BSP/PSP user_config.h setting problem

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

BSP/PSP user_config.h setting problem

787 Views
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

Tags (1)
0 Kudos
Reply
1 Reply

406 Views
leslieyang0509
Contributor II

Problem solved.

Remove all #include <stdio.h>

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

Leslie