I'm trying to work out why this happens, but am not a great expert at linker scripts. Currently, we use arm-none-eabi to build our projects (and cmake) to great effect. I'm currently working on a project that uses an nRF52840 and AHB devices RAM4, RAM5, RAM6, and RAM7 for static buffers. We start with RAM4 (0x20008000) because the smartdevice uses through 0x20004000 + some, which makes RAM4 the first available AHB device. We need four such blocks, and we don't want to use RAM8 because it's much larger than we need.
The issue is that .bss
runs into RAM4 (and RAM5, actually), so we would ideally like to move it to start at 0x20010000, but to do so we need to customize the content from nrf_common.ld
. If we simply copy that file into our linker script at the point where it is normally included, and make no other changes to a working build, we get the following error:
The remainder of the linker script is the same as the one provided in the ble_app_buttonless_dfu
example (in armgcc
), but with the memory sizes appropriate to our project:
If I comment in the INCLUDE
and remove everything after it, I get a clean compile and a good binary.