Hello PlatformIO Experts,
I am working on a project based on a Bluepill Board (STM31F1) using libopencm3. I have an initial version of my software working. I have been using an ST-Link v2 Clone to upload and debug my software. To support the next set of features, I have extended my project with FreeRTOS 10.4.1. After some more tinkering, I have my software roughly running with occasional crashes. This is sort of expected, as I believe that I haven’t gotten the configuration of FreeRTOS just right yet. To find these problems, I want to use the Debugger. However, my software does not run under the Debugger when using FreeRTOS.
The Debugger does break at the start of main(). Afterwards, no breakpoints are hit and I can’t observe any action of the software. If I pause the debugger, the CPU is in the blocking_handler of FreeRTOS. If I start the identical software without the debugger, the software starts to run until I drive it into the crash I’m trying to debug.
I have tried this on two projects. There is a branch on my own project: https://github.com/deltaphi/c6021light/tree/freertos
To ensure that the debugger problem is not caused by the bugs in my project itself, I have also tried this with Bastiaan Schaap’s Reference Project for Bluepill/libopencm3/FreeRTOS/PlatformIO: GitHub - bjwschaap/platformio-libopencm3-freertos: Sample blinky project for PlatformIO using libopencm3 and FreeRTOS
On Bastiaan’s project, I observed the same problem.
I also tried to add http://openocd.zylin.com/#/c/2347/4/contrib/rtos-helpers/FreeRTOS-openocd.c to my project - no success.
How can I make PlatformIO successfully debug my Project?
Thanks!
Damian