Problem building projects

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

Problem building projects

4,277 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by andres.cass on Fri Sep 23 12:58:18 MST 2011
Hi.
I have some problems building projects in LPCXpresso 4.0 (the latest version). I'm using a LPC1769.
The problem appears when I try to build a project in startup.c
It says: ../src/cr_startup_lpc176x.c:51:28: fatal error: system_LPC17xx.h: No such file or directory

I configurate the include path right, and verificate that in more than three times. If I change the path manually in the include line its works, but the problem appears in the next include. So I think the problem is that the IDE is not working ok with the include paths.

I have a netbook with Intel Atom processor, Windows 7 Ultimate.
Please, if someone knows where is the problem and can help me, I thanks a lot.
0 Kudos
Reply
23 Replies

3,835 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by shiggy on Fri Dec 21 06:18:34 MST 2012
[B]I have added the 2 items [/B]
The resolve of "system_LPC17xx.h No such file of directory" is followings.
Please change:
At first setect your Project, then in Puldown menu|
|Property|C/C++Bulid|Settings|ToolsSettings|Symbol|
_USE_CMIS=CMISv2p00_LPC17XX
--> _USE_CMIS=CMISv2_LPC17XX

|Property|C/C++Bulid|Settings|ToolsSettings|Include|
"{workspace_loc:/CMSISvp200_LPC17xx/inx}"
----> "{workspace_loc:/CMSISv_LPC17xx/inx}"

|Property|C/C++Bulid|Settings|ToolsSettings|MCU Linker|Libary|
CMISv2p00_LPC17XX
---> CMISv2_LPC17XX

|Property|C/C++Bulid|Settings|ToolsSettings|MCU Linker|Libary serch path|
when Release case:
"${workspace_loc:/|CMISv2p00_LPC17XX/Release}"
---> "${workspace_loc:/|CMISv2_LPC17XX/Release}"

when Debud case:
"${workspace_loc:/|CMISv2p00_LPC17XX/Debug}"
---> "${workspace_loc:/|CMISv2_LPC17XX/Debug}"

----------------------------------------------------------------------
Exaplanation:
When you import the project into workspace, the above mentioned settings
already done. But when you make the your original project, the wrong or old
settings has been done unfortunately.
----------------------------------------------------------------------
Shiggy
0 Kudos
Reply

3,835 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by shiggy on Fri Dec 21 05:26:21 MST 2012
The resolve of "system_LPC17xx.h No such file of directory" is followings.
Please change:
At first setect your Project, then in Puldown menu|
|Property|C/C++Bulid|Settings|ToolsSettings|Symbol|
_USE_CMIS=CMISv2p00_LPC17XX
    --> _USE_CMIS=CMISv2_LPC17XX

|Property|C/C++Bulid|Settings|ToolsSettings|Include|
"{workspace_loc:/CMSISvp200_LPC17xx/inx}"
----> "{workspace_loc:/CMSISv_LPC17xx/inx}"

Exaplanation:
When you import the project into workspace, the above mentioned settings
already done. But when you make the your original project, the wrong or old
settings has been done unfortunately.

Shiggy
0 Kudos
Reply

3,835 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by shiggy on Fri Dec 21 05:23:08 MST 2012

Quote: lipny
I experience the same problem - also under WIN XP SP3;
[SIZE=3]ver LPCXpresso v4.2.0 [Build 264] [24/02/2012] [/SIZE]

I imported project examples (eg. adc, buzzer) from lpc17xx.new.zip and when I try to "build all" I get this:

[SIZE=2][COLOR=red]fatal error: system_LPC17xx.h: No such file or directory[/COLOR][/SIZE]

[SIZE=2]No need to say that I tried to set INC paths everywhere I could: project scope, file scope etc. Did not work.[/SIZE]

[SIZE=2]In general I would expect that :[/SIZE]
[SIZE=2]- example project opened immediatelly after installation (done with all location defaults etc) should just WORK[/SIZE]
[SIZE=2]- user interface will be simple and straightforward[/SIZE]

[SIZE=2]I also get very often JAVA NULL POINTER crash messages - eg. when I try to create a brand new project (not from example).[/SIZE]

