This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

DFU and Bootloader Debugging

What's the best way to debug an application that is not starting after an OTA DFU update. The app said the update was successful but nothing booted and it didn't even seem like the CPU was running. The boot loader wasn't even advertising DFUTarg. I checked the boot loader settings at 0x7F000 and the app was marked valid but the CRC didn't match the one in the init file. This isn't correct right?

Also I noticed that all example DFU applications have the end of FLASH in the link scripts at 0x7FFFF not 0x79FFFF.

Thanks

Parents
  • Bjorn,

    Thanks for the tip. It turned out that the application was hard faulting due to an extra nrf_drv_clock_init() call in our FreeRTOS implementation. During my debugging I found some strange things I am hoping you can comment on:

    1. The application wouldn't produce a hardfault when the bootloader wasn't present. My guess is this is because the bootloader has set up the clock and this call was redundant when jumping from the bootloader to the application?
    2. When the app was uploaded via DFU and I attached to the running target from my bootloader project I could debug both the bootloader and the application correctly. When I tried to attach to the running target from my application project with the bootloader in FLASH it's like the interrupts were still forwarded to the bootloader in the MBR. Any idea what would cause this?

    Thanks

Reply
  • Bjorn,

    Thanks for the tip. It turned out that the application was hard faulting due to an extra nrf_drv_clock_init() call in our FreeRTOS implementation. During my debugging I found some strange things I am hoping you can comment on:

    1. The application wouldn't produce a hardfault when the bootloader wasn't present. My guess is this is because the bootloader has set up the clock and this call was redundant when jumping from the bootloader to the application?
    2. When the app was uploaded via DFU and I attached to the running target from my bootloader project I could debug both the bootloader and the application correctly. When I tried to attach to the running target from my application project with the bootloader in FLASH it's like the interrupts were still forwarded to the bootloader in the MBR. Any idea what would cause this?

    Thanks

Children
No Data
Related