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

Bootloader + Buttonless DFU on Custom Board

Hi, Nordic Forum!

We've been trying to implement an adapted version of the Secure Bootloader with Buttonless DFU in our custom board. We have successfully accomplished a version of this by hardcoding certain pins and buttons values in the source code while keeping the pca10040 as the board in the Makefile.

The problem is now we're trying to implement the same but using our custom board defines and Makefile, and that's where things start to break.

On one side, we don't have any BSP definitions per se (Our board have a single button, one programmable RGB LED and 14 normal LED but connected through expanders, so It didn't make much sense to do so), so when we drop the PCA1040 flag in the Makefile, neither the nrf_ble_dfu.c file (because of the BSP_LED_0, and BSP_LED_1 defines) and the nrf_dfu.h (because of the BSP_BUTTON_3) files compile.

So my question is, what's the best/recommended practice to use these libraries in the SDK when I can't provide a proper BSP definition?

On paper the BSP_BUTTON_3 problem I can solve by assigning the single button I have to that define, but since none of my LED's are directly connected to the MCU, I can't properly redefine dose. Should I assign them an arbitrary pin value like 0xFFFF?

Ideally, I would like to indicate the DFU state with my programmable RGB LED. Is there a way of doing this without creating a custom nrf_ble_dfu library?

Thanks in advance.

Related