[SIZE=2]And in the above at least it should tell the user what is the FULL PATH it expects the file to be in: [/SIZE]
[SIZE=2][COLOR=seagreen][COLOR=black](just an example) :[/COLOR] C:\nxp\LPCXpresso_4.2.0_264\lpcxpresso\Examples\NXP\LPC1000\LPC17xx\examples.lpc17xx.new\system_LPC17xx.h: No such file or directory[/COLOR][/SIZE]

[SIZE=2]So as for me at this stage XPRESSO IDE is good for nothing. I would revert back to CoIDE for now and look elsewhere for something that is FRIENDLY and WORKING. [/SIZE]

[SIZE=2]I should have listened to my [SIZE=2]colleagues at work who said that Xpresso IDE is waste of time. One of them managed somehow (after hours of pain) to create his OWN project for HIS target PCB fitted with his LPC uC but then he also gave up after experiencing crash after crash during debugging. [/SIZE]

:(
[/SIZE]


The resolve of "system_LPC17xx.h No such file of directory" is followings.
Please change:
At first setect your Project, then in Puldown menu|
|Property|C/C++Bulid|Settings|ToolsSettings|Symbol|
_USE_CMIS=CMISv2p00_LPC17XX
    --> _USE_CMIS=CMISv2_LPC17XX

|Property|C/C++Bulid|Settings|ToolsSettings|Include|
"{workspace_loc:/CMSISvp200_LPC17xx/inx}"
----> "{workspace_loc:/CMSISv_LPC17xx/inx}"

Exaplanation:
When you import the project into workspace, the above mentioned settings
already done. But when you make the your original project, the wrong or old
settings has been done unfortunately.

Shiggy
0 Kudos
Reply

3,836 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by blubba on Thu Jul 12 04:39:42 MST 2012

Quote: CodeRedSupport
So the issue you are seeing is the location of your workspace - which appears to be on a network drive referenced using a UNC path....

...

But the reason that the build fails is because the version of the CDT used by LPCXpresso 4 (version 7) does not support the use of UNC pathnames in include paths.

Thus the easiest way to solve your problem would be to move your workspace to a local drive - and this will avoid other potential issues (build and network mentioned above) that you might encounter going forward.



Wow, that was the key here. All examples now compile without further problems. Thank you such much for your help!
0 Kudos
Reply

3,836 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Wed Jul 11 02:16:58 MST 2012
So the issue you are seeing is the location of your workspace - which appears to be on a network drive referenced using a UNC path....


Quote:
[FONT=Courier New][SIZE=2]arm-none-eabi-gcc -D__REDLIB__ -DDEBUG -D__CODE_RED  -D__USE_CMSIS=CMSISv2p00_LPC17xx -I"[B]\\psf\Home\My  Documents\LPCXpresso_4.2.3_292\workspace\CMSISv2p00_LPC17xx\inc[/B]" .....[/SIZE][/FONT]

At a fundamental level, we wouldn't recommend placing workspaces on a network drive - build performance will definitely suffer, especically as the size of your projects increase. You'll also see quite a bit of network traffic whilst builds take place.

But the reason that the build fails is because the version of the CDT used by LPCXpresso 4 (version 7) does not support the use of UNC pathnames in include paths.

Thus the easiest way to solve your problem would be to move your workspace to a local drive - and this will avoid other potential issues (build and network mentioned above) that you might encounter going forward.

If you absolutely have to use your networked drive, then the simplest way to work around this issue would be to change the way that the include paths are set up in your project.

To do this, select each project in turn in the Project Explorer view, and use:

[FONT=Courier New][SIZE=2]Project Properties -> C/C++ Build -> Settings -> Tool Settings -> MCU C Compiler -> Includes[/SIZE][/FONT]

to change the include paths from:


Quote:
[FONT=Courier New][SIZE=2]"${workspace_loc:/CMSISv2p00_LPC17xx/inc}"[/SIZE][/FONT]

to:


Quote:
[FONT=Courier New][SIZE=2]"../../CMSISv2p00_LPC17xx/inc"[/SIZE][/FONT]

You will need to do this for both the Debug and Release build configurations for each project.

Remember also, if you change the way your own projects are structured, you may have to change/extend your include paths if you use this way of specifying them.

Regards,
CodeRedSupport
0 Kudos
Reply

3,836 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by blubba on Tue Jul 10 12:58:06 MST 2012

Quote: CodeRedSupport
From squinting at your video very hard, it looks like you are importing the examples from 'LPCXpresso176x_cmsis2.zip' and these fail to build.

These examples all build without any problem here under LPCXpresso 4.2.3 (I'm running Win7-32bit).

Can you try:

1) Select one of the projects that fails in the Project Explorer view.
2) Click on the Clean [I]<project>[/I] option in the Quickstart Panel.
3) Click on the  Build [I]<project>[/I] option in the Quickstart Panel.
4) Post the text from the "Build log", which will show up the actual command being invoked, as well as the error...

