<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/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/"><channel><title>How can I get the reset vector to jump straight to main</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/25633/how-can-i-get-the-reset-vector-to-jump-straight-to-main</link><description> 
I have created a image relocation scheme where my boot loader can
load an image into one of several positions in the flash and execute
them individually. This involves remapping the IVT from that created
by the compiler/linker so that the processor</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: How can I get the reset vector to jump straight to main</title><link>https://community.arm.com/thread/147527?ContentTypeID=1</link><pubDate>Wed, 01 Jul 2009 10:04:44 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:cf2c0252-ebe5-44e1-ba4a-3f4b02b5bedc</guid><dc:creator>Marcus Harnisch</dc:creator><description>&lt;p&gt;&lt;p&gt;
&amp;gt; No I care because the reset vector is what the boot loader
reads from&lt;br /&gt;
&amp;gt; ( from the new image ) before jumping to that entry point.&lt;/p&gt;

&lt;p&gt;
That&amp;#39;s what I meant. It is not used as actual Reset address, so
you&lt;br /&gt;
can use it for anything you like.&lt;/p&gt;

&lt;p&gt;
Regards&lt;br /&gt;
Marcus&lt;br /&gt;
&lt;a href="http://www.doulos.com/arm/"&gt;http://www.doulos.com/arm/&lt;/a&gt;&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can I get the reset vector to jump straight to main</title><link>https://community.arm.com/thread/146392?ContentTypeID=1</link><pubDate>Wed, 01 Jul 2009 08:33:01 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:1dc62f8d-6702-4ffd-9d60-bbb81b1e5e8c</guid><dc:creator>Mark Norman</dc:creator><description>&lt;p&gt;&lt;p&gt;
&amp;gt;But nobody cares what the address of your reset slot in
&amp;gt;the new&lt;br /&gt;
&amp;gt;vector table is. It&amp;#39;ll never be used anyway. If a reset
&amp;gt;occurs, it&lt;br /&gt;
&amp;gt;takes down the vector table offset register and the boot
&amp;gt;loader vector&lt;br /&gt;
&amp;gt;table will be used again.&lt;br /&gt;
No I care because the reset vector is what the boot loader reads from
( from the new image ) before jumping to that entry point. It does
not have to be the reset vector it could be any of the vectors that
is not used, i just use it as a entry point holder for the boot
loader ( or infact the other images ) to use for their jump into it.
Um, other vectors, now theres an idea!!!&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can I get the reset vector to jump straight to main</title><link>https://community.arm.com/thread/144658?ContentTypeID=1</link><pubDate>Wed, 01 Jul 2009 08:26:04 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:0334e658-3077-414e-a340-e16b42091b36</guid><dc:creator>Marcus Harnisch</dc:creator><description>&lt;p&gt;&lt;p&gt;
&amp;gt; I think the scatter file is just the default for the
processor type&lt;br /&gt;
&amp;gt; and will be common.&lt;/p&gt;

&lt;p&gt;
You may have to come up with your own.&lt;/p&gt;

&lt;p&gt;
&amp;gt; Where exactly do I put --apcs=/ropi, you are right about the
images&lt;br /&gt;
&amp;gt; running OAAT.&lt;/p&gt;

&lt;p&gt;
Add this to the compiler options. And, BTW, according to the
docs&lt;br /&gt;
there are supposedly some limitations with Microlib. Just a heads
up.&lt;/p&gt;

&lt;p&gt;
&amp;gt; Are you perhaps saying that inclusion of the --apcs=/ropi
will make&lt;br /&gt;
&amp;gt; these scatter routines behave?&lt;/p&gt;

&lt;p&gt;
It should, indeed.&lt;/p&gt;

&lt;p&gt;
&amp;gt; All I want to do is just jump straight to main, therefore
missing&lt;br /&gt;
&amp;gt; out the scatterfile stuff.&lt;/p&gt;

&lt;p&gt;
I don&amp;#39;t think you want that.&lt;/p&gt;

&lt;p&gt;
&amp;gt; So I want to be able to assign the image IVT with the main
address&lt;br /&gt;
&amp;gt; instead of the reset routines.&lt;/p&gt;

&lt;p&gt;
But nobody cares what the address of your reset slot in the
&lt;i&gt;new&lt;/i&gt;&lt;br /&gt;
vector table is. It&amp;#39;ll never be used anyway. If a reset occurs,
it&lt;br /&gt;
takes down the vector table offset register and the boot loader
vector&lt;br /&gt;
table will be used again.&lt;/p&gt;

