AnsweredAssumed Answered

FlexRAM and Linker Problem

Question asked by David Huwiler on Nov 14, 2019
Latest reply on May 5, 2020 by Kerry Zhou

I want to run an application on a rt1052 with the following RAM config:

DTCM: 256k, ITCM: 128k, OC: 128k (default values: DTCM: 128k, ITCM: 128k, OC: 256k)


I want to reconfigure the FlexRAM at runtime, not with the fuses...


I tired the SDK example evkbimxrt1050_flexram_ram_allocate which works fine. In this example, the memory details in the Project properties (Linker settings) are configured to the default values of the FlexRAM, not the values to which the RAM is finally reconfigured in code. This way i can only use the default RAM space at compiletime, because otherwise the linker complains (not enough space in RAM).


But as soon as i reconfigure the Memory details in the Project Property window to fit my needs, the linker is happy, but I get debugger errors at startup (not all RAM accessible). Because the RAM is not jet reconfigured (no code is executed jet).



Any Idea how to get around this problem?


Some infos:

I need the DTCM for heap memory (200k)

I tried different debugging probes (J-Link & LPC-Link2)

IDE: MCUExpresso