Please also confirm what version of LPCXpresso you are running and on which OS.




Yes, I was compiling the examples from LPCXpresso176x_cmsis2.
I am using LPCXpresso_4.2.3 under WinXP.

Here's the build log from a clean build of the "timers" example:
http://pastebin.com/qzMx8zk3
(I should note that the make on a cleaned project first successfully compiles a cmsis library, then erases the build log too fast to capture and then starts the output in the pastebin)
0 Kudos
Reply

3,836 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Tue Jul 10 05:57:36 MST 2012
From squinting at your video very hard, it looks like you are importing the examples from 'LPCXpresso176x_cmsis2.zip' and these fail to build.

These examples all build without any problem here under LPCXpresso 4.2.3 (I'm running Win7-32bit).

Can you try:

1) Select one of the projects that fails in the Project Explorer view.
2) Click on the Clean [I]<project>[/I] option in the Quickstart Panel.
3) Click on the  Build [I]<project>[/I] option in the Quickstart Panel.
4) Post the text from the "Build log", which will show up the actual command being invoked, as well as the error...

http://support.code-red-tech.com/CodeRedWiki/BuildConsole

[The text in your video is too small and blurry to make out]

Please also confirm what version of LPCXpresso you are running and on which OS.

Regards,
CodeRedSupport.
0 Kudos
Reply

3,833 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by blubba on Tue Jul 10 04:53:03 MST 2012

Quote: CodeRedSupport
It is unclear from the history exactly what you did wrong. But what you should be doing is this.

[LIST]
[*]Create a new workspace
[*]In the Quickstart view, press Import Project(s)
[*]In the [B]Project archive[/B] group, browse to the Examples/NXP/LPC1000/LPC17xx directory and choose one of the zip files, such as LPCXpresso176x_cmsis2.zip
[*]Press Next and then Finish
[*]Now, in Project Explorer, select one the projects (such as blinky) and in the Quickstart view, press Debug'(project name)'
[/LIST]
The project will be built and a debug session will be started.



I have exactly the same problem as the original poster: the examples provided with the IDE fail to compile.

The procedure you outline here also does not work for me. To demonstrate, I recorded a screencast with a new CodeRed install, as you can see it stumbles over an a missing system_LPC17xx.h: http://vimeo.com/45501212

It seems like the connection to the CMSIS isn't working, even though it is listed in the includes. Manually adding system_LPC17xx.h also only partially solves the problem, as the examples then trip over other includes.

What needs to be done to get at least the examples work?
0 Kudos
Reply

3,836 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Sat Apr 07 04:04:19 MST 2012

Quote: lipny

So tell me what did I wrong ?


It is unclear from the history exactly what you did wrong. But what you should be doing is this.


[LIST]
[*]Create a new workspace
[*]In the Quickstart view, press Import Project(s)
[*]In the [B]Project archive[/B] group, browse to the Examples/NXP/LPC1000/LPC17xx directory and choose one of the zip files, such as LPCXpresso176x_cmsis2.zip
[*]Press Next and then Finish
[*]Now, in Project Explorer, select one the projects (such as blinky) and in the Quickstart view, press Debug'(project name)'
[/LIST]
The project will be built and a debug session will be started.

I think that what you are misunderstanding, is how examples are shipped, and how you get them into your workspace. We supply examples as 'Project archives' in a zip file. You bring these projects into the IDE using Import. Do not try to unzip the files and copy them into the workspace. Just use Import and select the zip file directly.

HTH
0 Kudos
Reply

3,836 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Fri Apr 06 18:07:06 MST 2012

Quote: lipny
I don't get your answer. I did not say that including a header file is too difficult



