<?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>nRF52 development using clang</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/50605/nrf52-development-using-clang</link><description>Hello, 
 
 
 We are running a pretty massive nRF52832, SDK14.2, softdevice5.0.0, freertos based project built using Keil&amp;#39;s &amp;quot;default compiler version 5&amp;quot; 
 For various reasons we are considering moving to llvm clang compiler either in SES environment or</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 12 Aug 2019 11:55:21 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/50605/nrf52-development-using-clang" /><item><title>RE: nRF52 development using clang</title><link>https://devzone.nordicsemi.com/thread/203566?ContentTypeID=1</link><pubDate>Mon, 12 Aug 2019 11:55:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6a9a48e7-4632-4e54-9533-46c2dda13a80</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Sorry, but there are no current plans to add&amp;nbsp;LLVM/clang to the nRF5 SDK.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 development using clang</title><link>https://devzone.nordicsemi.com/thread/203557?ContentTypeID=1</link><pubDate>Mon, 12 Aug 2019 11:39:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4ccf6437-966c-4a97-b9b6-5847da8ed3c2</guid><dc:creator>eyalasko</dc:creator><description>[quote userid="2115" url="~/f/nordic-q-a/50605/nrf52-development-using-clang/203490"]you can see that most compilers perform equally when optimizing for size[/quote]
&lt;p&gt;actually when it comes to RAM consumption, I come the opposite conclusion...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 development using clang</title><link>https://devzone.nordicsemi.com/thread/203555?ContentTypeID=1</link><pubDate>Mon, 12 Aug 2019 11:36:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ad6e7342-0bd5-4e1e-87d7-9ed36a00977a</guid><dc:creator>eyalasko</dc:creator><description>&lt;p&gt;Thanks.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;We are aware of the git repo you&amp;#39;ve mentioned. We have tried to follow the instructions with SDK14.2 with limited success.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Is there any clang support on Nordic&amp;#39;s roadmap on the foreseeable future?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 development using clang</title><link>https://devzone.nordicsemi.com/thread/203490?ContentTypeID=1</link><pubDate>Mon, 12 Aug 2019 07:36:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0c80260d-a918-41a8-8c51-c9330dbdd08c</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I just want to initially point out that armclang / llvm is not supported in nRF5 SDK, so please be aware that there might be&amp;nbsp;unwanted side effects by using this toolchain.&lt;/p&gt;
[quote user=""]I&amp;#39;ve seen some pretty old posts (e.g. RK&amp;#39;s comment &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/14401/compile-sdk11-with-arm-compiler-version-6/54994#54994"&gt;here&lt;/a&gt;, and &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/5562/using-clang-and-the-s110-issues-with-supervisor-calls-to-the-softdevice/19484#19484"&gt;here&lt;/a&gt;) that the app breaks/softdevice calls not supported when using clang compiler. Is this still the case?[/quote]
&lt;p&gt;&amp;nbsp;Yes, that would still be the case. llvm/clang is close to gcc compatible, but not 100 % on the asm parts, and other ARM specific attributes (SVC for instance).&lt;/p&gt;
[quote user=""]Is there a (reasonably) easy way to make the project clang/Keil V6 compatible?[/quote]
&lt;p&gt;&amp;nbsp;I haven&amp;#39;t tried since SDK 13/14, but other forum users have. From the first thread you linked to, you can find a link to this github repo:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/eblot/nrf5-llvm"&gt;https://github.com/eblot/nrf5-llvm&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;You can try it out and see if that works for you.&lt;/p&gt;
[quote user=""]Are there any Code/RAM/Performance deltas when comparing Keil V5 and clang? (I&amp;#39;ve found &lt;a href="https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/comparing-compilersides-for-development-with-nrf5x"&gt;this&lt;/a&gt; old post , but it compares gcc only and its outdated)[/quote]
&lt;p&gt;I am not sure if moving to llvm/armclang would be the best option if you&amp;#39;re looking to tune your code, but for research purposes, it makes sense to look at it.&lt;/p&gt;
&lt;p&gt;From the link you posted, you can see that most compilers perform equally when optimizing for size. Without having done any testing with llvm/armclang in a while, I do suspect that the performance would be similar to other ARM compilers out there (IAR, gcc, armcc).&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 development using clang</title><link>https://devzone.nordicsemi.com/thread/202763?ContentTypeID=1</link><pubDate>Wed, 07 Aug 2019 08:38:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4f572d39-1480-4d2c-a142-480af78f874e</guid><dc:creator>Dmitry</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I can confirm that the problem&amp;nbsp;exists in&amp;nbsp;SDK 15.3.0 (SVCALL is implemented in the same way). We&amp;#39;re also considering&amp;nbsp;to use&amp;nbsp;6.x compiler, so looking forward..&lt;/p&gt;
&lt;p&gt;Concerning code/RAM results, maybe statistics from our project will be interesting for you.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;v5.06 (-O2): Full build time 0:43, Program Size: Code=27962 RO-data=13030 RW-data=308 ZI-data=10024
v6.9 (-Os balanced): Full build time 2:06, Program Size: Code=32600 RO-data=8392 RW-data=92 ZI-data=10236&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;A noticeable difference in RO-data is because LLVM removes unused&amp;nbsp;constant sections (for example, we have sha256/512 common source where sha512 functions are not called, v5.06 leaves sha512 transform tables in resulting image).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 development using clang</title><link>https://devzone.nordicsemi.com/thread/202737?ContentTypeID=1</link><pubDate>Wed, 07 Aug 2019 06:43:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b8c7a0a9-d437-40d0-8b12-c2929d36e8cd</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Hi eyalasko,&lt;/p&gt;
&lt;p&gt;The clang expert on our team is on holiday and will be back on Monday. He will answer to this post.&amp;nbsp; I know the posts you linked in but I am worried that this information might be outdated.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>