Creating an LPCXpresso project with existing src files

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

Creating an LPCXpresso project with existing src files

6,185件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by ktownsend on Sat Dec 04 03:38:42 MST 2010
I'd like to create an LPCXpresso project for a library that I've been working on for the LPC1343 and LPC1114 to allow people to debug the code in LPCXpresso as well (along with the current Crossworks and CodeLite project files). Unfortunately, not being all that familiar with lpcxpresso I haven't had any luck getting it to work with the directory structure I need to use.

I have the following structure:

<projectroot>
/build
   /codelite
   /crossworks
   /lpcxpresso
/core
   /adc
   /cpu
   /gpio
   ... etc. ...
/drivers
   /eeprom
   /sensors
   ... etc. ...
/lpc1xxx
common files in the root folder (main.c, projectconfig.h, etc.)

Is it possible to create a simple project file in lpcxpresso that points to a relative path two levels higher? For example, if my project files are stored in: <projroot>/build/lpcxpresso, all the actuals C files are in the path '../..' relative to the lpcxpresso project dir. I don't want to have to import everything into the lpcxpresso folder or to have the lpcxpresso project files in root since not everyone uses the same tools/IDE.

For reference sake, the code can be seen here if anyone has some suggestions on creaitng a project file: http://code.google.com/p/lpc1343codebase/downloads/list
0 件の賞賛
返信
15 返答(返信)

5,852件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by thommaughan on Fri Mar 11 20:40:56 MST 2016
Thanks for the pointers
0 件の賞賛
返信

5,852件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by starblue on Thu Mar 10 12:36:13 MST 2016
You can also enable automatic refresh under Window -> Preferences -> General -> Workspace.
There are two options, I only have "Refresh on access" set and that works well for me.
I don't know their exact meaning, I think when I enabled it there was only one. You could try which setting works best for you.
I change files under Eclipse all the time, usually as a result of biggish Git operations with tools outside of Eclipse, and that works quite well. The only thing that causes trouble is removing the .project file, in case the project doesn't yet exist in the version I'm checking out. In that case it helps to close the project first.
0 件の賞賛
返信

5,852件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by vtw.433e on Thu Mar 10 09:29:26 MST 2016

Quote: thommaughan
I'm prone to jumping out of Eclipse into a command line, then doing a copy, then trying to figure out how to tell Eclipse project about the copy - this is especially painful with a directory.



I wouldn't recommend copying files into a project from the command line, but if you must, in the IDE, right-click on the project and select "Refresh Project". This will find all new files in the project directory tree.
0 件の賞賛
返信

5,852件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by thommaughan on Thu Mar 10 08:53:35 MST 2016
I figured out my problem.   I'm prone to jumping out of Eclipse into a command line, then doing a copy, then trying to figure out how to tell Eclipse project about the copy - this is especially painful with a directory.

Here's what worked to do a project copy:

1) Create a new project - for me, I used LPCOpen chip support for the 11u24 but not the board support

2) build and verify all is good

3) I'm creating the new (copy) project in the workspace of the original project.   Using the project browser select the source files in the 'from project' and right-click copy.  Note: DO NOT leave Eclipse for the command line, allow the IDE to do all chores for proper xml and miasma knitting.   In the 'to project', select that project src directory, the right-click paste.    For me, I had to fix up some includes in the c files, but then all seemed to build.



0 件の賞賛
返信

5,852件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by vtw.433e on Thu Mar 10 07:23:24 MST 2016
Have you tried drag and drop? So, from an explorer window, drag the files to your lpcxpresso project.
0 件の賞賛
返信

5,852件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by thommaughan on Thu Mar 10 06:13:31 MST 2016
Simple tasks like adding a file to a project or creating a copy of a project are very challenging for the new user, especially if you have been using an intuitive IDE.  Eclipse has many capabilities and can do many things but it is quite a chore to do simple things.

I am trying to make a copy of an existing project to fork my code to a new board.   I'm searching the LPCXpresso help files, googling, trying things in the tool but am missing some understanding. 

I've copied the source files out of the project and have been working to import them or to create a new project but am clearly not getting it.   Is there a tutorial or a step by step?

Thanks,

Thom
0 件の賞賛
返信

5,852件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Tue Dec 07 10:43:04 MST 2010
"Import existing projects" is expecting to find an (Eclipse) project to import. You are looking for the standard Eclipse File->Import..., General, File system, which can be used to import anything from the file system
0 件の賞賛
返信