Then include it.


Quote: lipny
So tell me what did I wrong ?



Don't know that. Don't know what you've done already. Don't know what you are trying to do. Last post you mentioned you want to use COOCOX again and you expect something working easy out of the box.


Quote:

[SIZE=2][COLOR=red]fatal error: system_LPC17xx.h: No such file or directory[/COLOR][/SIZE]

is showing you that this file has to be included. So where is it?
Usually this file is included in CMSIS, so you have to include and Build CMSIS.
A lot of samples are using CMSIS and therefore working out of the box without mutilating project settings.
0 Kudos
Reply

3,836 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lipny on Fri Apr 06 17:33:36 MST 2012
I don't get your answer. I did not say that including a header file is too difficult.
I said that brand new installation of the IDE and examples, using all installation defaults does not allow me to run the simplest example without errors.

So tell me what did I wrong ?

And your sarcasm about 'header file' is unjustified
0 Kudos
Reply

3,836 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Fri Apr 06 17:10:53 MST 2012

Quote: lipny
[SIZE=2]I should have listened to my [SIZE=2]colleagues at work....[/SIZE][/SIZE]




Yes, you should have. Including a header file is too difficult, so use something easier.

Try mbed http://mbed.org/
0 Kudos
Reply

3,836 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lipny on Fri Apr 06 16:56:35 MST 2012
I experience the same problem - also under WIN XP SP3;
[SIZE=3]ver LPCXpresso v4.2.0 [Build 264] [24/02/2012]
[/SIZE]
I imported project examples (eg. adc, buzzer) from lpc17xx.new.zip and when I try to "build all" I get this:
[SIZE=2]
[COLOR=red]            fatal error: system_LPC17xx.h: No such file or directory[/COLOR]

No  need to say that I tried to set INC paths everywhere I could: project scope, file scope etc. Did not work.

In general I would expect that :
- example project opened immediatelly after installation (done with all location defaults etc) should just WORK
- user interface will be simple and straightforward

I also get very often JAVA NULL POINTER crash messages - eg. when I try to create a brand new project (not from example).

