<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>MCUXpresso for VSCode中的主题 Debug application started by the MCUBOOT</title>
    <link>https://community.nxp.com/t5/MCUXpresso-for-VSCode/Debug-application-started-by-the-MCUBOOT/m-p/2383505#M561</link>
    <description>&lt;P&gt;Dear Everyone,&lt;/P&gt;&lt;P&gt;the board we use is IMXRT1176.&lt;BR /&gt;&lt;BR /&gt;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:&lt;BR /&gt;&lt;BR /&gt;1. Original build produced me an app.elf&lt;BR /&gt;&lt;BR /&gt;2. I converted an app.elf to app.bin and singed it with imgtool to create app_signed.bin&lt;BR /&gt;&lt;BR /&gt;3. I used arm-none-eabi-objcopy to wrap app_signed.bin into app_signed.bin.elf&lt;BR /&gt;&lt;BR /&gt;4. I used this lanuch.json configuration&lt;BR /&gt;&lt;BR /&gt;```&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;"type": "mcuxpresso-debug",&lt;BR /&gt;"name": "Debug bootloader app",&lt;BR /&gt;"request": "launch",&lt;BR /&gt;"cwd": "${workspaceFolder}",&lt;BR /&gt;&lt;STRONG&gt;"executable": "&amp;lt;PATH_TO_BIN&amp;gt;/app.elf",&lt;/STRONG&gt;&lt;BR /&gt;"isAttach": false,&lt;BR /&gt;"probeType": "LinkServer",&lt;BR /&gt;"stopAtSymbol": "main",&lt;BR /&gt;"skipBuildBeforeDebug": true,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;"extraSymbolFiles": [&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; "&amp;lt;PATH_TO_BIN&amp;gt;/app.elf",&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; "&amp;lt;PATH_TO_BOOTLADER&amp;gt;/bootloader.elf",&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;],&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;"postLaunchCommands": [&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; "load &amp;lt;PATH_TO_BIN&amp;gt;/app_signed.bin.elf 0x30100000" &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;],&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;"gdbInitCommands": [&lt;BR /&gt;&amp;nbsp; &amp;nbsp;"set remotetimeout 600",&lt;BR /&gt;&amp;nbsp; &amp;nbsp; "set debug-file-directory",&lt;BR /&gt;&amp;nbsp; &amp;nbsp; "set non-stop off",&lt;BR /&gt;],&lt;/P&gt;&lt;P&gt;"gdbServerConfigs": {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; "linkserver": {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"device": "MIMXRT1176xxxxx:MIMXRT1170-EVKB",&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"core": "cm7",&lt;BR /&gt;},&lt;BR /&gt;"segger": {},&lt;BR /&gt;"pemicro": {}&lt;BR /&gt;},&lt;BR /&gt;},&lt;BR /&gt;```&lt;BR /&gt;&lt;BR /&gt;It seems to work, meaning i can debug both bootloader and app, but it feels like a hack.&lt;BR /&gt;&lt;BR /&gt;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).&lt;BR /&gt;&lt;BR /&gt;Could you please tell me if i missed something obvious? Do you think there is a cleaner way to achieve that.&lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;Thanks a lot in advance for any help and suggestions!&lt;BR /&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;Jakub&lt;/P&gt;</description>
    <pubDate>Fri, 19 Jun 2026 11:24:22 GMT</pubDate>
    <dc:creator>jslota13245</dc:creator>
    <dc:date>2026-06-19T11:24:22Z</dc:date>
    <item>
      <title>Debug application started by the MCUBOOT</title>
      <link>https://community.nxp.com/t5/MCUXpresso-for-VSCode/Debug-application-started-by-the-MCUBOOT/m-p/2383505#M561</link>
      <description>&lt;P&gt;Dear Everyone,&lt;/P&gt;&lt;P&gt;the board we use is IMXRT1176.&lt;BR /&gt;&lt;BR /&gt;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:&lt;BR /&gt;&lt;BR /&gt;1. Original build produced me an app.elf&lt;BR /&gt;&lt;BR /&gt;2. I converted an app.elf to app.bin and singed it with imgtool to create app_signed.bin&lt;BR /&gt;&lt;BR /&gt;3. I used arm-none-eabi-objcopy to wrap app_signed.bin into app_signed.bin.elf&lt;BR /&gt;&lt;BR /&gt;4. I used this lanuch.json configuration&lt;BR /&gt;&lt;BR /&gt;```&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;"type": "mcuxpresso-debug",&lt;BR /&gt;"name": "Debug bootloader app",&lt;BR /&gt;"request": "launch",&lt;BR /&gt;"cwd": "${workspaceFolder}",&lt;BR /&gt;&lt;STRONG&gt;"executable": "&amp;lt;PATH_TO_BIN&amp;gt;/app.elf",&lt;/STRONG&gt;&lt;BR /&gt;"isAttach": false,&lt;BR /&gt;"probeType": "LinkServer",&lt;BR /&gt;"stopAtSymbol": "main",&lt;BR /&gt;"skipBuildBeforeDebug": true,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;"extraSymbolFiles": [&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; "&amp;lt;PATH_TO_BIN&amp;gt;/app.elf",&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; "&amp;lt;PATH_TO_BOOTLADER&amp;gt;/bootloader.elf",&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;],&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;"postLaunchCommands": [&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; "load &amp;lt;PATH_TO_BIN&amp;gt;/app_signed.bin.elf 0x30100000" &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;],&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;"gdbInitCommands": [&lt;BR /&gt;&amp;nbsp; &amp;nbsp;"set remotetimeout 600",&lt;BR /&gt;&amp;nbsp; &amp;nbsp; "set debug-file-directory",&lt;BR /&gt;&amp;nbsp; &amp;nbsp; "set non-stop off",&lt;BR /&gt;],&lt;/P&gt;&lt;P&gt;"gdbServerConfigs": {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; "linkserver": {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"device": "MIMXRT1176xxxxx:MIMXRT1170-EVKB",&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"core": "cm7",&lt;BR /&gt;},&lt;BR /&gt;"segger": {},&lt;BR /&gt;"pemicro": {}&lt;BR /&gt;},&lt;BR /&gt;},&lt;BR /&gt;```&lt;BR /&gt;&lt;BR /&gt;It seems to work, meaning i can debug both bootloader and app, but it feels like a hack.&lt;BR /&gt;&lt;BR /&gt;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).&lt;BR /&gt;&lt;BR /&gt;Could you please tell me if i missed something obvious? Do you think there is a cleaner way to achieve that.&lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;Thanks a lot in advance for any help and suggestions!&lt;BR /&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;Jakub&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jun 2026 11:24:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-for-VSCode/Debug-application-started-by-the-MCUBOOT/m-p/2383505#M561</guid>
      <dc:creator>jslota13245</dc:creator>
      <dc:date>2026-06-19T11:24:22Z</dc:date>
    </item>
    <item>
      <title>Re: Debug application started by the MCUBOOT</title>
      <link>https://community.nxp.com/t5/MCUXpresso-for-VSCode/Debug-application-started-by-the-MCUBOOT/m-p/2384559#M563</link>
      <description>&lt;P&gt;Hello &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/251438"&gt;@jslota13245&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;There are currently no defined steps that combine flashing and debugging a signed image into a single workflow, as these are typically handled as separate processes. In general, you would first flash the signed image onto the device and then attach the debugger afterwards. As a reference, you may find it helpful to review the "Running the demo" section of the &lt;A href="https://mcuxpresso.nxp.com/mcuxsdk/26.03.00/html/examples/ota_examples/ota_mcuboot_basic/readme.html" target="_blank"&gt;ota_mcuboot_basic&lt;/A&gt; example, which demonstrates two different approaches for flashing a signed image that could be adapted to your setup. Additionally, the "Transferring data" to the flash memory section provides an overview of the available tools that can be used for the flashing process.&lt;/P&gt;