5,852件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by ktownsend on Tue Dec 07 10:11:41 MST 2010

Quote: CodeRedSupport
All "classic Eclipse" functionality is available in LPCXpresso, so I am not sure what you mean by being 'easy' in classic eclipse - it should be the same!

The suggestion of using XML scripts was to enable you to not only import the files, but also make all the project settings too. You can also prompt the user for input and modify files etc while doing it.



I'm going to try to put together a simple XML script since it looks like the easiest route.  In terms of Eclipse, I was able to place the two project files two folders higher than all of the source with no problems (build/eclipse), leaving all the source files where they were.  I don't have Eclipse (Yagarto in this case) installed on this PC, but it was just a matter of de-selecting a checkbox on an import dialogue off the top of my head.
0 件の賞賛
返信

5,850件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by ktownsend on Tue Dec 07 10:00:51 MST 2010
That only seems to work if you already have a project (image attached). I'll give the xml route a try, though, and see where that gets me. Or perhaps I can dig around in an existing project file and manually add in the relative file locations.
0 件の賞賛
返信

5,850件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Tue Dec 07 09:57:57 MST 2010

Quote: KTownsend
Thanks for the suggestion ... it might be worth  thinking about improving the file import in the future, though.  In  classic Eclipse I had no problem setting up a project with the files two  levels higher without having to make custom XML scripts, etc.  What  about adding files later, for example, after the first XML-based import?   That said, without purchasing a license to the commercial RedSuite, I  can't really complain much either, and it's still a good deal for the  price. ;)


All "classic Eclipse" functionality is available in LPCXpresso, so I am  not sure what you mean by being 'easy' in classic eclipse - it should be  the same!

The suggestion of using XML scripts was to enable you to not only import  the files, but also make all the project settings too. You can also  prompt the user for input and modify files etc while doing it.
0 件の賞賛
返信

5,850件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by NXP_USA on Tue Dec 07 09:39:06 MST 2010

Quote: KTownsend
I recall being able to get something working in Eclipse, but don't see an option in the LPCXpresso IDE to import just the references leaving the files where they are.  Perhaps I'm just missing something obvious, but there's nothing in the standard import dialogues anyway ...



Try using the Import Existing Projects option in the QuickStart panel in the "Import and Export" section. Then uncheck the checkbox that reads "Copy projects into workspace."
0 件の賞賛
返信

5,850件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by ktownsend on Tue Dec 07 02:08:47 MST 2010
Thanks for the suggestion ... it might be worth thinking about improving the file import in the future, though.  In classic Eclipse I had no problem setting up a project with the files two levels higher without having to make custom XML scripts, etc.  What about adding files later, for example, after the first XML-based import?  That said, without purchasing a license to the commercial RedSuite, I can't really complain much either, and it's still a good deal for the price. ;)
0 件の賞賛
返信

5,850件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Sun Dec 05 10:37:08 MST 2010
You are probably thinking of "Import *existing project*" where, you can leave the existing files where they are. If you "Import (from) file system", then there is no such option.

One thing you might like to consider is "Smart Import Wizard". NXP are about to release some new projects which use this, and we use the same technology for the New Project creation wizards (and TI already use it for their StellarisWare projecst). For an example, look in <install>/Wizards/System/NXP/lpc17/freeRTOS_LPC17.xml.

The basic concept is that you provide a description of your project in XML, including which files/directories to import, and which settings you wish to use, and the IDE will create a Managed project for you. Note that this is a feature written by Code Red and is thus only available in LPCXpresso/Red Suite, and not other Eclipse based IDEs.
0 件の賞賛
返信

5,850件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by ktownsend on Sun Dec 05 04:17:49 MST 2010
I recall being able to get something working in Eclipse, but don't see an option in the LPCXpresso IDE to import just the references leaving the files where they are.  Perhaps I'm just missing something obvious, but there's nothing in the standard import dialogues anyway ...
0 件の賞賛
返信

5,850件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Sat Dec 04 18:36:34 MST 2010
It sounds like what you want to do is 'Import' the source/header files, but without copying them into your project space. So, select Import, but be certain the check box for copying the files into your project is unchecked.

Regards,
CodeRedSupport
0 件の賞賛
返信