And in the above at least it should tell the user what is the FULL PATH it expects the file to be in:
[COLOR=seagreen][COLOR=black](just an example) :[/COLOR]    C:\nxp\LPCXpresso_4.2.0_264\lpcxpresso\Examples\NXP\LPC1000\LPC17xx\examples.lpc17xx.new\system_LPC17xx.h: No such file or directory[/COLOR]
[COLOR=#2e8b57][/COLOR]
So as for me at this stage XPRESSO IDE is good for nothing. I would revert back to CoIDE for now and look elsewhere for something that is FRIENDLY and WORKING.

I should have listened to my [SIZE=2]colleagues at work who said that Xpresso IDE is waste of time. One of them managed somehow (after hours of pain) to create his OWN project for HIS target PCB fitted with his LPC uC but then he also gave up after experiencing crash after crash during debugging. [/SIZE]

:(
[/SIZE]
0 Kudos
Reply

3,836 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by clkunde on Sat Dec 31 16:40:50 MST 2011
I had the same problem.

Very simple. Do not use directories name with accent or special characteres.

LPCxpresso can't find paths with it.
0 Kudos
Reply

3,836 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by halhertani on Sun Oct 09 21:30:27 MST 2011
The build configuration for the CMSIS library and target project(s) has to be set individually to the same configuration....."release" or to "debug".

Basically all active projects in your workspace have to have the same "build configuration". Just setting the build configuration for one of them is not enough. Because Eclipse views the CMSIS library as an additional project, the build configuration of the library must match that of target project(s). I hope this helps and good luck!
0 Kudos
Reply

3,836 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by nsalzman on Tue Oct 04 13:39:18 MST 2011

Quote: TheFallGuy
If you have the same problem, you probably need to read the same FAQ... Hint: compiler settings can be applied to a project, a directory, or a file. If you have set it on a file, you won't see it on the project...



Tried that, no luck. All I am doing is installing the IDE, importing all of the projects from one of the example archives (NXP_LPCXpresso1769_MCB1700_2011-02-11.zip) and trying to build the project 'timer'. The build fails.

Switching to the command line and going to the timer\Debug directory and running make clean followed by make all produces the following output:

Building file: ../src/cr_startup_lpc176x.c
Invoking: MCU C Compiler
arm-none-eabi-gcc -D__REDLIB__ -DDEBUG -D__CODE_RED -D__USE_CMSIS=CMSISv2_LPC17x
x -I"D:\projects\lpcxpresso\samples\1769\lpcx\CMSISv2_LPC17xx\inc" -O0 -Os -g3 -
Wall -c -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections -mcp
u=cortex-m3 -mthumb -MMD -MP -MF"src/cr_startup_lpc176x.d" -MT"src/cr_startup_lp
c176x.d" -o"src/cr_startup_lpc176x.o" "../src/cr_startup_lpc176x.c"
../src/cr_startup_lpc176x.c:51:28: fatal error: system_LPC17xx.h: No such file o
r directory
compilation terminated.
make: *** [src/cr_startup_lpc176x.o] Error 1

The -I switch refers to a location that is not and has never been on my machine, I assume it refers to the location of that file when the project was originally exported. When I go back to the IDE and look at the properties for the file cr_startup_lpc176x.c it shows the following options for the compiler:

-D__REDLIB__ -DDEBUG -D__CODE_RED -D__USE_CMSIS=CMSISv2_LPC17xx -I"D:\LPCXpresso\workspace3\CMSISv2_LPC17xx\inc" -O0 -Os -g3 -Wall -c -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections -mcpu=cortex-m3 -mthumb

Where the -I switch refers to the proper location on the computer. These options are the same for all of the files in the project. Scattered throughout the project (timer.map, makefile, etc.) are references to the directory that is not on my computer. The machine is running Windows XP sp3

When I follow the exact same steps on a Windows 7 machine, it works fine.

Please help.
0 Kudos
Reply

3,836 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by TheFallGuy on Mon Oct 03 14:11:57 MST 2011
If you have the same problem, you probably need to read the same FAQ... Hint: compiler settings can be applied to a project, a directory, or a file. If you have set it on a file, you won't see it on the project...
0 Kudos
Reply

3,836 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by nsalzman on Mon Oct 03 07:19:38 MST 2011
I am having the exact same problem.  Everything looks fine in the IDE under the build settings, and it has the -I switch pointing to the correct locations.  However, when I actually go to build and run make clean and make all from the command line, that switch is not included and the build fails because it cannot find the includes.  I also have the same situation where it builds fine on a windows 7 machine, but then the exact same project fails on a different machine running windows XP.  Any ideas?
0 Kudos
Reply

3,836 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Sun Sep 25 10:28:27 MST 2011
I think you probably need to read this FAQ:
http://support.code-red-tech.com/CodeRedWiki/PerFileProperties
0 Kudos
Reply

3,836 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by andres.cass on Sat Sep 24 17:27:12 MST 2011
In the workspace I have two projects: 0_Blinky_basic and 1_Blinky_Systick. Both very simple, just makes the LED on the LPC1768 blinks. And the librery Lib_CMSISp0_and_drivers_17xx.

The problem is just when I try to build the librery:
../Drivers/source/lpc17xx_exti.c:33:26: fatal error: lpc17xx_exti.h: No such file or directory
compilation terminated.
make: *** [Drivers/source/lpc17xx_exti.o] Error 1

And appears in the line wich has the include: #include "lpc17xx_exti.h"
I put manually the relative path in some includes and it builds the files with the relative path, but throw the error in the next file with the simple include.

The directory of the .c files that throw the errors is Lib_CMSISp0_and_drivers_17xx//Drivers/source/
and the directory of the .h files that are included is Lib_CMSISp0_and_drivers_17xx/Drivers/include/

The same workspace with the same configuration works perfectly in other Pcs with Windows XP.
I configurate the project for LPC1768 target. And configurate the Include paths in the Quick Settings well, it works perfect in other Pcs. I put in the include paths the directory of the .h files, but the IDE doesn't find them, and thats the point that I don't understand.
I try building de librery in Debug and in Release way and the result is the same.
If I try to build some project, the error occurs in the startup.c file, in the include lines, even if I had put the directories of the .h files in the Include Paths.

I have a Sony Vaio Netbook, with an Intel Atom processor, 2 GB RAM and Windows 7 Ultimate
0 Kudos
Reply