mothercup/mcm-ddc-04/MDK-ARM/debug_app.ini

20 lines
830 B
INI

/* Keil debugger startup script for mcm-ddc-04 (APP1 @ 0x01008000).
*
* Why: Keil downloads only the APP1 image. The bootsetting record at
* 0x01004000 (written by tools/merge_image.py) still holds the CRC of the
* last packaged build, so after any Keil re-download the bootloader at
* 0x01000000 rejects the APP and spins forever -> debug never reaches main.
*
* Fix: skip the natural boot path, force SP/PC from the APP1 vector table.
* µVision executes this file after LOAD + RESET, then "Run to main()" does
* the rest. For standalone (no debugger) runs, flash tools/out/caiic_full.bin
* instead - it carries a bootsetting CRC that matches the APP image.
*/
FUNC void Setup(void)
{
SP = _RDWORD(0x01008000); /* APP1 initial MSP */
PC = _RDWORD(0x01008004); /* APP1 Reset_Handler */
}
Setup();