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

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

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

988 次查看
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

标签 (1)
0 项奖励
回复
1 回复

966 次查看
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 项奖励
回复