<?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>nRF51822 &amp;quot;target folder&amp;quot; in mbed? (Really, how to live with the mbed API)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/5809/nrf51822-target-folder-in-mbed-really-how-to-live-with-the-mbed-api</link><description>Folks, 
 Newbie here with mbed, using nRF51-DK, but old hand with nRF51822, S110, SDK, J-Link, Keil MDK, etc. Trying to figure out how the mbed SDK API maps down onto the nRF51288 hardware. 
 For example, the standard mbed &amp;quot;Blinky&amp;quot; app contains the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 03 Mar 2015 01:15:58 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/5809/nrf51822-target-folder-in-mbed-really-how-to-live-with-the-mbed-api" /><item><title>RE: nRF51822 "target folder" in mbed? (Really, how to live with the mbed API)</title><link>https://devzone.nordicsemi.com/thread/20301?ContentTypeID=1</link><pubDate>Tue, 03 Mar 2015 01:15:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:36da05f4-43a8-4e5a-b7ba-17bae68323bd</guid><dc:creator>Mike Wirth</dc:creator><description>&lt;p&gt;Philip, thanks for being a trail blazer with the mbed environment.  I&amp;#39;ll undoubtedly have more mbed IDE questions for you :-)
Mike&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF51822 "target folder" in mbed? (Really, how to live with the mbed API)</title><link>https://devzone.nordicsemi.com/thread/20300?ContentTypeID=1</link><pubDate>Tue, 03 Mar 2015 00:01:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7cd265b5-ee96-46fc-9168-693f0a5f0d4d</guid><dc:creator>Philip Freidin</dc:creator><description>&lt;p&gt;Hi Mike,&lt;/p&gt;
&lt;p&gt;If you hover over the &amp;quot;A&amp;quot; in the multiple popups, one of them includes &amp;quot;TARGET_NRF51_DK&amp;quot;.&lt;/p&gt;
&lt;p&gt;In the program workspace pane (left side of the screen) select the &amp;quot;mbed&amp;quot; library in your project.&lt;/p&gt;
&lt;p&gt;On the right side of the screen, the &amp;quot;Library Build Details&amp;quot; pane should show up.
Click on the &amp;quot;Open Build Page&amp;quot;.  Find &amp;quot;TARGET_NRF51_DK&amp;quot; , and click on it, followed by
&amp;quot;TARGET_NORDIC&amp;quot;, &amp;quot;TARGET_MCU_NRF51822&amp;quot; , &amp;quot;TARGET_NRF51_DK&amp;quot;, and finally &amp;quot;PinNames.h&amp;quot;&lt;/p&gt;
&lt;p&gt;(all of which was shown when you hovered over the &amp;quot;A&amp;quot; that had TARGET_NRF51_DK in the path)&lt;/p&gt;
&lt;p&gt;At line 100 (also shown while hovering over the &amp;quot;A&amp;quot;) is the definition for LED1 for the DK board.
And all the other pin definitions for _DK.&lt;/p&gt;
&lt;p&gt;If you instead navigate to
/TARGET_NRF51_DK/TARGET_NORDIC/TARGET_MCU_NRF51822/Lib/nrf-sdk/app_common&lt;/p&gt;
&lt;p&gt;you will find the Nordic headers that you should be familiar with in the Keil environment.&lt;/p&gt;
&lt;p&gt;Sounds like you are doing development with the DK board, but are planning to use a different board later. I think the following might be a way to support both:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;// change next line to 0 for Mikes target board

#define TESTING_WITH_DK    (1)

#if TESTING_WITH_DK
#define MIKES_LED1             LED1
#else
#define MIKES_LED1             P25
#endif
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I haven&amp;#39;t actually tested the above snippet, I leave that for you.&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t have answers for the rest of your questions.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>