<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Modern GCC and Eclipse environment for NRF51</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/3140/modern-gcc-and-eclipse-environment-for-nrf51</link><description>Hi 
 Let&amp;#39;s see if you can help me :-) 
 I&amp;#39;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&amp;#39;t include the Eclipse project, only the Keil files.</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 29 Sep 2014 00:55:16 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/3140/modern-gcc-and-eclipse-environment-for-nrf51" /><item><title>RE: Modern GCC and Eclipse environment for NRF51</title><link>https://devzone.nordicsemi.com/thread/11621?ContentTypeID=1</link><pubDate>Mon, 29 Sep 2014 00:55:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d2cf043d-acb1-4d52-8688-bb539cb8a733</guid><dc:creator>Nguyen Hoan Hoang</dc:creator><description>&lt;p&gt;For those who are still struggling with Eclipse for nRF51.  Look over here &lt;a href="http://embeddedsoftdev.blogspot.ca/p/ehal-nrf51.html"&gt;embeddedsoftdev.blogspot.ca/.../ehal-nrf51.html&lt;/a&gt;.  Get my startup code instead.  It is generic for all ARM GCC C and C++.  No problem debugging with jtag.  Nordic startup code does not work for C++.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Modern GCC and Eclipse environment for NRF51</title><link>https://devzone.nordicsemi.com/thread/11619?ContentTypeID=1</link><pubDate>Mon, 28 Jul 2014 15:32:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:70918912-b40f-4aae-a76c-ec16a5db2d7a</guid><dc:creator>Elena</dc:creator><description>&lt;p&gt;Hi again&lt;/p&gt;
