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 Reply
  • 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.

Children
  • 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.

  • Hi Nick, 

    It's so strange that the bootloader didn't compile. Could you take a screenshot of the error ? 
    Please show how you generate the blink sample and let us know how you update it via BLE DFU. 

    I would assume having OTA DFU is your goal , not UART DFU ? 

  • OK screenshot attached.

    Actually I ultimately need both BLE & UART transports if possible but I would settle for one for the moment...

    Back to BLE (as the uart examples don't include a softdevice)

    After removing the button entry I can compile & load the bootloader secure_bootloader_ble_s112_pca10040e.

    I then can build the project ble_app_uart_pca10040_s112, make zip file and upload it by DFU from nRF Connect. I verify it's advertiisng correctly afterwards so my methofology & keys are working.

    But I still get insufficient resource using my hex file? The hex file is 282kB... I can send it if there is a way to do it privately?

  • Hi Nick, 
    Which chip are you working with ? 
    I'm not so sure why you are testing with PCA10040e if you have nRF52832. 
    I compiled the bootloader project here and saw no issue compiling. 
    NRF_GPIO_PIN_SENSE_LOW is defined in nrf_gpio.h . Could you please double check ?  I would suggest to try testing on a fresh copy of nRF5 SDK. 

    Could you show how you generate .zip file. And also show us the size of the application (either when compiling or show us the .bin file). 

    I have converted the case to Private , you can upload your .hex and .zip here. 

Related