This forum is dedicated to feedback, discussions about ongoing or future developments, ideas and suggestions regarding the ChibiOS projects are welcome. This forum is NOT for support.
This API will allow to design RTOS-independent components. My idea is to focus the kernel development after version 2.4.0 on providing a compliant API, the new API would wrap/supplement the normal ChibiOS API not replace it, I still think it is particularly efficient and elegant.
This development is interesting because it will possible to design complex components (file systems, networking stacks) without have to use a vendor specific interface. For example a stack like lwIP could simply assume that API instead of defining its own RTOS wrapper.
Of course it is all very preliminary, the idea is good but there is still a chance they will screw it up
This means that you have to separate the Cortex MCUs from the non Cortex ones, because there is no CMSIS support for AVR or STM8. For me its no big deal because i dont use a RTOS on MCUs like this. And came to use STM32F1 even for simple Led blinking.
But when there is an CMSIS ChibiOS, then it could be a good deal to have a Look on C++ for Kernel an HAL API, then for Cortex MCUs C++ is no big deal and i think ChibiOS would get more like a real OS. The existing C++ Wrapper for the kernel API is an good step in this direction but not complete. When i am more familiar with ChibiOS then i would like to help with development, especialy for STM32F1 and F4.
I am pretty new to ChibiOS, i converted from Keil RTX and FreeRTOS. But i am getting more an more convinced by your concept. I mean things like the Serial driver and the Shell.
The Kernel would remain portable, it would not have any dependency on CMSIS, this API would be a Cortex-specific extension not available for other architectures.
About the C++ wrapper, it was an experiment that I did in order to assess the C++ overhead on embedded applications out of curiosity, it received far more interest than I expected, any help about defining a new C++ API is welcome, there is also a dedicated thread about that in this forum.
building CMSIS RTOS as an extension is a goog way i think. in the same manner CMSIS Math could be handled as well.
I have tested the C++ Wrapper on F4-Discovery and found it nice to handle. The probleme with the main stacksize is an issue that must besolved because its not obvious to the user.
But first i want to code a c-project in ChibiOS on F4-Discovery to get familiar with the concepts used in ChibiOS, its a way different from systems like Keil RTX which are mere Schedulers than OSs. if i am done with that i may be an help in wiriting an C++ wrapper for kernel an Hal.
I agree with most points made in the article and also with some of the comments.
I must say that I don't particularly like the CMSIS RTOS API, it requires things that in ChibiOS I intentionally left out and that would hurt performance and/or safety, others things are simply too limiting.
For example: 1) It is meant for Cortex only, ChibiOS (and others before) proved it is possible to have a platform independent API. 2) 7 priority levels, 6 excluding the idle priority, seriously? 3) Functions return error codes. I prefer not having error conditions because safety and in order to not let users in doubt (do I have to handle some errors by calling this?). ChibiOS strives to reduce uncertainty. 4) Thread termination/deletion, allowing such a thing means a system unsafe by design. 5) It allows to change priority of other threads (bad idea if you want to implement priority inheritance or similar mechanisms). 6) I didn't find anything about how to write ISRs, critical section primitives are unspecified. 7) The API is lacking a lot of common functionalities. 8) There are lots on unspecified things, for example the exact behavior of mutexes and other objects, round robin behavior. 9) more...
It also has some things that are interesting but it has evident shortcomings IMHO. Probably writing a Posix-like or OSEK-like API would be a better spent time, anyway, let's see how it evolves.
first of all sorry to bring up such an old thread. Secondly, good job on the OS, I am coming from FreeRTOS and like it so far
I have some libraries, especially USB Host Driver from ST which use the CMSIS RTOS files (cmsis_os.h/c). I really would like to avoid fiddling around in ST's code, so my question: Is there a cmsis_os.h/c pair for ChibiOS by now? Couldn't find it so far. If anyone has already written it, please share! Otherwise I would need to write them on my own