&lt;p&gt;Finally I tested the HRS example by using my Eclipse environment and I had no problems. All I had to do is to modify the linker file (gcc_nrf51_blank_xxaa.ld) in order to fit the SD in flash and RAM memory. For SD s110, v7.0:&lt;/p&gt;
&lt;p&gt;FLASH (rx) : ORIGIN = 0x00016000, LENGTH = 0x2A000
RAM (rwx) :  ORIGIN = 0x20002000, LENGTH = 0x2000&lt;/p&gt;
&lt;p&gt;This change, of course, is only needed when using a SoftDevice.&lt;/p&gt;
&lt;p&gt;Cheers,&lt;/p&gt;
&lt;p&gt;Elena&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Modern GCC and Eclipse environment for NRF51</title><link>https://devzone.nordicsemi.com/thread/11618?ContentTypeID=1</link><pubDate>Mon, 21 Jul 2014 13:54:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c779536e-51fa-45f3-b849-de1d9b4888e1</guid><dc:creator>Elena</dc:creator><description>&lt;p&gt;Hi Scott&lt;/p&gt;
&lt;p&gt;I haven&amp;#39;t tried yet the ble_app_hrs example because we are having hardware problems with the project. Until we don&amp;#39;t fix these problems I can&amp;#39;t continue the tests with Eclipse. But for now, if you download the attached file of my initial post, you can start working with Eclipse. Don&amp;#39;t forget to modify the gcc_startup_nrf51.S file as according in the reply.&lt;/p&gt;
&lt;p&gt;We are in touch.&lt;/p&gt;
&lt;p&gt;Cheers,&lt;/p&gt;
&lt;p&gt;Elena&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Modern GCC and Eclipse environment for NRF51</title><link>https://devzone.nordicsemi.com/thread/11620?ContentTypeID=1</link><pubDate>Fri, 18 Jul 2014 06:33:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:525bd2b8-e9a1-43bf-b86e-c428b7bc9281</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;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&amp;#39;re on windows and tell the debugger not to flash the chip before it starts.&lt;/p&gt;
&lt;p&gt;I will say I&amp;#39;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&amp;#39;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.&lt;/p&gt;
&lt;p&gt;Since I moved to Crossworks I&amp;#39;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.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Modern GCC and Eclipse environment for NRF51</title><link>https://devzone.nordicsemi.com/thread/11617?ContentTypeID=1</link><pubDate>Thu, 17 Jul 2014 23:56:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9ecfbca2-b356-4b6f-84ae-5288c4c55eb5</guid><dc:creator>Scott Piette</dc:creator><description>&lt;p&gt;Elena, please keep us posted on your progress.  I was never able to get eclipse working.  You may take a look at &lt;a href="http://sourceforge.net/projects/nrf51osx/"&gt;sourceforge.net/.../&lt;/a&gt;  I found this plug in most effective in getting a project to build, however I was not able to get it to flash.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Modern GCC and Eclipse environment for NRF51</title><link>https://devzone.nordicsemi.com/thread/11616?ContentTypeID=1</link><pubDate>Thu, 17 Jul 2014 16:42:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6025d369-82a6-43d3-8a96-3ec8b73f5d47</guid><dc:creator>Vince</dc:creator><description>&lt;p&gt;When it comes to embedded systems, I like to use the -nostdlib flag (which implies -nostartfiles). This gives me the illusion of controlling what&amp;#39;s going on ;-) Anyway I&amp;#39;m glad I could help and, as I&amp;#39;m currently fighting with the HRS example, I suppose we&amp;#39;ll meet again on the forum.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Modern GCC and Eclipse environment for NRF51</title><link>https://devzone.nordicsemi.com/thread/11615?ContentTypeID=1</link><pubDate>Thu, 17 Jul 2014 16:11:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ce55b52f-af39-45b1-940f-a899cba99e38</guid><dc:creator>Elena</dc:creator><description>&lt;p&gt;Incredible but truth!!!!!!! :-)&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve just tested with the blinking example and just works! In addition, compiling with the -nostartfiles option I get a .hex file of 3KB, which is the same size of obtained .hex using Keil.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve several things to do, but in the next few days I&amp;#39;ll test the Eclipse environment with the ble_app_hrs example. This example must be a bit more complicated because the SoftDevice, but should be something as easy as to modify the linker file. Right?&lt;/p&gt;
&lt;p&gt;Thanks a lot for your help&lt;/p&gt;
&lt;p&gt;Cheers&lt;/p&gt;
&lt;p&gt;Elena&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Modern GCC and Eclipse environment for NRF51</title><link>https://devzone.nordicsemi.com/thread/11614?ContentTypeID=1</link><pubDate>Thu, 17 Jul 2014 11:57:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9beb4ffe-dcd2-4a7f-ba3e-43c476c9e66d</guid><dc:creator>Vince</dc:creator><description>&lt;p&gt;Also, some references for those who want to dig further:&lt;/p&gt;
&lt;h2&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href="http://www.state-machine.com/arm/Building_bare-metal_ARM_with_GNU.pdf"&gt;www.state-machine.com/.../Building_bare-metal_ARM_with_GNU.pdf&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href="http://learningpearls.blogspot.ch/2011/02/start-function-inside-c.html"&gt;learningpearls.blogspot.ch/.../start-function-inside-c.html&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href="http://www.embecosm.com/appnotes/ean9/html/ch05s02.html"&gt;www.embecosm.com/.../ch05s02.html&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Modern GCC and Eclipse environment for NRF51</title><link>https://devzone.nordicsemi.com/thread/11613?ContentTypeID=1</link><pubDate>Thu, 17 Jul 2014 11:40:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1c733825-e05b-4331-84e5-19d4e359052b</guid><dc:creator>Vince</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I started installing the GNU Toolchain yesterday from the sources, so we don&amp;#39;t have exactly the same environment, yet I faced the same problem. For the records, so far, I&amp;#39;ve got:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;binutils-2.24&lt;/li&gt;
&lt;li&gt;newlib-1.20&lt;/li&gt;
&lt;li&gt;gcc-4.9.0&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So, no IDE for now. But, obviously, the problem has nothing to do with eclipse...&lt;/p&gt;
&lt;p&gt;I&amp;#39;m nothing like a libc(newlib) internals guru, so there might be some misleading clues in the following lines. My apologies in advance. This is how I understand the startup process:&lt;/p&gt;
&lt;p&gt;When using the standard C runtime library startup files, the very first entry point is crt0 which performs very low-level initialization. Then comes the crt1 and the &lt;strong&gt;_start()&lt;/strong&gt; function. AFAK, the goal of &lt;strong&gt;_start()&lt;/strong&gt; is to call &lt;strong&gt;main()&lt;/strong&gt; with its required parameters, and then &lt;strong&gt;_exit()&lt;/strong&gt;, to avoid a segmentation fault on program termination and pass the &lt;strong&gt;main()&lt;/strong&gt; exit code to the OS.&lt;/p&gt;
&lt;p&gt;In the case of the blinky_example, we have a pure bare metal project: no OS, no need to copy the code to the RAM before executing it, no parameters to main and no return value as the main is an infinite loop.The startup code is located in gcc_startup_nrf51.S which takes the role of crt0 and tries to call a &lt;strong&gt;_start()&lt;/strong&gt; function which doesn&amp;#39;t exit, because it is not needed.&lt;/p&gt;
&lt;p&gt;So, to make a long story short, I finally decided to replace the call to &lt;strong&gt;_start()&lt;/strong&gt; by a call to &lt;strong&gt;main()&lt;/strong&gt; and I got my LEDs blinking. I hope I haven&amp;#39;t broken other projects depending on the same startup file; It would probably have been cleaner to implement a &lt;strong&gt;_start()&lt;/strong&gt; function to call &lt;strong&gt;main()&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Anyway, I will be trying some more examples and we&amp;#39;ll see what happen.&lt;/p&gt;
&lt;p&gt;I hope that helped :)
Any comments appreciated&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vince&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Modern GCC and Eclipse environment for NRF51</title><link>https://devzone.nordicsemi.com/thread/11612?ContentTypeID=1</link><pubDate>Wed, 16 Jul 2014 16:05:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6b1d8e3a-5084-41ee-b2fe-499ff47b7a73</guid><dc:creator>Elena</dc:creator><description>&lt;p&gt;Hi Jimi!&lt;/p&gt;
&lt;p&gt;Thanks you a lot of. I saw the link you say in your second post, but not the others. Anyway, after checking them I don&amp;#39;t see more clues to continue. They are stuck in a point very similar to mine. So I don&amp;#39;t know how to follow...&lt;/p&gt;
&lt;p&gt;Thanks you again.&lt;/p&gt;
&lt;p&gt;Cheers&lt;/p&gt;
&lt;p&gt;Elena&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Modern GCC and Eclipse environment for NRF51</title><link>https://devzone.nordicsemi.com/thread/11611?ContentTypeID=1</link><pubDate>Wed, 16 Jul 2014 09:20:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0084020e-d50f-44c1-80c8-af3d6577fc51</guid><dc:creator>Jimi Cullen</dc:creator><description>&lt;p&gt;One more thing: have you seen this? &lt;a href="https://github.com/hlnd/nrf51-pure-gcc-setup"&gt;github.com/.../nrf51-pure-gcc-setup&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Modern GCC and Eclipse environment for NRF51</title><link>https://devzone.nordicsemi.com/thread/11610?ContentTypeID=1</link><pubDate>Wed, 16 Jul 2014 08:44:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1f05ebc7-bbdf-47e7-bc99-7092e3b5ac18</guid><dc:creator>Jimi Cullen</dc:creator><description>&lt;p&gt;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). &lt;a href="https://mbed.org/forum/platform-39-Nordic-nRF51822-community/topic/4896/"&gt;mbed.org/.../&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;EDIT: I don&amp;#39;t know how useful this will be to you, but here&amp;#39;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: &lt;a href="https://github.com/mbedmicro/mbed/pull/337"&gt;github.com/.../337&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>