Jump to content
Sign in to follow this  
zeke

Anyone using TI-RTOS?

Recommended Posts

I have been researching TI-RTOS and now I am wondering if anyone is really using it.

 

Here's the Wikipedia article: http://en.wikipedia.org/wiki/SYS/BIOS

 

Apparently, it has the BSD license now.

 

Can anyone tell me their experience of working with it?

Is it worth it to climb the learning curve?

Share this post


Link to post
Share on other sites

Additionally, I think it will run only on the 5529. I'm not sure why but that is the vibe I am picking up from the TI-RTOS docs.

Share this post


Link to post
Share on other sites

Additionally, I think it will run only on the 5529. I'm not sure why but that is the vibe I am picking up from the TI-RTOS docs.

5529 does have enough resources for a typical sort of app that would necessitate using an RTOS in the first place, but it won't be very fast.  

 

1. MSP430 just isn't designed to work with threads.  This is not a knock on SYS-BIOS per se, but it is a fact of life when choosing an RTOS for MSP430.  If you can do it with cooperative tasking, things will work more efficiently.  Last I checked, there were only two RTOS'es for 430 that use cooperative tasking in a way that actually supports real-time operations.  One of them is special-purpose.  The other is Nano-RK.  I'm not sure if Nano-RK is still supported, or not.  Maybe the latest versions of SYS-BIOS support something like this -- admittedly I haven't kept up.

 

2. SYS-BIOS uses pretty big ISR wrappers.  On a system with only global interrupt (MSP430), this can lead to latency issues.  In worse case it can lead to race conditions all-over-the-place, but I trust the developers have gotten that worked-out.  

 

3. Generally speaking, don't try to use an RTOS to implement I/O drivers on any low-power MCU.  It will be too slow, unless your I/O is also really f-ing slow.

Share this post


Link to post
Share on other sites

I'm at chapter 8 of the Introduction to the TI-RTOS Kernel Workshop and I'm using a LaunchPad Stellaris for the examples and labs.

 

The workshop is well done and each chapter requires about 2 hours: 1 hour for the video and another for the lab. 

 

The CCS6 is painfully slow on my laptop powered by an i5 2.5MHz with plenty of RAM, even for the examples that only blink a LED.

 

No surprise, the workshop focuses on the TI-RTOS, but it also provides some background on RTOS. However, how to analyse and design a RTOS-based project is not part of the workshop and thus requires another course.

Share this post


Link to post
Share on other sites

I blasted through the modules.  By "blasted" I mean that I fast forwarded through the slides, but I'm an embedded RTOS expert, so to speak, so this was enough.

 

It's clear TI has sunk a *ton* of money into this.  Mostly that's a good thing.  On the other hand, it's also clear that all of the tools they have built are designed to prevent you from ever porting or easily using it with anything other than a TI chip.  I would be really careful with that, because things happen in the semiconductor industry, and TI isn't always where you want to be (sacrilege... I know).  If you have a goal to do something on the extreme side, e.g. *lowest power* or *cheapest* or *fastest frame rate* (etc) or some other extreme performance metric, by no means do you want to use this.  In that case you need something more portable.  Otherwise, no big deal, you can probably stay inside the TI stable without trouble.

 

Another thing I noticed is that TI-RTOS is fairly well abstracted across HW.  This means that it either has multiple, *very different* ports or that it is equally crappy on all the platforms.  I'm not sure which.  As a side-note, you can find embedded RTOSes that started with MSP430, others that started with Cortex-M, others that started with 8bit archs.  There's a legacy that makes them optimized for the original arch.  Contiki 3, for example, is in development and undergoing a massive effort to move all the legacy AVR8 ideology into ARM-CM ideology.  The take-home message is that it's a massive effort.  ChibiOS is CM-centric.  OpenTag is an exokernel (and a big mess) with entirely separate kernels for the different archs it supports, but nonetheless there's a clear MSP lineage.  Considering the  hoopla on nested interrupts, I wonder what was the origin of TI-RTOS (SYS/BIOS).  No-one targeting ARM is going to make a fanfare about nested interrupts.

 

