Sunteți pe pagina 1din 44

TI-RTOS Update: June 2014

Nick Lethaby, OS Product and Partners Manager

Agenda
What is TI-RTOS
TI RTOS components, product history, licensing, business model

TI-RTOS device/board support

Toolchain support
TI-RTOS component overview and update
Kernel/drivers, power management, networking, USB, file system

Roadmap
Positioning TI-RTOS to potential customers
Resources
Demo

TI-RTOS History & Resourcing


TI-RTOS is based on a mature, stable code base backed by an
experienced development team
Development team of 12 engineers
Many decades of experience with code base
Still support kernel versions over 10 years old
Based in Santa Barbara, CA
SSL
Integrated
HTTP & file
system
HTTP
Server for
wireless

Full RTOS
Drivers
Board
initialization
Examples
CCS

TM4C129x
SNTP
IAR
GCC
CC3000
driver

StellarisWare (USB)

TI-RTOS
1.00

TI-RTOS
1.20

TI-RTOS
2.00

TI-RTOS
2.10

2007

Jul 2012

Nov 2013

May 2014

Q4 2014

CC3200
MSP430
Watchdog

NDK (TCP/IP)

1998

DSP/BIOS

2010

SYS/BIOS

TI-RTOS Components
Standard, cross-platform APIs
TCP/IP
wired,
wireless
(CC3xxx)

USB
Host,
Device

FAT File
System

IPC
Multicore
communication

MSC, HID, CDC

Real-time Kernel
Debug and instrumentation
EMAC, USB, SD, SPI, UART, I2C, GPIO, Watchdog Drivers

Board Initialization

TI-RTOS Component Support by Family


Kernel

C28x

C28x+M3

TM4Cx

MSP430

CC3200

CC2600

EA

Wired Networking
Wi-Fi (CC3xxx)

Y
Y

BLE

EA

USB

FAT File System

EA

Drivers/Board
Initialization

EA

TBA

EA

EA

Power Management
Instrumentation

IPC

TI Confidential NDA Restrictions

How is TI-RTOS Delivered?


In TI-RTOS 2.0 and later, TI-RTOS product downloads are available
for each supported device family
C2000, Tiva C, MSP430, CC3200, C6000, Sitara

TI-RTOS can be downloaded via:


The CCS Applications Center (this is new in CCS 6.0)
Note that neither SYS/BIOS nor TI-RTOS is bundled with CCS anymore

Directly from: http://softwaredl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/index.html (All versions)


or www.ti.com/tool/ti-rtos (Latest version only)

TI-RTOS is completely free


No development or per-project license fees, no run-time royalties
Both source code and pre-built binaries are provided

All components (except USB stack) are open source (BSD style
license) so no proprietary lock-in

Platforms Supported by Full BSPs


Concerto (28M3x)
TMDXDOCK28M36
TMDXDOCKH52C1

Tiva C

EK-TM4C123GXL
DK-TM4C123G
DK-TM4C129X
EK-TM4C1294XL

MSP430
MSP-EXP430F5529LP
MSP-EXP430F5529
MSP-EXP430FR5969

CC3200
CC3200-LAUNCHXL

CC2600/CC1300
Early access now via BU
TI-RTOS Kernel is in ROM

All C2000 devices have basic TI-RTOS Kernel support


TI Confidential NDA Restrictions

IDE/Toolchain Support
Code Composer Studio v6.0 or later (All devices)
Earlier CCS releases are supported by older versions of TI-RTOS
Includes example projects and plug-in for TI-RTOS-aware debug
Includes support for System Analyzer and GUI Composer

IAR Embedded Workbench (MSP430/ARM only)


Embedded Workbench for ARM v7.20
Embedded Workbench for MSP430 v5.60.7
Includes example projects and plug-in for TI-RTOS-aware debug

GCC (ARM only)


gcc-arm-none-eabi-4_7-2103q3
Makefile support only
CCS includes this version of GCC if cross debug support is required
TI does not provide GDB cross-debugger solutions for MCUs

IAR EW TI-RTOS-aware Debug

CCS System Analyzer TI-RTOS Support

Displays for thread execution timeline and CPU load


10

GUI Composer: See & Control


