nrf7002dk - region `FLASH' overflowed

Hi,

I am trying to create a Wi-Fi application on nrf7002dk using SMP over Bluetooth LE for Firmware Updates, but I get a "region 'FLASH' overflowed" error when I try to build the project:

[1/11] Linking C executable zephyr\zephyr_pre0.elf
FAILED: zephyr/zephyr_pre0.elf zephyr/zephyr_pre0.map 
c:/nordicsemi/toolchains/v2.3.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.1.0/../../../../arm-zephyr-eabi/bin/ld.exe: zephyr\zephyr_pre0.elf section `rodata' will not fit in region `FLASH'
c:/nordicsemi/toolchains/v2.3.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.1.0/../../../../arm-zephyr-eabi/bin/ld.exe: region `FLASH' overflowed by 1424 bytes
collect2.exe: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
[115/263] Building C object modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/C_/nordicsemi/v2.3.0/modules/hal/nordic/nrfx/drivers/src/nrfx_gpiote.c.obj
FAILED: modules/mcuboot/mcuboot_subimage-prefix/src/mcuboot_subimage-stamp/mcuboot_subimage-build mcuboot/zephyr/zephyr.hex mcuboot/zephyr/zephyr.elf 

Is there any option to reduce the project's size? I have already disabled the debug options.

Regards,

Candela

  • Candela said:
    Nevertheless, the building process gets stuck into the step "Generating app_test_update.hex" many hours, without finishing the building process at all.

    I have never seen the build process freeze like that before.
    Can you try to delete the build folder and rebuild?

    "CONFIG_NORDIC_QSPI_NOR=y"

    The nRF7002DK uses SPI for external flash, and not SPI: https://infocenter.nordicsemi.com/topic/ug_nrf7002_dk/UG/nrf7002_DK/hw_external_memory.html?cp=3_0_2_4_5

    So you need to use the SPI driver instead.

    Something along these lines:

    CONFIG_NORDIC_QSPI_NOR=n
    CONFIG_SPI=y
    CONFIG_SPI_NOR=y
    CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096
    

  • Hi Sigurd,

    Finally, I have achieved to build succesfully the app deleting the partition manager file. Now the app fits on the nRF5340.

    However, I think there is something wrong with the address mapping, because I can't load any new images by MCUMGR (it used to work before adding the WiFi configurations that caused the overflow), and, if I try to flash the hex file directly into the board, the BLE stops working (due to the hci image i guess...) I think it has to do with the XIP address warning on the last build log I uploaded.

    I have also added the SPI configurations you propose.

    Thank you!

    Candela

  • In your log, I see multiple warnings like this:

    warning: NORDIC_QSPI_NOR (defined at C:/nordicsemi/v2.3.0/nrf/Kconfig.nrf:97,
    drivers/flash/Kconfig.nordic_qspi_nor:4) was assigned the value 'y' but got the value 'n'. See
    http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_NORDIC_QSPI_NOR and/or look up
    NORDIC_QSPI_NOR in the menuconfig/guiconfig interface. The Application Development Primer, Setting
    Configuration Values, and Kconfig - Tips and Best Practices sections of the manual might be helpful
    too.
    

    I suggest that you look into fixing these first.

    You can do this by running "ninja menuconfig" inside "build/" or inside "build/mcuboot", depending on which image has the warning.

    Candela said:
    think it has to do with the XIP address warning

    Do you try to use XIP in your project?

Related