<?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>Separate Vectors from .text</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/29936/separate-vectors-from-text</link><description>Hello, 
 For more &amp;quot;simplicity&amp;quot; I have devised my own OTA update procedure. It relies on image information being embedded in a dedicated section (I have modified the linker script to do this) but now I am having trouble with the following: 
 I want to</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 01 Feb 2018 16:42:23 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/29936/separate-vectors-from-text" /><item><title>RE: Separate Vectors from .text</title><link>https://devzone.nordicsemi.com/thread/119405?ContentTypeID=1</link><pubDate>Thu, 01 Feb 2018 16:42:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3f197b70-a3cf-4c6f-8429-899553e1d172</guid><dc:creator>George Beckstien</dc:creator><description>&lt;p&gt;Yes, I based it off of what you provided me. Thank you. I didn&amp;#39;t want to just replace the files given by mbed though. I have enough issues with mbed as it is already &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f605.svg" title="Sweat smile"&gt;&amp;#x1f605;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Separate Vectors from .text</title><link>https://devzone.nordicsemi.com/thread/119055?ContentTypeID=1</link><pubDate>Mon, 29 Jan 2018 16:50:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1ba8eaed-dc73-4d01-9d6a-fa4ac9439941</guid><dc:creator>Nguyen Hoan Hoang</dc:creator><description>&lt;p&gt;That is exactly what is in the code I gave you initially in the EHAL library.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Separate Vectors from .text</title><link>https://devzone.nordicsemi.com/thread/119060?ContentTypeID=1</link><pubDate>Mon, 29 Jan 2018 15:22:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:be3cc224-d653-4ba1-93df-f4dbdc902822</guid><dc:creator>George Beckstien</dc:creator><description>&lt;p&gt;&lt;a href="http://web.mit.edu/gnu/doc/html/as_7.html#SEC122"&gt;From documentation here&lt;/a&gt; the naked .text directive tells the assembler to place the following code at the beginning of the code .text section.&lt;/p&gt;
&lt;p&gt;The startup assembly is unmodified from the mbed version. I have achieved my desired code placement in a slightly different way and have detailed it in my original post.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Separate Vectors from .text</title><link>https://devzone.nordicsemi.com/thread/119059?ContentTypeID=1</link><pubDate>Fri, 26 Jan 2018 23:49:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7ba7bc5b-4681-4950-bdfe-c7cb2c9f6247</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;You have properly put&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;.section .Vectors
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;at the top to switch to the .Vectors section. However you need to switch out of it again back to .text before you define the Reset_handler (else it won&amp;#39;t actually go into a section because it won&amp;#39;t match anything). However you&amp;#39;ve just put&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;.text
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;not&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;.section .text
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;to do that. I suspect if you check the linker map file you&amp;#39;ll find some/lots/at least Reset_handler marked as in the vectors section &lt;code&gt;.Vectors.Reset_handler&lt;/code&gt; and discarded.&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t even know what a naked &lt;code&gt;.text.&lt;/code&gt; does in the middle of the file, you&amp;#39;d expect a linker warning.&lt;/p&gt;
&lt;p&gt;Switch the section properly and see if that improves life. If it doesn&amp;#39;t, hit the map file and start seeing what the linker is doing on a trivial example.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Separate Vectors from .text</title><link>https://devzone.nordicsemi.com/thread/119058?ContentTypeID=1</link><pubDate>Fri, 26 Jan 2018 20:11:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fe851a23-041d-4ded-a37c-ee92f872f1ec</guid><dc:creator>Nguyen Hoan Hoang</dc:creator><description>&lt;p&gt;It should work with mBed as it works with the SDK.  The code shows you how to separate Vector from the code and it also have received section just bellow the vector as you wanted.  Just replace the mBed startup with that all the rest of the SDK is the same.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Separate Vectors from .text</title><link>https://devzone.nordicsemi.com/thread/119057?ContentTypeID=1</link><pubDate>Fri, 26 Jan 2018 19:49:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:afa40dfc-a059-42b0-8620-949975ab40c3</guid><dc:creator>George Beckstien</dc:creator><description>&lt;p&gt;Thank you, but that&amp;#39;s not exactly what I&amp;#39;m looking for. I&amp;#39;m trying to modify the mbed startup code/linker files as little as possible to keep mbed stable.&lt;/p&gt;
&lt;p&gt;I have updated the post with my attempts&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Separate Vectors from .text</title><link>https://devzone.nordicsemi.com/thread/119056?ContentTypeID=1</link><pubDate>Fri, 26 Jan 2018 19:26:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c72eafb6-3a68-473b-a4c1-d90b57407477</guid><dc:creator>Nguyen Hoan Hoang</dc:creator><description>&lt;p&gt;What you need is available in the &lt;a href="https://github.com/I-SYST/EHAL"&gt;EHAL library&lt;/a&gt;.  The startup code 100% in C no assembly require.  The startup code work with all Cortex-M series M0-M4.  Linker script is there too.  Generic startup code, look for ResetEntry.c &amp;amp; gcc_arm_flash.ld in ARM/src.  For Vectors look in src of specific platform for example nRF52 is Vectors_nRF52.c in ARM/Nordic/nRF52/src.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>