How to wrap all "const" variables in macros using Embedded Coder?
17 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
MathWorks Support Team
le 23 Nov 2022
Réponse apportée : MathWorks Support Team
le 24 Jan 2023
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
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
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Deployment, Integration, and Supported Hardware dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!