Flash overflow?

Hello,

I'm trying to merge together a couple of sample projects to make a prototype (in particular, the LTE-BLE gateway, and AWS-IoT samples) - to run on the nRF 9160DK

When I try and compile, I get the following errors:

/opt/nordic/ncs/toolchains/20d68df7e5/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: zephyr/zephyr_pre0.elf section `text' will not fit in region `FLASH'

/opt/nordic/ncs/toolchains/20d68df7e5/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: region `FLASH' overflowed by 119504 bytes

How can I resolve this please? Or is it just too big to try and fit onto the Dev Kit?

Regards,

Ben

  • That doesn't seem to be working :-(

    Is this the right place to set this?

  • Not sure if you have that much amount of RAM left to reserve for stack for main thread. I would normally increase it by 1024 or 2048 bytes at a time. Set to probably 8096 and not to 32k. Did you click on the "save to file" button on the top right corner?

  • Hi - sorry for the delay

    I tried again and made sure I clicked 'save to file' - it tells me that it to /build/zephyr/.config

    I can verify that this worked by inspection of that file, and because VS Code says 'In build: 8192' if I try to add CONFIG_MAIN_STACK_SIZE manually to prj.conf

    I still get the exact same error when I run the code!

  • I requested you to enable the thread analyzer and monitor aswell, This should throw some logs onto the serial log terminal. Can you show me what the thread analyzer shows on each thread's stack usage? It is possible that sometime the neighboring rogue thread can cause a stack corruption in a well behaved thread.

  • Hi - I included the four lines in pros.conf as instructed - but I don't seem to be getting any of the messages - I assume I would see them in the serial monitor?

« 2 3 4 5 6