&lt;p&gt;
Regards&lt;br /&gt;
Marcus&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can I get the reset vector to jump straight to main</title><link>https://community.arm.com/thread/146391?ContentTypeID=1</link><pubDate>Wed, 01 Jul 2009 08:22:47 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:1306971d-db61-4865-b3bc-a9f68f17d632</guid><dc:creator>Mark Norman</dc:creator><description>&lt;p&gt;&lt;p&gt;
I should be able to get away with changing&lt;br /&gt;
Reset_Handler PROC EXPORT Reset_Handler [WEAK] IMPORT __main LDR R0,
=__main BX R0 ENDP&lt;br /&gt;
to&lt;br /&gt;
Reset_Handler PROC EXPORT Reset_Handler [WEAK] IMPORT main LDR R0,
=main BX R0 ENDP&lt;br /&gt;
i have a little problem with testing this a currently my boot loader
and images are the same program only with the IVTs modified as I have
not got a physical transport working yet ( which is to be I2C ). So a
little move time to prove concept. Thanks for all your help :)&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can I get the reset vector to jump straight to main</title><link>https://community.arm.com/thread/144656?ContentTypeID=1</link><pubDate>Wed, 01 Jul 2009 08:11:46 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:1610dde4-42da-44dc-80e1-832346ee3e15</guid><dc:creator>Mark Norman</dc:creator><description>&lt;p&gt;&lt;p&gt;
Hang on, its come to me, don&amp;#39;t go away I&amp;#39;ll try it before I
embarrass myself with a supid solution.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can I get the reset vector to jump straight to main</title><link>https://community.arm.com/thread/142352?ContentTypeID=1</link><pubDate>Wed, 01 Jul 2009 08:07:38 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:cdfde151-c61a-432e-b3bb-ddce37e695c5</guid><dc:creator>Mark Norman</dc:creator><description>&lt;p&gt;&lt;p&gt;
Thanks&lt;br /&gt;
I think the scatter file is just the default for the processor type
and will be common. Where exactly do I put --apcs=/ropi, you are
right about the images running OAAT.&lt;br /&gt;
&amp;quot;..branch to image entry point&amp;quot; There&amp;#39;s where it goes wrong because
the only address I can currently get my hands on is the &amp;quot;reset
vector&amp;quot; which in turn calls misbehaving scatter file routines (call
absolute addresses). Are you perhaps saying that inclusion of the
--apcs=/ropi will make these scatter routines behave? All I want to
do is just jump straight to main, therefore missing out the
scatterfile stuff. So I want to be able to assign the image IVT with
the main address instead of the reset routines.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can I get the reset vector to jump straight to main</title><link>https://community.arm.com/thread/142356?ContentTypeID=1</link><pubDate>Wed, 01 Jul 2009 08:06:37 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:86516e9b-346c-4d5f-aeea-49f6c47a489b</guid><dc:creator>Advanced Zeusti</dc:creator><description>&lt;p&gt;&lt;p&gt;
marcus beet me to the response. but he has a good sugestion.&lt;/p&gt;

&lt;p&gt;
Always yo&amp;#39;re freind.&lt;/p&gt;

&lt;p&gt;
Zeusti.&lt;/p&gt;

&lt;p&gt;
(success rateing now fallen to 100%-1)&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can I get the reset vector to jump straight to main</title><link>https://community.arm.com/thread/139234?ContentTypeID=1</link><pubDate>Wed, 01 Jul 2009 07:56:54 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:38ce1637-b682-4aa6-b239-30fce8ddc581</guid><dc:creator>Marcus Harnisch</dc:creator><description>&lt;p&gt;&lt;p&gt;
I have never tried this, but here is an idea:&lt;/p&gt;

&lt;p&gt;
Create a scatter file shared by all images, which will ensure
common entry point and vector table addresses.&lt;/p&gt;

&lt;p&gt;
Build the images with --apcs=/ropi. Position independent data is
not necessary, since I take it you will be running only one image at
a time.&lt;/p&gt;

&lt;p&gt;
Install image at known address initialize stack pointer from
&lt;i&gt;new&lt;/i&gt; vector table as well as the vector table itself and branch
to image entry point.&lt;/p&gt;

