<?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>Can&amp;#39;t get ble_app_uart working on nRF51822 with GCC</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/13192/can-t-get-ble_app_uart-working-on-nrf51822-with-gcc</link><description>I&amp;#39;m having trouble building the ble_app_uart example in: SDK11/examples/ble_peripheral 
 My build environment is:
Ubuntu 15.04
SDK 11.0
GCC
S130
PCA10000
nRF51822_xxaa - Rev 2 silicon 
 I can load and run the pre-built hex file: ble_app_uart_s130_pca10028</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 21 Apr 2016 08:52:53 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/13192/can-t-get-ble_app_uart-working-on-nrf51822-with-gcc" /><item><title>RE: Can't get ble_app_uart working on nRF51822 with GCC</title><link>https://devzone.nordicsemi.com/thread/50312?ContentTypeID=1</link><pubDate>Thu, 21 Apr 2016 08:52:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9722ceee-5659-4a9b-9e34-ce37a3029a4e</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Good to hear you found the solution.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can't get ble_app_uart working on nRF51822 with GCC</title><link>https://devzone.nordicsemi.com/thread/50313?ContentTypeID=1</link><pubDate>Thu, 21 Apr 2016 08:17:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:81a9581e-8d89-4ce3-95e5-6f9e01c9096a</guid><dc:creator>Lee</dc:creator><description>&lt;p&gt;Hi.  I agree that the matrix says that it isn&amp;#39;t compatible and I questioned this in a support case to Nordic.
