<html><head><style><![CDATA[#xb10922c99beb4be4a37e65de56310d4f{
font-family:'Segoe UI';
font-size:12pt;
}#x2e68745a2298420c878d7e88e06e6d8c{
font-family:'Segoe UI';
font-size:12pt;
}#x1af91ed03dd447b7b6611dd7cff76d06{
font-family:'Segoe UI';
font-size:12pt;
}]]></style>
<style id="css_styles"><![CDATA[
blockquote.cite { margin-left: 5px; margin-right: 0px; padding-left: 10px; padding-right:0px; border-left: 1px solid #cccccc }
blockquote.cite2 {margin-left: 5px; margin-right: 0px; padding-left: 10px; padding-right:0px; border-left: 1px solid #cccccc; margin-top: 3px; padding-top: 0px; }
a img { border: 0px; }
li[style='text-align: center;'], li[style='text-align: right;'] { list-style-position: inside;}
body { font-family: Segoe UI; font-size: 12pt; }
]]></style>
</head>
<body>Hello,<div><br /></div><div>I have a problem using a TObject on arm embedded (cortex m0: an atmel samd10x14).</div><div>It boils down to this:</div><div><br /></div><div>00002124 <SYSTEM_$$_GETMEM$POINTER$LONGWORD>:<br /> 2124: b510 push {r4, lr}<br /> 2126: b08a sub sp, #40 ; 0x28<br /> 2128: 1c04 adds r4, r0, #0<br /> 212a: 1c08 adds r0, r1, #0<br /> 212c: 4902 ldr r1, [pc, #8] ; (2138 <SYSTEM_$$_GETMEM$POINTER$LONGWORD+0x14>)<br /> 212e: 6809 ldr r1, [r1, #0]<br /> 2130: 4788 blx r1<br /> 2132: 6020 str r0, [r4, #0]<br /> 2134: b00a add sp, #40 ; 0x28<br /> 2136: bd10 pop {r4, pc}<br /> 2138: 20000140 andcs r0, r0, r0, asr #2</div><div><br /></div><div>When the debugger stops at 212e, r1 is correctly filled with 0x20000140.</div><div>On the next step, r1 is zero , and the program crashes on the blx.</div><div><br /></div><div>Could anybody point me towards the right direction ? What should I expect as the normal behavior at this point.</div><div>Thanks.</div><div><br /></div><div>Ps1: this is fpc_getmem</div><div><br /></div><div>00002178 <fpc_getmem>:<br /> 2178: b500 push {lr}<br /> 217a: b08a sub sp, #40 ; 0x28<br /> 217c: 4902 ldr r1, [pc, #8] ; (2188 <fpc_getmem+0x10>)<br /> 217e: 6809 ldr r1, [r1, #0]<br /> 2180: 4788 blx r1<br /> 2182: b00a add sp, #40 ; 0x28<br /> 2184: bd00 pop {pc}<br /> 2186: 46c0 nop ; (mov r8, r8)<br /> 2188: 20000140 andcs r0, r0, r0, asr #2</div><div><br /></div><div>Ps2: the memory at 0x20000140 is filled with zeros. </div></body></html>