[TriEmbed] RTOS discussion/favorites

jonjwolfe at anibit.com jonjwolfe at anibit.com
Sun Aug 10 21:11:11 CDT 2014


I've had a decent amount of experiance with ChibiOS, I really like it.  
I've only used it on STM32 Cortex M-3/4 processor though, which it has  
direct ports for. Chibi is nice in that it has really sophisticated  
support at least for ARM Cortext chips, and there is an Eclipse  
plug-in that works over gdb to let you see OS specific properties,  
such as threads, thread states, locks, and per thread stack usage.

The API is really well laid out, and there are debug builds you can  
enable where the API calls let you know if you call the wrong type of  
API. For example only a subset of the API are legally callable from an  
interrupt service routine, the in debug build will detect the invalid  
call and give you an assert or kernal panic instead of just freezing  
or corrupting data.

There are "HAL" (Hardware Abstraction Layer) drivers for most of the  
common types of hardware you see on embedded
processors, such as Serial, TWI, SPI, CAN, etc. On the STM32, Chibi  
supports the DMA hardware which let me write blocks of memory to an SD  
card while the cpu services other threads. I don't think I would have  
tried to tackle DMA myself just looking at the datasheet.

It also has support for your regular collection of threading goodies,  
like mutexes, semaphores, message passing, timers.

There are also some add-on libraries for FAT filesystem support,  
networking, graphical LCD's, and even a simple system shell over  
serial that you can add your own commands to.

All the hardware specific parts are very well segregated, and writing  
your own driver probably wouldn't be to hard. I wrote some graphical  
LCD drivers, but that was a while back when the Graphics add on was in  
it's infancy.


The Home page for ChibiOS says it supports AtMega chips, but I've  
never tried to use it with those, FreeRTOS seems more like it makes  
AVR's a "first class" target platform.


Quoting Jon Wolfe <jonjwolfe at yahoo.com>:

> ----- Forwarded Message -----
> From: Charles West <crwest at ncsu.edu>
> To: TriEmbed <triembed at triembed.org>
> Sent: Friday, August 8, 2014 11:55 AM
> Subject: [TriEmbed] RTOS discussion/favorites
>
>
>
> Hello,
>
>
> Real time operating systems can make some of the more complicated  
> embedded software tasks a lot simpler.  From what I've seen, it  
> makes it a lot more like threaded POSIX programming (with mutexes,  
> semaphores, signals, etc).  Given their utility, I was wondering if  
> people might be willing to share their experiences with different  
> RTOS implementations and what they thought about the overall quality  
> of different projects.
>
>
> To start:
> I've recently worked with FreeRTOS on some projects.  It is open  
> source and seems reasonably popular.  It worked pretty well for my  
> project (however, make sure that you set the interrupt priority of  
> any interrupts that call FreeRTOS functions to be less than that of  
> the scheduler or the system will be unstable). 
>
> Once the interrupt priorities were correct, it delivered on its  
> guarantees and worked well.  It is supported on many different  
> microcontrollers, but sometimes only for specific IDEs/compilers.   
> Its main downside is that it appears to be somewhat difficult to  
> port to a new platform ("non-trivial" as it says in the docs).
>
> I would love to have one RTOS that I can port and use across most  
> platforms.  The Atom Threads RTOS looks interesting since it says it  
> is "Highly portable ANSI C code not tied to any compiler", but I  
> haven't tried it yet.
>
>
>
>
> Thanks,
> Charlie West
>
> _______________________________________________
> Triangle, NC Embedded Computing mailing list
> TriEmbed at triembed.org
> http://mail.triembed.org/mailman/listinfo/triembed_triembed.org
> TriEmbed web site: http://TriEmbed.org






More information about the TriEmbed mailing list