How to wrap all "const" variables in macros using Embedded Coder?
11 次查看(过去 30 天)
显示 更早的评论
MathWorks Support Team
2022-11-23
回答: MathWorks Support Team
2023-1-24
Using Embedded Coder, is there a way to add macro code (#define and #include statements) before and after all "const" variable declarations in the generated code? For example I would like to add macros as shown below around the "const" variable "var1":
#define L1_CONST_DATA /* added before autocoded const */
#include "L1_DATA.h"
const var1;
#define L1_CONST_DATA /* added after autocoded const */
#include "L1_DATA.h"
采纳的回答
MathWorks Support Team
2022-11-23
Using the documented workflow below, you should be able to achieve your goals by using a similar method to this workflow with "#define" and "#include" instead of "#pragma."
https://www.mathworks.com/help/ecoder/ug/control-data-and-function-placement-in-memory-by-inserting-pragmas.html
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Deployment, Integration, and Supported Hardware 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!