nordic project in eclipse

nordicbeginner gravatar image

asked 2017-01-18 13:28:51 +0100

updated 2017-01-20 15:15:30 +0100

Makefile.windowsimage descriptionCapture.PNGhello i am trying to make nordic project in eclipse. for that iam following this tutorial. https://devzone.nordicsemi.com/tutorials/7/

i am following this section. Create a new Eclipse project

after i build my project. i am getting error in make file like

Description Resource    Path    Location    Type
make: *** [all] Error 2 blinky          C/C++ Problem
make[1]: *** [_build/system_nrf51.o] Error 2    blinky          C/C++ Problem
recipe for target '_build/system_nrf51.o' failed    Makefile    /blinky line 133    C/C++ Problem
recipe for target 'all' failed  Makefile    /blinky line 97 C/C++ Problem

can anyone help me how to solve it??

edit retag flag offensive close delete report spam


waiting for anyone's response

nordicbeginner ( 2017-01-19 10:23:51 +0100 )editconvert to answer

Which SDK are you using? Are you sure you performed every step of the tutorial as described?

Jørgen Holmefjord ( 2017-01-19 10:46:13 +0100 )editconvert to answer

i am using sdk11. https://devzone.nordicsemi.com/questi...link text. its my previous link. i performed every step

nordicbeginner ( 2017-01-19 11:05:25 +0100 )editconvert to answer

Are you using a clean version of the SDK? Not modified any Makefile, linker files or source/header files in the example you are using?

Jørgen Holmefjord ( 2017-01-19 13:34:19 +0100 )editconvert to answer

https://devzone.nordicsemi.com/tutori... like this tutorial, i change make file

Open and edit the SDK makefile to support debugging of your code. Locate the CFLAGS variables, and change ‘-O3’ to '-O0' for debugging to produce expected results (stack variables loaded directly to CPU registers,etc). Then add '-g3' to CFLAGS to include debug symbols in the .out file (GNU manual).

nordicbeginner ( 2017-01-19 14:05:23 +0100 )editconvert to answer

i have not added any source files yet

nordicbeginner ( 2017-01-19 14:34:38 +0100 )editconvert to answer

i followed just three steps. (1) Start Eclipse, enter file -> new Makefile project with existing code in the menu bar. Name your project and browse the directory of your Makefile. Click finish once you are done. (2)Open and edit the SDK makefile to support debugging of your code. Locate the CFLAGS variables, and change ‘-O3’ to '-O0' for debugging to produce expected results (stack variables loaded directly to CPU registers,etc). Then add '-g3' to CFLAGS to include debug symbols in the .out file (GNU manual). (3)Configure the build settings and build the project, see the instructions from the Import existing Eclipse project to workspace section above and verify that there are no build errors before moving on to the next step.

nordicbeginner ( 2017-01-19 14:38:18 +0100 )editconvert to answer

i got these error after third steps

nordicbeginner ( 2017-01-19 14:38:50 +0100 )editconvert to answer

It seems that make is not particularly fond of spaces in the paths to the tool. I got the same errors, but after copying the directory GNU Tools ARM Embedded\4.9 2015q3 from C:\Program Files (x86) to C:\, replacing spaces with underscores, and updating the path in [SDK_ROOT]\components\toolchain\gcc\Makefile.windows, it compile without errors. Could you try this?

Jørgen Holmefjord ( 2017-01-20 14:10:44 +0100 )editconvert to answer

ok after modification my path is C:\GNU_Tools_ARM_Embedded\5.4 2016q3

nordicbeginner ( 2017-01-20 14:55:15 +0100 )editconvert to answer

content of Makefile.windows is

ifeq ($(findstring 86, $(ProgramFiles)), ) PROGFILES := C:/Program Files else PROGFILES := C:/Program Files (x86) endif

GNU_INSTALL_ROOT := $(PROGFILES)/GNU_Tools_ARM_Embedded/5.4 2016q3 GNU_VERSION := 5.4.1 GNU_PREFIX := arm-none-eabi

nordicbeginner ( 2017-01-20 14:56:16 +0100 )editconvert to answer

You should add a underscore to the second directory as well: 5.4_2016q3. In your Makefile, you should set: GNU_INSTALL_ROOT := C:/GNU_Tools_ARM_Embedded/5.4_2016q3.

Jørgen Holmefjord ( 2017-01-20 14:57:58 +0100 )editconvert to answer

i got error in comand line too. in previous case, i am not getting error in command line

nordicbeginner ( 2017-01-20 14:58:41 +0100 )editconvert to answer

uploaded screen shot capture.PNG

nordicbeginner ( 2017-01-20 15:00:25 +0100 )editconvert to answer

