<?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>Write multiple compile time constants into UICR</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/61387/write-multiple-compile-time-constants-into-uicr</link><description>Hi, 
 
 I&amp;#39;m trying to write multiple compile time constants into the UICR (from the boot loader project). Currently I&amp;#39;m writing the boot loader addresses (start address &amp;amp; params page) and the REGOUT0 voltage. 
 If I only write the addresses or the REGOUT0</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 26 May 2020 12:07:57 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/61387/write-multiple-compile-time-constants-into-uicr" /><item><title>RE: Write multiple compile time constants into UICR</title><link>https://devzone.nordicsemi.com/thread/251709?ContentTypeID=1</link><pubDate>Tue, 26 May 2020 12:07:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:136e684c-8326-4125-be8c-a6094e412fc1</guid><dc:creator>Remco Poelstra</dc:creator><description>&lt;p&gt;The following flash_placement segment works:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="xml"&gt;&amp;lt;MemorySegment name=&amp;quot;UICR&amp;quot; start=&amp;quot;0x10001000&amp;quot; size=&amp;quot;0x308&amp;quot; fill=&amp;quot;0xff&amp;quot;&amp;gt;
      &amp;lt;ProgramSection alignment=&amp;quot;4&amp;quot; keep=&amp;quot;yes&amp;quot; load=&amp;quot;no&amp;quot; name=&amp;quot;.uicr_fill&amp;quot; fill=&amp;quot;0xff&amp;quot; size=&amp;quot;0x1&amp;quot; /&amp;gt;
      &amp;lt;ProgramSection alignment=&amp;quot;4&amp;quot; keep=&amp;quot;Yes&amp;quot; load=&amp;quot;Yes&amp;quot; name=&amp;quot;.uicr_pselreset&amp;quot; start=&amp;quot;0x10001200&amp;quot; size=&amp;quot;8&amp;quot;/&amp;gt;
      &amp;lt;ProgramSection alignment=&amp;quot;4&amp;quot; keep=&amp;quot;yes&amp;quot; load=&amp;quot;no&amp;quot; name=&amp;quot;.uicr_fill2&amp;quot; fill=&amp;quot;0xff&amp;quot; size=&amp;quot;0x1&amp;quot; /&amp;gt;
      &amp;lt;ProgramSection alignment=&amp;quot;4&amp;quot; keep=&amp;quot;Yes&amp;quot; load=&amp;quot;Yes&amp;quot; name=&amp;quot;.uicr_regout0&amp;quot; start=&amp;quot;0x10001304&amp;quot; size=&amp;quot;4&amp;quot;/&amp;gt;
  &amp;lt;/MemorySegment&amp;gt;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;This example sets the PSELRESET and REGOUT registers, while leaving the others at 0xff.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Write multiple compile time constants into UICR</title><link>https://devzone.nordicsemi.com/thread/250850?ContentTypeID=1</link><pubDate>Wed, 20 May 2020 05:50:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9b38b280-f50b-4763-bb15-cee557f8a1d5</guid><dc:creator>Remco Poelstra</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks for the suggestion. This does indeed load the file correctly and does indeed not load the symbols. I&amp;#39;ll ask on the Segger forum and report back if I find a solution.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Write multiple compile time constants into UICR</title><link>https://devzone.nordicsemi.com/thread/250754?ContentTypeID=1</link><pubDate>Tue, 19 May 2020 13:29:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a10ae317-a666-4a5d-846d-69924fe6680e</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;SES is setup to flash the ELF file by default. This may have different padding rules than the HEX-file. It is possible to configure SES to flash the HEX file by setting the &amp;quot;Load File&amp;quot; option to &amp;quot;$(OutDir)/$(ProjectName).hex&amp;quot;, but this may cause debugging symbols to not be loaded automatically, etc.&lt;/p&gt;
