BSP/PSP user_config.h setting problem

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

BSP/PSP user_config.h setting problem

968 次查看
leslieyang0509
Contributor II

Hello

 

IDE: CW 10.3

MQX: 4.0

MCU: k60d100m 100pin

 

I am porting our project from MQX 3.8.1 to MQX 4.0

BSP/PSP build well without error and warning

BSP: bsp_twrk60d100m.cw10

PSP: psp_twrk60d100m.cw10

(PE modify: add new processor MK60DN512VLL10, remove components PWM/IO, change clock configuration, MCG set as FEE, .. etc)

 

While build the project, here comes errors.

 

the error message says

 

identifier 'FILE' redeclared was declared as: 'struct _FILE' now declared as: 'struct mqx_file'

(included from:        C:\Freescale\Freescale_MQX_4_0\lib\twrk60d100m.cw10\debug\bsp\bsp.h:

line 160, external location: C:\Freescale\Freescale_MQX_4_0\lib\twrk60d100m.cw10\debug\psp\fio.h

 

So I change the user_config.h setting

set MQX_SUPPRESS_STDIO_MACROS as 1

 

then re-build the BSP/PSP and our project

 

the error message says

 

macro 'feof' redefined

(included from:        C:\Freescale\Freescale_MQX_4_0\lib\twrk60d100m.cw10\debug\bsp\bsp.h:

line 59, external location: C:\Freescale\Freescale_MQX_4_0\lib\twrk60d100m.cw10\debug\psp\fio.h

 

My question is how to fixed this error?

 

According the discussion below

MQX with MFS compile problem

I move #include <stdio.h> to the top of each *.c and *.h

It seems not fixed the error.

 

Because our project need higher performance, so we do not use the MQX I/O subsystem.

The user_config.h has set false to every I/O module.

 

The attached file is user_config.h upload from

C:\Freescale\Freescale_MQX_4_0\config\twrk60d100m

 

Leslie

Original Attachment has been moved to: user_config.h.zip

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

587 次查看
leslieyang0509
Contributor II

Problem solved.

Remove all #include <stdio.h>

Do not include stdio.h in project to avoid redeclaration.

Leslie