How do I load data/code to flash and run from RAM on a TI C2000 device?

60 次查看(过去 30 天)
I wish to place performance-sensitive functions in RAM instead of ROM because executing from RAM is faster than ROM on my device. How do I accomplish this?


MathWorks Support Team
The TI compiler provides an easy mechanism to do this automatically using the "ramfuncs" attribute. Follow the steps below:
The shipping *.cmd (Linker command file) file of a specific processor already has allocation of sections of flash to store RAM data. Open the Configuration Parameters of your model, navigate the the "Hardware Implementation" settings, and click on the Edit button as shown below:
You can find the "ramfuncs" section details as below:
In the TI C2000 Hardware Support package provided by MathWorks, the custom storage class package labeled "tic2000demospkg" has been created to load the parameters/routines on the flash memory and run them from the RAM using this ramfuncs section. You can verify these built-in storage classes by executing the following command in the MATLAB command window:
>> cscdesigner
Select the tic2000demospkg package:
In the "Memory Sections" tab, you will find sections named "code_ramfuncs" and "const_data_ramfuncs" which can be used to store code and data in the ROM but copy them into RAM during execution. 
If you cannot find the tic2000demospkg und "Select package," try clicking "Refresh package list" in the Configuration Parameters window in the Code Generation section:
To place a subsystem in the ramfuncs section, right-click on the subsystem, select Block Parameters and under the Code Generation tab, select the appropriate memory section as shown below:
Similarly, to allocate a Simulink parameter to ramfuncs section, type tic2000demospkg.Parameter in the MATLAB command prompt:
>> tic2000demospkg.Parameter
Then double-click on the parameter in the workspace and select const_data_ramfuncs as shown below:

更多回答(0 个)


Help CenterFile Exchange 中查找有关 Deployment, Integration, and Supported Hardware 的更多信息




Community Treasure Hunt

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

Start Hunting!

Translated by