&lt;p&gt;I have not found any working options for changing the padding rules. Maybe you could ask that on the &lt;a href="https://forum.segger.com/index.php/Board/9-SEGGER-Embedded-Studio-related/"&gt;SEGGER forum&lt;/a&gt;?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Write multiple compile time constants into UICR</title><link>https://devzone.nordicsemi.com/thread/249983?ContentTypeID=1</link><pubDate>Thu, 14 May 2020 13:52:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fc6c0b39-cd14-4310-9c5e-33af999e2acc</guid><dc:creator>Remco Poelstra</dc:creator><description>&lt;p&gt;I can confirm this difference in behaviour.&lt;/p&gt;
&lt;p&gt;Is there anything we can do about it?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Write multiple compile time constants into UICR</title><link>https://devzone.nordicsemi.com/thread/249960?ContentTypeID=1</link><pubDate>Thu, 14 May 2020 12:43:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:343d1ffc-cd03-4557-9158-de4b9d7d8dda</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;It looks like this is an issue with how Segger Embedded Studio flashes the chip. I see the same behavior when flashed from SES, but when flashing the exact same HEX file with nrfjprog, the UICR registers in between are not cleared.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Write multiple compile time constants into UICR</title><link>https://devzone.nordicsemi.com/thread/249853?ContentTypeID=1</link><pubDate>Thu, 14 May 2020 08:28:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:31fac5cb-3109-4bf0-8ed4-6b878d18d879</guid><dc:creator>Remco Poelstra</dc:creator><description>&lt;p&gt;I now have:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span class="Apple-converted-space"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;  &amp;lt;MemorySegment name=&amp;quot;uicr_bootloader_start_address&amp;quot; start=&amp;quot;0x10001014&amp;quot; size=&amp;quot;0x4&amp;quot;&amp;gt;
    &amp;lt;ProgramSection alignment=&amp;quot;4&amp;quot; keep=&amp;quot;Yes&amp;quot; load=&amp;quot;Yes&amp;quot; name=&amp;quot;.uicr_bootloader_start_address&amp;quot; address_symbol=&amp;quot;__start_uicr_bootloader_start_address&amp;quot; end_symbol=&amp;quot;__stop_uicr_bootloader_start_address&amp;quot; start = &amp;quot;0x10001014&amp;quot; size=&amp;quot;0x4&amp;quot; /&amp;gt;
  &amp;lt;/MemorySegment&amp;gt;
  &amp;lt;MemorySegment name=&amp;quot;uicr_mbr_params_page&amp;quot; start=&amp;quot;0x10001018&amp;quot; size=&amp;quot;0x4&amp;quot;&amp;gt;
    &amp;lt;ProgramSection alignment=&amp;quot;4&amp;quot; keep=&amp;quot;Yes&amp;quot; load=&amp;quot;Yes&amp;quot; name=&amp;quot;.uicr_mbr_params_page&amp;quot; address_symbol=&amp;quot;__start_uicr_mbr_params_page&amp;quot; end_symbol=&amp;quot;__stop_uicr_mbr_params_page&amp;quot; start = &amp;quot;0x10001018&amp;quot; size=&amp;quot;0x4&amp;quot; /&amp;gt;
  &amp;lt;/MemorySegment&amp;gt;
  &amp;lt;MemorySegment name=&amp;quot;UICR&amp;quot; start=&amp;quot;0x10001304&amp;quot; size=&amp;quot;0x4&amp;quot;&amp;gt;
      &amp;lt;ProgramSection alignment=&amp;quot;4&amp;quot; keep=&amp;quot;Yes&amp;quot; load=&amp;quot;Yes&amp;quot; name=&amp;quot;.uicr_regout0&amp;quot; start=&amp;quot;0x10001304&amp;quot; size=&amp;quot;4&amp;quot;/&amp;gt;
  &amp;lt;/MemorySegment&amp;gt;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;But this shows the same behaviour.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Write multiple compile time constants into UICR</title><link>https://devzone.nordicsemi.com/thread/249852?ContentTypeID=1</link><pubDate>Thu, 14 May 2020 08:21:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:28124b88-b16d-40b5-86a8-a02b07be53fb</guid><dc:creator>Turbo J</dc:creator><description>[quote userid="81291" url="~/f/nordic-q-a/61387/write-multiple-compile-time-constants-into-uicr"]such that the remaining registers remain untouched?[/quote]
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Split your one memory segment into two. Just creating two program sections is not enough.&lt;/p&gt;
&lt;p&gt;You might also need to change the linker script/settings accordingly.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>