Turku Centre for Computer Science (TUCS) students play with their brand new bucks

Eero and I had fun today with the TUCS students, teaching them how to build buck converters. Even though we had only three hours for our lab exercise, three of the groups got so far that they were able to drive an HP LED with their buck converter designs. One group even got fancy and did some disco lights! The smiles were bright.

Core coding

I recently started to rewrite the ELL-i runtime from scratch. The old runtime had grown organically for a about year, gaining support for most of the Arduino APIs, most of Contiki, and finally a scouts-honour threading system, allowing the Arduino and Contiki environments to run in parallel. Unfortunately, the code had also started to rot, mainly since I hadn’t understood what I was doing when I had started and because I had written parts of the code in too much hurry. In the end, adding even simple features — for demo purposes — was a constant battle against running out of RAM or Flash, or the code not working for some other obscure reason.

Hence, it looked like a perfect time for rewriting everything, and this time properly. So, in the beginning of November I started from a completely clean slate. I started with an empty repository, https://github.com/ell-i/Runtime (note the name may still change), starting with making the compiler to work with the Arduino IDE, without any real source code, yet. Then I added low-level initialisation code from ST and CMSIS from ARM, only to later rewrite parts of the initialisation code. A next step was to write an utterly simple hardware emulator, using C++ objects to model peripherals, allowing the code to run also on the host, printing out all interactions with the hardware. With that, the system was ready to boot, but not able to do anything, yet.

So, at this moment, the code boots and includes partial support for GPIO, which is a good start. The system part of the code is Clean C, compiling with both gcc and g++, with the intention of gradually moving over to LLVM. The work continues with adding a rudimentary test suite using the Robot Framework; thereafter we will start adding back the currently missing Arduino and Contiki APIs, slowly and carefully.

— Pekka