&lt;P&gt;On the other hand, could you please clarify the reason for converting the signed image into a .bin.elf file? Also, could you confirm if you followed a guide for this process?&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;BR&lt;BR /&gt;Habib&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jun 2026 22:47:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-for-VSCode/Debug-application-started-by-the-MCUBOOT/m-p/2384559#M563</guid>
      <dc:creator>Habib_MS</dc:creator>
      <dc:date>2026-06-22T22:47:28Z</dc:date>
    </item>
    <item>
      <title>Re: Debug application started by the MCUBOOT</title>
      <link>https://community.nxp.com/t5/MCUXpresso-for-VSCode/Debug-application-started-by-the-MCUBOOT/m-p/2384765#M565</link>
      <description>&lt;P&gt;Hello Habib!&lt;BR /&gt;&lt;BR /&gt;thank you for the reply.&lt;/P&gt;&lt;P&gt;To answer your question. I followed this guide for flashing multiple binaries at the start-up. We use mcuxpresso for vs-code instead of IDE but the premise should be the same:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://mcuoneclipse.com/2022/11/01/loading-multiple-binary-files-with-gdb/" target="_blank" rel="noopener"&gt;https://mcuoneclipse.com/2022/11/01/loading-multiple-binary-files-with-gdb/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;The idea here is that the elf file has information to debug a signed binary, as signed binary is just a binary with header and trailer attached. If the .elf file was generated with this layout in mind it should work as intended.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;For future reference, approach i suggested in my original post doesn't work too well as debugger gets stuck on non-existing 0x00000 breakpoints while the CPU is still running so i suspect no real crash has occurred. There is clearly some configuration/integration debugger problem here but I can't point exactly where. &lt;STRONG&gt;Did you encounter such behaviour by any chance?&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;As for your suggested approach, I found this section:&lt;BR /&gt;```&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;programing signed application image to the primary application partition using an external tool (direct method)&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;jump-starting the application by debugger, performing an image update with the signed image, resetting the board and letting the bootloader to perform the update (indirect method)&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The latter method is used in the following step-by-step description:&lt;/STRONG&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;Open the demo project and build it. Known issue: MDK linker issues warning about unused &lt;SPAN class=""&gt;boot_hdr&lt;/SPAN&gt; sections. This does not affect the functionality of the example.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Prepare signed image of the application from raw binary as described in the readme of &lt;SPAN class=""&gt;mcuboot_opensource&lt;/SPAN&gt; SDK example.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;In case of MCUXpresso raw binary may not be generated automatically. Use binary tools after right clicking Binaries/.axf file in the project tree to generate it manually.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Launch the debugger in your IDE to jump-start the application.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;In case of MCUXpresso IDE the execution stalls in an endless loop in the bootloader. Pause the debugging and use debugger console and issue command &lt;SPAN class=""&gt;jump&lt;/SPAN&gt; &lt;SPAN class=""&gt;ResetISR&lt;/SPAN&gt;.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;```&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;But I'm a bit lost on what do i need to do with the extension for VS-code - I don't have ide backend unfortunately. &lt;STRONG&gt;Could you please help me by answering the questions below?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Let's assume i do have a signed binary and original elf file with symbols.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;1. How can debugger kick start signed image?&lt;BR /&gt;2. How can debugger kick start it without flashing it first? The point 1 explicitly states to flash it with some tool - i assume point 2 does something else?.&amp;nbsp;&lt;/P&gt;&lt;P&gt;3. The debugger can't flash just base elf file as it'll be discarded by the mcuboot as it doesn't have mcuboot header and a trailer.&lt;/P&gt;&lt;P&gt;4. When point 2.3 states 'Launch the debugger in your IDE to jump-start the application' - does it mean the debugger flashes something? Or does it attach to already flashed image?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance for your help and time &lt;LI-EMOJI id="lia_slightly-smiling-face" title=":slightly_smiling_face:"&gt;&lt;/LI-EMOJI&gt;&lt;BR /&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;Jakub&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jun 2026 07:10:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-for-VSCode/Debug-application-started-by-the-MCUBOOT/m-p/2384765#M565</guid>
      <dc:creator>jslota13245</dc:creator>
      <dc:date>2026-06-23T07:10:29Z</dc:date>
    </item>
  </channel>
</rss>

