Compilation error for nRF52832: Flash region overflow

Hi,

I'm getting compilation error for nrf52dk/nrf52832 as,

 c:/ncs/toolchains/ce3b5ff664/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd.exe: region `FLASH' overflowed by 42708 bytes collect2.exe: error: ld returned 1 exit status ninja: build stopped: subcommand failed. [10/20] No configure step for 'mcuboot'

While the same code was compiling for nrf5340dk/nrf5340/cpuapp.

Please let me know how to reduce the output file size for nrf52dk/nrf52832 board.

Best regards,

Sai Krishna

  • nRF5340 have a network core with its own flash memory of 256KB. The protocol stack normally uses this extra flash on nrf5340. In total nrf5340 have 1MB+256KB flash that those two cores can access. On nRF52840, you need have the BLE stack and your application on the same flash of 1MB, hence you see a memory squeeze there. If your application has grown bigger that it does not fit into the memory layout you planned for it, then either

    • you need to optimize it, 
    • try to see if compiler optimization flags help here
    • or use our newer nRF54L15 which have 2MB flash on it. 
Related