<?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>KEIL build with SDK 16.0.0 fails</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/72282/keil-build-with-sdk-16-0-0-fails</link><description>I am trying to port my build from Eclipse (based on the GCC tool chain) to a KEIL uVision build system. 
 I am using KEIL ARM Compiler version 6.15. Most of the files compile fine except for the file: &amp;#39;nrf_svci_async_function.h&amp;#39; (and its dependencies</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 04 Mar 2021 21:49:24 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/72282/keil-build-with-sdk-16-0-0-fails" /><item><title>RE: KEIL build with SDK 16.0.0 fails</title><link>https://devzone.nordicsemi.com/thread/297920?ContentTypeID=1</link><pubDate>Thu, 04 Mar 2021 21:49:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b9a261ae-b842-4826-8c76-365e1ceaed07</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;That is a good idea.&amp;nbsp;I can&amp;#39;t discuss Nordic&amp;#39;s roadmap details here on DevZone. For such questions, please contact our RSM (Regional Sales Manager) for your region. If you are already in contact with a Sales Rep, you can use that person. If not, please let me know if you are interested in the RSM details. Send me a PM containing your location, and I will send you the contact details.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: KEIL build with SDK 16.0.0 fails</title><link>https://devzone.nordicsemi.com/thread/297890?ContentTypeID=1</link><pubDate>Thu, 04 Mar 2021 17:37:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:780a96fc-4d58-488f-8101-93bcb350b38e</guid><dc:creator>RVM</dc:creator><description>&lt;p&gt;This is like pulling teeth here....&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Maybe I should send an email to my Nordic FAE/Sales Rep and ask them when they will be releasing a version that is compatible with ARM KEIL compiler versions 6.x&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: KEIL build with SDK 16.0.0 fails</title><link>https://devzone.nordicsemi.com/thread/297693?ContentTypeID=1</link><pubDate>Thu, 04 Mar 2021 08:55:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:27db3108-6b04-4257-89dd-c51b2eb62ec5</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1614848101962v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/index.html" rel="noopener noreferrer" target="_blank"&gt;https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/index.html&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: KEIL build with SDK 16.0.0 fails</title><link>https://devzone.nordicsemi.com/thread/297601?ContentTypeID=1</link><pubDate>Wed, 03 Mar 2021 16:28:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:31a28220-a1f1-483a-b5c3-d6d468e0f60f</guid><dc:creator>RVM</dc:creator><description>&lt;p&gt;If it helps Nordic to fix the SDK, here is the offending piece of code from the file &amp;#39;nrf_svci.h&amp;#39; in SDK 16.0.0, starting from line 123.&lt;/p&gt;
