How do I prevent code generation macros

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How do I prevent code generation macros

Jump to solution
894 Views
MikeM
Contributor III

I'm using CoedWarrior Development Studio10.6.4 to design C/C++ code for the S08DZ32 MCU. I am using processor expert to generate bit I/O drivers. The problem I am having is that the generate code implements macros rather than methods much of the time. I have a lot of bit I/O that I would like to put in an array of function pointers and, of course, you can't implement macros this way. I've searched everywhere for an answer to this including searching through all the project settings to see if there is a way to force method generation rather than macros. I have not been able to find anything. Modifying the generated code is not an option because it will be written over during the next clean and build. Does anyone know of a way to do this? Thank you very much.

0 Kudos
1 Solution
687 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Mike,

There is a method : after you change the code, then enable the "Don't Write Generated Component Modules"

to prevent change your code. Please right click the component -> Code Generation -> Don't Write Generated Component Modules :

Hope it helps

View solution in original post

0 Kudos
3 Replies
688 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Mike,

There is a method : after you change the code, then enable the "Don't Write Generated Component Modules"

to prevent change your code. Please right click the component -> Code Generation -> Don't Write Generated Component Modules :

Hope it helps

0 Kudos
687 Views
MikeM
Contributor III

Thanks Alice. I did not know you could do that. Shows what a CodeWarrior expert I am :-) Thanks so much!

0 Kudos
687 Views
MikeM
Contributor III

I found the exact solution I originally wanted. There IS a way to force the compiler to generate functions rather than macros. It is a simple setting for the processor in the Components Inspector using Processor Expert. Simply click on the Processor in the Components list (MC9S08DZ32 in my case). Then select the "Build options" tab and scroll down to "Generate macros". Then simply "yes" or "no".

0 Kudos