Why the macro of preprocessor is invalid for the newly created configuration?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Why the macro of preprocessor is invalid for the newly created configuration?

跳至解决方案
782 次查看
liping921
Contributor II

When I create a new configuration based on a configuration, I add a new macro on the new configuration, but this macro is invalid for the new configuration, only adding this macro on the original configuration is valid for the new configuration, what is the reason for this? Isn't it true that the different configurations are not controlled separately?

liping921_1-1701246026770.pngliping921_2-1701246230264.png

 

0 项奖励
回复
1 解答
749 次查看
liping921
Contributor II
Sorry, I didn't notice another problem that I didn't select the corresponding build file after compiling, and now the problem has been solved, only the code is still grayed out, but it doesn't affect the run, thanks for your reply!

在原帖中查看解决方案

4 回复数
738 次查看
jiri_kral
NXP Employee
NXP Employee

Hi,

in the past there was some issue that preprocessor macros was visible only from First configuration (typically debug_FLASH). What is your S32DS version? Can you try to put this macro definition in first debug configuration and check, if the code is still invalid? 

0 项奖励
回复
677 次查看
liping921
Contributor II
Putting the first configuration is valid, our version of S32DS is V
2.2
0 项奖励
回复
761 次查看
Mehul_Patel_NXP
NXP Employee
NXP Employee

Hi, @liping921 , 

 

Please can you provide more information to help to understand the issue. 

 

Thank you.  Kind regards. 

- Mehul Patel

0 项奖励
回复
750 次查看
liping921
Contributor II
Sorry, I didn't notice another problem that I didn't select the corresponding build file after compiling, and now the problem has been solved, only the code is still grayed out, but it doesn't affect the run, thanks for your reply!