3 ms·
One of the (admittedly less active these days) contributors here. Happy to answer questions to the best of my ability :) As far as I'm aware, the focus of RIOT
by x3ro 8y ago
One of the (admittedly less active these days) contributors here. Happy to answer questions to the best of my ability :)
As far as I'm aware, the focus of RIOT is to make embedded development as similar as possible to the way you'd write an application on Linux, including most of the relevant POSIX APIs. This is what, as far as I know, sets it apart from other systems such as Contiki or FreeRTOS, which have non-POSIX APIs for interaction with the OS.
Someone on this thread asked why RIOT vs FreeRTOS is not something being compared. FreeRTOS doesn't really come with all the drivers, network stack etc that you need in order to write an embedded IoT application. That is not to say that it's not possible to do so, but it requires more work of picking the right drivers and libraries, whereas RIOT tries to work out of the box for supported devices.
Finally, RIOT was born as a university project, and many of the people working on it are either university students or former students. In that sense, there are many, often conflicting interests and no single governing body. Depending on your point of view, this might either be good or bad.
- TickleSteve 8y agoPOSIX APIs are typically not appropriate for embedded systems. For example filesystems. Filesystems are not generally applicable for single-purpose embedded systems. You're never going to need textual filenames, opening and closing file handles, etc. All that is just a waste, typically you just want to store your data to a log. This is much more appropriately stored in a simple circular buffer on FLASH without the overhead and non-determinacy of a filesytem. Also, processes. These should be static. You typically never ever exit a task/thread on an embedded system. Resets are a way of life. You have to acknowledge them in your design and error handling takes advantage of this. I would not take POSIX compliance for a system like this as a plus point.
- ramzyo 8y agoReplied to your comment below as well, but will reiterate my primary point here, You seem to be conflating embedded systems with safety-critical systems. There are plenty of embedded systems that are neither safety critical nor single-purpose. Also, plenty of non safety-critical embedded systems use microcontrollers that don't have the resources (RAM) to run Linux effectively (even MMU-less Linux) but could benefit from dynamic kernel capabilities like dynamic loading and unloading of drivers for hot-plugging events to support external hardware/accessories.
- TickleSteve 8y agoNo, there is a large gulf between making robust, simple embedded software and safety-critical systems, I've done both sides of that equation. Accepted general practice for (non-safety-critical) embedded software is to avoid dynamic behaviour wherever you find it. This increases robustness and makes your code a lot simpler while giving you confidence you've handled your worst-case. If you're not doing that, you're trying to do desktop-software on an embedded system.
- as-j 8y ago> POSIX APIs are typically not appropriate for embedded systems. This is a very broad brush. My Embedded Linux system makes amazingly good use of Linux and its Posix APIs. It’s also way to big to be the target of RIOT, so let’s talk about it’s 3 other embedded MCUs. > Filesystems are not generally applicatble...You’re never going to need textual filenames Really? Because I always enjoy talking to my cell radio doing AT+CMOGS=257,FFFFFF^1. That’s open file 257 and write FF. Maintenance, debugging and robuestness of embedded systems is frequently overlooked. It allows not only a single dev, but a team to work, debug and release a system is a big deal. Embedded systems, esepcially those logging data, holding SSL certs, config data can very much use a filesystem. None of this has to be complex JFFS2 FS. For example, if it’s an IoT, how do you plan to OTA it without good storage management? > I would not take POSIX compliance for a system like this as a plus point As a hirring manager anything that opens my pool of candidates is useful. Teaching someone a whole new environment is a big deal. If there’s similar concept and tools this ia big plus.^2 ——- 1) ok, I can’t remember the right AT command or the right file number, but serisouly how did this make it into a public API in 2019? 2) Mostly true. If it’s too close that it’s almost the same, but not due a laundry list of weird exceptions I’ll skip it. Micropython is my example here, it’s like really close to python, may too close but too different. There’s lots of other embeddedable languages that aren’t too close but weird.
- TickleSteve 8y ago(Quick reply) - RIOT is obviously targetted at microcontroller-based systems (not Linux level). - AT commands... you can't use modems in general as a good example of anything. Thes software running on those things tend to be terrible. - Good storage management != filesystem. you can simply allocate a rotating circular buffer in FLASH with CRCd blocks. This is a simple mechanism that gives you both bad-block-management and wear-levelling in one trivial mechanism. No filenames in sight! ;o) - Hiring... There is a lot more to embedded systems than "Can they use the API". All RTOSs use similar APIs, thats never been an issue.
- ThomDenholm 8y agoAgree with TickleSteve; there are file system essential options which may work out of the box for you, or at least provide a nice framework for what you need.
- jly 8y agoThe microcontroller landscape is shifting rapidly. I think many of the things you've mentioned - no dynamic tasks, no filesystem, etc - are appropriate for some devices and some software but not all. MCUs today are pushing the boundary on performance. We'll see GHz Cortex-M7 chips (already 600MHz+ today) running an RTOS in the near future, with external DRAM and flash. Users rightly want to push a LOT of functionality on them and that comes with advanced OS usage, including dynamic memory and threading. The developers using these systems are increasingly coming from an embedded Linux world as the performance line blurs, and POSIX is familiar.
- deleted 8y ago[deleted]
- ramzyo 8y agoDon't know why you got downvoted - this is a highly informed comment. The embedded systems landscape has been shifting rapidly since the introduction of the Cortex M0 about 10 years ago, and continues to do so with the hardware you mentioned, and will continue to into the foreseeable future. Perhaps what we need here is a redefining of the term "embedded system," or if nomenclature purists are against that, a new term altogether to encompass the systems you describe. Regardless of nomenclature flame wars, it's an exciting time to be involved with embedd... erm... the microcontroller world as it evolves at an unprecedented pace.
- TickleSteve 8y agoThe higher end of microcontrollers are getting affordable, true. This does not change the fact that a smaller, less capable uC will always be cheaper. Embedded system designs are typically cost-driven, hence cheaper (and therefore resource-constrained) devices will always be a fact of embedded-life, no matter how "powerful" uC become.
- pantalaimon 8y agoSmaller uCs will also consume less power which is another important consideration.
- SlowRobotAhead 8y agoFreeRTOS does have POSIX support though, it’s on their site. No idea of the level of support or release status, but it’s there.
- kevin_thibedeau 8y agombedOS is FreeRTOS with networking baked in. You can compare against that.