<?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>Determining Safe Portion of RAM from Bootloader Binary for a NOLOAD section</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/71899/determining-safe-portion-of-ram-from-bootloader-binary-for-a-noload-section</link><description>SDK: nRF5SDK Toolchain: ARM GCC 
 Hello, 
 I have some devices out in the field using nRF52840s, using the non-SoftDevice bootloader, and a custom mechanism for reading updates that I&amp;#39;ve downloaded to the flash remotely. 
 In our application, I&amp;#39;d like</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 23 Feb 2021 14:33:56 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/71899/determining-safe-portion-of-ram-from-bootloader-binary-for-a-noload-section" /><item><title>RE: Determining Safe Portion of RAM from Bootloader Binary for a NOLOAD section</title><link>https://devzone.nordicsemi.com/thread/295866?ContentTypeID=1</link><pubDate>Tue, 23 Feb 2021 14:33:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e9624446-08f5-45c1-9e80-c0618c939fd3</guid><dc:creator>joshuao</dc:creator><description>&lt;p&gt;Great, thanks for that Einar.&lt;br /&gt;&lt;br /&gt;I ended up sticking it just &amp;quot;before&amp;quot; the stack which is placed at the end of the RAM it seems from the .map file (thanks for the hint with that one)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Determining Safe Portion of RAM from Bootloader Binary for a NOLOAD section</title><link>https://devzone.nordicsemi.com/thread/295851?ContentTypeID=1</link><pubDate>Tue, 23 Feb 2021 14:04:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:42283b0f-d853-41c4-9d62-e82de17f18e1</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]Given that I have the bootloader code, and linker script, is there anyway I can analyse the memory addresses and determine if there&amp;#39;s a portion of RAM which the bootloader defintely won&amp;#39;t be initing or messing with, and thus I&amp;#39;m safe to use as a &amp;quot;NOLOAD&amp;quot; section in my application code?[/quote]
&lt;p&gt;Yes, that should be safe. You can also see from the .map file that is produced by the linker what memory is being used. Unless you have some code that manipulates pointers etc. runtime to just &amp;quot;find&amp;quot; a place in RAM to use (which would generally not be a good idea and you probably do not), then all the RAM that is being used will be shown there. And if you use any dynamic memory, which you probably do not, then that would only be allocated inside a specified heap. And for the stack, you know where it is.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>