Debug application started by the MCUBOOT Dear Everyone, the board we use is IMXRT1176. I would like to debug my application which is started by mcuboot. I would like the debugger to flash a signed application and debug it afterwards. Let me show you what i did: 1. Original build produced me an app.elf 2. I converted an app.elf to app.bin and singed it with imgtool to create app_signed.bin 3. I used arm-none-eabi-objcopy to wrap app_signed.bin into app_signed.bin.elf 4. I used this lanuch.json configuration ``` { "type": "mcuxpresso-debug", "name": "Debug bootloader app", "request": "launch", "cwd": "${workspaceFolder}", "executable": " /app.elf", "isAttach": false, "probeType": "LinkServer", "stopAtSymbol": "main", "skipBuildBeforeDebug": true, "extraSymbolFiles": [ " /app.elf", " /bootloader.elf", ], "postLaunchCommands": [ "load /app_signed.bin.elf 0x30100000" ], "gdbInitCommands": [ "set remotetimeout 600", "set debug-file-directory", "set non-stop off", ], "gdbServerConfigs": { "linkserver": { "device": "MIMXRT1176xxxxx:MIMXRT1170-EVKB", "core": "cm7", }, "segger": {}, "pemicro": {} }, }, ``` It seems to work, meaning i can debug both bootloader and app, but it feels like a hack. What I don't like the most is that flash is written twice. Once for executable where we write unsigned binary and one for load where we write signed binary (which has the same core code obviously). Could you please tell me if i missed something obvious? Do you think there is a cleaner way to achieve that. Just as an info, I know how to attach to already flashed image, the process above is more about convenience to start debugging in one step, I mention this to express what my goal is. Thanks a lot in advance for any help and suggestions! Best Regards, Jakub
View full article