Incorrect use of preprocessor definitions in debug_frmwrk.h causes debug_frmwrk.c not to build (CMSIS distribution)

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

Incorrect use of preprocessor definitions in debug_frmwrk.h causes debug_frmwrk.c not to build (CMSIS distribution)

762 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by rgledhill on Mon Apr 08 06:54:29 MST 2013

Hello, I have noticed the following code in debug_frmwrk.h (lpcware distribution of CMSIS drivers for LPC43xx): #define PLATFORM HITEX_BOARD #if (PLATFORM == HITEX_BOARD) #define USED_UART_DEBUG_PORT 0 #endif #if (PLATFORM == KEIL_BOARD) #define USED_UART_DEBUG_PORT 3 #endif This is giving a compiler error that USED_UART_DEBUG_PORT is redefined, i.e. it is processing both of the #if clauses as positive. I can fix the code by doing this: #define HITEX_BOARD 1 #define KEIL_BOARD 2 #define PLATFORM HITEX_BOARD #if (PLATFORM == HITEX_BOARD) #define USED_UART_DEBUG_PORT 0 #endif #if (PLATFORM == KEIL_BOARD) #define USED_UART_DEBUG_PORT 3 #endif This is because the C compiler (Keil in my case) is defining KEIL_BOARD and HITEX_BOARD as the same constant (0), which means the #if clauses are both "true".
Can you change the LPCWare distribution to include this fix please?

Thanks, Richard

Labels (1)
0 Kudos
Reply
1 Reply

740 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by rgledhill on Mon Apr 08 09:52:17 MST 2013

I have now reported this in the Bug Tracker part of the site - I hadn't noticed it existed till now, sorry!

0 Kudos
Reply