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)

934件の閲覧回数
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 返信

912件の閲覧回数
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 件の賞賛
返信