This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Modern GCC and Eclipse environment for NRF51

Hi

Let's see if you can help me :-)

I've spent several days trying to compile the blinking example for NRF51822 in a more modern Eclipse environment. In fact, latest SDK versions of Nordic don't include the Eclipse project, only the Keil files. I can't understand this decision, mostly when Eclipse is one of the best dev environment in nowdays. Anyway, I've been trying to compile the included GCC example by clicking the .bat files, but with no sucess: The generated .hex file doesn't work. :-(

The NRF51 SDK v4 includes an Eclipse example, but using manual makefiles, and in the other hand, the generated .hex file doesn't work. Must be noticed that I'm using Yagarto 20121222, with GCC 4.7.2.

So, I've decided to create a more modern GCC environment using Eclipse, but I'm having problems with the startup files:

  1. When not using the -nostartfiles option, the generated .hex files has 93K, instead of 3K like the equivalent file generated by Keil. Of course, it doesn't work :-(. When trying to debug it, I lost the trace at _start call in the gcc_startup_nrf51.S. At this point, the execution jumps to crt0.o file, and I don't have the source. In fact, the crt0.o file weren't included by the latest Yagarto, but I get it from a previous version.

  2. When USING the -nostartfiles option, I get a problem in the gcc_startup_nrf51.S:

    D:\gcc\ble_app_hrs\Debug/../Platform/gcc_startup_nrf51.S:181: undefined reference to `_start'

So I think that the problem must be related to the crt0.S or crt0.o file. Using the -nostartfiles option together to the correct crt0.S should fix the problem. It is right?

What can I do? Any suggestion? I include an screenshot of the error, and the Eclipse environment. In case I finally fix the problems, I'll document and post the new Eclipse environment as alternative of Keil projects.

Thanks you in advance

Cheers,

Elena

image description ble_app_hrs.rar

Parents
  • Good luck with this; I hope you get it working [and share how you did it ;)]. You might find this thread on the mbed forums useful (some people talking about how they got the nRF51822 examples working with gcc). mbed.org/.../

    EDIT: I don't know how useful this will be to you, but here's a link to a long description of the efforts made by a guy in the thread I linked about about compiling for nRF51822 with gcc: github.com/.../337

Reply
  • Good luck with this; I hope you get it working [and share how you did it ;)]. You might find this thread on the mbed forums useful (some people talking about how they got the nRF51822 examples working with gcc). mbed.org/.../

    EDIT: I don't know how useful this will be to you, but here's a link to a long description of the efforts made by a guy in the thread I linked about about compiling for nRF51822 with gcc: github.com/.../337

Children
No Data
Related