&lt;p&gt;
Regards&lt;br /&gt;
Marcus&lt;br /&gt;
&lt;a href="http://www.doulos.com/arm/"&gt;http://www.doulos.com/arm/&lt;/a&gt;&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can I get the reset vector to jump straight to main</title><link>https://community.arm.com/thread/148096?ContentTypeID=1</link><pubDate>Wed, 01 Jul 2009 07:52:40 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:0a05239c-6d07-4f9b-8093-0c3cbf6355bb</guid><dc:creator>Tamiryan Michael</dc:creator><description>&lt;p&gt;&lt;p&gt;
I believe his reply of a minute ago (more or less) as well as his
posting style speak for themselves. I hope he does surprise us,
though.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can I get the reset vector to jump straight to main</title><link>https://community.arm.com/thread/147529?ContentTypeID=1</link><pubDate>Wed, 01 Jul 2009 07:49:16 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:44819c16-00f2-484f-a9e6-e5f433549658</guid><dc:creator>Advanced Zeusti</dc:creator><description>&lt;p&gt;&lt;p&gt;
Tapeer.&lt;/p&gt;

&lt;p&gt;
have you read the abi yet? understand now?&lt;/p&gt;

&lt;p&gt;
Always yo&amp;#39;re freind.&lt;/p&gt;

&lt;p&gt;
Zeusti.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can I get the reset vector to jump straight to main</title><link>https://community.arm.com/thread/147526?ContentTypeID=1</link><pubDate>Wed, 01 Jul 2009 07:47:56 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:8f5f2956-71a2-48ed-89b5-3128823b4b47</guid><dc:creator>Mark Norman</dc:creator><description>&lt;p&gt;&lt;p&gt;
Ah, good I understand. Does he normally give good advice?&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can I get the reset vector to jump straight to main</title><link>https://community.arm.com/thread/146395?ContentTypeID=1</link><pubDate>Wed, 01 Jul 2009 07:30:18 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:09b9294c-4cef-482f-9ac4-660eb2637846</guid><dc:creator>Tamiryan Michael</dc:creator><description>&lt;p&gt;&lt;p&gt;
Mark,&lt;br /&gt;
I was teasing the renowned professor Zuesti or whatever his nickname
is. Why all know him around here...&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can I get the reset vector to jump straight to main</title><link>https://community.arm.com/thread/144657?ContentTypeID=1</link><pubDate>Wed, 01 Jul 2009 07:28:49 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:28cb07a1-eae8-4018-90a5-99c34d16965f</guid><dc:creator>Mark Norman</dc:creator><description>&lt;p&gt;&lt;p&gt;
Sorry, you have lost me there???&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can I get the reset vector to jump straight to main</title><link>https://community.arm.com/thread/142351?ContentTypeID=1</link><pubDate>Wed, 01 Jul 2009 07:26:22 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:c9799d4a-8f71-4869-9fb5-d3585d51d6a1</guid><dc:creator>Tamiryan Michael</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;Hello Master MARK&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
does that make you a slave?&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can I get the reset vector to jump straight to main</title><link>https://community.arm.com/thread/139225?ContentTypeID=1</link><pubDate>Wed, 01 Jul 2009 07:02:29 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:fbc78435-878a-4c0a-a34f-4daec9ef0d05</guid><dc:creator>Advanced Zeusti</dc:creator><description>&lt;p&gt;&lt;p&gt;
Hello Master MARK.&lt;/p&gt;

&lt;p&gt;
i know the m3 and i understand the problem. the m3 is diferrent to
the old arms. you wait and see if i can find the answer. plz
wait.&lt;/p&gt;

&lt;p&gt;
always yo&amp;#39;re freind.&lt;/p&gt;

