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

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

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

754件の閲覧回数
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 返答(返信)

661件の閲覧回数
rodionvronsky
Contributor II

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

0 件の賞賛

661件の閲覧回数
nxf45548
NXP Employee
NXP Employee

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

0 件の賞賛