<?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>Errors while building project in segger embedded studio</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/59985/errors-while-building-project-in-segger-embedded-studio</link><description>HI, I have following errors while building a project in segger embedded studio: 
 1. &amp;#39;TIMER1_INSTANCE_INDEX&amp;#39; undeclared here (not in a function) 
 2. &amp;#39;TIMER2_INSTANCE_INDEX&amp;#39; undeclared here (not in a function) 
 3.nrf.h: No such file or directory 
 The</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 08 Apr 2020 14:32:51 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/59985/errors-while-building-project-in-segger-embedded-studio" /><item><title>RE: Errors while building project in segger embedded studio</title><link>https://devzone.nordicsemi.com/thread/244107?ContentTypeID=1</link><pubDate>Wed, 08 Apr 2020 14:32:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0bb1c672-ecf8-4b55-9d7f-35023178c102</guid><dc:creator>Edvin</dc:creator><description>[quote user="Akkamahadevi"]This is a example of sdk modified a bit.[/quote]
&lt;p&gt;&amp;nbsp;Ok. Did it compile before you modified it a bit?&lt;/p&gt;
&lt;p&gt;SDK 11 is quite old. Is there a reason why you are still using that? I would suggest checking out SDK16, as they are a bit more user friendly lately. If you are using the nRF51, I suggest you use SDK12.3.0, which is the last one that supports nRF51. In my opinion it is a bit better than SDK11.&lt;/p&gt;
&lt;p&gt;It is complaining that e.g. TIMER1_INSTANCE_INDEX is not defined. If you open your nrf_drv_config.h file (included from nrf_drv_timer.h), you should see something like:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#define TIMER1_ENABLED 0

#if (TIMER1_ENABLED == 1)
#define TIMER1_CONFIG_FREQUENCY    NRF_TIMER_FREQ_16MHz
#define TIMER1_CONFIG_MODE         TIMER_MODE_MODE_Timer
#define TIMER1_CONFIG_BIT_WIDTH    TIMER_BITMODE_BITMODE_16Bit
#define TIMER1_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW

#define TIMER1_INSTANCE_INDEX      (TIMER0_ENABLED)
#endif&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Try to change the line:&lt;/p&gt;
&lt;p&gt;#define TIMER1_ENABLED 0&lt;br /&gt;to&lt;br /&gt;#define TIMER1_ENABLED 1&lt;/p&gt;
&lt;p&gt;After that the TIMER1_INSTANCE_INDEX should be defined.&lt;/p&gt;
&lt;p&gt;The same applies for TIMER2.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;As for the missing nrf.h file. Is the path to this file included in your project? Was it included before you modified the example?&lt;/p&gt;
&lt;p&gt;I am not entirely sure where it should be. It You are using SES with SDK11. SDK11 didn&amp;#39;t come with SES project files. How did you port it?&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><item><title>RE: Errors while building project in segger embedded studio</title><link>https://devzone.nordicsemi.com/thread/244101?ContentTypeID=1</link><pubDate>Wed, 08 Apr 2020 14:06:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c3fba382-a6b8-4446-abe3-6df9660a1d50</guid><dc:creator>Akkamahadevi</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;This is a example of sdk modified a bit. I have the sdk folder closer to c drive as suggested by you. But, i have all the above mentioned errors still there.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I have sdk 11.0, in which the keil version 5 project is imported to segger embedded studio project.&lt;/p&gt;
&lt;p&gt;Please help me eliminate these errors.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Errors while building project in segger embedded studio</title><link>https://devzone.nordicsemi.com/thread/244078?ContentTypeID=1</link><pubDate>Wed, 08 Apr 2020 12:23:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:659eadad-086f-4b4c-85d2-e2e31510585e</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Are you trying to compile an unmodified example from the SDK? If so, which one?&lt;/p&gt;
&lt;p&gt;If this is a custom example, then you are probably missing some header files.&lt;/p&gt;
&lt;p&gt;If this is one of the examples from the SDK, I suspect that the path to your SDK is too long. Compilers struggle to handle files with an absolute path of more than 250 something characters.&lt;/p&gt;
&lt;p&gt;Try to unzip the SDK closer to your C: drive, e.g.:&lt;/p&gt;
&lt;p&gt;C:\Nordic\SDKs\SDK16&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Let me know if that doesn&amp;#39;t work.&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>