How do I define a custom Memory Section for a TI C2000 device using Embedded Coder's Custom Storage Class designer?

20 visualizaciones (últimos 30 días)
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?

Respuesta aceptada

MathWorks Support Team
MathWorks Support Team el 17 de Feb. de 2021
Editada: MathWorks Support Team el 15 de Mzo. de 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.
>> 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. 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:

Más respuestas (0)

Categorías

Más información sobre Deployment, Integration, and Supported Hardware en Help Center y File Exchange.

Productos


Versión

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by