#define for Debug vs Release?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

#define for Debug vs Release?

1,157件の閲覧回数
dougpaulsen
Contributor IV

Would MCUXpresso have a #define that it sets depending on whether a build is a debug or a release version? 

I'd need to have slightly different build versions for debugging on EVK boards versus the true Release version for target hardware.  I keep forgetting!  It seems not unreasonable that some #define might already exist that would allow conditional compilation to differentiate between debug and release - without relying on fallible mortals....  Can try to set something up myself, but it wouldn't surprise me that something already exists.

Thanks for any pointers! 

タグ(1)
0 件の賞賛
2 返答(返信)

1,154件の閲覧回数
dougpaulsen
Contributor IV

Never mind.  I found it!  It's DEBUG and NDEBUG.  See project->properties->C/C++ General->Paths and Symbols.  

タグ(1)

1,144件の閲覧回数
danielchen
NXP TechSupport
NXP TechSupport

NDEBUG /DEBUG also in MCU C compiler preprocessor.

danielchen_0-1630424067654.png

 

Regards

Daniel

 

0 件の賞賛