application_update sample not updating app

Dear Community,

I am trying to run the HTTP application update sample. I can run the sample without issues, but after the download is completed, the app is not updated.

I am running the sample as it is, on an Actinius Icarus with nrf SDK release v1.7.1. This is the output of the sample program:

*** Booting Zephyr OS build v2.6.99-ncs1-1 ***
HTTP application update sample started v1.0
LTE Link Connecting ...
LTE Link Connected!
Press Button 1 to perform application firmware update
I: Configuring socket timeout (30 s)
I: Connecting to xxxxxxxxxxxxxxxxxx.s3.eu-west-2.amazonaws.com
I: Downloading: app_update_test.bin [0]
I: Downloaded 2048/167536 bytes (1%)
I: Downloaded 4096/167536 bytes (2%)
I: Downloaded 6144/167536 bytes (3%)
I: Downloaded 8192/167536 bytes (4%)
I: Downloaded 10240/167536 bytes (6%)
I: Downloaded 12288/167536 bytes (7%)
I: Downloaded 14336/167536 bytes (8%)
I: Downloaded 16384/167536 bytes (9%)
I: Downloaded 18432/167536 bytes (11%)
I: Downloaded 20480/167536 bytes (12%)
I: Downloaded 22528/167536 bytes (13%)
I: Downloaded 24576/167536 bytes (14%)
I: Downloaded 26624/167536 bytes (15%)
I: Downloaded 28672/167536 bytes (17%)
I: Downloaded 30720/167536 bytes (18%)
I: Downloaded 32768/167536 bytes (19%)
I: Downloaded 34816/167536 bytes (20%)
I: Downloaded 36864/167536 bytes (22%)
I: Downloaded 38912/167536 bytes (23%)
I: Downloaded 40960/167536 bytes (24%)
I: Downloaded 43008/167536 bytes (25%)
I: Downloaded 45056/167536 bytes (26%)
I: Downloaded 47104/167536 bytes (28%)
I: Downloaded 49152/167536 bytes (29%)
I: Downloaded 51200/167536 bytes (30%)
I: Downloaded 53248/167536 bytes (31%)
I: Downloaded 55296/167536 bytes (33%)
I: Downloaded 57344/167536 bytes (34%)
I: Downloaded 59392/167536 bytes (35%)
I: Downloaded 61440/167536 bytes (36%)
I: Downloaded 63488/167536 bytes (37%)
I: Downloaded 65536/167536 bytes (39%)
I: Downloaded 67584/167536 bytes (40%)
I: Downloaded 69632/167536 bytes (41%)
I: Downloaded 71680/167536 bytes (42%)
I: Downloaded 73728/167536 bytes (44%)
I: Downloaded 75776/167536 bytes (45%)
I: Downloaded 77824/167536 bytes (46%)
I: Downloaded 79872/167536 bytes (47%)
I: Downloaded 81920/167536 bytes (48%)
I: Downloaded 83968/167536 bytes (50%)
I: Downloaded 86016/167536 bytes (51%)
I: Downloaded 88064/167536 bytes (52%)
I: Downloaded 90112/167536 bytes (53%)
I: Downloaded 92160/167536 bytes (55%)
I: Downloaded 94208/167536 bytes (56%)
I: Downloaded 96256/167536 bytes (57%)
I: Downloaded 98304/167536 bytes (58%)
I: Downloaded 100352/167536 bytes (59%)
I: Downloaded 102400/167536 bytes (61%)
I: Downloaded 104448/167536 bytes (62%)
I: Downloaded 106496/167536 bytes (63%)
I: Downloaded 108544/167536 bytes (64%)
I: Downloaded 110592/167536 bytes (66%)
I: Downloaded 112640/167536 bytes (67%)
I: Downloaded 114688/167536 bytes (68%)
I: Downloaded 116736/167536 bytes (69%)
I: Downloaded 118784/167536 bytes (70%)
I: Downloaded 120832/167536 bytes (72%)
I: Downloaded 122880/167536 bytes (73%)
I: Downloaded 124928/167536 bytes (74%)
I: Downloaded 126976/167536 bytes (75%)
I: Downloaded 129024/167536 bytes (77%)
I: Downloaded 131072/167536 bytes (78%)
I: Downloaded 133120/167536 bytes (79%)
I: Downloaded 135168/167536 bytes (80%)
I: Downloaded 137216/167536 bytes (81%)
I: Downloaded 139264/167536 bytes (83%)
I: Downloaded 141312/167536 bytes (84%)
I: Downloaded 143360/167536 bytes (85%)
I: Downloaded 145408/167536 bytes (86%)
I: Downloaded 147456/167536 bytes (88%)
I: Downloaded 149504/167536 bytes (89%)
I: Downloaded 151552/167536 bytes (90%)
I: Downloaded 153600/167536 bytes (91%)
I: Downloaded 155648/167536 bytes (92%)
I: Downloaded 157696/167536 bytes (94%)
I: Downloaded 159744/167536 bytes (95%)
I: Downloaded 161792/167536 bytes (96%)
I: Downloaded 163840/167536 bytes (97%)
I: Downloaded 165888/167536 bytes (99%)
I: Downloaded 167536/167536 bytes (100%)
I: Download complete
I: MCUBoot image upgrade scheduled. Reset device to apply
I: External SIM is selected
*** Booting Zephyr OS build v2.6.99-ncs1-1 ***
HTTP application update sample started v1.0

