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

bootloader_util.c does not compile with GCC without -Os option

If I try to build my project using GCC and I change the optimization flag to something other than -Os then I get the following error:

D:/Nordic/nRF51_SDK_8.1.0_b6ed55f/components/libraries/bootloader_dfu/bootloader_util.c: In function 'bootloader_util_reset': D:/Nordic/nRF51_SDK_8.1.0_b6ed55f/components/libraries/bootloader_dfu/bootloader_util.c:106:1: error: r7 cannot be used in asm here } ^ Is there any way to fix this?

Related