&lt;p&gt;The problem is in the assembler command at line 133:&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;quot; ldr r12, = %0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; \n&amp;quot; &lt;br /&gt;The =%0 gets translated to, in my specific case, as&amp;nbsp;&amp;nbsp; &amp;#39;=#3&amp;#39; and that is invalid ARM assembly command.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#if defined (__GNUC__)

    #define SVCI_DECL_0(svci_num, return_type, function_name)           \
        _Pragma(&amp;quot;GCC diagnostic push&amp;quot;)                                  \
        _Pragma(&amp;quot;GCC diagnostic ignored \&amp;quot;-Wreturn-type\&amp;quot;&amp;quot;)             \
        __attribute__((naked, unused))                                  \
        static return_type svci_ ## function_name(void)                 \
        {                                                               \
            /* Do the SuperVisor call by using svc instruction with     \
               R12 containing the SVCI number */                        \
            __ASM __volatile                                            \
            (                                                           \
                &amp;quot;  ldr r12, =%0       \n&amp;quot;                               \
                &amp;quot;  svc %1             \n&amp;quot;                               \
                &amp;quot;  bx lr              \n&amp;quot;                               \
                &amp;quot;  .ltorg&amp;quot;                                              \
                : /* output */                                          \
                : /* input */                                           \
                    &amp;quot;X&amp;quot;(svci_num),                                      \
                    &amp;quot;I&amp;quot;(GCC_CAST_CPP NRF_SVCI_SVC_NUM)                  \
                : /* clobbers */                                        \
                    &amp;quot;r12&amp;quot;                                               \
            );                                                          \
        }                                                               \
        _Pragma(&amp;quot;GCC diagnostic pop&amp;quot;)    
    
    #define SVCI_DECL(svci_num, return_type, function_name, ...)        \
        _Pragma(&amp;quot;GCC diagnostic push&amp;quot;)                                  \
        _Pragma(&amp;quot;GCC diagnostic ignored \&amp;quot;-Wreturn-type\&amp;quot;&amp;quot;)             \
        __attribute__((naked, unused))                                  \
        static return_type svci_ ## function_name(__VA_ARGS__)          \
        {                                                               \
            /* Do the SuperVisor call by using svc instruction with     \
               R12 containing the SVCI number */                        \
            __ASM __volatile                                            \
            (                                                           \
                &amp;quot;  ldr.w r12, =%0     \n&amp;quot;                               \
                &amp;quot;  svc %1             \n&amp;quot;                               \
                &amp;quot;  bx lr              \n&amp;quot;                               \
                &amp;quot;  .ltorg&amp;quot;                                              \
                : /* output */                                          \
                : /* input */                                           \
                    &amp;quot;X&amp;quot;(svci_num),                                      \
                    &amp;quot;I&amp;quot;(GCC_CAST_CPP NRF_SVCI_SVC_NUM)                  \
                : /* clobbers */                                        \
                    &amp;quot;r12&amp;quot;                                               \
            );                                                          \
        }                                                               \
        _Pragma(&amp;quot;GCC diagnostic pop&amp;quot;)
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: KEIL build with SDK 16.0.0 fails</title><link>https://devzone.nordicsemi.com/thread/297600?ContentTypeID=1</link><pubDate>Wed, 03 Mar 2021 16:24:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:95600533-fcac-492d-986a-8b5107b04e51</guid><dc:creator>RVM</dc:creator><description>&lt;p&gt;The release note says that one needs to &amp;#39;download a previous version of the MDK&amp;#39; from another website, and not to mention that it only works with KEIL compiler version 5.x&lt;/p&gt;
&lt;p&gt;My question was if there was a version that will build with KEIL compiler version 6.x&lt;/p&gt;
&lt;p&gt;But I am not getting an answer to that question.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: KEIL build with SDK 16.0.0 fails</title><link>https://devzone.nordicsemi.com/thread/297599?ContentTypeID=1</link><pubDate>Wed, 03 Mar 2021 16:21:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4d4d0f3d-3cee-4cff-80cb-6f0e2effddc9</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;The SDK Release Notes say what versions of tools they work with&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: KEIL build with SDK 16.0.0 fails</title><link>https://devzone.nordicsemi.com/thread/297598?ContentTypeID=1</link><pubDate>Wed, 03 Mar 2021 16:17:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5c3355f0-73a8-4d66-8cfa-9891da1552fe</guid><dc:creator>RVM</dc:creator><description>[quote userid="6462" url="~/f/nordic-q-a/72282/keil-build-with-sdk-16-0-0-fails/297594#297594"]&lt;p&gt;If it really is the compiler, then that&amp;#39;s a question for Keil - not Nordic.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://community.arm.com/developer/tools-software/tools/f/keil-forum"&gt;https://community.arm.com/developer/tools-software/tools/f/keil-forum&lt;/a&gt;&lt;/p&gt;[/quote]
&lt;p&gt;Well, my original post was a request to get a version of the SDK that builds with KEIL compiler -- a question to Nordic, not KEIL. Besides, the problem is in the ASM fragment that translates and forwards the SoftDevice service call to the SVC handler, also provided by Nordic. &lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: KEIL build with SDK 16.0.0 fails</title><link>https://devzone.nordicsemi.com/thread/297594?ContentTypeID=1</link><pubDate>Wed, 03 Mar 2021 16:11:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f0e293dd-2f5e-4de6-9b3f-802893eeee0c</guid><dc:creator>awneil</dc:creator><description>[quote userid="86158" url="~/f/nordic-q-a/72282/keil-build-with-sdk-16-0-0-fails"]the ARM Compiler defines the symbol __GNUC__ [/quote]
&lt;p&gt;Are you sure it&amp;#39;s the &lt;em&gt;compiler&lt;/em&gt;, and not something in the Nordic stuff that is defaulting to __GNUC__ in the absence of anything else it recognises?&lt;/p&gt;
&lt;p&gt;If it &lt;em&gt;is&lt;/em&gt; in the code, you should be able to find it with &amp;#39;Go To Definition&amp;#39;&lt;/p&gt;
[quote userid="86158" url="~/f/nordic-q-a/72282/keil-build-with-sdk-16-0-0-fails"]is there any other option to convince the KEIL build system to not define __GNUC__[/quote]
&lt;p&gt;If it really is the compiler, then that&amp;#39;s a question for Keil - not Nordic.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://community.arm.com/developer/tools-software/tools/f/keil-forum"&gt;https://community.arm.com/developer/tools-software/tools/f/keil-forum&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You could check if there are any other uniquely identifying symbols for CC_ARM - and use that to #undef __GNUC__&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: KEIL build with SDK 16.0.0 fails</title><link>https://devzone.nordicsemi.com/thread/297587?ContentTypeID=1</link><pubDate>Wed, 03 Mar 2021 15:51:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ccce1de0-0e94-4f42-bff1-318d20bb6646</guid><dc:creator>RVM</dc:creator><description>&lt;p&gt;If it helps, starting with version 6.x, the ARM Compiler uses CLANG which is also used by GCC which leads to the side effect (not sure if it was intentional or accidental) that it defines the symbol __GNUC__.&lt;/p&gt;
&lt;p&gt;I did try to use version 5.x of the compiler but that led to a whole slew of other errors SDK, most of which I got rid of when I set the language to use C90 and GNU Extensions.... but I prefer something more recent and robust.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: KEIL build with SDK 16.0.0 fails</title><link>https://devzone.nordicsemi.com/thread/297583?ContentTypeID=1</link><pubDate>Wed, 03 Mar 2021 15:35:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fac6fa7a-5e73-4efc-9d95-97fec44f0b68</guid><dc:creator>RVM</dc:creator><description>&lt;p&gt;I found this in two ways.&lt;/p&gt;
&lt;p&gt;The initial indication is due to the fact that the GUI parses the files behind the scenes and enables code within valid #if .... #else ... clauses.&lt;/p&gt;
&lt;p&gt;The second, more accurate method, was that I edited the specific file and added a statement &amp;#39;#error FIXME&amp;#39; within the code fragment contained inside the #if defined(__GNUC__) .... #else combination and that line triggered that error and failed during the build.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: KEIL build with SDK 16.0.0 fails</title><link>https://devzone.nordicsemi.com/thread/297526?ContentTypeID=1</link><pubDate>Wed, 03 Mar 2021 13:28:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7f960faa-00c6-456f-bd12-6938220463a1</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I am not sure what setting that changes this. By searching for it it says that the __CC_ARM is &lt;a href="https://developer.arm.com/documentation/dui0491/c/Compiler-specific-Features/Compiler-predefines"&gt;always defined as 1 when using the Keil compiler&lt;/a&gt;. How did you determine that it was not?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Perhaps you can try to compare your project settings with one of the Keil projects found in our SDK and see if you can see anything that differs? If you can&amp;#39;t find anything, perhaps you need to ask Keil directly.&lt;/p&gt;
&lt;p&gt;Another option is to take a project that is already set up using Keil from our SDK, and swap it with your files.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>