nRF5 SDK is not maintained anymore
More Info: Consider nRF Connect SDK for new designs

How to update the MCUboot in nRF Connect on nRF52840DK

Hi,

I press Button 1 and Reset to put the nRF52840 DK in to DFU mode that is programmed with a immutable bootloader (B0), mcuboot, and application. This works well to update the application (app_update.bin) using mcumgr over USB. However, during the mcuboot update (signed_by_mcuboot_and_b0_s1_image_update.bin), the application area is over-written and the application enters in a infinite loop after reset. I verified the over-write by reading the flash memory using the nRF programmer. 

Since mcumgr doesn't accept an address or slot parameter, I think the DFU mode is initialized with the application address. 

Are there different ways to enter the DFU mode to update the application and to update the mcuboot?

Thanks,

Ram

Parents
  • Hi,

     It's the Partition Manager that sets the start address in a multi-image build. See this link for more information: http://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.4.0/nrf/scripts/partition_manager/partition_manager.html

    In your build folder, how does partitions_nrf52840dk_nrf52840.yml and pm_nrf52840dk_nrf52840.config look like ?

  • EMPTY_0:
    address: 0x18200
    placement:
    before:
    - s1_pad
    region: flash_primary
    size: 0xe00
    EMPTY_1:
    address: 0x19200
    placement:
    before:
    - s1_image
    region: flash_primary
    size: 0xe00
    app:
    address: 0x2a200
    region: flash_primary
    size: 0x6ae00
    b0:
    address: 0x0
    orig_span: &id001
    - b0_image
    - provision
    region: flash_primary
    size: 0x8000
    span: *id001
    b0_image:
    address: 0x0
    placement:
    after:
    - start
    region: flash_primary
    size: 0x7000
    mcuboot:
    address: 0x8200
    placement:
    before:
    - mcuboot_primary
    region: flash_primary
    sharers: 0x1
    size: 0x10000
    mcuboot_pad:
    address: 0x2a000
    placement:
    align:
    start: 0x1000
    before:
    - mcuboot_primary_app
    region: flash_primary
    sharers: 0x2
    size: 0x200
    mcuboot_primary:
    address: 0x2a000
    orig_span: &id002
    - app
    - mcuboot_pad
    region: flash_primary
    sharers: 0x1
    size: 0x6b000
    span: *id002
    mcuboot_primary_app:
    address: 0x2a200
    orig_span: &id003
    - app
    region: flash_primary
    size: 0x6ae00
    span: *id003
    mcuboot_secondary:
    address: 0x95000
    placement:
    after:
    - mcuboot_primary
    align:
    start: 0x1000
    region: flash_primary
    share_size:
    - mcuboot_primary
    size: 0x6b000
    provision:
    address: 0x7000
    placement:
    after:
    - b0_image
    align:
    start: 0x1000
    region: flash_primary
    size: 0x1000
    s0:
    address: 0x8000
    orig_span: &id004
    - mcuboot
    - s0_pad
    region: flash_primary
    size: 0x10200
    span: *id004
    s0_image:
    address: 0x8200
    orig_span: &id005
    - mcuboot
    region: flash_primary
    size: 0x10000
    span: *id005
    s0_pad:
    address: 0x8000
    placement:
    after:
    - b0
    align:
    start: 0x1000
    region: flash_primary
    share_size:
    - mcuboot_pad
    size: 0x200
    s1:
    address: 0x19000
    orig_span: &id006
    - s1_pad
    - s1_image
    region: flash_primary
    size: 0x10200
    span: *id006
    s1_image:
    address: 0x1a000
    placement:
    after:
    - s1_pad
    - s0
    align:
    end: 0x1000
    region: flash_primary
    share_size:
    - mcuboot
    size: 0x10000
    s1_pad:
    address: 0x19000
    placement:
    after:
    - s0
    align:
    start: 0x1000
    region: flash_primary
    share_size:
    - mcuboot_pad
    size: 0x200
    spm_app:
    address: 0x2a200
    orig_span: &id007
    - app
    region: flash_primary
    size: 0x6ae00
    span: *id007
    sram_primary:
    address: 0x20000000
    region: sram_primary
    size: 0x40000

Reply
  • EMPTY_0:
    address: 0x18200
    placement:
    before:
    - s1_pad
    region: flash_primary
    size: 0xe00
    EMPTY_1:
    address: 0x19200
    placement:
    before:
    - s1_image
    region: flash_primary
    size: 0xe00
    app:
    address: 0x2a200
    region: flash_primary
    size: 0x6ae00
    b0:
    address: 0x0
    orig_span: &id001
    - b0_image
    - provision
    region: flash_primary
    size: 0x8000
    span: *id001
    b0_image:
    address: 0x0
    placement:
    after:
    - start
    region: flash_primary
    size: 0x7000
    mcuboot:
    address: 0x8200
    placement:
    before:
    - mcuboot_primary
    region: flash_primary
    sharers: 0x1
    size: 0x10000
    mcuboot_pad:
    address: 0x2a000
    placement:
    align:
    start: 0x1000
    before:
    - mcuboot_primary_app
    region: flash_primary
    sharers: 0x2
    size: 0x200
    mcuboot_primary:
    address: 0x2a000
    orig_span: &id002
    - app
    - mcuboot_pad
    region: flash_primary
    sharers: 0x1
    size: 0x6b000
    span: *id002
    mcuboot_primary_app:
    address: 0x2a200
    orig_span: &id003
    - app
    region: flash_primary
    size: 0x6ae00
    span: *id003
    mcuboot_secondary:
    address: 0x95000
    placement:
    after:
    - mcuboot_primary
    align:
    start: 0x1000
    region: flash_primary
    share_size:
    - mcuboot_primary
    size: 0x6b000
    provision:
    address: 0x7000
    placement:
    after:
    - b0_image
    align:
    start: 0x1000
    region: flash_primary
    size: 0x1000
    s0:
    address: 0x8000
    orig_span: &id004
    - mcuboot
    - s0_pad
    region: flash_primary
    size: 0x10200
    span: *id004
    s0_image:
    address: 0x8200
    orig_span: &id005
    - mcuboot
    region: flash_primary
    size: 0x10000
    span: *id005
    s0_pad:
    address: 0x8000
    placement:
    after:
    - b0
    align:
    start: 0x1000
    region: flash_primary
    share_size:
    - mcuboot_pad
    size: 0x200
    s1:
    address: 0x19000
    orig_span: &id006
    - s1_pad
    - s1_image
    region: flash_primary
    size: 0x10200
    span: *id006
    s1_image:
    address: 0x1a000
    placement:
    after:
    - s1_pad
    - s0
    align:
    end: 0x1000
    region: flash_primary
    share_size:
    - mcuboot
    size: 0x10000
    s1_pad:
    address: 0x19000
    placement:
    after:
    - s0
    align:
    start: 0x1000
    region: flash_primary
    share_size:
    - mcuboot_pad
    size: 0x200
    spm_app:
    address: 0x2a200
    orig_span: &id007
    - app
    region: flash_primary
    size: 0x6ae00
    span: *id007
    sram_primary:
    address: 0x20000000
    region: sram_primary
    size: 0x40000

Children
No Data
Related