<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>I am sorry but my last comment wasn't meant for the list, I
wanted to send it directly to Florian but I failed miserably....</p>
<p>But for the main question raised in the (german) mail it makes
perhaps sense to translate it to english...</p>
<p>In Cortex Startup files the relocation of the VectorTable is put
inside an {$ifdef REMAP_VECTTAB} which makes it necessary to
define this in virtually every controller unit to be able to use
bootloaders. Question is why this was done in that way.<br>
</p>
<p>I now can already partially self-answer myself, to date It looks
like when I did something on Cortex-M0 I used cortex-m0+ based
controllers and for those the vtor register existed. However is an
optional feature (Although an often implemented one for M0+). <br>
</p>
<p>On CortexM3 and higher chips it is always implemented. Only
Cortex-M0 seems to be the big exception to the rule. But why this
relocation is not enabled by default in M3 and M4F Header files is
still something I do not understand.<br>
</p>
<p>Michael<br>
</p>
<div class="moz-cite-prefix">Am 23.01.21 um 05:17 schrieb J. Gareth
Moreton via fpc-devel:<br>
</div>
<blockquote type="cite"
cite="mid:f51f0048-41c4-e101-e0c9-acfedeb3c12b@moreton-family.com">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<p>I hope this isn't too much to ask, but if this IS intended for
this mailing list, would someone be willing to translate for me?
I'm still learning German (I assume it's German) and am not good
enough yet to make much sense of this.<br>
</p>
<p>Gareth aka. Kit<br>
</p>
<div class="moz-cite-prefix">On 22/01/2021 22:37, Michael Ring via
fpc-devel wrote:<br>
</div>
<blockquote type="cite"
cite="mid:0386bd22-be7e-8da5-c033-efe23e109b05@michael-ring.org">Hi
Florian, im Anhang der Path für den UF2 Support in freepascal,
ich hoffe er passt so für Dich... <br>
<br>
Das UF2 File wird nur erzeugt wenn die Startadresse ungleich
$00000000 ist da normalerweise der UF2 Bootloader ab Addresse 0
steht und es damit keinen sinnmacht ein uf2 file zu erzeugen
wenn die Startaddresse auf default für Arm steht da dann der uf2
loader mit dem eigentlichen code kollidiert. <br>
<br>
Der Fall das eine Startadresse via -Ttext angepasst wird ist
auch mit drin, habe ich noch was vergessen? <br>
<br>
Für den vollen Support muss auch noch das vtor Register
umgeschrieben werden damit man interrupt-Handler im eigenen Code
definieren kann, ich habe dazu bei mir den Startup Code for
cortex M0,M3,M4F angepasst, keine Ahnung warum dieser Teil in
dem {$ifdef REMAP_VECTTAB} define steht, denn dies muss dann in
jeder Unit für einen Controller gesetzt werden obwohl bei den
default Einstellungen der Remap korrekt ist. <br>
<br>
Hast Du eine Ahnung warum das so gemacht wurde? <br>
<br>
Ist nur ein Detail, wenn ich in der unit für den Raspi Pico den
wert definiere dann wird vtor ja richtig gesetzt. <br>
<br>
Michael <br>
<br>
<br>
Mein Startup Code: <br>
<br>
ldr r0, .Lvtor <br>
ldr r1, .Ltext_start <br>
str r1, [r0] <br>
<br>
bl PASCALMAIN <br>
b HaltProc <br>
.balign 4 <br>
.L_bss_start: <br>
.long _bss_start <br>
.L_bss_end: <br>
.long _bss_end <br>
.L_etext: <br>
.long _etext <br>
.L_data: <br>
.long _data <br>
.L_edata: <br>
.long _edata <br>
.Lvtor: <br>
.long 0xE000ED08 <br>
<br>
<br>
statt original startup Code: <br>
<br>
<br>
{$ifdef REMAP_VECTTAB} <br>
ldr r0, .Lvtor <br>
ldr r1, .Ltext_start <br>
str r1, [r0] <br>
{$endif REMAP_VECTTAB} <br>
<br>
bl PASCALMAIN <br>
b HaltProc <br>
<br>
.L_bss_start: <br>
.long _bss_start <br>
.L_bss_end: <br>
.long _bss_end <br>
.L_etext: <br>
.long _etext <br>
.L_data: <br>
.long _data <br>
.L_edata: <br>
.long _edata <br>
{$ifdef REMAP_VECTTAB} <br>
.Lvtor: <br>
.long 0xE000ED08 <br>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
fpc-devel maillist - <a class="moz-txt-link-abbreviated" href="mailto:fpc-devel@lists.freepascal.org" moz-do-not-send="true">fpc-devel@lists.freepascal.org</a>
<a class="moz-txt-link-freetext" href="https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel" moz-do-not-send="true">https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel</a>
</pre>
</blockquote>
<div id="DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2"><br>
<table style="border-top: 1px solid #D3D4DE;">
<tbody>
<tr>
<td style="width: 55px; padding-top: 13px;"><a
href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient"
target="_blank" moz-do-not-send="true"><img
src="https://ipmcdn.avast.com/images/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif"
alt="" style="width: 46px; height: 29px;"
moz-do-not-send="true" width="46" height="29"></a></td>
<td style="width: 470px; padding-top: 12px; color:
#41424e; font-size: 13px; font-family: Arial, Helvetica,
sans-serif; line-height: 18px;">Virus-free. <a
href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient"
target="_blank" style="color: #4453ea;"
moz-do-not-send="true">www.avast.com</a> </td>
</tr>
</tbody>
</table>
<a href="#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2" width="1"
height="1" moz-do-not-send="true"> </a></div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
fpc-devel maillist - <a class="moz-txt-link-abbreviated" href="mailto:fpc-devel@lists.freepascal.org">fpc-devel@lists.freepascal.org</a>
<a class="moz-txt-link-freetext" href="https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel">https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel</a>
</pre>
</blockquote>
</body>
</html>