i changed it. but still i am getting error like i have uploaded screenshot

nordicbeginner ( 2017-01-20 15:03:48 +0100 )editconvert to answer

Are you sure you changed it to exactly what I wrote? Can you upload a new image showing the new output? I have the exact same setup and it works fine. Can you also upload your Makefile.windows file?

Jørgen Holmefjord ( 2017-01-20 15:08:46 +0100 )editconvert to answer

yes i have. i have uploaded screenshot and Makefile.windows

nordicbeginner ( 2017-01-20 15:14:29 +0100 )editconvert to answer

You did not replace $(PROGFILES) with C:/ in Makefile.windows as I wrote above. Use this file.

Jørgen Holmefjord ( 2017-01-20 15:17:12 +0100 )editconvert to answer

yes its work in sdk12

nordicbeginner ( 2017-01-20 15:27:05 +0100 )editconvert to answer

Description Resource Path Location Type Cannot find include folder: ../../../config Makefile /blinky line 173 C/C++ Problem Cannot find include folder: ../../../config/blinky_pca10028 Makefile /blinky line 173 C/C++ Problem

nordicbeginner ( 2017-01-20 15:28:42 +0100 )editconvert to answer

waiting for your response https://devzone.nordicsemi.com/users/...

nordicbeginner ( 2017-01-23 15:27:11 +0100 )editconvert to answer

Did you follow the instructions in the tutorial to Enable auto discovery of symbols, include paths and compiler settings? Have you checked that the directories is actually there (relatvie to the Makefile)? By default there should not be a blinky_pca10028 directory inside the config folder.

Jørgen Holmefjord ( 2017-01-24 11:15:38 +0100 )editconvert to answer

hi i did these steps (1)file -> New -> Makefile project with existing code (2) i select C:\nRF5_SDK_12.1.0_0d23e2a\examples\peripheral\blinky\pca10028\blank\armgcc path , select cross gcc (3)then i write settings in make VERBOSE=1 in settings and described tutorial. (4)Enter project properties -> C/C++->Preprocessor Include Paths,etc.->Providers Click on CDT GCC Build Output Parser and change the compiler command pattern from (gcc)|([gc]++)|(clang) to (.gcc)|(.[gc]++) then apply changes. Click on CDT Built-in Compiler Settings Cross ARM and replace ${COMMAND} with arm-none-eabi-gcc and click Apply.

then i build

nordicbeginner ( 2017-01-24 12:34:32 +0100 )editconvert to answer

Did you select Cross GCC or Cross ARM GCC in step 2?

Jørgen Holmefjord ( 2017-01-24 13:15:25 +0100 )editconvert to answer

i tried both. and getting error in both

nordicbeginner ( 2017-01-24 13:30:12 +0100 )editconvert to answer

You say you select C:\nRF5_SDK_12.1.0_0d23e2a\examples\peripheral\blinky\pca10028\blank\armgcc, did you do this that is described in the tutorial?:

"Note regarding SDK 12 9/30-16 - Makefile structure was changed in SDK 12.0.0; there are now two separate Makefiles for each example; the project makefile that defines the example dependencies/flags, and makefile.common to actually build the specified targets. It should only be necessary to modify the project makefile as before. However, apparently the CDT parser does not like that we added quoted toolchain strings. E.g., "C:/Program Files (x86)/GNU Tools ARM Embedded/4.9 2015q3/bin/arm-none-eabi-gcc".

Included a patched version of Makefile.common, see list of attachments at the end of this tutorial."

Jørgen Holmefjord ( 2017-01-24 13:35:47 +0100 )editconvert to answer

i can't understand what is this

nordicbeginner ( 2017-01-24 13:49:36 +0100 )editconvert to answer

should i use another sdk??

nordicbeginner ( 2017-01-24 13:50:03 +0100 )editconvert to answer

If you are using SDK 12.x you have to change Makefile.common with the one linked in the Tutorial. The tutorial is written for SDK 11. Also, can you try the solution described in the comment on the GCC/Eclipse tutorial on Dec. 5, 2016, 9:14 p.m. by @bradyhurlburt?

Jørgen Holmefjord ( 2017-01-24 14:36:06 +0100 )editconvert to answer

1 answer

Sort by » oldest newest most voted
hnhoan gravatar image

answered 2017-01-20 17:36:27 +0100

It would probably a lot easier to work with Eclipse project instead of makefile. See this blog.

edit flag offensive delete publish link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer. Do not ask a new question or reply to an answer here.

[hide preview]

Question Tools

1 follower


Asked: 2017-01-18 13:28:51 +0100

Seen: 265 times

Last updated: jan. 20