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.
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.