Welcome to Chopin's homepage!
Fourth version of distortos - 0.4.0
Written by Freddie Chopin   
Saturday, 11 March 2017 20:37

Since previously released version - 0.3.0 - 107 days have passed, while 431 commits appeared in the repository, so it's clearly high time for a new release! Therefore, today I have published fourth version of the C++ RTOS for microcontrollers - distortos 0.4.0. Thanks to adding support for the whole STM32F7 chip family (along with 32F746GDISCOVERY board), total number of supported chips has risen to 395. Other new features especially worth mentioning are two options (each in two variants) which enable run-time stack overflow detection and an option which enables context checking of functions which must not be used from interrupts (all blocking functions, all functions of Mutex class and all functions from ThisThread namespace). These last two additions allow for detection of the most frequent problems which are encountered by developers of multithreaded embedded applications, which are otherwise very hard to track - I've had the opportunity to find that out more than once. Quite recently I was completely shocked to learn (thanks to one of these new options) that developers of ST's USB libraries don't have even the slightest objections at all to happily allocate dynamic memory in interrupts...

Last Updated on Saturday, 11 March 2017 21:02
Next version of OpenOCD - 0.10.0 - finally available
Written by Freddie Chopin   
Monday, 23 January 2017 21:20
A little over one and a half year after the previous one, another version of OpenOCD was finally published yesterday - this time it's 0.10.0. You can already download the package with Windows binaries from Download > Software > OpenOCD. The archive with previous version was downloaded over 31000 times, which translates to something like 75GB of transfer (; What new features can we expect in this release? The best answer can be found in the official information about this release posted on the project's website.
Last Updated on Monday, 23 January 2017 22:51
distortos 0.3.0 released
Written by Freddie Chopin   
Friday, 25 November 2016 21:16

Yesterday I finally completed third version of distortos - a RTOS I've been working on for over 2 years, aimed primarily at C++ enthusiasts. In the most recent version, which supports exactly 302 microcontrollers, there are quite a few new features, most of them probably related to the built-in HAL. The most important changes introduced in this version, in chronological order, are:

  • support for periodic software timers,
  • easy to use serial port driver, operating on hardware exclusively via abstract interface class, with implementations of this interface class for all supported chip families (STM32F0, STM32F1, STM32F4), currently only interrupt-driven,
  • RS-485 bus driver, based on the serial port driver mentioned above,
  • SPI master mode bus driver, also using the hardware only through abstract interface class, obviously with implementations for all supported microcontrollers, also interrupt-driven only,
  • abstract base class for external peripherals connected to SPI bus with first implementation of this interface in the form of driver for popular SPI EEPROMs (Atmel AT25xxx, ON Semiconductor CAT25xxx, ST M95xxx, Microchip 25xxxxx or similar),
  • fixes required by GCC 6, so the most recent bleeding-edge-toolchain (GCC 6.2.0) can be used with no issues,
  • replacement of distortosConfiguration.h generator which used AWK with the one using only shell and sed, so AWK is no longer required by this project.

By the way - I've completely forgot to write about version 0.2.0, which was published long time ago. So while we're at it, I'll briefly mention that the biggest additions in the previous version were support for ARMv6-M architecture (ARM Cortex-M0, ...), STM32F0 and STM32F1 chip families.

Source code packages, most recent API reference and changelog can be obviously found on project's website.

Last Updated on Friday, 25 November 2016 22:06
How does multitasking work?
Written by Freddie Chopin   
Saturday, 12 November 2016 18:29

I would like to invite anyone interested in this subject to read my first article of a real-time operating systems introduction series  - Multitasking explained. This article is about the absolute basics, but you have to start with something, right? (;

EDIT (03.12.2016): After a longer break I've published another article about Task states and transitions between them. This time a bit harder subject, but I really tried to keep the explanation as clear as possible, even for people reading about RTOSes for the first time. I'm not sure whether these efforts were successful or not, but let's hope they were. The frequency of publishing of new articles should now increase a little bit, at least that's my plan.

Last Updated on Saturday, 03 December 2016 20:56
bleeding-edge-toolchain (r)evolution?
Written by Freddie Chopin   
Wednesday, 12 October 2016 12:07

As I grew tired of solving problems caused by bizarre workflow of ARM employees and also realized that solving incompatibilities between various Linux distributions is probably impossible, I decided to make a next step. So I present you a preview of a new all-in-one shell script for toolchain compilation, which is supposed to slightly change current form of bleeding-edge-toolchain.

For now I've tested this script on Linux only (on my PC, on a different machine and in Travis-CI system - Ubuntu 12.04.5 LTS "precise"), but soon I'm going to test it on Windows. It's quite possible that even now this script would work in MSYS2 on Windows, but this was not tried yet. The idea is to stop distributing toolchains for Linux in "binary" form - this script will allow anyone to build the toolchain that will work for sure on given distribution. I know that such compilation doesn't last 30 seconds, but it also doesn't last half a day - in here everything (including download of all sources) took 22 minutes. On very slow Travis-CI virtual system it took 80 minutes. I think such amount of time can be sacrificed once every few months, especially that you can do anything else during the compilation [; If someone wants to make this time much shorter, then just find a line with "--with-multilib-list=armv6-m,armv7-m,armv7e-m,armv7-r" in the script and remove what you don't use (WARNING - there are two identical lines in the script, they both must stay identical!). Windows versions will most likely be still distributed in "binary" form, as this platform has no such issues with library compatibility.

Anyway - the script generally does everything that is required - it downloads the sources of the toolchain and required libraries in proper versions, extracts them and then configures & compiles each in proper order. This idea is obviously not new and there are many scripts like this one, but all that I know of are either not developed anymore or just not entirely the way they should be. The script should not require anything fancy to work, the standard set present in any Linux distribution should be enough - the only exception are the tools needed to generate documentation ("makeinfo", which usually is a part of a package like "texinfo"). I encourage anyone to try it out, if something doesn't work as expected let me know - either here in the comments or file an issue at GitHub. I'll also be very happy to hear that it is working correctly (;

Current versions of toolchain components are - obviously - most recent (; More recent than in the toolchain from ARM <:

  • gcc-6.2.0 + multilib patch
  • newlib-
  • binutils-2.27
  • gdb-7.12
  • expat-2.2.0
  • gmp-6.1.1
  • isl-0.16
  • libelf-0.8.13
  • mpc-1.0.3
  • mpfr-3.1.5
  • zlib-1.2.8
Last Updated on Friday, 14 October 2016 10:33

Page 1 of 10