ChibiOS 3.0 contains numerous improvements and changes. The API is very similar to the 2.6.x branch but there are some differences that should be considered.
The API is mostly the same but a new function class has been introduced, the “X” class. X-class functions or macros are meant to be invoke-able from any context, ISR or Thread, within or without critical zones.
Some of the existing functions have been renamed in order to match the new semantic, if you see a compile error regarding a missing function or macro first check if the function has been renamed by adding an “X” at the end of the name.
Some functions have been renamed for consistency.
|ChibiOS/RT 2.6.x||ChibiOS/RT 3.0.x|
All types have been renamed to not use camel-case and have an “_t” suffix, for example:
The bool_t type has been removed in order to converge to the standard “bool” type defined in stdbool.h.
Now Virtual Timers functions check if the timer is already armed before performing the operation. The functions affected are:
New functions have been added that have the same behaviour of the previous ones:
Now Virtual Timers also support a “tickless mode”, this means that there is no more a system tick, interrupts are triggered only when strictly required. There only a difference between the tickless mode and the normal mode, in tickless more the time counter continues to run even while in a critical zone because it is handled by an HW counter.
The configuration options prefix has been changed from “CH_” to “CH_CFG_”.
In ChibiOS 3.0 the HAL is no more dependent on the RT kernel, it talks with the operating system using an abstraction layer called OSAL (Operating System Abstraction Layer). This makes possible to use the HAL with other RTOSes, like NIL, or even without an RTOS at all, an OSAL can also be implemented on a bare metal machine.
Because the new architecture there are new rules about writing device drivers. The driver structure is almost the same but: