Why do I receive an error about 'available memory' when building a Simulink model for an external target?

7 views (last 30 days)
I am trying to replace the Speed Controller subsystem of the 'c28035pmsmfoc_ert' Simulnk model (the example provided in the 'Embedded Coder Support Package for Texas Instruments C2000 Processors'), with my own PID controller.
The model runs (Ctrl+T) both with no modification and with my own PID controller instead of the Speed Controller subsystem. However, when I try to build (Ctrl+B) the model it gives the error:
"C:/ProgramData/MATLAB/SupportPackages/R2017b/toolbox/target/supportpackages/tic2000/src/c28035.cmd", line 58: error:
program will not fit into available memory. placement with
alignment/blocking fails for section ".text" size 0x203f page 0. Available
memory ranges:
PRAML0_L3 size: 0x2000 unused: 0x1c4b max hole: 0x1c4b
error: errors encountered during linking; "../c28035pmsmfoc_ert.out" not built

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 2 Sep 2022
Edited: MathWorks Support Team on 2 Sep 2022
The issue is related to the lack of memory on the external hardware (in this case a Texas Instruments C2000 processor). The first step is to check whether the 'ExtModeStaticAlloc' parameter is 'off'. This can be done by executing:
 
>> get_param(bdroot,'ExtModeStaticAlloc')
If the result is 'on', then please turn it off by executing:
 
>> set_param(bdroot,'ExtModeStaticAlloc','off')
Now please try to build the model again. However, if the parameter was already set to 'off', then please enable the option 'Boot From Flash (stand alone execution)'. You can find this option in the Configuration Parameters (Ctrl+E) under 'Hardware Implementation > Target Hardware Resources > Build Options' (next to the 'Device Name' drop-down menu). By enabling this option, you make sure that the model is built for flash, instead of RAM.
In case you preferred to increase the RAM, instead, please refer to this Texas Instruments blog post (and leave the 'Boot From Flash (stand alone execution)' option unchecked):https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/602656/ccs-tms320f28379d-is-there-any-technique-to-fix-the-linker-error

More Answers (0)

Products


Release

R2017b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!