I am working on a big project where the debugger from STM32CubeIDE stopped to work unfortunately but the code can compile and run in the other hand. The project use a touchscreen with TouchGFX and vendor code template with FreeRTOS layer.
To understand where the problem comes from, I have strongly lightened my code by keeping only 2 screens and the minimum of code possible but the debugger still does not work.
When I launch the debugger, it gets stuck on a Hard Fault in FreeRTOS that you can see in the image below.
I am wondering if the debugger needs to use MCU’s memory to run ?
Do you have any idea why the debugger doesn’t work?
It’s frustrating because my code works but the debugger does not…
Those tools allow you to use several different debuggers, some of which can connect in a couple of different ways (JTAG, SWD), and you haven’t said which you are using. It’s not clear how your question relates to FreeRTOS other than noting you need to ensure your debugger settings are not using semihosting as that can conflict with FreeRTOS use of system interrupts.
Thank you for your reply.
I’m using SWD with ST-LINK debug probe and I don’t use semihosting I believe.
On simple projects, debugger works.
A couple of thoughts that may or may not help:
- It looks like you are using an external loader - does it work if you try loading through the STlink too?
- Does the st-link_gdbserver_lot.txt file provide any clues?
- Try planing with different Reset Behavior (the drop down list in the image) settings.