MCUBOOT_DIRECT_XIP mode #48259
-
Hi @DerekSnell @danieldegrasse, Can you please give your thoughts on below request. I want to use MCUBOOT_DIRECT_XIP upgrade mode to run latest image from their slots. Trials for MCUBOOT_DIRECT_XIP:
I'm expecting in second test case from slot-1 image should get executed as per documentation details, whichever slot has higher version should get executed. below is my configuration details of MCUBoot and Zephyr application image. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 4 replies
-
Hi @Sathishkumar-rk , The image in Slot1 needs to be confirmed. See steps using MCUmgr, and MCUboot documentation. |
Beta Was this translation helpful? Give feedback.
-
Hi @Sathishkumar-rk , Since this happens to you after giving the image list command, I would use a debugger with the smp_svr app, and step through the code after it receives this command, to see why the app stops responding. Let us know what you find. |
Beta Was this translation helpful? Give feedback.
-
Hi @DerekSnell, I have tested secondary slot image with confirm command but still my expectation is not met with confirm image. In above log information, chain-load offset address pointing to secondary slot location it's as expected and from their application reset vector is called as application entry point. Actually from debugging I understood that, when we do west build it's preparing application binary for primary slot. which is confirmed by zephyr memory map file. Because of this even-though secondary slot image calling application reset vector memory it's pointing out to primary location that's why it's always running primary location image. Is that any way we can build application for secondary slot location, so that upon reset vector call it will point to secondary image entry point. Earlier I was expected like if binary image flashed over secondary slot MCUboot direct XIP mode will take care of address related stuff but it seems it not getting handled. To confirm the above statement i was tried to change the flash base address of application through menuconfig setting and build application binary. Flashed in secondary slot and confirmed. Log Information: Binary with modified configuration for secondary slot *** Booting Zephyr OS build b6270b6acb3b *** I: Primary slot: version=1.1.1+1 Header Info=0x96f3b83d, 0x0, 0x400, 0x0, 0xf21c, 0x0, 0x0 Thanks, |
Beta Was this translation helpful? Give feedback.
-
Hi @Sathishkumar-rk , I am no expert on MCUboot. My experience with MCUboot has always executed the applications from Slot0, and using MCUboot to swap the image in Slot1 to Slot0 before executing. But if you want the linker to place the application code in the Slot1 partition for executing there, you just need to change the devicetree for the board. The line below is from the board's devicetree file, and normally places code in the Slot0 partition. The change below will move the executable image to Slot1.
Best regards |
Beta Was this translation helpful? Give feedback.
Hi @Sathishkumar-rk ,
I have not run into NMP timeout errors before. But after reviewing this other issue, and reading this note about NMP timeouts in the smp_svr doc, it seems the mcumgr host tool will report this error when it can no longer communicate with smp_svr over the serial connection.
Since this happens to you after giving the image list command, I would use a debugger with the smp_svr app, and step through the code after it receives this command, to see why the app stops responding.
Let us know what you find.