Embedded Programming
Group assignment: compare the performance and development workflows
Checking out other tools and platforms
During the development phase of this week’s assignment, I wanted to explore other environments and tools.
These are 3 of the environments I explored:
- Platform.io on VSCode (on linux) ⭐
- VSCodium
- IntelliJ IDEA (on linux) ⭐
- CLion
- Arduino emulation on Wokwi ⭐⭐⭐⭐
VSCode (linux) using the Platform.io plugin
How to install Platform.io on Linux Mint
Download VSCode for Linux from the official site. and install it using apt
sudo apt install ./code_1.65.2-1646927742_amd64.deb
Platform.io uses Visual Studio Code (Microsoft) + the Platform.io plugin to provide an IDE
Platform.io can be installed (as a standalone toolchain), but it does not seem to support SAMD11C [1] , [2].
While it supports some Atmel boards, it does not support SAM-D11C.
VSCodium (linux)
VSCodium seems to be a modified version of Visual Studio Code, with no telemetry (nice). Despite this nice gesture, it has even worse support for Platform.io.
It can’t even find the platform.io plugin. So it got uninstalled in less than 10 minutes.
IntelliJ IDEA (linux)
IntelliJ IDEA would have been my preferred method of working, since I’m familiar with the JetBrains family of IDEs. I could find a basic wrapper plugin that allows cpp_check to do basic syntax checking, but nothing beyond that.
Installing cpp-check to validate cpp code
sudo apt install cppcheck cppcheck-gui
It also requires you to install cpp_check manually, so the plugin is basically a wrapper that can highlight lines of code in the editor, but not much else (no refactor capabilities, no syntax highlight or prediction, et…)
CLion with official Plugins for Arduino
I would have liked to try out CLion.
It seems to have better plugin support, from the official marketplace: Official Arduino Support plugin
Unfortunately, since it has no community edition, I didn’t want to start the 30-day trial just yet, but I might look into it in the future (final project?), when I need heavy IDE support.
I’ve been a big fan of JetBrains for years, and I’m expecting that this combo packs a bunch of goodies out of the box.
Emulating the circuit with wokwi.com
See a simplified simulation at wokwi.com
This was a really nice discovery:
It allows us to emulate LOTS (not everything) of the behaviour of our board (not just the microcontroller but also the components attached to it!) and it provides semi realtime simulations of the behaviour and the outputs.
It could not emulate everything perfectly:
- In order to generate pseudo-random numbers, we need to initialize the random generator with a seed.
- The emulator was able to simulate a random seed with faking noise into an analog unused pin, but on the real board, the seed always ended up being the same and the sequence of “random” numbers was always the same, making the game a bit boring.
- The emulator assumes infinite memory. so the first iterations of the program were too large to fit in memory and
would get
region 'FLASH' overflowed
errors.