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] [参考译文] [常见问题解答]常见问题解答:如何使用 MathWorks Embedded Coder#39;s Custom Storage Class Designer 为 TI C2000定义自定义存储器部分?

Guru**** 2039030 points
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/943935/faq-faq-how-do-i-define-a-custom-memory-section-for-a-ti-c2000-using-mathworks-embedded-coder-s-custom-storage-class-designer

采用 MathWorks TI C2000硬件支持包的 MathWorks Embedded Coder 允许使用 MATLAB 和 Simulink 开发的模型在 C2000硬件上自动编译和执行。

假设我们需要对齐信号缓冲器以从512字节边界开始。 在这种情况下、我们需要创建自定义存储器段以确保缓冲器的存储器对齐。 以下步骤用于定义自定义存储器部分:

1.在 MATLAB 命令窗口中运行"cscdesigner"。 它将填充自定义存储类设计器窗口。

2.选择 tic2000demospkg 包,如下所示:

3.创建一个新的存储器段,将 alignmentpragma 设置为512。

 

4.创建新的自定义存储类,并为该类选择先前创建的存储器部分。

5.选择 Apply (应用)并关闭窗口,并在出现提示时保存软件包。 您可能需要重新启动 MATLAB 才能使用新的存储类。

6.打开信号属性或块参数的代码生成,并将信号对象类选为 tic2000demospk.Signal 和新创建的存储类

C2000培训视频:https://training.ti.com/search-catalog/field_language/ZH-CN?keywords=C2000&start%5Bdate%5D=&end%5Bdate%5D=

C2000培训小程序码