0

Undefined reference to 'nrf_dfu_button_enter_check'

kykrueger gravatar image

asked 2017-12-07 12:42:46 +0100

When creating a custom bootloader for buttonless DFU, it is surprising to see that nrf_dfu.c not compile without defining button related function.

The warning

nRF5_SDK_14.2.0_17b948a/components/libraries/bootloader/dfu/nrf_dfu.c:81: undefined reference to `nrf_dfu_button_enter_check'

was thrown, and the make fails.

This is with nRF5 SDK 14.2.0.

edit retag flag offensive close delete report spam

1 answer

Sort by » oldest newest most voted
1
kykrueger gravatar image

answered 2017-12-07 12:44:24 +0100

updated 2017-12-07 12:49:10 +0100

A workaround is to make a define of the function in the bootloader code even though the function is not needed.

bool nrf_dfu_button_enter_check(void)
{
    return false;
}

I would suggest fixing this in the next release with a weak function declaration within the SDK that doesn't do anything.

@brief Empty button press handler to be overridden when not using buttonless DFU
__weak bool nrf_dfu_button_enter_check(void)
{
    return false;
}
edit flag offensive delete publish link more

Comments

Thank you for the report. I have forwarded your suggestion to the the SDK team.

Martin Børs-Lind ( 2017-12-08 12:02:20 +0100 )editconvert to answer

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer. Do not ask a new question or reply to an answer here.

[hide preview]

User menu

    or sign up

Recent questions

Question Tools

1 follower

Stats

Asked: 2017-12-07 12:42:46 +0100

Seen: 28 times

Last updated: des. 07