Finally, my most important piece of advice is also the one I made first: don't put I/O drivers in tasks (or threads).  Module 3 discusses the implementation of an 100kHz Audio driver inside a task.  GAG.  This means the scheduler is going to run *A LOT*.  Since it is a tickless scheduler, it also isn't a small piece of code.  Just be aware of that.  I'm not sure this is the best ideology for low speed MCUs.  What I do is build a driver that exists outside the scheduler, and when it completes enough I/O to qualify as a "packet," it will preempt the task which processes the packet.  This is very efficient, because the scheduler only has to run once per packet.  It is harder to write the driver, sure, but often this is the difference between something working and not-working on a chip like MSP430.

Share this post


Link to post
Share on other sites

I have been trying to create a project using TI-RTOS under IAR Tools, to no avail. Here is my latest error - does anyone know how to fix this? (No, I cannot go to CCS, because the company uses IAR.)

 

Building configuration: TiRtos - Debug
Updating build tree...
Performing Pre-Build Action
Error while running "c:/ti/xdctools_3_30_01_25/xs" --xdcpath="c:/ti/tirtos_msp430_2_00_01_23/packages;c:/ti/tirtos_msp430_2_00_01_23/products/uia_2_00_00_28/packages;;c:/ti/tirtos_msp430_2_00_01_23/products/bios_6_40_01_15/packages;" 
iar.tools.configuro -c "c:\Program Files (x86)\IAR Systems\Embedded Workbench 7.0\430" --cc "c:\Program Files (x86)\IAR Systems\Embedded Workbench 7.0\430\bin\icc430.exe" --device "MSP430F5529" --compileOptions "-f C:\
f5529tiRtos/configPkg/compiler.opt.defs --diag_suppress=Pa050 -DMSP430WARE -Ic:/ti/tirtos_msp430_2_00_01_23/products/MSP430Ware_1_80_01_03a/driverlib/MSP430F5xx_6xx -o C:\f5529tiRtos\Debug\Obj\ --no_cse --no_unroll --no_inline 
--no_code_motion --no_tbaa --debug -D__MSP430F5529__ -e --double=32 --dlib_config \"c:\Program Files (x86)\IAR Systems\Embedded Workbench 7.0\430\lib\dlib\dl430xlsfn.h\" --core=430X --data_model=small -Ol --multiplier=32 
--multiplier_location=4C0 --hw_workaround=CPU40 --hw_workaround=CPU39 --segment __data16=DATA16 --segment __data20=DATA20 --code_model=large" --linkOptions "-f C:\f5529tiRtos/configPkg/linker.cmd 
c:/ti/tirtos_msp430_2_00_01_23/products/MSP430Ware_1_80_01_03a/driverlib/iar-MSP430F5529/iar-MSP430F5529.r43 -o C:\f5529tiRtos\Debug\Exe\TiRtos.d43 \"-Ic:\Program Files (x86)\IAR Systems\Embedded Workbench 7.0\430\LIB\\\" -f \"c:\
Program Files (x86)\IAR Systems\Embedded Workbench 7.0\430\config\linker\lnk430F5529.xcl\" -f \"c:\Program Files (x86)\IAR Systems\Embedded Workbench 7.0\430\config\linker\multiplier32_loc2.xcl\" -D_STACK_SIZE=200 -rt \"c:\Program 
Files (x86)\IAR Systems\Embedded Workbench 7.0\430\lib\dlib\dl430xlsfn.r43\" -D_DATA16_HEAP_SIZE=0 -s __program_start -D_DATA20_HEAP_SIZE=0" --profile release --projFile "C:\f5529tiRtos\TiRtos.ewp"
 
Total number of errors: 1
Total number of warnings: 0
 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×