Question
Error at start of debugging while Flash write test
I am testing Flash write using a custom board with STM32H562VG.
For debugging, I use IAR I-jet and VSCode's C-SPY extension.
The following HAL API is used for Flash writing, addr starts at 0x08030000 in the User area.
HAL_FLASH_Program(FLASH_TYPEPROGRAM_QUADWORD, addr, pData)
I was able to confirm that I could write data to 0x08030000 with HAL_FLASH_Program,
but then when I stopped debugging and restarted, the debugger would not start.
When debugging is aborted, a log message “Failed to execute flash loader” is displayed.
After that, I was able to write the relevant program using STM32CubeProgrammer,
but the debugger did not start and the error message status did not change.
I debugged the relevant program on another board using the same CPU and the debugger started.
(I did not try writing Flash because that board might not start up either.)
(I did not try writing Flash because that board might not start up either.)
Is there some kind of memory protection mechanism in effect?
