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

How to build [SDK 14.0.0] bootloader_secure_ble with -O0

What do I need to change to make "bootloader_secure_ble" build for armgcc (using Makefile in pca10040_debug) and -O0 (no size optimization )?

Parents
    1. Set -O0 flag in Makefile

    2. 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

    3. If you get error: r7 cannot be used in asm here add -fomit-frame-pointer to CFLAGS.

Reply
    1. Set -O0 flag in Makefile

    2. 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

    3. If you get error: r7 cannot be used in asm here add -fomit-frame-pointer to CFLAGS.

Children
No Data
Related