Create GUI applications that provide:
Visibility into what is happening in the target application
The ability to control target variables

GUI Composer Integration with TI-RTOS


CCS provides widgets
Knobs, graphs, meters, status lights, sliders, edit
boxes

GUI application requests data for display or


values to be written to the target

Web server
Debug
Server

JTAG

TI-RTOS provides a pre-integrated monitor


solution that enables GUI Composer to
communicate with the embedded application
using its UART driver

TI-RTOS
UART
Driver

Uses JTAG or a request to a monitor service running


on the device

UART
Mon

TI-RTOS Kernel, Power Manager, & Drivers


Standard, cross-platform APIs
TCP/IP
wired,
wireless
(CC3xxx)

USB
Host,
Device

FAT File
System

IPC
Multicore
communication

MSC, HID, CDC

Real-time Kernel
Debug and Instrumentation
EMAC, USB, SD, SPI, UART, I2C, GPIO, Watchdog Drivers

Board Initialization

TI-RTOS Kernel
Designed for real-time applications
Scheduler is deterministic so kernel system calls complete operation
in a predictable time
Interrupt latency is low
Zero-latency Interrupts enable kernel to be used in hard real-time
applications

Low footprint to meet MCU memory constraints


Kernel is highly configurable so unneeded functions are excluded
Static configuration enables very low footprints by eliminating need
for heaps or create/delete calls if desired

Detailed collateral for real-time design and optimization


Timing & sizing benchmarks available for each release
Application note on minimizing kernel footprint
Minimal kernel configuration example

14

Kernel Services
Intertask
Communication:
Events, Mailboxes,
Semaphores, Gates

Debug &
Analysis:
Logging,
diagnostics,
Hooks, stack
checking

Device-specific
services: Interrupt and
power management,
timers, exception
handling

Memory
Managers:
Heap, fixedsized buffers

Multi-threading:
Tasks, Software Interrupts,
Clocks, Idle

15

TI-RTOS Power Management


TI-RTOS (as SYS/BIOS and DSP/BIOS) has a long history of power
management support in OMAP and DSP devices
TI-RTOS power management capabilities are best-in-class
TI-RTOS power management features vary based on device capabilities

Benefits of RTOS-based design in low-power applications


Elimination of polling from drivers
Inherent mechanism to identify when CPU is idle

The RTOS is the natural place to control power management


To keep an accurate time base, RTOS must know if timers are to be clockgated
Since several peripherals may depend on one power domain, the system
must track which peripherals are active to disable the power domain safely
RTOS and drivers can track this

The OS knows when the application is doing nothing and is aware of some
future actions (time-outs, periodic functions)

TI-RTOS Power Management by Device


MSP430 (available today)
CPU idling, tick suppression
Full TI-RTOS power management framework not applicable due to
hardware features being unavailable (e.g. limited clock gating)

CC2600 (under development today)


Tick suppression
Full TI-RTOS power management framework
Clock gating, sleep modes, power policy, and associated APIs

CC3200 (planned)
Tick suppression, TI-RTOS power management framework
Not available with initial CC3200 TI-RTOS release

MSP432 (planned)
Tick suppression, TI-RTOS power management framework
TI Confidential NDA Restrictions

Tick Suppression
Tick suppression eliminates most OS tick timer interrupts
in power saving modes while keeping time base accurate
Implemented in TI-RTOS clock module
Configurable option, no programming required
GPIO asserted every 1 msec, GPIO asserted in heartbeat clock tick

No Suppression

With Suppression

TI-RTOS Power Management Framework


A framework to enable customers to easily leverage powersaving HW features within their applications
Coordinates PM actions across application, drivers, and OS
Significant sleep transitions decided by policy manager
User application may control these if desired

Insulates customers from low-level and often complex HW controls


Optimized to minimize footprint in MCU/WCS devices
Application Tasks
network

control

UI

TI-RTOS KERNEL
driver

Clock

driver

MCU

power
policy

Power
Manager
(Power)
CLKG

CC26xx TI-RTOS Power Management


TI-RTOS Drivers will be power-aware
Drivers declare dependencies on peripheral clocks and power
domains
When OS identifies an opportunity to move to a low-power state, it
will notify the drivers so they can suspend/resume gracefully

