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
  • I wrote the nrf51osx templates. In Eclipse flashing and debugging were always the hard bit, but using the GNU ARM Eclipse version of the JTag connector, which uses the gdb server, I did a lot better than the Eclipse built-in one and could flash and debug consistently. I also wrote a flasher for anyone on OSX, or you could use the command-line tools if you're on windows and tell the debugger not to flash the chip before it starts.

    I will say I've moved on to Crossworks now, it cost a little money but is so well set up for ARM development it was worth it. I definitely however had Eclipse working ok, you could use it, it's just not quite the Eclipse paradigm and it was clunky. Crossworks also has the huge major advantage that it has a full JLink driver built-in so it flashes and it debugs way better than Eclipse ever did and really ever could.

    Since I moved to Crossworks I've started actually getting work done at 3x the speed I did with Eclipse, where I was constantly messing about wondering if I could tweak it to be less hard to use.

Reply
  • I wrote the nrf51osx templates. In Eclipse flashing and debugging were always the hard bit, but using the GNU ARM Eclipse version of the JTag connector, which uses the gdb server, I did a lot better than the Eclipse built-in one and could flash and debug consistently. I also wrote a flasher for anyone on OSX, or you could use the command-line tools if you're on windows and tell the debugger not to flash the chip before it starts.

    I will say I've moved on to Crossworks now, it cost a little money but is so well set up for ARM development it was worth it. I definitely however had Eclipse working ok, you could use it, it's just not quite the Eclipse paradigm and it was clunky. Crossworks also has the huge major advantage that it has a full JLink driver built-in so it flashes and it debugs way better than Eclipse ever did and really ever could.

    Since I moved to Crossworks I've started actually getting work done at 3x the speed I did with Eclipse, where I was constantly messing about wondering if I could tweak it to be less hard to use.

Children
No Data
Related