As you can see, after performing a reset, it boots the same app version. Could someone help me, please?

Best regards, Ander.

Parents
  • Hi,

     

    The default app_update.bin is made to run on a nRF9160-DK, and may not work on custom boards. Have you replaced the link to one of your own images?

    Here's the output when running ncs v1.7.0, on nrf9160dk_nrf9160_ns:

    *snip*
    I: Downloaded 182272/187931 bytes (96%)
    I: Downloaded 184320/187931 bytes (98%)
    I: Downloaded 186368/187931 bytes (99%)
    I: Downloaded 187931/187931 bytes (100%)
    I: Download complete
    I: MCUBoot image upgrade scheduled. Reset device to apply
    *** Booting Zephyr OS build v2.6.99-ncs1  ***
    I: Starting bootloader
    I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
    I: Secondary image: magic=good, swap_type=0x2, copy_done=0x3, image_ok=0x3
    I: Boot source: none
    I: Swap type: test
    I: Bootloader chainload address offset: 0x10000
    *** Booting Zephyr OS build v2.7.99-ncs1-17-gc3208e7ff49d  ***
    Flash regions           Domain          Permissions
    00 03 0x00000 0x20000   Secure          rwxl
    04 31 0x20000 0x100000  Non-Secure      rwxl
    
    Non-secure callable region 0 placed in flash region 3 with size 32.
    
    SRAM region             Domain          Permissions
    00 03 0x00000 0x08000   Secure          rwxl
    04 31 0x08000 0x40000   Non-Secure      rwxl
    
    Peripheral              Domain          Status
    00 NRF_P0               Non-Secure      OK
    01 NRF_CLOCK            Non-Secure      OK
    02 NRF_RTC0             Non-Secure      OK
    03 NRF_RTC1             Non-Secure      OK
    04 NRF_NVMC             Non-Secure      OK
    05 NRF_UARTE1           Non-Secure      OK
    06 NRF_UARTE2           Secure          SKIP
    07 NRF_TWIM2            Non-Secure      OK
    08 NRF_SPIM3            Non-Secure      OK
    09 NRF_TIMER0           Non-Secure      OK
    10 NRF_TIMER1           Non-Secure      OK
    11 NRF_TIMER2           Non-Secure      OK
    12 NRF_SAADC            Non-Secure      OK
    13 NRF_PWM0             Non-Secure      OK
    14 NRF_PWM1             Non-Secure      OK
    15 NRF_PWM2             Non-Secure      OK
    16 NRF_PWM3             Non-Secure      OK
    17 NRF_WDT              Non-Secure      OK
    18 NRF_IPC              Non-Secure      OK
    19 NRF_VMC              Non-Secure      OK
    20 NRF_FPU              Non-Secure      OK
    21 NRF_EGU0             Non-Secure      OK
    22 NRF_EGU1             Non-Secure      OK
    23 NRF_EGU2             Non-Secure      OK
    24 NRF_EGU3             Non-Secure      OK
    25 NRF_EGU4             Non-Secure      OK
    26 NRF_EGU5             Non-Secure      OK
    27 NRF_DPPIC            Non-Secure      OK
    28 NRF_REGULATORS       Non-Secure      OK
    29 NRF_PDM              Non-Secure      OK
    30 NRF_I2S              Non-Secure      OK
    31 NRF_GPIOTE1          Non-Secure      OK
    
    SPM: NS image at 0x20200
    SPM: NS MSP at 0x200130a8
    SPM: NS reset vector at 0x25ed9
    SPM: prepare to jump to Non-Secure image.
    *** Booting Zephyr OS build v2.7.99-ncs1-17-gc3208e7ff49d  ***
    HTTP application update sample started
    Using version 2
    
    
    uart:~$ LTE Link Connecting ...
    LTE Link Connected!
    Press Button 1 or enter 'download' to download firmware update

     

    Compared to your log output, mcuboot is silent on your end, which then hides debug information about the image itself. 

     

    PS: If you have uploaded your own app_update.bin, it is crucial that the partition layout of this image matches on both updated and original project.

    This can be done by copying original_project/build/partitions.yml to new_project/pm_static.yml and recompiling. Now the app_update.bin shall match your original partition layout.

     

    Kind regards,

    Håkon