&lt;p&gt;
Zeusti.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can I get the reset vector to jump straight to main</title><link>https://community.arm.com/thread/135843?ContentTypeID=1</link><pubDate>Wed, 01 Jul 2009 06:48:37 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:8cf9d9c2-d1a0-4af4-9d3f-5f88594351a9</guid><dc:creator>Mark Norman</dc:creator><description>&lt;p&gt;&lt;p&gt;
Is there any one out there who knows about the M3 that can answer
my questions? It is a STM32F103xx.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can I get the reset vector to jump straight to main</title><link>https://community.arm.com/thread/125561?ContentTypeID=1</link><pubDate>Wed, 01 Jul 2009 06:45:10 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:0c079769-4b35-430f-94e7-700149552ae3</guid><dc:creator>Mark Norman</dc:creator><description>&lt;p&gt;&lt;p&gt;
sorry should have said it is resetting the IVT pointer in the new
images main.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can I get the reset vector to jump straight to main</title><link>https://community.arm.com/thread/115058?ContentTypeID=1</link><pubDate>Wed, 01 Jul 2009 06:43:35 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:be229a4c-1884-44e6-9a2e-1035141e373f</guid><dc:creator>Mark Norman</dc:creator><description>&lt;p&gt;&lt;p&gt;
I&amp;#39;m using an M3. Don&amp;#39;t know about other ARMs but this allows the
resetting of the stack and the IVT pointer before jumping into a new
image. The IAP_AN example supplied by ARM does the stack stuff
i.e.&lt;br /&gt;
/* Initialize user application&amp;#39;s Stack Pointer */ __MSR_MSP(*(vu32*)
ApplicationAddress);&lt;br /&gt;
does this mean I&amp;#39;m still violating one of the foundations?&lt;br /&gt;
The jump actually works, so I can&amp;#39;t be that wrong.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can I get the reset vector to jump straight to main</title><link>https://community.arm.com/thread/103236?ContentTypeID=1</link><pubDate>Wed, 01 Jul 2009 06:35:13 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:9a60d9fa-bfda-408e-a9f1-f1e973fa8354</guid><dc:creator>Tamiryan Michael</dc:creator><description>&lt;p&gt;&lt;p&gt;
I did understand you and as I said, you are violating one of the
foundations on which an ARM processor (not an M3 - don&amp;#39;t know that
one yet) is based. &lt;b&gt;you cannot setup the different modes stacks
when in user mode&lt;/b&gt; - in user mode, only the condition flags of the
CPSR (CPSR_f) can be changed. In other modes, the entire CPSR can be
changed.&lt;br /&gt;
I suggest you read a little bit about an ARM processor and then apply
what I have written above. You don&amp;#39;t have to, but it is advisable to
do the remapping from within the target application itself.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can I get the reset vector to jump straight to main</title><link>https://community.arm.com/thread/101871?ContentTypeID=1</link><pubDate>Wed, 01 Jul 2009 06:32:06 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:9d736a5b-e4a6-4119-b281-57aa56a467fb</guid><dc:creator>Mark Norman</dc:creator><description>&lt;p&gt;&lt;p&gt;
..each image, including the boot loader has their own IVTs.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can I get the reset vector to jump straight to main</title><link>https://community.arm.com/thread/77549?ContentTypeID=1</link><pubDate>Wed, 01 Jul 2009 06:28:43 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:ad84d30c-bcac-4062-be5b-d1398053a7a7</guid><dc:creator>Mark Norman</dc:creator><description>&lt;p&gt;&lt;p&gt;
why is it fundamentally wrong?&lt;br /&gt;
what is supervisor mode?&lt;br /&gt;
Not sure what you mean by getting the bootloader execute the SWI.
Sorry you have lost me here totally.&lt;br /&gt;
Perhaps you misunderstand what I am doing, my bootloader will remap
during the image load process, it does not relocate anything in its
IVT, that would be very difficult. On reset the bootloader would do
all the ordinary reset stuff and end up in its main routine which
would decide which image to jump to, it knows the image positions but
not their main start address. It can obtain their reset vectors but
not their main address.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can I get the reset vector to jump straight to main</title><link>https://community.arm.com/thread/103241?ContentTypeID=1</link><pubDate>Wed, 01 Jul 2009 06:17:10 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:5873db2d-06b5-4142-adb4-2ba382f18759</guid><dc:creator>Tamiryan Michael</dc:creator><description>&lt;p&gt;&lt;p&gt;
the remapping of the vector table should depend on which
application is executed. use the RAM_INTVEC REMAP RAM_MODE macros in
the ASM tab of the different applications.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can I get the reset vector to jump straight to main</title><link>https://community.arm.com/thread/89848?ContentTypeID=1</link><pubDate>Wed, 01 Jul 2009 06:15:24 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:93471a2a-59b0-4ebb-9abd-ba07d5a1a173</guid><dc:creator>Tamiryan Michael</dc:creator><description>&lt;p&gt;&lt;p&gt;
you must be in supervisor mode in order to configure the stacks
correctly.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can I get the reset vector to jump straight to main</title><link>https://community.arm.com/thread/56350?ContentTypeID=1</link><pubDate>Wed, 01 Jul 2009 06:14:46 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:75ee2199-d75d-4409-b62c-cc1fe2d93999</guid><dc:creator>Tamiryan Michael</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;I have managed to get the boot loader to jump directly to main
(using hard coding) and this works beautifully, all the routines
appear to be using the correct relative branches and jumps&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
no no no, this is fundamentally wrong. you must pass though the
reset vector while the processor is in &lt;b&gt;supervisor mode&lt;/b&gt;. so
make sure your bootloader executes a SWI, from which the jump to
application is performed.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>