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

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

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

736 Views
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!

Labels (1)
Tags (3)
0 Kudos
2 Replies

643 Views
rodionvronsky
Contributor II

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

0 Kudos

643 Views
nxf45548
NXP Employee
NXP Employee

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

0 Kudos