<?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>What are the differences between IAR and GCC ?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/25511/what-are-the-differences-between-iar-and-gcc</link><description>Hi everyone ! 
 We migrated a functional code from IAR to GCC compiler. But we got some trouble working it with GCC. The code compiles but it doesn&amp;#39;t act properly with GCC(I use nRF UART for debugging, we didn&amp;#39;t change any line of code). 
 Here is my</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 28 Sep 2017 09:22:17 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/25511/what-are-the-differences-between-iar-and-gcc" /><item><title>RE: What are the differences between IAR and GCC ?</title><link>https://devzone.nordicsemi.com/thread/100558?ContentTypeID=1</link><pubDate>Thu, 28 Sep 2017 09:22:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d7ec556e-0446-42cd-8f19-948208a426e0</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hamza, is it possible to allocate more flash for debugging, or do you have user data/bootloader above the application that prevents you from doing so?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: What are the differences between IAR and GCC ?</title><link>https://devzone.nordicsemi.com/thread/100559?ContentTypeID=1</link><pubDate>Thu, 28 Sep 2017 08:20:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:50770707-6a25-47b0-b99c-ead067b2d872</guid><dc:creator>Hamza</dc:creator><description>&lt;p&gt;Yes we tried, but the size is too large&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: What are the differences between IAR and GCC ?</title><link>https://devzone.nordicsemi.com/thread/100557?ContentTypeID=1</link><pubDate>Thu, 28 Sep 2017 07:57:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b9b2eb3d-dc7f-41c4-9f17-4a41dab6fb57</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;Ok, the make and linker file look good. Have you tried turning off optimization?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: What are the differences between IAR and GCC ?</title><link>https://devzone.nordicsemi.com/thread/100567?ContentTypeID=1</link><pubDate>Wed, 27 Sep 2017 22:01:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:68437eaf-029c-4981-8dbd-a6063dae46a5</guid><dc:creator>Francois</dc:creator><description>&lt;p&gt;:-). Thanks. I think we will try to have the debug working asap. Else we will stay stuck.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: What are the differences between IAR and GCC ?</title><link>https://devzone.nordicsemi.com/thread/100566?ContentTypeID=1</link><pubDate>Wed, 27 Sep 2017 21:59:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c9d129ea-e089-4adc-9f21-adae6fc9d2e7</guid><dc:creator>Nguyen Hoan Hoang</dc:creator><description>&lt;p&gt;Well, you said (as I understood it) that each works well but when putting altogether you get crap.  So first suspicion would be that.  If it&amp;#39;s not the case then you may have stack overflow or something or a re-entrance problem.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: What are the differences between IAR and GCC ?</title><link>https://devzone.nordicsemi.com/thread/100565?ContentTypeID=1</link><pubDate>Wed, 27 Sep 2017 21:02:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eb55efd4-0695-497f-9c23-2d49bcc98eb5</guid><dc:creator>Francois</dc:creator><description>&lt;p&gt;Instantiation?  Why changing compiler would affect this?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: What are the differences between IAR and GCC ?</title><link>https://devzone.nordicsemi.com/thread/100564?ContentTypeID=1</link><pubDate>Wed, 27 Sep 2017 19:34:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ad7827e9-536c-46db-a161-3d6b6711ac0d</guid><dc:creator>Nguyen Hoan Hoang</dc:creator><description>&lt;p&gt;have you check for shared resource conflict ? Page 17 of the Ref man.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: What are the differences between IAR and GCC ?</title><link>https://devzone.nordicsemi.com/thread/100556?ContentTypeID=1</link><pubDate>Wed, 27 Sep 2017 19:21:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ae0c006e-91fa-4cd4-bc63-b37cd795580d</guid><dc:creator>Francois</dc:creator><description>&lt;p&gt;our nrf51822-CEAA is packaged in ISP130301-BM. 256 kB Flash, 16 kB Ram. Serial number = ? as is it packaged.&lt;/p&gt;
