I am in the process of migrating from nRF Connect SDK v2.0.0 to v2.4.0. In order to isolate some of the compile errors, I did this incrementally, and found that in v2.3.0 specifically, I was getting a RAM overflow error during compilation:
/opt/nordic/ncs/toolchains/4ef6631da0/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 `noinit' will not fit in region `RAM' /opt/nordic/ncs/toolchains/4ef6631da0/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: region `RAM' overflowed by 7012 bytes
The only thing I've found to allow for successful compilation is changing the following symbols in hci_rpmsg.conf from 251 to 179:
CONFIG_BT_BUF_ACL_TX_SIZE=251 CONFIG_BT_CTLR_DATA_LENGTH_MAX=251 CONFIG_BT_BUF_ACL_RX_SIZE=251
In looking through the map file, I tried reducing the sizes of other memory areas (e.g. memory slabs) that account for far more than 7000 bytes, but they resulted in the exact same error as above. This is occurring in two projects: a Peripheral UART and Central UART. Both use SoftDevice, and both projects get the exact same error message (including the specific byte amount) at compilation. The two projects are quite different. Lastly, the error messages I see locally have been reproduced in a CI environment, so I don't think I have anything weird going on with my SDK setup that a fresh install would remedy.
I would prefer to keep these BT buffers their original size; where else can I look to reduce the size of the noinit section? Why do these buffers seem to be the only thing that changes the overflow amount?
Thanks!