Code generation progress

A project log for MCU pin setup

Generic visual pin layout setup tool for development boards, including a setup-based automatic code generator.

Norbert Fekete 04/06/2017 at 13:500 Comments

New board added

To have another MCU, I've added Arduino Pro Mini board with ATmega328. It is available now in the "Module" drop-down menu.

Of course it's not complete and has flaws. Bugfixes will be done, this is still just at a proof-of-concept level.

User can now select between "pin layout" and "generated code" views

The layout view is the default which was available before.

The code view allows the user to see what will the generated code exactly be. Of course it is not editable, but is instantly updated if settings are modified.

For now nearly nothing is implemented, and it has only one code flavour: Arduino-FreeRTOS. This decision was made to test if I can make an application code which runs a RTOS "blink" task, and this very same code could run on an ATmega328 and ESP32. It was a success, however needed a bit of thinking, and handling colliding things, like minimal stack size for different MCUs. (Made the ESP32 go into reset-loop because of too small stack)

The generated code has an Arduino flavour, so those who are used to the Arduino coding style can use familiar methods on other MCUs as well, with RTOS additions. The intention is not to replace Arduino, because other MCUs have virtual Arduino core. Of course "vanilla Arduino" flavour will be added as well.

For now I would like this to act also as an educational tool to easily understand and start coding an RTOS application.

A "Download" button was also added, in order to quickly download the whole generated code.

Next steps