A class to access MCU registers

Back from holidays, back to other hobbies. One thing that I hate when programming on MCUs is that you almost always access register directly through macros, masks and bit shifting operations; so, inspired by this talk on Youtube I decided to write my own code to access registers. The result is a couple of templates that makes it possible to access registers in a clean way. First is the Bitfield class: it allows to access some specific bits on a memory address; you can combine many Bitfields Read more [...]

Flashing and debugging non-development STM32 boards under Linux

In a previous article we've seen how to flash and debug STM32 boards that have an onboard SMTLINK-V2 circuitry, such as the Nucleo and Discovery boards. However this is not always the case, as for many STM32F103 boards (like the blue pill or the red pill); so we need another way. Luckily, there is. The easy way the easy way to flash and debug any board is to buy an STLINK clone online for a few euros; then use it as explained in the previous article. The DIY way You can also flash Read more [...]

Flashing and debugging STM32 microcontrollers under Linux

One of my interests is electronics and microcontrollers, and since I mainly use Linux for developing I wanted to find a way to do programming and debugging for ARM microcontrollers, more specifically STM32 (STM32F4 Discovery, STM32F413 Nucleo and small boards like blue pill or red pill), which are the ones I use the most. And ideally using open source, non proprietary and packages already in my distro (Ubuntu 18.04). The method below works out of the box for development cards with an onboard Read more [...]