Free RTOS

Getting Started With FreeRTOS And ChibiOS

If operating systems weren’t so useful, we would not be running them on every single of our desktop systems. In the same vein, embedded operating systems provide similar functionality as these desktop OSes, while targeting a more specialized market. Some of these are adapted versions of desktop OSes (e.g. Yocto Linux), whereas others are built up from the ground up for embedded applications, like VxWorks and QNX. Few of those OSes can run on a microcontroller (MCU), however. When you need to run an OS on something like an 8-bit AVR or 32-bit Cortex-M MCU, you need something smaller.

Something like ChibiOS (‘Chibi’ meaning ‘small’ in Japanese), or FreeRTOS (here no points for originality). Perhaps more accurately, FreeRTOS could be summarized as a multi-threading framework targeting low-powered systems, whereas ChibiOS is more of a full-featured OS, including a hardware abstraction layer (HAL) and other niceties.

In this article we’ll take a more in-depth look at these two OSes, to see what benefits they bring. Continue reading “Getting Started With FreeRTOS And ChibiOS”

Put An Open Source Demon In Your Pocket

Back in 1996, the Tamagotchi was a triumph of hardware miniaturization. Nearly 25 years later, our expectations for commercially designed and manufactured gadgets are naturally quite a bit higher. But that doesn’t mean we can’t be impressed when somebody pulls off a similar feat in the DIY space.

The Xling by [dsl] follows the classic Tamagotchi concept. A little creature, apparently inspired by the demon from Netflix’s Disenchantment, lives in your pocket and needs occasional attention to remain healthy. The user pushes a few buttons to interact with the creature displayed on the display to do…whatever it is you do with a pet demon. Feed it souls and what have you.

But unlike the iconic 90s toy, both the hardware and software for the Xling are open source. The CERN-OHL-W licensed PCB was designed in KiCad and features an ATmega1284P microcontroller and SH1106G controller for the 128 x 64 OLED display.

Power is provided by an AP3401 DC-DC converter, MCP73831 charge controller, and a 400 mAh 3.7 V battery. Everything fits inside of a 3D printed case that looks like it could easily hang off of a keyring.

While the hardware is admirable enough, the software side of things is quite interesting as well. The Xling is running on a FreeRTOS kernel ported to the ATmega, but the GPLv3 licensed firmware sill needs some work. Right now only a few core functions are implemented, and [dsl] is hoping to get some ideas and feedback from the community so his dream of a fully open source demonic Tamagotchi can finally be realized.

Build enough of them, and you might even be able to implement another virtual pet Singularity. But to be safe, maybe you shouldn’t.

Continue reading “Put An Open Source Demon In Your Pocket”

FreeRTOS Gets Class

[Michael Becker] has been using FreeRTOS for about seven years. He decided to start adding some features and has a very interesting C++ class wrapper for the OS available.

Real Time Operating Systems (RTOS) add functionality for single-thread microcontrollers to run multiple programs at the same time without threatening the firmware developer’s sanity. This project adds C++ to the rest of the FreeRTOS benefits. We know that people have strong feelings one way or the other about using C++ in embedded systems. However, as the 24 demo projects illustrate, it is possible.

One nice thing about the library is that it is carefully documented. A large number of examples don’t hurt either. The library is clean with just under 30 classes. It seems to have resisted the trend of having classes for everything. You know the kind of library we mean. To create an Integer object, just build a configuration object to pass to the class factory generator which…. This library doesn’t entertain any of that. It has simple abstractions around threads and timers, queues, and mutexes.

Continue reading “FreeRTOS Gets Class”

Hackaday Prize Entry: MyComm Handheld Satellite Messenger

We live in a connected world, but that world ends not far beyond the outermost cell phone tower. [John Grant] wants to be connected everywhere, even in regions where no mobile network is available, so he is building a solar powered, handheld satellite messenger: The MyComm – his entry for the Hackaday Prize.

The MyComm is a handheld touch-screen device, much like a smartphone, that connects to the Iridium satellite network to send and receive text messages. At the heart of his build, [John] uses a RockBLOCK Mk2 Iridium SatComm Module hooked up to a Teensy 3.1. The firmware is built upon a FreeRTOS port for proper task management. Project contributor [Jack] crafted an intuitive GUI that includes an on-screen keyboard to write, send and receive messages. A micro SD card stores all messages and contact list entries. Eventually, the system will be equipped with a solar cell, charging regulator and LiPo battery for worldwide, unconditional connectivity.

2016 will be an interesting year for the Iridium network since the first satellites for the improved (and backward-compatible) “Iridium NEXT” network are expected to launch soon. At times the 66 Iridium satellites currently covering the entire globe were considered a $5B heap of space junk due to deficiencies in reliability and security. Yet, it’s still there, with maker-friendly modems being available at $250 and pay-per-use rates of about 7 ct/kB (free downstream for SDR-Hackers). Enjoy the video of [Jack] explaining the MyComm user interface:

Continue reading “Hackaday Prize Entry: MyComm Handheld Satellite Messenger”