WDT & Bootloader: Multiple definitions of `WDT_IRQHandler'

So I'm trying top add a bootloader+DFU to allow f/w updates via UART on my custom  board.

I'm already successfully using WDT in my app. Now I'm looking down the rabbithole of trying to integrate code from docs and/or examples into my own...

Using the example secure_bootloader_uart as my template for DFU, I've added the nRF-Bootloader files & updated the user include directories. But it seems that the bootloader WDT is duplicating driver WDT

nrf_bootloader_wdt.o: In function `WDT_IRQHandler':
nrf_bootloader_wdt.c:73: multiple definition of `WDT_IRQHandler'
\modules\nrfx\drivers\src/nrfx_wdt.c:61: first defined here

I'm not even sure if I need WDT support? Because my custom board has no buttons or LEDs I'll be using sd_power_gpregret_set() followed by a NVIC_SystemReset() - won't that clear the WDT anyway?

Parents
  • Hi Nick, 

    I'm not so sure what you are planning to do.  If you want to add DFU support to your device you don't need to modify the application. 
    Please follow the documentation or you can follow my step by step guide here.
    The bootloader is compiled and flashed as separated application to your application. 

    The bootloader handle WDT automatically, so you don't really need to do anything. (you don't need to integrate the bootloader code into your code)

Reply
  • Hi Nick, 

    I'm not so sure what you are planning to do.  If you want to add DFU support to your device you don't need to modify the application. 
    Please follow the documentation or you can follow my step by step guide here.
    The bootloader is compiled and flashed as separated application to your application. 

    The bootloader handle WDT automatically, so you don't really need to do anything. (you don't need to integrate the bootloader code into your code)

Children
  • OK, that makes sense.

    As I mentioned, I do need to trigger the DFU from my application though as these will be installed at remote online  locations, so I'll still need to set the gpregret register.

    I may not be able to check out your guide for a few days but I will update this ticket when I do.

    Thanks

    Nick

  • Hi Nick, 

    In the guide, I have explained a little bit on how you can enter DFU mode from the application. 

    You can also have a look at the buttonless example we have in the SDK: ble_app_buttonless_dfu

  • OK so I've compiled & loaded the bootloader example (using uECC) and it advertises DFUTarg as expected. To be sure I performed Target>Erase All.

    But the actual DFU fails with insufficient resource which is a bit strange as my application flash usage is only 39%

    Is the example forcing dual bank update? I can't see where it may be set. I'm using the example bootloader <SDK>\examples\dfu\secure_bootloader\pca10040e_s112_ble with my custom board which has part nRF52832-QFAA-R7 which has 512kB flash.

  • Hi Nick, 

    Please get familiar with the DFU bootloader by following my step by step guide and try testing with an example before moving to your application. 

    Please give exact size of the application, excluding the softdevice size. 

  • I was following your guide. The ble secure bootloader example didn't compile as it was configured for button operation but no board or buttons were defined. So after changing the config I built & run the bootloader, then tried to load the blinky example by DFU and got the same error. The blinky project is tiny, so I concluded the error message was misleading and I was chasing a red hering down a rabbit hole.

    I gave up after that, deleted the files and decided to try again using the UART DFU which works, at least with the ble_app_uart example application which will get me going for now.

    I *think* in hindsight it was due to a mismatch in softdevices somewhere but I can't say 100% as the test projects I was using have been deleted now.

Related