Error when building Modem_Shell for Thingy91 -> ld.bfd: region `FLASH' overflowed by 64612 bytes

When I execute the command:  west build -p -b thingy91_nrf9160_ns -- -DDTC_OVERLAY_FILE=ppp.overlay -DOVERLAY_CONFIG=overlay-ppp.conf

I get: 

ld.bfd: region `FLASH' overflowed by 64612 bytes
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: /usr/local/bin/cmake --build /home/xavier/ncs/v2.2.99-dev3/nrf/samples/nrf9160/modem_shell/build

I only wish to use the modem shell for the PPP functionality, and do not care about including support that is not necessary to achieve PPP dial up service. Any suggestions on how to build this image with only PPP that will fit on the Thingy91 would be IMMENSELY appreciated!   

Parents
  • Hello, 

    Could you please test with latest tagged version v2.2.0? You are currently on the main branch. The nRF Connect SDK repository is described in our documentation. As stated, the main branch can often be unstable as this is where the latest development is added. The tagged versions are stable versions. 

    Are you able to share more information about you setup and environment?  I tested on my side on Linux, MacOS, and Windows, the latter using VS Code. extension. The former two built with success, however, with Windows I got the same issue. I updated the SDK and Toolchain, and it successfully built.

    Can you test on your side?

    Kind regards,
    Øyvind

  • I am using Linux Mint with the CLI tools. I have tested with v2.2.0 and get the same result.

    When I execute the command:  west build -p -b thingy91_nrf9160_ns -- -DDTC_OVERLAY_FILE=ppp.overlay -DOVERLAY_CONFIG=overlay-ppp.conf the build system errors out:

    /home/xavier/zephyr-sdk-0.15.2/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.1.0/../../../../arm-zephyr-eabi/bin/ld.bfd: zephyr/zephyr_pre0.elf section `rodata' will not fit in region `FLASH'
    /home/xavier/zephyr-sdk-0.15.2/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.1.0/../../../../arm-zephyr-eabi/bin/ld.bfd: region `FLASH' overflowed by 63528 bytes
    collect2: error: ld returned 1 exit status
    ninja: build stopped: subcommand failed.
    FATAL ERROR: command exited with status 1: /usr/local/bin/cmake --build /home/xavier/ncs/v2.2.0/nrf/samples/nrf9160/modem_shell/build

    I have even tried with VSCode and I get the exact same result. I even installed v2.1.3 and v2.1.2 and get the exact same result each time. What doesn't make sense is that there seems to be enough space on the thingy91 because of this printed message during the build process:


    [280/280] Linking C executable zephyr/zephyr.elf
    Memory region   Used Size   Region Size   %age Used
    FLASH:               40410 B     48 KB             82.21%
    RAM:                   28024 B     197400 B       14.20%
    IDT_LIST:            0 GB           2 KB              0.00%


    What information would be helpful to you to see so I may provide it?

Reply
  • I am using Linux Mint with the CLI tools. I have tested with v2.2.0 and get the same result.

    When I execute the command:  west build -p -b thingy91_nrf9160_ns -- -DDTC_OVERLAY_FILE=ppp.overlay -DOVERLAY_CONFIG=overlay-ppp.conf the build system errors out:

    /home/xavier/zephyr-sdk-0.15.2/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.1.0/../../../../arm-zephyr-eabi/bin/ld.bfd: zephyr/zephyr_pre0.elf section `rodata' will not fit in region `FLASH'
    /home/xavier/zephyr-sdk-0.15.2/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.1.0/../../../../arm-zephyr-eabi/bin/ld.bfd: region `FLASH' overflowed by 63528 bytes
    collect2: error: ld returned 1 exit status
    ninja: build stopped: subcommand failed.
    FATAL ERROR: command exited with status 1: /usr/local/bin/cmake --build /home/xavier/ncs/v2.2.0/nrf/samples/nrf9160/modem_shell/build

    I have even tried with VSCode and I get the exact same result. I even installed v2.1.3 and v2.1.2 and get the exact same result each time. What doesn't make sense is that there seems to be enough space on the thingy91 because of this printed message during the build process:


    [280/280] Linking C executable zephyr/zephyr.elf
    Memory region   Used Size   Region Size   %age Used
    FLASH:               40410 B     48 KB             82.21%
    RAM:                   28024 B     197400 B       14.20%
    IDT_LIST:            0 GB           2 KB              0.00%


    What information would be helpful to you to see so I may provide it?

Children
No Data
Related