FOTA with Nordic Connect SDK (ncs) not working

I'm blocked trying to get an Nrf52 application developed under v1.3.0 SDK work with FOTA.

My application is working fine. FYI, its on custom hardware derived from nrf52832_mdk board definition, and the lbs sample.

Now to add FOTA capability. No buttons or display, so buttonless.

I followed the instructions from here, 

https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/ug_nrf52.html?highlight=fota#fota-upgrades

and I end up with an application that has the DFU characteristic advertised, and nrf connect for mobile and connects to, for DFU. I rebuild an application and try to upload it via NRF Connect, and after a short time of "validating app" on the screen, it reverts back with no error message.

Goggling suggests there is some bug with page alignment fixed mid last year. So I try to copy my application to SDK v1.4.2, and I get a raft of build errors, which cannot be navigated to easily in the IDE. Even the previously supported types like u8_t are no longer valid!

Does anyone have any suggestions? I've used buttonless FOTA on a product on the previous NRF5 SDK with no issues, I'd rather not abandon this mess and go back.

Parents
  • Some additional info, if it helps. I enabled more debug output in mcuboot. When I FOTA an image over, the device reboots, displaying this output, and no more.

    [00:00:00.274,536] <inf> mcuboot: Starting bootloader
    [00:00:00.280,548] <inf> mcuboot: Swap type: perm
    [00:00:00.550,292] <inf> mcuboot: Image upgrade secondary slot -> primary slot
    [00:00:00.557,983] <inf> mcuboot: Erasing the primary slot
    [00:00:00.658,386] <inf> mcuboot: Copying the secondary slot to the primary slot: 0x2cec4 bytes
    [00:00:03.891,265] <dbg> mcuboot.boot_write_magic: writing magic; fa_id=2 off=0x34ff0 (0x40ff0)
    [00:00:03.900,726] <dbg> mcuboot.boot_copy_image: erasing secondary header
    [00:00:03.910,095] <dbg> mcuboot.boot_copy_image: erasing secondary trailer
    [00:00:04.183,990] <inf> mcuboot: Bootloader chainload address offset: 0xc000
    [00:00:04.191,589] <inf> mcuboot: Jumping to the first image slot

    Attaching the debugger, I am in a hard fault condition. Here's the call stack:

Reply
  • Some additional info, if it helps. I enabled more debug output in mcuboot. When I FOTA an image over, the device reboots, displaying this output, and no more.

    [00:00:00.274,536] <inf> mcuboot: Starting bootloader
    [00:00:00.280,548] <inf> mcuboot: Swap type: perm
    [00:00:00.550,292] <inf> mcuboot: Image upgrade secondary slot -> primary slot
    [00:00:00.557,983] <inf> mcuboot: Erasing the primary slot
    [00:00:00.658,386] <inf> mcuboot: Copying the secondary slot to the primary slot: 0x2cec4 bytes
    [00:00:03.891,265] <dbg> mcuboot.boot_write_magic: writing magic; fa_id=2 off=0x34ff0 (0x40ff0)
    [00:00:03.900,726] <dbg> mcuboot.boot_copy_image: erasing secondary header
    [00:00:03.910,095] <dbg> mcuboot.boot_copy_image: erasing secondary trailer
    [00:00:04.183,990] <inf> mcuboot: Bootloader chainload address offset: 0xc000
    [00:00:04.191,589] <inf> mcuboot: Jumping to the first image slot

    Attaching the debugger, I am in a hard fault condition. Here's the call stack:

Children
Related