&lt;p&gt;As we are using some features, these arguments are needed no (vs.unmodified makefile/linker)? (It was inside IAR config. files)
CFLAGS = -DSOFTDEVICE_PRESENT
-DBLE_DFU_APP_SUPPORT
-DNRF51
-DSPI_MASTER_0_ENABLE
-DSWI_DISABLE0
-DS110
-DBLE_STACK_SUPPORT_REQD&lt;/p&gt;
&lt;p&gt;Would adding these kind of arguments help?
CFLAGS += -D$(DEVICE_FAMILY) -D$(SOC)&lt;/p&gt;
&lt;p&gt;DEVICE_FAMILY	= NRF51
SOC = NRF51822_CEAA_CA_R //(or other?)&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: What are the differences between IAR and GCC ?</title><link>https://devzone.nordicsemi.com/thread/100562?ContentTypeID=1</link><pubDate>Wed, 27 Sep 2017 19:11:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3d747d6f-6a8b-4c20-b6ff-57aa9ba61377</guid><dc:creator>Francois</dc:creator><description>&lt;p&gt;We can&amp;#39;t really share our code publicly but most features work. Outputs are OK, memory is working, rtc is fine and ADC seems to be OK but altogether, the things goes nuts in a certain memory reading function shooting tons of data not voluntarily recorded (we don&amp;#39;t know if memory is full of crap data wrongly saved or if it&amp;#39;s the reading/sending loop that fails).  Debug is required, we will spend time on this tomorrow (if we manage to make it work). But could the Makefile argument be wrong?&lt;/p&gt;
&lt;p&gt;Will give chip details in previous post.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: What are the differences between IAR and GCC ?</title><link>https://devzone.nordicsemi.com/thread/100563?ContentTypeID=1</link><pubDate>Wed, 27 Sep 2017 19:06:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:acec4cf1-e0cc-434e-9275-2d6d299ffa5c</guid><dc:creator>Francois</dc:creator><description>&lt;p&gt;I&amp;#39;ll help Hamza as we are worgkin together (and we are both stuck).&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Our code leverage many features: ADC/TWI/GPIO/etc. It runs an RTC and an external flash MEMORY.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Our code was working flawlessly using IAR but our sponsorship ended and, due to their ridiculous licence fees (at least for us as programming this chip is not our core business), we had to migrate the code to Eclipse/GCC. Now doing most of the described tasks in different GIT/tutorials, we ended up compiling the code successfully. We now have hex for bootloader and application and no issue generating zip for OTA.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: What are the differences between IAR and GCC ?</title><link>https://devzone.nordicsemi.com/thread/100568?ContentTypeID=1</link><pubDate>Wed, 27 Sep 2017 15:34:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:478dee61-6866-4113-97f8-de4a70f3f2aa</guid><dc:creator>Nguyen Hoan Hoang</dc:creator><description>&lt;p&gt;Could you give a little more details on what is not working ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: What are the differences between IAR and GCC ?</title><link>https://devzone.nordicsemi.com/thread/100569?ContentTypeID=1</link><pubDate>Wed, 27 Sep 2017 12:18:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b66661c2-3c28-421c-8b23-9d9f8f7e01b2</guid><dc:creator>Hamza</dc:creator><description>&lt;p&gt;I will try the Eclipse native project, thank you. But the code compiles actually&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: What are the differences between IAR and GCC ?</title><link>https://devzone.nordicsemi.com/thread/100570?ContentTypeID=1</link><pubDate>Wed, 27 Sep 2017 11:50:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:29ee119b-d3ae-43eb-a46d-448ef75fade4</guid><dc:creator>Nguyen Hoan Hoang</dc:creator><description>&lt;p&gt;rename the &amp;#39;gcc_startup_nrf51.s&amp;#39; to &amp;#39;gcc_startup_nrf51.S&amp;#39;.  GCC require the big &amp;#39;S&amp;#39; to compile by default unless you have a flag to tell it to us small &amp;#39;s&amp;#39;.  I don&amp;#39;t remember what was the flag.&lt;br /&gt;
Check out this &lt;a href="https://embeddedsoftdev.blogspot.ca/p/ehal-nrf51.html"&gt;blog&lt;/a&gt;.  It uses Eclipse native project, easier to work with than using makefiles.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: What are the differences between IAR and GCC ?</title><link>https://devzone.nordicsemi.com/thread/100571?ContentTypeID=1</link><pubDate>Wed, 27 Sep 2017 11:44:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:01906c5c-5430-474f-9994-ea945fb7aebf</guid><dc:creator>Hamza</dc:creator><description>&lt;p&gt;Hello Nguyen Hoan Hoang,
I&amp;#39;m using Eclipse. I can flash the module and play with it using nrf UART, the majority of the functions work. I updated my question to put the Makefile and the linker script.
Thank you&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: What are the differences between IAR and GCC ?</title><link>https://devzone.nordicsemi.com/thread/100560?ContentTypeID=1</link><pubDate>Wed, 27 Sep 2017 11:41:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1c5ed9e8-ecc3-4cee-9b94-2a7c22771992</guid><dc:creator>Hamza</dc:creator><description>&lt;p&gt;Hi Martin Børs-Lind,
I&amp;#39;m using SDK and Softdevice v8.1. And actually the majority of functions work, it&amp;#39;s for that I&amp;#39;m asking these question. I also put the whole Makefile.&lt;/p&gt;
&lt;p&gt;Thanks for your answer&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: What are the differences between IAR and GCC ?</title><link>https://devzone.nordicsemi.com/thread/100555?ContentTypeID=1</link><pubDate>Wed, 27 Sep 2017 10:52:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:35b98ef3-c7c8-417c-875e-12478a4cb0e0</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;What SDK and Softdevice version are you using?&lt;/li&gt;
&lt;li&gt;Can you attach your linker script in your original answer?&lt;/li&gt;
&lt;li&gt;What is the complete serial number on top of  your nRF51?&lt;/li&gt;
&lt;li&gt;Have you tried to compile anything with an unmodified makefile and linker file from our SDK?&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: What are the differences between IAR and GCC ?</title><link>https://devzone.nordicsemi.com/thread/100561?ContentTypeID=1</link><pubDate>Wed, 27 Sep 2017 10:51:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:63db462c-64e4-4104-9de3-40f70a411833</guid><dc:creator>Nguyen Hoan Hoang</dc:creator><description>&lt;p&gt;I don&amp;#39;t know the IAR compiler but you can find the GCC makfile in the SDK examples.  You can use that to compare with yours.  At least the following flags are required for the linker &lt;code&gt;--specs=nano.specs -lgcc -lc -lm&lt;/code&gt;.  Check also the ld script and startup code.  Are you able to go into debug mode ? What environment IDE are you using ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>