Reply
  • Hi,

     

    The default app_update.bin is made to run on a nRF9160-DK, and may not work on custom boards. Have you replaced the link to one of your own images?

    Here's the output when running ncs v1.7.0, on nrf9160dk_nrf9160_ns:

    *snip*
    I: Downloaded 182272/187931 bytes (96%)
    I: Downloaded 184320/187931 bytes (98%)
    I: Downloaded 186368/187931 bytes (99%)
    I: Downloaded 187931/187931 bytes (100%)
    I: Download complete
    I: MCUBoot image upgrade scheduled. Reset device to apply
    *** Booting Zephyr OS build v2.6.99-ncs1  ***
    I: Starting bootloader
    I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
    I: Secondary image: magic=good, swap_type=0x2, copy_done=0x3, image_ok=0x3
    I: Boot source: none
    I: Swap type: test
    I: Bootloader chainload address offset: 0x10000
    *** Booting Zephyr OS build v2.7.99-ncs1-17-gc3208e7ff49d  ***
    Flash regions           Domain          Permissions
    00 03 0x00000 0x20000   Secure          rwxl
    04 31 0x20000 0x100000  Non-Secure      rwxl
    
    Non-secure callable region 0 placed in flash region 3 with size 32.
    
    SRAM region             Domain          Permissions
    00 03 0x00000 0x08000   Secure          rwxl
    04 31 0x08000 0x40000   Non-Secure      rwxl
    
    Peripheral              Domain          Status
    00 NRF_P0               Non-Secure      OK
    01 NRF_CLOCK            Non-Secure      OK
    02 NRF_RTC0             Non-Secure      OK
    03 NRF_RTC1             Non-Secure      OK
    04 NRF_NVMC             Non-Secure      OK
    05 NRF_UARTE1           Non-Secure      OK
    06 NRF_UARTE2           Secure          SKIP
    07 NRF_TWIM2            Non-Secure      OK
    08 NRF_SPIM3            Non-Secure      OK
    09 NRF_TIMER0           Non-Secure      OK
    10 NRF_TIMER1           Non-Secure      OK
    11 NRF_TIMER2           Non-Secure      OK
    12 NRF_SAADC            Non-Secure      OK
    13 NRF_PWM0             Non-Secure      OK
    14 NRF_PWM1             Non-Secure      OK
    15 NRF_PWM2             Non-Secure      OK
    16 NRF_PWM3             Non-Secure      OK
    17 NRF_WDT              Non-Secure      OK
    18 NRF_IPC              Non-Secure      OK
    19 NRF_VMC              Non-Secure      OK
    20 NRF_FPU              Non-Secure      OK
    21 NRF_EGU0             Non-Secure      OK
    22 NRF_EGU1             Non-Secure      OK
    23 NRF_EGU2             Non-Secure      OK
    24 NRF_EGU3             Non-Secure      OK
    25 NRF_EGU4             Non-Secure      OK
    26 NRF_EGU5             Non-Secure      OK
    27 NRF_DPPIC            Non-Secure      OK
    28 NRF_REGULATORS       Non-Secure      OK
    29 NRF_PDM              Non-Secure      OK
    30 NRF_I2S              Non-Secure      OK
    31 NRF_GPIOTE1          Non-Secure      OK
    
    SPM: NS image at 0x20200
    SPM: NS MSP at 0x200130a8
    SPM: NS reset vector at 0x25ed9
    SPM: prepare to jump to Non-Secure image.
    *** Booting Zephyr OS build v2.7.99-ncs1-17-gc3208e7ff49d  ***
    HTTP application update sample started
    Using version 2
    
    
    uart:~$ LTE Link Connecting ...
    LTE Link Connected!
    Press Button 1 or enter 'download' to download firmware update

     

    Compared to your log output, mcuboot is silent on your end, which then hides debug information about the image itself. 

     

    PS: If you have uploaded your own app_update.bin, it is crucial that the partition layout of this image matches on both updated and original project.

    This can be done by copying original_project/build/partitions.yml to new_project/pm_static.yml and recompiling. Now the app_update.bin shall match your original partition layout.

     

    Kind regards,

    Håkon

Children
Related