Go Down

Topic: ChibiOS/RT 2.4.1 RTOS update (Read 3 times) previous topic - next topic

fat16lib

I have updated the ChibiOS/RT library to version 2.4.1.

This library is a simple way to use the ChibiOS/RT RTOS on 328 and Mega Arduinos.

The download is ChibiOS20120529.zip at http://code.google.com/p/beta-lib/downloads/list.

ChibiOS 2.4.1 is a maintenance release fixing all known bugs. More details are available in the release note at the ChibiOS website.

I have made minor changes to examples and included a new version of the SdFat library.

obiwanjacobi

Nice, new version. Thanx.

Do you know if its possible to let the OS do cooperative multitasking?
I remember reading that somewhere, but I can't find it again.

fat16lib

I don't think ChibiOS is the best choice but you can arrange for cooperative multitasking.

Quote
#define CH_TIME_QUANTUM   20

Round robin interval.

This constant is the number of system ticks allowed for the threads before preemption occurs. Setting this value to zero disables the preemption for threads with equal priority and the round robin becomes cooperative. Note that higher priority threads can still preempt, the kernel is always preemptive.

Note:
    Disabling the round robin preemption makes the kernel more compact and generally faster.

Definition at line 70 of file chconf.h.

Referenced by _scheduler_init(), chSchDoReschedule(), chSchGoSleepS(), and chSchWakeupS().

pito

HI folks, there is a nice subproject starting at Giovanni - Nil Rtos.
It is a very small and simple variant of chibios, intended for small mcus, where CM0 is considered a high end.
Maybe useful for avr as well.

http://forum.chibios.org/phpbb/viewforum.php?f=12&sid=7e0b515caae252657af6351384d1419a

Preliminary results (95% complete code, now it compiles).
Total image size: 1284 bytes
Divided as:
Appl.Main: 76 bytes
Vectors: 192 bytes
NVIC code: 156 byes <- To be removed from the code
CRT0: 188 bytes
CM0 Port: 140 bytes
Kernel: 492 bytes
Talking about a real, usable, kernel with threads, semaphores, timeouts, delays, system time, without even start optimizing.



p.

fat16lib

Nil Rtos examples look interesting.  Many Arduino projects need two or three threads and this should work well with Nil Rtos.

Looks like all development is with ARM CM0 but it should not be too hard to port to AVR and make an Arduino library.

There are many tiny systems like this but Giovanni Di Sirio is a real expert in embedded systems so I expect this will be a very good OS.

Designing a good general RTOS takes a lot of experience and talent and Giovanni has both.  I worked on some the largest embedded systems in physics research for 40 years.  The last system I did design work for was the LHC Atlas experiment at CERN which may have discovered the Higgs Boson.

I think ChibiOS is one of the best free systems available so it will be worth trying Nil Rtos on Arduino.

Go Up