MATLAB: How to define a custom Memory Section for a TI C2000 device using Embedded Coder’s Custom Storage Class designer

c2000cscEmbedded Codermemorysectiontitic2000

I need to create a custom memory section. For example, suppose I need to align a signal buffer to start on a 512-byte boundary. How do I accomplish this?

Best Answer

You can create a custom memory section using the Custom Storage Class Designer. The following steps are used to define a custom memory section:
1. Run the following command in the MATLAB command window to open the Custom Storage Class Designer tool.
>> cscdesigner
2. Select the "tic2000demospkg" package as shown below:
3. Go to the "Memory Section" tab and create a new memory section and write the pragma statement in the "Pre statement" section:
4. Now click on the "Custom Storage Class" tab, create a new custom storage class, and select the previously created memory section for it:
5. Click "Apply" and close the window. Save the package when prompted. You may need to restart MATLAB to use the new storage class. 
6. Apply your new Storage class to "tic2000demospkg.Signal" and "tic2000demospkg.Parameter" objects and in block parameters where needed.