Debugging FreeRTOS on STM32 Bluepill

Hi,

even more tinkering reveals that I actually end up in the hard_fault_handler - for an unknown reason.

Also, I previously believed that having the debugger attached or not was the main difference between “works” and “broken”. However, there is another factor: The build process. I observed that a release build reliably runs whereas a debug build will reliably not run, even when the software is not running under a debugger (e.g., Start Debugging, Stop Debugging, Press the reset button on the board without reflashing).

I got verbose logs of pio run -v and pio debug -v and ran a diff on them, but no difference sprung to my eye.

Regards
Damian