too large for FLASH1 memory segment

Hello,

I'm currently developing some firmware for the nrf52811. i currently ran into an memory issue and got stuck there.

i have started from the ble_app_templater from the nrf5 sdk (v. 17.1.0) and added some functions (spi, saadc, gpio). i can compile the project in "Release" but in "Debug" the flash was too small. so i extended the flash a little. The FLASH error messages disappeared but i still get the messages that FLASH1 is too small.

".rodata is too large to fit in FLASH1 memory segment"

".data is too large to fit in FLASH1 memory segment"

how can i get rid of these messages?

Edit:
Sorry my fault. I solved the issue. All of the errors appeared to belong to FLASH1. I simply had to give it some more space.

best,
Martin

  • Hello,

    I'm not sure I follow. Did you change the size of FLASH1 segment here:

    ? This defines the total amount of FLASH available on the chip.

    Best regards,

    Vidar

  • No i didn't change it there. Seems like i just had to adopt FLASH_START and FLASH_SIZE.

    if i go below 0x19000 for flash start i get problems because of overlaps if i try to flash the firmware. i guess because i'm getting into the memory range of the bluetooth stack (s112).

    i'd have to go to around 0x10000 then it compiles in debug. But it seems like i can't get there because i'd get segment overlap errors.

    i guess some of the libraries included are too big in debug mode.

    best,
    martin

  • Thanks for the clarification. Yes, the s112 stack occupies the flash from 0x0 to 0x19000. Thus leaving 0x11000 (0x30000 - 0x19000) bytes of flash to the application.

    FLASH_START + FLASH_SIZE cannot exceed 0x30000 (192KB) on the nRF52811.

    Martin_W said:
    i guess some of the libraries included are too big in debug mode.

    Agree. This is a common limitation to encounter when working with the more memory constrained IC variants of the nRF52 family.

    Best regards,

    Vidar

Related