I did eventually get ble_app_uart working on my PCA10000 by changing RAM Length from 0x5f80 to 0x1f80.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can't get ble_app_uart working on nRF51822 with GCC</title><link>https://devzone.nordicsemi.com/thread/50311?ContentTypeID=1</link><pubDate>Wed, 20 Apr 2016 11:38:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:546540a0-c49b-4614-9ba7-101f7c692d1e</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;A am not sure why you would get the pre-built hex file for pca10028 to work on a pca10000 with rev2 nRF51. It is not compatible according to the &lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.nrf51%2Fdita%2Fnrf51%2Fcompatibility_matrix%2FnRF51422_nRF51822_ic_rev_sdk_+sd_comp_matrix.html&amp;amp;cp=2_0_3"&gt;compatibility matrix&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Did your make commands show any error messages? You can always use nrfjprog to program the hex file directly, rather than through make. &lt;code&gt;nrfjprog -e&lt;/code&gt; to erase the flash, then &lt;code&gt;nrfjprog --program &amp;lt;path-to-hex-file&amp;gt;&lt;/code&gt; for the SoftDevice and for the application. Will compiling the pca10028 examples and loading them using nrfjprog give the exact same behaviour as when downloading the pre-built hex file?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can't get ble_app_uart working on nRF51822 with GCC</title><link>https://devzone.nordicsemi.com/thread/50321?ContentTypeID=1</link><pubDate>Wed, 13 Apr 2016 23:16:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b2fdb2c4-6942-48e7-ae1d-018c968f197b</guid><dc:creator>Lee</dc:creator><description>&lt;p&gt;Still no success with these slightly modified settings.  I&amp;#39;ve deleted the PCA10028 folder and reinstalled it from the SDK so that it is clean.  I guess that it may be a step that I&amp;#39;m missing in order to get it to work with GCC.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can't get ble_app_uart working on nRF51822 with GCC</title><link>https://devzone.nordicsemi.com/thread/50320?ContentTypeID=1</link><pubDate>Wed, 13 Apr 2016 22:47:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0cc7c11b-61bc-42a7-be95-2bbbcc873556</guid><dc:creator>AmbystomaLabs</dc:creator><description>&lt;p&gt;Sorry, just realized I was building the client side instead of the peripheral side. I just built the peripheral version, again without changes and threw it on a pca10000 and my droid is reporting Nordic_UART in nRFtoolbox.
The settings were start 0x1b000 size 0x25000, ram start 0x20002080 and size 0x5f80.
Again, it was as the project was left in the zip that I downloaded from nordic completely without changes. Just build it for 51422 and it&amp;#39;ll work. You might want to flush the project directory and start from fresh.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can't get ble_app_uart working on nRF51822 with GCC</title><link>https://devzone.nordicsemi.com/thread/50319?ContentTypeID=1</link><pubDate>Wed, 13 Apr 2016 22:42:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c297cc5d-8379-4846-b429-2b7907583675</guid><dc:creator>Lee</dc:creator><description>&lt;p&gt;I&amp;#39;ve just tried your settings and that didn&amp;#39;t work either.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can't get ble_app_uart working on nRF51822 with GCC</title><link>https://devzone.nordicsemi.com/thread/50318?ContentTypeID=1</link><pubDate>Wed, 13 Apr 2016 22:06:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f70f4668-0956-4a81-b59c-7b2e61736fc9</guid><dc:creator>AmbystomaLabs</dc:creator><description>&lt;p&gt;I happen to have a PCA10000, so I built it in keil and loaded the 2.0.0.0 S130 softdevice and the application hex that was in the build folder.  I assume this is some sort of serial over BLE device. I didn&amp;#39;t change anything at all in the project I left all the bsp and processor stuff unchanged. So it thought it was building for 51422 but the board actually has a 51822 on it.  Though, if memory serves me well, these two are mostly the same except for packaging and ram/flash options.&lt;/p&gt;
&lt;p&gt;Anyway, after loading the files, the red led blinks now and then. I connected to the com port with putty and it says &amp;quot;scan started&amp;quot;. So, I think it works.&lt;/p&gt;
&lt;p&gt;The target settings in keil are:
irom1 start 0x1b000 size 0x25000, iram1 start 0x20001ebo and size 0x6150&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can't get ble_app_uart working on nRF51822 with GCC</title><link>https://devzone.nordicsemi.com/thread/50317?ContentTypeID=1</link><pubDate>Wed, 13 Apr 2016 21:38:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:46e21dc5-9ded-4a52-91b6-e603c0f3e8c5</guid><dc:creator>Lee</dc:creator><description>&lt;p&gt;I&amp;#39;ve tried that also using:&lt;/p&gt;
&lt;p&gt;make (to build ble_app_uart)&lt;/p&gt;
&lt;p&gt;make flash_softdevice (to program the soft device hex file onto the nrf51822)&lt;/p&gt;
&lt;p&gt;make flash (to program the ble_app_uart hex file onto the nrf51822)&lt;/p&gt;
&lt;p&gt;I think that my FLASH and RAM settings are not correct and can&amp;#39;t find a definitive answer to what they should be for my PCA10000.&lt;/p&gt;
&lt;p&gt;The example for the PCA10028 is:&lt;/p&gt;
&lt;p&gt;FLASH (rx) : ORIGIN = 0x1b000, LENGTH = 0x25000
RAM (rwx) :  ORIGIN = 0x20002080, LENGTH = 0x5f80&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve tried others settings found by searching this forum and others, but am still unsure what the correct FLASH and RAM settings should be.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can't get ble_app_uart working on nRF51822 with GCC</title><link>https://devzone.nordicsemi.com/thread/50316?ContentTypeID=1</link><pubDate>Wed, 13 Apr 2016 21:24:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1535148f-b63e-4196-83be-e5dbefaea960</guid><dc:creator>AmbystomaLabs</dc:creator><description>&lt;p&gt;I wouldn&amp;#39;t bother trying to merge it just load the softdevice s130_nrf51_2.0.0_softdevice.hex separately. Look for it under components/softdevice/s130/hex in the SDK folder.
Then if the compiler is set up correctly, the app will build with it&amp;#39;s starting address correct for S130 and you can just load it by itself.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can't get ble_app_uart working on nRF51822 with GCC</title><link>https://devzone.nordicsemi.com/thread/50315?ContentTypeID=1</link><pubDate>Wed, 13 Apr 2016 21:06:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cb8e4536-3aec-41f1-8ced-93e22d6e1c42</guid><dc:creator>Lee</dc:creator><description>&lt;p&gt;Hi.  Thanks for replying.&lt;/p&gt;
&lt;p&gt;My development environment is Linux so I&amp;#39;m not able to use Keil or any of the development tools that Nordic offer - hence why I&amp;#39;m using GCC.&lt;/p&gt;
&lt;p&gt;You are correct, ble_app_uart_s130_pca10028.hex is the softdevice and ble_app_uart.  This is why I have also tried to use mergehex.  I suspect that the app section of ble_app_uart_s130_pca10028.hex was compiled and build using Keil.  I haven&amp;#39;t spent too much time comparing build the .hex files as I&amp;#39;m building using GCC and they will almost certainly be different.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m replacing the references to PCA10028 and nrf51422_xxac to PCA10000 and nrf51822_xxaa so that the BSP files use the correct header files for my target.  That said, the pre-built hex file is for a PCA10028 (nrf51422_xxac) so doesn&amp;#39;t seem to make too much difference.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can't get ble_app_uart working on nRF51822 with GCC</title><link>https://devzone.nordicsemi.com/thread/50314?ContentTypeID=1</link><pubDate>Wed, 13 Apr 2016 20:45:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dd644eec-4c75-4537-87cf-4a1bfdadbfaf</guid><dc:creator>AmbystomaLabs</dc:creator><description>&lt;p&gt;I use Keil 5 and the application code for the project builds just fine. By the way, the free version of Keil 5 works fine with these examples.
I think the problem is you refer to the ble_app_uart_s130_pca10028.hex as the app, but these are actually images of the entire flash space. So it includes the softdevice and application as one hex.
The target in keil should be the 51822 and should be making the 51822_xxx...hex file which is just the app.  Then the easiest route is to use nRFgo Studio, erase the whole thing and load only the correct softdevice and separately load the application code on top of it.
After that you should be able to use the flash tools in GCC to load only the application code while you debug and code.
If you have further problems, you are correct the flash, ram and target processor settings are vitally important. But I wouldn&amp;#39;t just start renaming the pre-compile stuff to PCA10000.  Nordic makes heavy use of board support headers and c files and you may just complicate things as you try to figure it out.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>