Make problem when using complex folder structure

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Make problem when using complex folder structure

1,426件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by bjorn.juul on Mon Jan 27 06:02:42 MST 2014
Hi

I'm having quiet an annoying problem when building my problem.
I have a LPC1343 on a custom developed breakout board (Forebrain) from the former Universal Air Ltd, and compiling on LPCXpresso 6.1.2.

I got a semi-complex source folder structure, which I thought shouldn't be a problem, as I use an identical structure, when working with Atmel MCUs.
But when I try including my GPIO.h more than once in my files, it corrupts the building of the GPIO header file, and I end up with multiple errors such as:

unknown type name 'uint32_t'gpio.h/LPC1343_CodeBase/core/incline 22C/C++ Problem
make: *** [drivers/displays/tft/hw/lcd.o] Error 1LPC1343_CodeBase C/C++ Problem
expected declaration specifiers or '...' before '*' tokengpio.h/LPC1343_CodeBase/core/incline 28C/C++ Problem
expected '=', ',', ';', 'asm' or '__attribute__' before 'void'gpio.h/LPC1343_CodeBase/core/incline 40C/C++ Problem
expected '=', ',', ';', 'asm' or '__attribute__' before 'void'gpio.h/LPC1343_CodeBase/core/incline 54C/C++ Problem

If if remove the includes from all of my source files but one, the build ends succesfully.

I've tried to setting up the search paths and source paths, but nothing seems to do any good.
The file and include structure is represented in the illustration attached.

Can anyone figure this out?

Original Attachment has been moved to: LPC1343_workspace2.zip

0 件の賞賛
返信
3 返答(返信)

1,264件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Tue Jan 28 01:42:25 MST 2014
Have you include "LPC13xx.h"? This should be your FIRST include.
In future, why not look at a working Example (as provided in the Examples), to see what you are doing differently...
0 件の賞賛
返信

1,264件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by bjorn.juul on Tue Jan 28 01:00:39 MST 2014

Okay, that helped me get rid of the unknown type name, but I'm still stuck with the last part:

../core/gpio.h:57:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'

This error occurs when I try to include the GPIO.h in more than one file.

Am I missing something else?
0 件の賞賛
返信

1,264件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Mon Jan 27 06:49:00 MST 2014
If you look at the Build log, you will see the error says:
../core/gpio.h:22:24: error: unknown type name 'uint32_t

(it even tells you this when you hover over the error in the source file...)

gpio.h needs unit32_t defined, so you need to include stdint.h. This is included by default in core_cm3.h, or you can add it yourself.
0 件の賞賛
返信