When I'm following this procedure, program execution is successfully stopped when the payload program is run:
- Setting breakpoint to beginning of program which is gets loaded by the bootloader afterwards. The breakpoint gets set with the GDB command
break *0x2000001c. As OpenOCD tells me that the CPU has 6 harware breakpoints when connecting, I suppose one of those is used.
- Resetting Mikrocontroller with GDB command
monitor reset run
- Loading programm by bootloader into the SRAM region.
- Halting and then continuing execution by GDB commands
- Instructing bootloader to run loaded program.
However, when I'm exchanging step 3. and 4, program execution is not stopped when hitting the breakpoint.
Can anyone tell me why? It seems to my, that the core "looses" the breakpoint when the register the breakpoint is set to gets overwritten.
This is the equipment I'm using:
- STM32F4 mikrocontroller