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.

[FAQ] FAQ: How do I define a Custom Memory section for a TI C2000 using MathWorks Embedded Coder's Custom Storage Class designer?

Prodigy 130 points

Replies: 0

Views: 54

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.

Suppose we need to align a signal buffer to start on a 512-byte boundary. In such situations we need to create a custom memory section to ensure memory alignment for the buffers. The following steps are used to define a custom memory section:

1. Run "cscdesigner" in MATLAB command window. It will populate Custom Storage Class Designer window.

2. Select the tic2000demospkg package as shown below:

3. Create a new memory section with alignment pragma set to 512.


4. Create a new Custom storage class and select the previously created memory section for the same.

5. Select Apply and close the window and save the package when prompted. You may need to restart MATLAB to use the new storage class.

6. Open the Code Generation for Signal properties or Block Parameters and select the Signal object class as tic2000demospkg.Signal and newly created storage class