Comfortably coding STM32 Blue Pill with ST-Link at Henderson Waves Bridge

1️⃣ Too comfortable with Arm Semihosting, SWD Flashing + Debugging and ST-Link

After working on RISC-V for a while, I gotta admit that Arm and STMicroelectronics did a really great job with programming support: Flashing and Debugging!

I love using Arm Semihosting to display debug messages on OpenOCD! Yes some developers are annoyed by the slow transfer of debug messages over Semihosting… But I solved it the software way: Buffering in memory before going a giant dump of debug messages.

I don’t like the hassle of connecting another UART port just to see debug messages. To me, Embedded Programming should be Plug and Play… Just Plug in the ST-Link USB Programmer and start Playing with the gadget! Let’s not subject Embedded Newbies to any extra hassle… We should be thankful they are still hanging on!

While experimenting with Nordic nRF52, I realised there’s something magical about the ST-Link USB dongle. It’s known as a High Level Adapter for SWD, because ST-Link handles the complex SWD protocol internally and presents a simple, high-speed USB interface to OpenOCD. (That’s why I had to use a Raspberry Pi to remove the Flash Protection on nRF52)

Removing flash protection on nRF52 with Raspberry Pi 4

Using ST-Link and OpenOCD to flash and debug any STM32 microcontroller, even Nordic nRF52, are super efficient. Today I still enjoy rapid iterative development on PineTime Smart Watch (nRF52)… Arm Semihosting + SWD + ST-Link make the perfect workflow for Embedded Developers!

Now here are my gripes about RISC-V and GD32 VF103…