I am trying to create a large array in off-chip memory as follows:
#pragma SET_DATA_SECTION("ext_ram")
uint32_t big_array[0x200000];
#pragma SET_DATA_SECTION()
Where ext_ram is a section in external DDR memory.
The problem is the linker fails with an insufficient memory error. This is because it is trying to allocate 0x200000 words in the .cinit section in addition to the array itself in external memory. How can I resolve this?