This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
MathWorks Embedded Coder with the MathWorks TI C2000 Hardware Support Package allows automatic build and execution on C2000 hardware from models developed using MATLAB and Simulink.
For embedded software which is mainly stored in and executed out of ROM, developers may wish to place certain functions in RAM instead for performance-sensitive code on devices where executing from RAM is faster than ROM. The TI compiler provides an easy mechanism to do this automatically using the ramfuncs attribute.
In the TI C2000 Hardware Support package provided by MathWorks, using this ramfuncs section, a custom storage class package labeled tic2000demospkg has been created to load the parameters/routines on the flash memory and run them from the RAM.
The shipping *.cmd file of a specific processor already has allocation of sections of flash to store RAM data. Click on the Edit button as shown below in configuration parameters:
You can find the ramfuncs section details as below:
You can verify the pre-existing custom storage classes by running "cscdesigner" in MATLAB command window. It will populate Custom Storage Class Designer window.
Select the tic2000demospkg package.
Note the above Memory sections namely code_ramfuncs and const_data_ramfuncs can be used to store the code and data in the ROM and this will be copied to RAM during execution which improves the overall performance of the system.
If you cannot find the tic2000demospkg above under the Select package, you can select the same from code generation configuration parameters as shown below. You may wish to search for “memory sections” from the search bar in configuration parameters to more easily see this option.
To place a subsystem in ramfuncs section, right click on the subsystem, select Block Parameters and under Code Generation tab select appropriate memory section as shown below:
Similarly, to allocate a Simulink parameter to ramfuncs section, type tic2000demospkg.Parameter at the MATLAB command prompt.
And double click on the parameter in the workspace and select const_data_ramfuncs as shown below:
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.