External Flash (SPI) - MCUBoot - OTA

I have been able to set up external flash for MCUBoot for FOTA.

But after rebooting, the image is the same than before the image upgrade.

I used a sniffer so i could see SPI transmission with external flash during the process but all i can see is writing the new image to the flash, not reading it when swapping.

That's how my partitions are built

And here is my mcuboot.conf in child_image folder

Parents
  • Thanks for your reply,

    Actually, i don't have any pm_static_yml file since it uses dynamic partitioning. 

    Partition layout on updated and original image are the same because the updated image is exactly the same image than the old one, except that i edited a "Firmware Version" ressource for lwm2m

    I just added the mcuboot overlay but it's not working yet.

  • Hi,

     

    MehdiChelouah said:
    Actually, i don't have any pm_static_yml file since it uses dynamic partitioning. 

    You should use a pm_static.yml file, to ensure that all updated builds have the exact same partition layout.

    This is done by copying my_project/build/partitions.yml to my_project/pm_static.yml.

     

    MehdiChelouah said:
    Partition layout on updated and original image are the same because the updated image is exactly the same image than the old one, except that i edited a "Firmware Version" ressource for lwm2m

    You must have defined the &spiX in the overlay for the mcuboot (can be in the main board file as well) to ensure that it picks up the external flash.

    The print outs indicates that your logic is done in the application space. Can you share how you handle this after a successful download?

     

    Kind regards,

    Håkon

Reply
  • Hi,

     

    MehdiChelouah said:
    Actually, i don't have any pm_static_yml file since it uses dynamic partitioning. 

    You should use a pm_static.yml file, to ensure that all updated builds have the exact same partition layout.

    This is done by copying my_project/build/partitions.yml to my_project/pm_static.yml.

     

    MehdiChelouah said:
    Partition layout on updated and original image are the same because the updated image is exactly the same image than the old one, except that i edited a "Firmware Version" ressource for lwm2m

    You must have defined the &spiX in the overlay for the mcuboot (can be in the main board file as well) to ensure that it picks up the external flash.

    The print outs indicates that your logic is done in the application space. Can you share how you handle this after a successful download?

     

    Kind regards,

    Håkon

Children
No Data
Related