How to wrap all "const" variables in macros using Embedded Coder?

17 vues (au cours des 30 derniers jours)
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"

Réponse acceptée

MathWorks Support Team
MathWorks Support Team le 23 Nov 2022
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

Plus de réponses (0)

Catégories

En savoir plus sur Deployment, Integration, and Supported Hardware dans Help Center et File Exchange

Produits


Version

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by