Where to declare macros/defines to config SDK using GNU ARM toolchain?

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

Where to declare macros/defines to config SDK using GNU ARM toolchain?

1,544 次查看
rodionvronsky
Contributor II

Hi, I need to configure the SDK, for example for debug using console UART, I define the following constants:

SERIAL_PORT_TYPE_UART=1

SDK_DEBUGCONSOLE=DEBUGCONSOLE_REDIRECT_TO_SDK

SDK_DEBUGCONSOLE_UART=1

So, are there any global header file to do this?.

I known that I can pass theses constants using the "-D" option with GCC in my Makefile, like  -D'SERIAL_PORT_TYPE_UART=1', but is hard to read in project.

Now I'm using a global file like "sdklib.h" and include to all SDK by default using the GCC option "-include sdklib.h", because I can touch this file more easily and add comments.

Any suggest?

Thanks!

标签 (1)
标记 (3)
0 项奖励
回复
2 回复数

1,451 次查看
rodionvronsky
Contributor II

Hi, I'm using the LPC51U68 (JBD48). Thanks.

0 项奖励
回复

1,451 次查看
nxf45548
NXP Employee
NXP Employee

To provide you better support, can you please let us know the part number that you are using? 

0 项奖励
回复