<?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>Segger Embedded Studio and Bootloader</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/13696/segger-embedded-studio-and-bootloader</link><description>Continuing with my attempts to get this to work on SES I&amp;#39;m not sure if I&amp;#39;m missing something simple or not. 
 So using the excellent RKNRFGO (which by the way is much quicker for adding the softdevice than linking it in with SES, highly recommended for</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 10 May 2016 15:33:46 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/13696/segger-embedded-studio-and-bootloader" /><item><title>RE: Segger Embedded Studio and Bootloader</title><link>https://devzone.nordicsemi.com/thread/52349?ContentTypeID=1</link><pubDate>Tue, 10 May 2016 15:33:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7b4e722e-304a-42f8-81d2-16db52074023</guid><dc:creator>RichieJH</dc:creator><description>&lt;p&gt;Ok, I got this to work and it ended up pretty easy in the end.&lt;/p&gt;
&lt;p&gt;Here are the steps (for nRF52, pca10040):&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Using RKNRFGO set the Softdevice as &amp;quot;dfu_dual_bank_ble_s132_pca10040.hex&amp;quot; .  Since we know this includes the SoftDevice, you don&amp;#39;t flash a SoftDevice separately and RKNRFGO doesn&amp;#39;t seem to mind that it has a Bootloader in it, although it does give a warning - but ignore it for these purposes.  Don&amp;#39;t add anything else (i.e., do not tick Use Code and do not tick Use Bootloader).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Hit &amp;quot;Both&amp;quot; and RKNRFGO will wipe and install.  If you just wanted the Bootloader up and running, then you can stop here.  But if you have an app, keep going.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Go to Segger Embedded Studio and your app.  Set the memory Section Placement Macros as normal (so FLASH_START=0x1c000 and RAM_START=0x20002080).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;DO NOT&lt;/strong&gt; specify a SoftDevice in Loader Options, remember we have already added that with RKNRFGO.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;However &lt;strong&gt;DO&lt;/strong&gt;  specify &amp;quot;bootloader_settings_nrf52.hex&amp;quot; in Loader Options which writes the flag to tell the device an app is present (more on this here -&amp;gt; &lt;a href="https://devzone.nordicsemi.com/question/76838/memory-allocation-macros-in-segger-embedded-studio-to-program-a-soft-device-application-and-bootloader-all-at-once/)"&gt;devzone.nordicsemi.com/.../)&lt;/a&gt;.  This step is not strictly necessary, it just means that on each boot, the Bootloader will start and not the app, but if that is what you want you could stop at Step 2 above.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Make sure you have done all the other steps for SES (i.e, deleting duplicate SEGGER_RTT files, etc) as outlined in the blog post here -&amp;gt; &lt;a href="https://devzone.nordicsemi.com/blogs/845/segger-embedded-studio-cross-platform-ide-w-no-cod/."&gt;devzone.nordicsemi.com/.../.&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Then &amp;quot;Build and Run&amp;quot; and, as usual, your app will be running on the board.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Now if you hit Boot/Reset on the DK while holding down Button 4, viola, the board will go into Bootloader mode.  If you want to restart your app, just hit Boot/Reset again (without holding down Button 4) and your app will run once more.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;So now without leaving the comfort of your Mac, SES and RKNRFGO you can flash the SD, App and BL with a few simple steps.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Segger Embedded Studio and Bootloader</title><link>https://devzone.nordicsemi.com/thread/52348?ContentTypeID=1</link><pubDate>Tue, 10 May 2016 06:59:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3efaa972-1bc6-41b9-9e70-4edd087d0e6e</guid><dc:creator>RichieJH</dc:creator><description>&lt;p&gt;Well I guess letting people know you can do it is not unhelpful.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Segger Embedded Studio and Bootloader</title><link>https://devzone.nordicsemi.com/thread/52347?ContentTypeID=1</link><pubDate>Tue, 10 May 2016 06:48:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0c29bd1f-225b-46f2-b9ff-74759bfea24e</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;of course you can - I made one with Crossworks, it&amp;#39;s the same product.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Segger Embedded Studio and Bootloader</title><link>https://devzone.nordicsemi.com/thread/52346?ContentTypeID=1</link><pubDate>Tue, 10 May 2016 06:46:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6fcb4073-da99-44f3-9dcb-d19c537780e5</guid><dc:creator>RichieJH</dc:creator><description>&lt;p&gt;It&amp;#39;s great RKNRFGO works with the correct files, but that wasn&amp;#39;t the question.  I&amp;#39;m trying to determine whether there is a way to achieve introduce a bootloader hex just with SES without having to resort back to makefiles and gnu tools.  Clearly this is new to Nordic too since I seem to get conflicting advice on this, but part of this exercise is to help everyone.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Segger Embedded Studio and Bootloader</title><link>https://devzone.nordicsemi.com/thread/52345?ContentTypeID=1</link><pubDate>Tue, 10 May 2016 06:13:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4a691492-df2c-46b0-b96a-582242509610</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;I&amp;#39;m just telling you it works if you give RKNRFGO an actual bootloader instead of a bootloader conflated with a softdevice and master boot record, which was something like your original question. There&amp;#39;s no may about it, that hex file contains all those three things, Nordic only just started shipping precompiled hex files, which was rather useful of them in general, which build product they ship for them is still probably a bit random. I think it would be more helpful if they shipped a bootloader-only hex file, but you can actually build that by going to the armgcc directory and typing make .. not that I&amp;#39;ve tested the resulting product; looks right tho.&lt;/p&gt;
&lt;p&gt;It wasn&amp;#39;t that hard to see that couldn&amp;#39;t have been a bootloader alone, RKNRFGO showed it had many code sections. You don&amp;#39;t even need to fiddle with the hex file, you can use the gcc tools to extract the bit you want.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Segger Embedded Studio and Bootloader</title><link>https://devzone.nordicsemi.com/thread/52344?ContentTypeID=1</link><pubDate>Tue, 10 May 2016 05:54:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:29cda541-ef80-48b6-9c51-619718bb4174</guid><dc:creator>RichieJH</dc:creator><description>&lt;p&gt;That&amp;#39;s great RK, but not everyone has the wherewithall to dive into a hex and start carving out the SD.  I had been advised by Nordic to flash both the Bootloader hex AND the SoftDevice and that&amp;#39;s what I was doing.  Now Michael confirmed yesterday that the hex may have also contained the SoftDevice but the issue I have is where is that documented and could the Bootloader hex not be better named to indicate that on its face because there is some confusion on this even at Nordic.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Segger Embedded Studio and Bootloader</title><link>https://devzone.nordicsemi.com/thread/52343?ContentTypeID=1</link><pubDate>Tue, 10 May 2016 00:17:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6f2fb0df-a26f-4c75-9732-07aaafd5fa29</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;tried that on my PCA10040 today as I came across it in a box. Took the hex bootloader file, trimmed it to be just the bootloader as above, took the stock S132 softdevice, pointed RKNRFGO at each of them, hit the &amp;#39;both&amp;#39; button, 5 seconds later I had a DFUTarg. So .. it works just fine.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Segger Embedded Studio and Bootloader</title><link>https://devzone.nordicsemi.com/thread/52336?ContentTypeID=1</link><pubDate>Sun, 08 May 2016 23:37:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b7bc1f9b-5a52-4488-abc4-6815a99b408d</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;I looked at that bootloader hex file - just look at the list of blocks RKNRFGO decodes for it, it&amp;#39;s clearly way more than a bootloader, it has code at 0, code at 1000, stuff all over the place. Hence my suggestion to check what was at 0x10001014 to see if it is correct, I&amp;#39;m pretty sure you&amp;#39;ll find it&amp;#39;s &amp;#39;0x00000000&amp;#39; which is the address of the first block of that hex file and not the address of the bootloader, so you&amp;#39;re just going around and around in the MBR. That&amp;#39;s a merged bootloader softdevice hex file, which is why it doesn&amp;#39;t work and why you get errors with the tools.&lt;/p&gt;
&lt;p&gt;deleting the first 6917 lines of the file makes it look a bit more like a bootloader-only to me. The bootloader starts at the line&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;:020000040007F3
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;inclusive to the end of the file then excluding the second and third to last&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;:020000041000EA
:0810140000A0070000E0070046
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;altho it&amp;#39;ll work with those in.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Segger Embedded Studio and Bootloader</title><link>https://devzone.nordicsemi.com/thread/52340?ContentTypeID=1</link><pubDate>Sun, 08 May 2016 08:32:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a76914b0-1f69-41ea-b3ce-fc5ab5636e07</guid><dc:creator>RichieJH</dc:creator><description>&lt;p&gt;I&amp;#39;ve also tried using nrfjprog tools and on trying to flash the bootloader hex it is throwing an error saying it is attempting to write to the SD area.  I&amp;#39;ve emailed Michael @mjdietz2 with this observation and we&amp;#39;ll see where this takes us.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Segger Embedded Studio and Bootloader</title><link>https://devzone.nordicsemi.com/thread/52339?ContentTypeID=1</link><pubDate>Sun, 08 May 2016 08:16:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:984dce32-b80b-418a-8f04-5685f67a22d4</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;I guess you need to figure that out first then - if you can make it work with the standard tools then we can figure out what doesn&amp;#39;t work with RKNRFGO. I wonder if one of the hex files has an extra section which overwrites some part of the UICR. That&amp;#39;s 8 sections it writes, seems rather a lot, I&amp;#39;d have expected 4 or 5 perhaps.&lt;/p&gt;
&lt;p&gt;I need to put something in to log what addresses it&amp;#39;s writing sections at because JLink no-longer seems to print it out.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Segger Embedded Studio and Bootloader</title><link>https://devzone.nordicsemi.com/thread/52338?ContentTypeID=1</link><pubDate>Sun, 08 May 2016 06:33:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:665d61ff-ee4d-45ca-8f0e-6dc5391860b9</guid><dc:creator>RichieJH</dc:creator><description>&lt;p&gt;Interestingly I just tried to do this with nRFgo using the same hexs (SD + BL and no app) and got an error saying &amp;quot;This hex file [BL - SD was already flashed] has data in SoftDevice region.  Try programming using &amp;quot;Program SoftDevice&amp;quot;, or erase all before programming&amp;quot;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Segger Embedded Studio and Bootloader</title><link>https://devzone.nordicsemi.com/thread/52337?ContentTypeID=1</link><pubDate>Sun, 08 May 2016 01:01:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f175b692-787f-45c7-aee3-0c83bea46fbc</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;yes with an erased chip with just the bootloader and softdevice it should jump to the bootloader. I didn&amp;#39;t know there was a pre-built bootloader.hex, so I never tried it.&lt;/p&gt;
&lt;p&gt;So possible issues are it&amp;#39;s not actually getting downloaded, I&amp;#39;m sure you selected nrf52 mode in RKNRFGO, or the special bootloader area of the UICR isn&amp;#39;t being set with the correct data, so there&amp;#39;s no knowledge of there being a bootloader for it to jump to. It certainly works with the version of the bootloader I built, probably before Nordic started shipping a precompiled hex plus the 132 softdevice and with the bootloader I built for nrf51 before that.&lt;/p&gt;
&lt;p&gt;I&amp;#39;d suggest taking a look at the memory after the programming to make sure the bootloader and SD are where you expect and 0x1000104 has the bootloader address etc. What&amp;#39;s the log say?&lt;/p&gt;
&lt;p&gt;also try with the nordic nrfjprog too, then we can play spot the difference.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Segger Embedded Studio and Bootloader</title><link>https://devzone.nordicsemi.com/thread/52342?ContentTypeID=1</link><pubDate>Sat, 07 May 2016 15:07:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1a56d818-e904-42af-b963-515d4e150ebd</guid><dc:creator>RichieJH</dc:creator><description>&lt;p&gt;So putting aside an app for the moment, If I just downloaded the s132_softdevice.hex and the dfu_dual_bank_ble_s132_pca10040.hex (no changes made to either of them, just to be clear) via RKNRFGO it should go straight into bootloader mode.  However it&amp;#39;s not, there is no advertising or anything from the DK and I switch off/on, hold button 4 down and nothing.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Segger Embedded Studio and Bootloader</title><link>https://devzone.nordicsemi.com/thread/52341?ContentTypeID=1</link><pubDate>Sat, 07 May 2016 10:28:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8cb4129c-a8ea-42f8-84cc-9fa6c470417b</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;Which bit&amp;#39;s not working? it&amp;#39;s certainly true that if you write the bootloader, softdevice and app all at the same time then it&amp;#39;s still going to boot into the bootloader, because RKNRFGO doesn&amp;#39;t know about the secret location to tell the bootloader there&amp;#39;s a valid app (and since that&amp;#39;s part of the bootloader code it can&amp;#39;t really be added). So are you never seeing the bootloader boot, in which case it&amp;#39;s probably not built correctly, or some combinations of bootloader/softdevice and app when loaded aren&amp;#39;t doing what you expect?&lt;/p&gt;
&lt;p&gt;I see I have a custom section placement file for my bootloader project which has the noinit section, the mbrParamsPage section  and the bootloaderSetting sections in it. I don&amp;#39;t remember it being that hard to do, but there were certainly some sections needed mapping.&lt;/p&gt;
&lt;p&gt;You can debug the bootloader, first job is to make sure you&amp;#39;re getting into it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>