<?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>Memory allocation macros in Segger Embedded Studio to program a Soft Device, Application and Bootloader all at once</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/13415/memory-allocation-macros-in-segger-embedded-studio-to-program-a-soft-device-application-and-bootloader-all-at-once</link><description>I am looking for some guidance as to the memory regions to reserve for the Bootloader hex if I pull it in via Segger Embedded Studio. I have the memory allocations for the Application down pat and there is no problem linking in the SoftDevice. However</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sun, 24 Apr 2016 10:55:55 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/13415/memory-allocation-macros-in-segger-embedded-studio-to-program-a-soft-device-application-and-bootloader-all-at-once" /><item><title>RE: Memory allocation macros in Segger Embedded Studio to program a Soft Device, Application and Bootloader all at once</title><link>https://devzone.nordicsemi.com/thread/51214?ContentTypeID=1</link><pubDate>Sun, 24 Apr 2016 10:55:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:70a51073-615c-489b-9e87-26b3d7b25b2b</guid><dc:creator>RichieJH</dc:creator><description>&lt;p&gt;There is both a Memory Map XML and a Flash Placement XML.  With the Flash Placement XML there is no obvious way in which to add a length or end memory address looking in the example files.  Nor is there an obvious way in which to associate each memory segment with the linker files.  Are you able to provide further guidance?  You mentioned you had managed to get this to work, how did you do it?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Memory allocation macros in Segger Embedded Studio to program a Soft Device, Application and Bootloader all at once</title><link>https://devzone.nordicsemi.com/thread/51213?ContentTypeID=1</link><pubDate>Sun, 24 Apr 2016 09:20:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4ed144e0-5e67-448c-9a1f-3ad2baf9cb35</guid><dc:creator>Michael Dietz</dc:creator><description>&lt;p&gt;OK. I didn&amp;#39;t see any way to specify FLASH_LENGTH or FLASH_END in section placement macros. You could try setting the actual memory map. I think this is in either flash placement xml or something like that. You can right click the project and select import flash placement (or memory map) and then select edit flash placement. Then instead of using section placement macros you can set flash, ram start and end here.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Memory allocation macros in Segger Embedded Studio to program a Soft Device, Application and Bootloader all at once</title><link>https://devzone.nordicsemi.com/thread/51212?ContentTypeID=1</link><pubDate>Sun, 24 Apr 2016 08:51:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:64284321-2de1-4e60-bc5c-0f7c58954174</guid><dc:creator>RichieJH</dc:creator><description>&lt;p&gt;Hi Micheal, yes I tried that - same issue. As alluded to in my previous comment, for the app we are not specifying an end address or length, so could this be an issue for SES when it comes to inserting the Bootloader since it doesn&amp;#39;t know where the app has ended or does it calculate this dynamically on building? I am also going to be using fstorage in this application and I know amendments will be needed to the flash_placement_xml, just for added complexity.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Memory allocation macros in Segger Embedded Studio to program a Soft Device, Application and Bootloader all at once</title><link>https://devzone.nordicsemi.com/thread/51211?ContentTypeID=1</link><pubDate>Sun, 24 Apr 2016 08:40:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:92d55870-a3ed-4209-9291-4828081e7457</guid><dc:creator>Michael Dietz</dc:creator><description>&lt;p&gt;OK, I&amp;#39;ll need to try this and let you know what I find. Can you try flashing just the softdevice, application and bootloader from additional load files (no bootloader_settings.hex). Is there still a collision? bootloader_settings.hex writes a flag in memory where the bootloader is programmed so maybe Embedded Studio is being too strict here and we need to find a way to allow this.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Memory allocation macros in Segger Embedded Studio to program a Soft Device, Application and Bootloader all at once</title><link>https://devzone.nordicsemi.com/thread/51209?ContentTypeID=1</link><pubDate>Fri, 22 Apr 2016 19:50:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fe262796-133b-4154-81f8-f2dc0c737dc6</guid><dc:creator>RichieJH</dc:creator><description>&lt;p&gt;Hi Michael, I&amp;#39;m afraid I couldn&amp;#39;t get this to work.  I got &amp;quot;cannot download multiple load files because they overlap.&amp;quot;  I had 3 files to load using the loader in addition to the app.  The total set comprised the SD, the app - which just happened to be the ble_app_uart I was working on, the pca10040 dual bank boot loader hex and the boot loader setting hex.  The only section placement macros was the for the app (where, perhaps importantly, you only specify the start of the memory for the app, not its length or end), as usual.  Any other thoughts?  RJH&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Memory allocation macros in Segger Embedded Studio to program a Soft Device, Application and Bootloader all at once</title><link>https://devzone.nordicsemi.com/thread/51210?ContentTypeID=1</link><pubDate>Fri, 22 Apr 2016 14:47:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c437b0dc-70a6-4b73-ba5e-f21d2a18b180</guid><dc:creator>RichieJH</dc:creator><description>&lt;p&gt;Thanks Michael, that was the bit I was missing - the hex carries its own address.  I&amp;#39;ll give it a go a little later and let you know how I get on.  Thanks - RJH&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Memory allocation macros in Segger Embedded Studio to program a Soft Device, Application and Bootloader all at once</title><link>https://devzone.nordicsemi.com/thread/51207?ContentTypeID=1</link><pubDate>Fri, 22 Apr 2016 14:47:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e8cb435e-c4d8-4bdc-94f0-4efa93514f18</guid><dc:creator>Michael Dietz</dc:creator><description>&lt;p&gt;Note: A common misconception is that you need to flash the bootloader using nrfjprog. This is only the case when using Keil with nRF51. The Keil Flash algorithms can&amp;#39;t properly write the UICR on nRF51 and this is why the problem occurs.&lt;/p&gt;
&lt;p&gt;If you are developing on nRF52, or you aren&amp;#39;t using Keil, you can use your IDE to program the Bootloader no problem! (to be clear: You can program the bootloader from the Keil IDE when using nRF52 device).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Memory allocation macros in Segger Embedded Studio to program a Soft Device, Application and Bootloader all at once</title><link>https://devzone.nordicsemi.com/thread/51208?ContentTypeID=1</link><pubDate>Fri, 22 Apr 2016 14:43:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3e4b1d1e-4159-4735-afc0-c7ad5e1340da</guid><dc:creator>Michael Dietz</dc:creator><description>&lt;p&gt;Short Answer: You don&amp;#39;t need to specify where the Bootloader goes (see the &amp;#39;Loading .hex files&amp;#39; section below). Basically a .hex file specifies where the data should go. You have already configured the Section Placement Macro/Memory Map for the SoftDevice and don&amp;#39;t need to do anything else here.&lt;/p&gt;
&lt;p&gt;Loading the .hex files:&lt;/p&gt;
&lt;p&gt;The .hex file specifies both the actual program data to be written to flash, along with the address of where that data should be written (i.e. write 0xDEADBEEF to address 0x1C000, 0xB16B00B5 to address 0x1C004, etc...) So when we load these .hex files to the board we are sure there will be no overlapping.&lt;/p&gt;
&lt;p&gt;Doing this all in Embedded Studio:&lt;/p&gt;
&lt;p&gt;We want to specify both the SoftDevice and Bootloader as &amp;#39;Additional Load Files&amp;#39; in &amp;#39;Project Properties -&amp;gt; Debugger -&amp;gt; Loader Options.&amp;#39; So specify the paths to each of the .hex files there. (To flash the Application when a Bootloader is present you also need to write a flag in FLASH. I recommend also specifying this &lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/bootloader_5F00_settings_5F00_nrf52.hex"&gt;bootloader_settings_nrf52.hex&lt;/a&gt; as an additional file to loader. It is a .hex file that writes that flag for you). &lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/bootloader_5F00_settings_5F00_nrf51.hex"&gt;bootloader_settings_nrf51.hex&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Now when you compile your application and load it to your board, Embedded Studio will flash the SD, BL and write the flag for you! And if there are any collisions between the .hex file you will get an error.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Memory allocation macros in Segger Embedded Studio to program a Soft Device, Application and Bootloader all at once</title><link>https://devzone.nordicsemi.com/thread/51206?ContentTypeID=1</link><pubDate>Fri, 22 Apr 2016 13:45:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2365d689-57b3-43ba-a989-8312396cb69d</guid><dc:creator>Ole Bauck</dc:creator><description>&lt;p&gt;Ok, then I will withdraw my statement and wait for Michael to answer.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Memory allocation macros in Segger Embedded Studio to program a Soft Device, Application and Bootloader all at once</title><link>https://devzone.nordicsemi.com/thread/51205?ContentTypeID=1</link><pubDate>Fri, 22 Apr 2016 13:43:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4bc96054-9297-4af6-b569-9365ab040f5a</guid><dc:creator>RichieJH</dc:creator><description>&lt;p&gt;Hi Ole, the reason I asked is that Mike said it was possible.  I had an exchange with him yesterday where he said ask in the forum and he would respond.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Memory allocation macros in Segger Embedded Studio to program a Soft Device, Application and Bootloader all at once</title><link>https://devzone.nordicsemi.com/thread/51204?ContentTypeID=1</link><pubDate>Fri, 22 Apr 2016 13:40:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f281aaf2-e6fb-4d2a-a8c8-64fe06e95e03</guid><dc:creator>Ole Bauck</dc:creator><description>&lt;p&gt;You need to use nrfjprog to program the bootloader, so I guess it will not work anyhow.&lt;/p&gt;
&lt;p&gt;To get the bootloader to start the application after flashing without using DFU you need to set address BOOTLOADER_SETTINGS_ADDRESS to 0x01, see &lt;a href="https://devzone.nordicsemi.com/blogs/685/common-faq-on-dfu/"&gt;this FAQ&lt;/a&gt; (question E).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>