CC26xx BLE stack will be power-aware


Stack declares constraints to prevent power-downs while radio
communication is active

Power Policy is provided to achieve aggressive power savings


No user programming is required to achieve these
Runs when IDL process is entered
User may customize if needed
TI Confidential NDA Restrictions

C26xx Power Management APIs


Function

Power_releaseDependency

Purpose
Declare a dependency upon a power-manageable
resource
Release a previously declared dependency

Power_setConstraint

Declare an operational constraint

Power_releaseConstraint

Release a previously declared constraint


Transition the CC26xx to a new sleep state:
STANDBY (retention of MCU logic, other
domains OFF, uLDO)
POWERDOWN (MCU logic OFF, requires
context save/restore to resume)
SHUTDOWN (lowest OFF state, app reboot
required)
Register a function to be called on specific power
events
Unregister for event notifications

Power_setDependency

Power_sleep

Power_registerNotify
Power_unregisterNotify

TI Confidential NDA Restrictions

TI-RTOS Drivers & BSP Components


TivaWare, MSP430Ware
Low-level peripheral
APIs specific to a device

TI-RTOS Drivers
Standard cross-platform
APIs (UART_write,
UART_read, )
Interrupt-driven, threadsafe

TI-RTOS board.c
Initializes peripheral
drivers (which interrupt
vectors, how many
UARTs, )
Sets pin-muxing

22

Example TivaWare UART APIs


These APIs are used by the TIRTOS UART driver to control the
peripherals functionality
The TivaWare APIs handle the
hardware abstraction into the
peripherals registers

void UARTDisable(uint32_t ui32Base);


void UARTFIFOEnable(uint32_t ui32Base);
void UARTFIFODisable(uint32_t ui32Base);
void UARTEnableSIR(uint32_t ui32Base, bool
bLowPower);
void UARTDisableSIR(uint32_t ui32Base);
bool UARTCharsAvail(uint32_t ui32Base);
bool UARTSpaceAvail(uint32_t ui32Base);

Dozens of APIs for each


peripheral

int32_t UARTCharGetNonBlocking(uint32_t ui32Base);


int32_t UARTCharGet(uint32_t ui32Base);
void UARTBreakCtl(uint32_t ui32Base, bool bBreakState);
bool UARTBusy(uint32_t ui32Base);
void UARTIntRegister(uint32_t ui32Base, void
(*pfnHandler)(void));
void UARTIntUnregister(uint32_t ui32Base);

23

TI-RTOS Driver APIs


Each driver has a standard, documented API set to enable easy application
portability. These are the UART driver APIs*:
Void UART_init(Void);

// initializes the drivers data


// structuresnot HW registers.
Void UART_Params_init(UART_Params *params);
UART_Handle UART_open(unsigned int index, UART_Params
*params);
Void UART_close(UART_Handle handle);
Int UART_read(UART_Handle handle, const void *buffer,
size_t size);
Int UART_write(UART_Handle handle, void *buffer, size_t
size);

*There are four other APIs that would be used rarely

24

TI-RTOS Driver Implementation


