<?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>Editing the XML linker script.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/98974/editing-the-xml-linker-script</link><description>Hello, 
 
 I have been working on a project and it includes working on the linker script. 
 Now I don&amp;#39;t have experience with linker scripts and online there are no simple explenations of adjusting this xml script. 
 I would like to take 1kb space from</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 24 Apr 2023 10:56:27 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/98974/editing-the-xml-linker-script" /><item><title>RE: Editing the XML linker script.</title><link>https://devzone.nordicsemi.com/thread/422001?ContentTypeID=1</link><pubDate>Mon, 24 Apr 2023 10:56:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:97de5fd3-c3b1-4e3c-aa15-cfebf8caba13</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="Chriis"]Pretty vague, byte alignement from what?[/quote]
&lt;p&gt;This follows the architecture. 4 bytes are normal on a 32 bit system.&lt;/p&gt;
[quote user="Chriis"]What is loaded? When is a section loaded?[/quote]
&lt;p&gt;Should the data be initialized? Or should it not?&lt;/p&gt;
[quote user="Chriis"]Can you explain this one in different words? or with example?[/quote]
&lt;p&gt;Global variables that are initialized will have the initial value loaded from flash into the RAM location.&lt;/p&gt;
&lt;p&gt;ie: uint32_t g_variable = 0xVALUE;&lt;/p&gt;
&lt;p&gt;The &amp;quot;0xVALUE&amp;quot; will then be loaded from a non-volatile area (Flash) into RAM in the boot-up sequence (start up files).&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;More information about linker scripts and startup sequences can be found here:&amp;nbsp;&lt;a href="https://interrupt.memfault.com/blog/how-to-write-linker-scripts-for-firmware"&gt;https://interrupt.memfault.com/blog/how-to-write-linker-scripts-for-firmware&lt;/a&gt;&lt;/p&gt;
[quote user="Chriis"]&lt;p&gt;Now I have done this. Is this a valid region for my goal?&lt;/p&gt;
&lt;p&gt;I want to save sensor data there, copy and paste every few minutes. I don&amp;#39;t want any other data to go in that region. This is so I can save my important data in RAM region 1 so I can dissable all other RAM regions when the chip is not powered.&lt;/p&gt;[/quote]
&lt;p&gt;Do you have a hard requirement on where it should be located? if no, then just declare a buffer of your wanted size.&lt;/p&gt;
&lt;p&gt;If you need this data to be absolute located, please see the former link:&lt;/p&gt;
[quote user="hkn"]&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/28589/placing-data-at-a-specific-memory-address-with-segger-embedded-studio"&gt;Placing data at a specific memory address with Segger Embedded Studio&lt;/a&gt;&amp;nbsp;[/quote]
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Editing the XML linker script.</title><link>https://devzone.nordicsemi.com/thread/421779?ContentTypeID=1</link><pubDate>Fri, 21 Apr 2023 13:33:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:26bdc408-94ef-4513-95b1-6d10b1823388</guid><dc:creator>Chriis</dc:creator><description>&lt;p&gt;Hey,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;i&gt;&amp;quot;alignment&lt;/i&gt;:&amp;nbsp;&amp;nbsp;The required alignment of the program section; a decimal number specifying the byte alignment.&amp;quot;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Pretty vague, byte alignement from what?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;i&gt;&amp;quot;load&lt;/i&gt;:&amp;nbsp;&amp;nbsp;If&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;Yes&lt;/b&gt;, the section is loaded. If&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;No&lt;/b&gt;, the section isn&amp;#39;t loaded.&amp;quot;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;What is loaded? When is a section loaded?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;i&gt;keep&lt;/i&gt;:&amp;nbsp;&amp;nbsp;If&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;Yes&lt;/b&gt;, the section will be kept even if none of the symbols are referenced by the rest of the program.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Can you explain this one in different words? or with example?&lt;br /&gt;&lt;br /&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/Schermafbeelding-2023_2D00_04_2D00_21-152928.png" /&gt;&lt;/p&gt;
&lt;p&gt;Now I have done this. Is this a valid region for my goal?&lt;/p&gt;
&lt;p&gt;I want to save sensor data there, copy and paste every few minutes. I don&amp;#39;t want any other data to go in that region. This is so I can save my important data in RAM region 1 so I can dissable all other RAM regions when the chip is not powered.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Editing the XML linker script.</title><link>https://devzone.nordicsemi.com/thread/421771?ContentTypeID=1</link><pubDate>Fri, 21 Apr 2023 13:16:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9db6b80b-192e-4574-9b3e-3ef6e8969cc8</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Section placement in Segger Embedded Studio is documented here:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://studio.segger.com/index.htm?https://studio.segger.com/ide_section_placement_file_format.htm"&gt;https://studio.segger.com/index.htm?https://studio.segger.com/ide_section_placement_file_format.htm&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could this post be similar to what you&amp;#39;re looking for?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/28589/placing-data-at-a-specific-memory-address-with-segger-embedded-studio"&gt;Placing data at a specific memory address with Segger Embedded Studio&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>