I am trying to run and debug a simple program on the Nucleo-F401RE. The toolchain is GNAT ARM elf 15.2.1. The runtime is embedded-nucleo_f401re. For flash and debug, I’m using GNAT Studio 26.0 and the following is the Ide configuration in the project file:
package Ide is
for Program_Host use “localhost:4242”;
for Communication_Protocol use “remote”;
for Connection_Tool use “st-util”;
end Ide;
The build and flash on MCU process works, while the execution and debugging not.
When I start the debugger, the program is waiting in _start_rom (), which is correct.
You can try to execute program at CPU instructions level and look what happened. Giving the “empty” application main it should be doable.
I have the same problem when I try to execute the assembly instructions.
You can check CPU/MPU registers to find why and probably where application fails.
There’s no any useful information. It looks like the execution never begins.
You can set catch point on exceptions.
Done, but no excpetions detected.
PS. Did you enable semihosting in GDB?
Yes, moreover if I switch to light-stm32f429disco runtime and I flash the related MCU with the same application source code, the debugging works as expected.
When I run the program, the program execution stops on its own after about ten seconds in the same function.
10s could be the timeout of a watchdog.
If I put the following breakpoint, it is never hit.
You try to put a breakpoint on a line which does nothing. It is more than likely this line has been optimized out by the compiler, so the breakpoint is not set.