How do I define a custom Memory Section for a TI C2000 device using Embedded Coder's Custom Storage Class designer?
16 views (last 30 days)
MathWorks Support Team on 17 Feb 2021
Edited: MathWorks Support Team on 15 Mar 2021
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.
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. Continue below for your version of MATLAB:
a. For R2020a and before: Apply your new Storage class to "tic2000demospkg.Signal" and "tic2000demospkg.Parameter" objects and in block parameters where needed.
b. For R2020b and beyond: In R2020b, the Code Mappings Editor became the primary location to configure model data elements for code generation. Please refer to the R2020b Release Notes for more information:
So instead of setting the “Signal object class” and “Storage class” in the “Block Parameters” of your “DataStoreMemory” (as you did in R2020a), that information would be defined using the Code Mappings Editor:
Please refer to the screenshots under “Data Exchange between the CLA and the C28x CPU” for the specific Code Mappings settings used for CLA: