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

DFU Bootloader without NRF_LOG/UART

Greetings,

I'm having some trouble using the secure DFU bootloader and buttonless DFU service in my application. The code for both of these has been taken from their respective examples in the 13.0.0 SDK. Our application code has been implemented and tested using the example DFU bootloader; a bootloader settings page is generated from the application binary and CRC completes successfully, correctly beginning execution from the application start address, only entering DFU bootloader execution after the control point in the buttonless DFU service is written to.

However, our application is running on a custom board, for which we wish to disable the UART module so that the GPIO pins can be used for another purpose. I have thus modified the sdk_config.h for the bootloader to disable UART, NRF_LOG, NRF_STRERROR, etc. and masked the board support led and button functions from the bootloader code through a #define, separating the bootloader into debug and release versions.

I have repeated the process of generating a settings page and merging it with the new bootloader binary after compiling the release version, but when I flash the application, the board remains stuck in DFU bootloader mode, seemingly unable to verify that a valid application is present.

The differences between the debug and release bootloader are currently so small that I can't come up with an explanation for this behaviour. Also, as the error only occurs in the absence of nrf_log, and the bootloader is optimised by default to be quite breakpoint-unfriendly, this is incredibly difficult to debug.

Any advice would be appreciated.

Related