Page 1 of 3

Next generation RTOS

Posted: Thu Oct 13, 2011 1:22 pm
by Giovanni
Hi,

I've been thinking about this lately, ChibiOS is mature and improving so potentially it is reaching the point where you just have to do maintenance and new ports.

How could it evolve? what else could be done? I am proposing some potential evolutions for discussion. Some of the proposed solutions are not new in this forum (or the old one) and have been discussed in the past.

This is a list of possible directions, not necessarily mutually exclusive nor necessarily incompatible with current ChibiOS, vote and discuss.

Re: Next generation RTOS

Posted: Thu Oct 13, 2011 10:20 pm
by DrunkenDonkey
Voted for the moar features, but wasn't an easy vote. The other choice tempted with is the kernel-application model, it allows for small-sized binaries and the update issue. Technically, if the program is going to self-update now, I'm using half (yes, half) of the flash to store the new ver, then reset into the bootloader that reflashes the stuff, thats like the only way it is safe enough. But big, fat kernel code + small binary will allow for quite larger programs that can be done this way.

Re: Next generation RTOS

Posted: Fri Oct 14, 2011 7:24 am
by barthess
ChibiOS is very good for mid (and generally low) end MCUs now. For the heavier features like a separate applications or SMP is better to use something like uClinux with more powerfull hardware. I vote for concentrate on additional drivers/subsystems. Also, power saving is interesting feature too.

Re: Next generation RTOS

Posted: Fri Oct 14, 2011 5:32 pm
by brian360
I agree with barthess -- ChibiOS, with 'chibi' in it's name, should stay focused on small systems. I think having a complete, well designed, and tested HAL support for each microcontroller is a big win. And I'd say that "ultra-low power" is part of that feature-set (e.g., the STM32L and STM8L line) which is currently missing. Along with that would be improved integration for major subsystems, like TCP/IP, a filesystem, and a wireless stack (e.g., 802.15.4). I've got no problems with using 3rd party libraries for those (like I do with lwip right now; and I almost prefer it for the wider support), but it'd be nice to see more complete implementations, examples, and test suites of them on ChibiOS.

Re: Next generation RTOS

Posted: Wed Oct 19, 2011 4:07 pm
by liamstask
I'm still holding out for flash filesystem support :) This is something that would be a distinct differentiator from other current offerings, and would just happen to make my life a bit easier!

One other thing that would be nice: a simplified project structure (somehow)...not sure how this would work, but it can be quite overwhelming for new users to set up a ChibiOS project, and to maintain it as new versions are released. I think this is mainly due to the number of header files and options required. Again, I don't have a good suggestion here since the current approach provides quite a bit of flexibility, but at the cost of some complexity. Maybe a project management wizard could help, but that's a big undertaking as well.

Great to see how stable things are becoming!

Re: Next generation RTOS

Posted: Wed Oct 19, 2011 6:00 pm
by Giovanni
The person who started working on TFFS is having issues so the project is on hold.

About the other point, very true, ChibiOS is not so easy to integrate into an application because the complex architecture, at least I hope the whole thing is "logic" and it becomes easy after you understood the various layers.

Probably it would be possible to make it buildable into one or more pre-configured binary libraries with a single "merged" header. Basically this would separate the RTOS configuration and compilation from the subsequent integration into applications. It would be probably less flexible if you have to change configuration.

It would allow binary distribution too.

Re: Next generation RTOS

Posted: Thu Oct 20, 2011 6:41 pm
by barthess
Flexibility is very important thing in embedded programming (at least for me). My opinion, create more beginner guides instead of simplification.

ChibiOS has very good examples, but folder named "testhal". The name is misleading for beginners. I am wrote my own ADC code and only after that found example in "testhal". Renaming is not so good decision, my be better to place "warning" about that in documentation?

Re: Next generation RTOS

Posted: Sat Oct 29, 2011 1:33 am
by Xamusk
Another thing that may be considered is trying to implement the rest of the HAL to the other architectures. For example, implement ADC, PWM and SPI for AVR. For AVR specifically, the recent ChibiOS library for Arduino may fill most needs, but I'd really like some possible LPC210x port (though most likely the LPC214x port will do, even though it doesn't have many HAL features like the AVR). Also, USB for the AVRs which have hardware support would be great, even if just a hook to the LUFA library.

I actually voted for having a bootloader with separate apps. An USB bootloader would be great too, for chips which have it, though I admit that should be hard to implement, even though it's sort of useless to have, for example, a UART bootloader for a chip which already has a hardware UART bootloader like the STM32.

I'd also like to have better integration with other subsystems, even if just hooks for existing libraries. A nice way to implement this would be some sort of tool to download drivers from a central repository. Or a GUI to select pin functions which would also enable HAL drivers for the selected function. A nice example of interfaces is from the CooCox guys, who have an IDE which allows easy selection of modules. They also have a pin selection GUI which looks interesting, but the IDE and OS don't suit my needs (I like a fully configurable Eclipse, and think ChibiOS is better implemented).

Re: Next generation RTOS

Posted: Mon Jun 25, 2012 12:06 pm
by tinito
Hi, what about the bootloader proposal? There was some development about that?
If I understood correctly, the idea is to have like a "ROM" with the OS (a section of the flash memory) and each application (aka thread) is loaded through the bootloader, still having access to the "ROM" to call ChibiOS API.
This seems really cool to me, much better than having a little non-Chibi bootloader that is used to upgrade the whole firmware (chibi+application) each time.

Re: Next generation RTOS

Posted: Mon Jun 25, 2012 1:36 pm
by Giovanni
A bootloader using ChibiOS has already been discussed/tested, search in this forum. It could be enhanced and offered as a test application.

About new kernels. I already wrote another one, it is named "nil" and its API is a subset of ChibiOS, the challenge:
- Around half KB of code (THUMB2 CM3).
- Threads, virtual timers and semaphores included.
- Threads only statically declared (no chThdCreatexxx() functions).
- Reduced used RAM (semaphore = 1byte, thread = 8bytes).
- Ultra simplified use, ChibiOS is too complex for beginners apparently.
- Entirely documented in 10 pages max.

I have to find some time to test/debug it, it could be targeted to small devices with 2-16KB flash and few KB of RAM.

Giovanni