This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Eclipse example project nRF52

Hi

I tried following the eclipse installation tutorial: devzone.nordicsemi.com/.../ And after a while I got eclipse to handle the Nordic stuff, but when I try to import a project there is no armcc folder in my SDK. I tried loading an existing project and then manually adding all of the sources. It does recognize all of the imported header files, but nothing actually matches up. I have 124 errors, everything that is not pure C is an error. I tried to find an example project for eclipse that I could try importing but I found none. Does anyone have at least a blinky project that I can directly import into eclipse from a archived file or something like that? I'm not sure if its just the project broken, or I messed up the installation, or some version of something changed which affected the installation.

  • I think Eclipse, to import a project, wants a file with suffix ".project". In other words, a file whose contents is XML that describes the settings and location of source files for the "project".

  • No, I was wrong. You need to choose either the archive or the "root directory" that was unzipped, when importing a project into Eclipse. The archive must contain a ".project" file, but you choose the directory above it. See my answer below

  • Using Eclipse, to import an example file from the Nordic tutorial:

    1. Download the example, say to Download/foo.zip

    2. Start Eclipse

    3. Choose File>Import. Expect a dialog titled "Import" to open.

    4. Select (click on) "General>Existing projects into workspace". Choose the "Next" button. Expect another dialog saying "Select a directory to search for existing Eclipse projects".

    5. Select the radio button "Select archive file". Choose the "Browse" button. Expect a file chooser dialog to open.

    6. Browse to and select the file "Downloads/foo.zip". Choose the "OK" button. Expect the file chooser dialog to close and for the previous dialog to reappear, now with the "Finish" button enabled.

    7. Choose the "Finish" button. Expect the dialog to close and for a new project to appear in the "Project Explorer" pane of Eclipse.

    I tested this with Eclipse Neon version on Linux. It might be slightly different with other OS or version of Eclipse.

    You might still need to edit the Makefile if you did not follow the tutorial exactly with respect to where you downloaded the SDK, which SDK you downloaded, or other matters. For example, today the tutorial only has an example project for blinky and SDK11. If you try to use SDK12 with that example project, you might need to edit the Makefile (because the filenames changed, and the SDK changed.) The recommendation is to follow the tutorial exactly.

  • @Dajgoro: Where did you get that nRF5x_MDK_8_9_0 from ?

  • Thanks for the help! I was able to import the archive, but I had to manually replace the /home/butch... entries with my sdk location. Once I did that most of the issues were resolved but all the function calls in counter.cpp were still invalid. Since I don't need that anyway, I just commented everything that was giving an error just to see if I can compile it. When I try to build I get the following errors regarding the makefile: Description Resource Path Location Type Program "" not found in PATH ble_control C/C++ Problem Program "echo" not found in PATH ble_control Project Properties, C++ Preprocessor Include.../Providers, [CDT GCC Built-in Compiler Settings Cross ARM] options C/C++ Scanner Discovery Problem Program "make" not found in PATH nRFCounter C/C++ Problem

    I am not really an expert in tailoring makefiles, I only used it for simple C projects. How do I fix the makefile?

Related