What do I need to change to make "bootloader_secure_ble" build for armgcc (using Makefile in pca10040_debug) and -O0 (no size optimization )?
What do I need to change to make "bootloader_secure_ble" build for armgcc (using Makefile in pca10040_debug) and -O0 (no size optimization )?
Set -O0 flag in Makefile
You need to change the flash size available to the bootloader. Go to the corresponding .ld file for your project (secure_dfu_gcc_pca10040_debug.ld, in the main project folder) and change the FLASH ORIGIN and LENGTH so that the bootloader fits. This should work: FLASH (rx) : ORIGIN = 0x72000, LENGTH = 0xC000
If you get error: r7 cannot be used in asm here
add -fomit-frame-pointer
to CFLAGS.