Importing into NBEclipse

From NetBurner Wiki

Jump to: navigation, search

Importing a Project into Eclipse or NBEclipse

If you have an existing project you want to use in Eclipse or have downloaded a zipped project from this wiki, you will need to import the project into Eclipse before you start using it. This can be accomplished in the following steps.

  1. From the Eclipse main screen, select File->Import...
  2. Select General->Existing Projects into workspace.
  3. If you are importing a zipped project enable the Select archive file: radio button otherwise enable the Select root directory: and browse to the zip file or folder. Once selected, the Project will appear under the Projects: box.

Image:ImportProjects.png

  1. Click Finish to finish the import. The project will import into Eclipse and build automatically.
  2. If you get a java.lang.NullPointerException, odds are good the target platform did not get set properly. Use the Project Properties to set the target to your particular processor as shown in the image.

Image:SetTargetPlatform.png

Importing an external pre-existing Project

If you have a project that predates Eclipse and and would like to run it within Eclipse, you need only to import it. This can be accomplished in the following steps.

  1. First create a new NetBurner Device Executable for your target processor. Leave it completely empty.
  2. From the Eclipse main screen, select File->Import...
  3. Select General->File System. This allows the selection of a directory to import into Eclipse.

Image:ImportFileSystem.png

  1. Browse to the base folder of your project. This folder should contain main.cpp or your src folder. It should also contain an html folder if your project is hosting a web page.
  2. Select (check) all source files that need to be included to build the project. This usually includes all .cpp, .c, .s, .h files.
    1. Expand the html folder if your project is hosting a web page. If the project was previously under version control you may want to drill into the HTML folder and make sure folders like .svn aren't included. The image shows an example of this in progress.
    2. If it exists, ensure that htmldata.cpp is not imported into your new project. This is a special file generated by NetBurner that should be treated like an object file.
    3. Use the Browse... button next to the Into Folder area and select the project you created in the first step.
  3. Click Finish to finish the import. The project will import into Eclipse and build automatically.