Here is the (greatly simplified) pseudo-code for the UARTTiva_read
function. Notice both TI-RTOS Kernel and TivaWare calls.
Int UART_write(UART_Handle handle, void *buffer, size_t size)
{
Semaphore_pend(mutex) //Use semaphore for thread-safe access
UARTCharPutNonBlocking() // Write character to UART
......
Semaphore_pend(writeComplete) // Use second semaphore to block until ISR
completes
Semaphore_post(mutex)

25

board.c File: Peripheral Initialization


void EK_TM4C1294XL_initUART(void)
{
/* Enable and configure the peripherals used by the UART0 */
SysCtlPeripheralEnable(SYSCTL_PERIPH_UART0);
GPIOPinConfigure(GPIO_PA0_U0RX);
GPIOPinConfigure(GPIO_PA1_U0TX);
GPIOPinTypeUART(GPIO_PORTA_BASE, GPIO_PIN_0 | GPIO_PIN_1);

/* Enable and configure the peripherals used by the UART2 */


SysCtlPeripheralEnable(SYSCTL_PERIPH_UART2);
GPIOPinConfigure(GPIO_PD4_U2RX);
GPIOPinConfigure(GPIO_PD5_U2TX);
GPIOPinTypeUART(GPIO_PORTD_BASE, GPIO_PIN_4 | GPIO_PIN_5);
}

UART_init();

The board.c file does board-specific peripheral initialization occurs:


Peripheral clock rates and power control
Which interrupt vector is a peripheral associated with
Pin-muxing, number of peripheral instances (e.g. 4 or 6 UARTs)
26

TI-RTOS File System & USB Overview


Standard, cross-platform APIs
TCP/IP
wired,
wireless
(CC3xxx)

USB
Host,
Device

FAT File
System

IPC
Multicore
communication

MSC, HID, CDC

Real-time Kernel
Debug and instrumentation
EMAC, USB, SD, SPI, UART, I2C, GPIO, Watchdog Drivers

Board Initialization

USB Stack

M
S
C

H
I
D

C
D
C

H
I
D

Class Driver
Application
Host

Device

Hardware Adaptation Layer


SD card, mouse,
UART, .
Drivers

DMA USB
Driver Driver

C
O
N
F
I
G
U
R
A
T
I
O
N

USB Key Features


Uses TivaWare USBLIB unmodified
MSC Host Class Driver
HID Host & Device Class Drivers

CDC Device Class Driver


Examples for each class driver
Example of using MSC Host Driver
under FAT file system

Hardware

28

File System
We use open source software called FatFs
The FAT file system is shipped within SYS/BIOS

Key features:
Both native and C RTS file APIs may be used
C RTS APIs (fopen (), fread (), fwrite (), ) are plugged into file system

Supports FAT12, FAT16 and FAT32


Supports 8.3 format file name.

Long file names (VFAT) are not supported in our default build
Customer can rebuild FatFS sources to add this feature
TI does NOT indemnify against VFAT patents

Drivers options:
SD Card (via SPI driver)
USB flash drive (via USB MSC host)

29

TI-RTOS Networking Overview


Standard, cross-platform APIs
TCP/IP
wired,
wireless
(CC3xxx)

USB
Host,
Device

FAT File
System

IPC
Multicore
communication

MSC, HID, CDC

Real-time Kernel
Debug and instrumentation
EMAC, USB, SD, SPI, UART, I2C, GPIO, Watchdog Drivers

Board Initialization

TI-RTOS TCP/IP Stack


TCP/IP Key Features
S
N
T
P

H
T
T
P

T
E
L
N
E
T

T
F
T
P

D
H
C
P

D
N
S

Supports both IPv4 and IPv6


DHCP Client and Server
Standard BSD Sockets interface

Standard BSD Sockets Interface

Zero-copy sockets interface available

UDP

Highly configurable to meet footprint


constraints

Route
Manager

TCP

IGMP

IP

IF
Manager
NAT

ICMP

ARP

New Features in TI-RTOS 2.10

Ethernet IF

SSL/TLS (Q3 2014)

Hardware Adaptation Layer


Ethernet Serial
Packet
Port
Driver
Driver

Timer
Driver

Hardware

User
LED
Driver

HTTP Server over both wired and


wireless

HTTP server integrated with FAT file


system (can now get web pages from SD
cards, USB flash drives, )

31

What is SSL / TLS?


These are protocols that enable secure network connections
Current SSL / TLS / DTLS Versions
Notes:
1995
1996

SSL 2.0
SSL 3.0

1999
2006
2008

TLS 1.0
TLS 1.1
TLS 1.2

2012

DTLS 1.2

SSL 2.0 is insecure


SSL = Secure Sockets Layer
TLS = Transport Layer Security
DTLS = Datagram TLS

DTLS 1.0

Copyright 2014 wolfSSL

SSL/TLS Support
We have licensed and ported CyaSSL from WolfSSL
Business model
Not free of charge to the customer
US$2,900 for a license to deploy in a single customer product

Part number: TIRTOS-SSL-SRC


Customer must purchase it through e-store

Support model
TI will provide front-end support and can work customer issues with
help from WolfSSL support
Customers can also ask post questions to WolfSSL support forums
http://www.wolfssl.com/forums/
Note that in-depth support direct from WolfSSL will require customers to
purchase support contract with WolfSSL

33

CyaSSL Technical Overview


Optimized for embedded (20x smaller than OpenSSL)
Minimum footprint size of 20-100kB
Minimum RAM usage: 1-36kB

Supports latest TLS standards and broad range of ciphers


All versions up to TLS 1.2 and DTLS 1.2
MD2, MD4, MD5, SHA-1, SHA-2, SHA-3,
RIPEMD

Hash Functions

DES, 3DES, AES, Camellia

Block Ciphers

ARC4, RABBIT, HC-128

Stream Ciphers

AES-GCM, AES-CCM

Authenticated Ciphers

RSA, ECC, DSS, DH, EDH

Public Key Options

HMAC, PBKDF2

Password-based Key Derivation

Copyright 2014 wolfSSL

Roadmap
Release
Version
Device &
Platform
Supported

1.21

2.00

2.00.02

2.10

Device

Dev Platform

Device

Dev Platform

Device

Dev Platform

Concerto

TMDXDOCK28M36
TMDXDOCKH52C1

Concerto

TMDXDOCK28M36
TMDXDOCKH52C1

Concerto

TMDXDOCK28M36
TMDXDOCKH52C1
Aumento SDK

TM4C123

EK-TM4C123GXL
DK-TM4C123G

TM4C123

EK-TM4C123GXL
DK-TM4C123G

TM4C123

EK-TM4C123GXL
DK-TM4C123G

TM4C129

DK-TM4C129X

TM4C129

DK-TM4C129X
EK-TM4C1294XL

TM4C129

DK-TM4C129X
EK-TM4C1294XL

MSP430

MSP-EXP430F5529LP
MSP-EXP430F5529
MSP-EXP430FR5969

F5529

C2800*

All

C2800*
CC3200

New Devices

MSP-EXP430F5529LP
MSP-EXP430F5529
MSP-EXP430FR5969
All
CC3200LAUNCHXL

CC2600
MSP432

New Features

IAR project and TI-RTOS-aware


debug support, GCC support

Per-ISA TI-RTOS products for MCU,


Sitara, and DSP

HTTP Client/REST,
HTTP server over WIFI & wired

SNTP

GUI Composer UART monitor

RTC, PWM drivers


Enhanced low power
modes

Schedule

Dec 20 2013

Apr 25 2014

June 25 2014

Q4 2014

*Non-Concerto C2000 devices do not have driver & BSP support


35

TI Confidential NDA Restrictions

Positioning TI-RTOS to Customers


When selling a MCU solution to a customer that involves TI-RTOS,
there are a number of questions or objections that may come up
Questions and objections we have encountered are:
Is TI-RTOS suitable for use in safety-certified applications?
How does TI-RTOS compare to FreeRTOS (or other commercial third-party
solutions)?
How does TI-RTOS compare to Freescales MQX offerings?
How committed is TI to TI-RTOS?
We dont want to get locked to a software platform that is proprietary to a
particular silicon vendor
An RTOS has too much overhead for our application

We will discuss how to handle such situations

TI Confidential NDA Restrictions

36

Positioning TI-RTOS to Customers


Objection: An RTOS has too much overhead for our application
Background: An RTOS is generally useful in more complex
applications that need to deal with multiple functions (especially
communication stacks) and interrupts. Generally using an RTOS in
devices with 32KB of flash would not make sense. Some engineers
simply dont want to have to deal with code they havent written.
How to respond: Suggest TI-RTOS if the device under consideration
has 128KB of flash or more. For higher-end device like Concerto or
TM4C129x, TI-RTOS should be strongly recommended (unless
customer is already using third-party RTOS). Find out how many
interrupts sources, different functions, and connectivity stacks the
application will need. When discussing RTOS overhead, remind the
customer that they will likely need to write much of the code that an
RTOS provides (e.g. ISRs, drivers, some kind of scheduling loop, ).
TI Confidential NDA Restrictions

37

Positioning TI-RTOS to Customers


Question: How does TI-RTOS compare to FreeRTOS (or commercial
third-party solutions)?
Background: Questions like this must be handled carefully. FreeRTOS
and other third-party RTOS solutions are provided by TIs ecosystem
partners. Therefore negative comments about them should be avoided.
Response: Explain that TI does not provide detailed technical
comparisons against partner products. In general, the more likely
reasons a customer would choose TI-RTOS are:
Its free, including connectivity stacks and board support packages (the
stacks associated with FreeRTOS typically cost money)
TI-RTOS solutions typically include an integrated BSP
It is well integrated with CCS (which is also low-cost)
Single point of support for silicon and software
Often available early in the silicon release cycle
TI Confidential NDA Restrictions

38

Positioning TI-RTOS to Customers


Question: How committed is TI to TI-RTOS?
Background: Most customers in the MCU space are not familiar with
the long history of TI-RTOS in the DSP space. Use the TI-RTOS
History and Resourcing slide as evidence of our proven long-term
commitment and the fact we have an experienced development team.
Question: We dont want to get locked to a software platform that is
proprietary to a particular silicon vendor:
How to respond: Some customers only want open-source solutions,
while others are wary of being locked into software specific to one chip
vendor. To address these, make these points: TI-RTOS in entirely
BSD-licensed except for the USB stack. So the customer can port the
code to any device they like; TI-RTOS works with the IAR and GCC
toolchains which support silicon from numerous vendors; it is fairly easy
to abstract the application from OS-vendor specific calls
TI Confidential NDA Restrictions

39

Positioning TI-RTOS to Customers


Question: Is TI-RTOS suitable for use in safety-certified applications?
Background: This is a complex question, since safety standards have
multiple levels. Application that must conform to the most stringent
safety standards (e.g. SIL-3, FDA Class III, ASIL D, DO-178 levels A or
B) must be treated differently to those that only require a lower level of
safety certification.
How to respond: If the application requires a high-level of safety
certification, they should not use TI-RTOS. We do not provide any of
the following: a pre-certified RTOS, a certification assistance package
that include extensive RTOS design and test documentation, formal
evidence of use in other certified applications, or access for customers
to audit our software processes. TI-RTOS MAY be useable depending
on the certification requirements. We provide the OS source code and
can provide test suites and test results if requested. Customer must
determine what is needed before selecting an RTOS.
TI Confidential NDA Restrictions

40

Positioning TI-RTOS to Customers


Objection: We are already using another RTOS.
How to respond: If a customer already has a application codebase
that uses another RTOS, they will often want to continue using that
RTOS. The best approach is to make the desired RTOS available on
the TI device. The TI third-party marketing teams will typically know if a
RTOS is available for their device or be able to investigate whether a
port can be done. If it transpires that a port cannot be done, then at that
point you can push TI-RTOS.
Question: How does TI-RTOS compare to Freescales MQX offerings?
How to respond: The products are comparable. MQX has a few
networking protocols (e.g. SNMP, SMTP) that we lack today.

TI Confidential NDA Restrictions

41

More Information
Product Manager: Nick Lethaby, nlethaby@ti.com
www.ti.com Web Page:
www.ti.com/tool/ti-rtos
Includes link for product downloads for customers
Includes link for product bulletin

e2e Forum - TI-RTOS Forum:


External: http://e2e.ti.com/support/embedded/tirtos/default.aspx

Wiki: http://processors.wiki.ti.com/index.php/Main_Page
Select TI-RTOS category

Download page:
http://softwaredl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/tirtos/index.html

42

Demonstration
TI-RTOS for the CC3200
Uses IAR Embedded Workbench for ARM (EWARM) and CC3200
Launchpad
We demonstrate an embedded web server that can be accessed from
wireless devices. We will also demonstrate TI-RTOS-aware tools in
EWARM.
We will demonstrate building a TI-RTOS project with IAR as well as TIRTOS-aware debugging

43

Summary
TI-RTOS enables MCU software developers to focus on their specific
areas of applications expertise
TI-RTOS provides connectivity software such as TCP/IP
TI-RTOS provides power management
TI-RTOS provides an integrated set of proven embedded software
components that are known to work together

TI-RTOS provides standard APIs to device drivers to abstract


applications from HW specifics
Applications are easily ported to the latest devices

TI-RTOS works with multiple development toolchains


TI-RTOS no-cost licensing removes commercial barriers to deployment
TI-RTOS is developed and supported by TI

44

S-ar putea să vă placă și