<?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>Padding end of Zephyr application</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/92241/padding-end-of-zephyr-application</link><description>Hi, We need the ability to pad the end of our Zephyr application for 8 byte alignment. Is there a way to do this? 
 Thanks</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sat, 08 Oct 2022 13:37:29 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/92241/padding-end-of-zephyr-application" /><item><title>RE: Padding end of Zephyr application</title><link>https://devzone.nordicsemi.com/thread/389889?ContentTypeID=1</link><pubDate>Sat, 08 Oct 2022 13:37:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d3fa6d94-f45c-4bf4-abab-8c786cce6e0b</guid><dc:creator>kpreiss</dc:creator><description>&lt;p&gt;Thank you Vidar,&lt;br /&gt;&lt;br /&gt;That did the trick!&amp;nbsp; We actually pulled the Zephyr linker.ld script file local to our build and modified it to do the padding at the end of FLASH. See this link in the Zephyr project,&amp;nbsp;&lt;a id="" href="https://github.com/zephyrproject-rtos/zephyr/commit/c107827bb7456d7ead8af0b1febe932e1b2c4423"&gt;https://github.com/zephyrproject-rtos/zephyr/commit/c107827bb7456d7ead8af0b1febe932e1b2c4423&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Best,&lt;/p&gt;
&lt;p&gt;Kurt&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Padding end of Zephyr application</title><link>https://devzone.nordicsemi.com/thread/388215?ContentTypeID=1</link><pubDate>Tue, 27 Sep 2022 18:32:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:63be996b-62af-4042-8cce-91de49cb4d3a</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;As you are already working with a custom linker script, maybe you can add a padding section at the end. Something like this: &lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;.padding : ALIGN(8)
{   
    LONG(0xE015E015)
} &amp;gt; FLASH&lt;/pre&gt;The LONG() is just a constant 4 byte word which will be added to the end of the FW image.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Padding end of Zephyr application</title><link>https://devzone.nordicsemi.com/thread/388061?ContentTypeID=1</link><pubDate>Tue, 27 Sep 2022 08:42:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5f9f53dd-db96-417f-bddc-816ba5cf57f7</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t see any option in Zephyr to this. As far as I can see, it looks like it&amp;#39;s set to align 4.&amp;nbsp;&lt;a href="https://github.com/zephyrproject-rtos/zephyr/blob/main/include/zephyr/arch/arm/aarch32/cortex_m/scripts/linker.ld#L146"&gt;https://github.com/zephyrproject-rtos/zephyr/blob/main/include/zephyr/arch/arm/aarch32/cortex_m/scripts/linker.ld#L146&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;But there could be some other ways to do it.&amp;nbsp;Maybe you could check with the Zephyr community in the Zephyr discord.&amp;nbsp;&lt;a href="https://docs.zephyrproject.org/latest/develop/getting_started/index.html#asking-for-help"&gt;https://docs.zephyrproject.org/latest/develop/getting_started/index.html#asking-for-help&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Padding end of Zephyr application</title><link>https://devzone.nordicsemi.com/thread/387930?ContentTypeID=1</link><pubDate>Mon, 26 Sep 2022 13:01:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:391fdaf1-6b1a-4c55-95a6-79f7328e3ce9</guid><dc:creator>kpreiss</dc:creator><description>&lt;p&gt;Hi Sigurd,&lt;/p&gt;
&lt;p&gt;Our Zephyr application images are encrypted and require the end FLASH address to fall on an 8 byte boundary.&amp;nbsp; We use our own custom non-Zephyr bootloader to decrypt the Zephyr application from SPIFLASH prior to programming into FLASH memory.&lt;br /&gt;&lt;br /&gt;We use a custom linker script file to locate variables in certain sections of SRAM and FLASH memory.&amp;nbsp; Is there a simple way to modify the alignment of code/data at the end of FLASH memory?&lt;br /&gt;&lt;br /&gt;In the past, a simple &amp;quot;. = ALIGN(8);&amp;quot; statement in the linker script file will work to pad memory to an 8 byte alignment at the end of FLASH.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Padding end of Zephyr application</title><link>https://devzone.nordicsemi.com/thread/387674?ContentTypeID=1</link><pubDate>Fri, 23 Sep 2022 11:30:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:309a94dc-8622-498f-8a19-20cb246ac2c8</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I think&amp;nbsp;the partition manager could handle this for you:&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.1.0/nrf/scripts/partition_manager/partition_manager.html"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.1.0/nrf/scripts/partition_manager/partition_manager.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;What is the use-case for your need to do this? DFU?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>