0
\$\begingroup\$

I am working on a project to move from the mbed platform, to some custom hardware. I am using the nRF51822 from Nordic. I have just exported my nRF51-DK project to GCC (ARM Embedded) and extracted it and opened it in Eclipse. It is not building however. I am getting an error code, saying

[file:/Users/george/Downloads/project_1V0/nRF51822/source/nordic-sdk/components/drivers_nrf/ble_flash/ble_flash.c#1]nse/nRF51822/source/nordic-sdk/components/drivers_nrf/ble_flash/ble_flash.c:1 
make: *** missing separator.  Stop.

Should it not be flash.c ? Is there anything else I was supposed to do, rather than just running it straight out of the box?

Here is my export screen - showing the options I have from Mbed

\$\endgroup\$
4
  • \$\begingroup\$ Are you exporting your mbed project as gnu GCC and then importing to Eclipse as gnu GCC project? \$\endgroup\$ Commented Sep 4, 2015 at 15:09
  • \$\begingroup\$ @FernandoLuizCola I exported as GCC (ARM Embedded) and in eclipse, "create new makefile project with existing code". \$\endgroup\$ Commented Sep 4, 2015 at 16:49
  • \$\begingroup\$ what OS you are using? \$\endgroup\$ Commented Sep 4, 2015 at 19:33
  • \$\begingroup\$ @FernandoLuizCola Mac OSX \$\endgroup\$ Commented Sep 5, 2015 at 20:29

1 Answer 1

1
\$\begingroup\$

I manage to compile a Mbed project in Eclipse. I used Kinetis Design Studio but i'm sure that you can use a normal version of Eclipse C/C++ as well.

I´ve downloaded my mbed project as GNU (Arm Embedded) imported the project to Eclipse as an Existing Code as Makefile Project.

Importing project

Configure the toolchain as Cross GCC

choosing cross compile

In the project properties, configure Make

Since I'm using Windows, I had to use the make binary from Cygwin

uncheck the Use default build command and past the path to your make binary.

configuring make

Add your compiler to the PATH. I used GCC ARM Embedded

adding compiler to the path

Build your project

Build

I got two errors:

Program "g++" not found in PATH

Program "gcc" not found in PATH

But I guess this not a problem, just a minor configuration.

Hope it Helps!

\$\endgroup\$
4
  • \$\begingroup\$ What does GNU GCC mean? I don't seem to have this option? See the new image in my question for my options. \$\endgroup\$ Commented Sep 6, 2015 at 11:12
  • \$\begingroup\$ Ah yes, the GCC(Arm Embedded) option of mbed is the GNU GCC that I mention ( just look at the GNU logo on the option =D ). I will fix this in my answer =D \$\endgroup\$ Commented Sep 6, 2015 at 11:56
  • \$\begingroup\$ I am using a Nordic target (nrf51822) does that change any of the make config steps? As I can see reference to the LPC family and freescale? \$\endgroup\$ Commented Sep 7, 2015 at 8:41
  • \$\begingroup\$ @GeorgeEdwards I don't think so. When you download the project from mbed as GCC (ARM Embedded) you can just compile it with a compiler and a make file. The project comes with all the target specific configuration from mbed. When you configure Eclipse ( or in my case Kinect Studio ) it will just use the make file and compile. \$\endgroup\$ Commented Sep 8, 2015 at 11:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.