Dump variables to PC
Posted: Tue Oct 23, 2018 11:02 am
I'm trying to fill an Oberon-07 array variable inside a program and, after program termination,
dumping back the array from the PC.
The array is defined as:
VAR
shared: ARRAY 32 OF BYTE;
and filled in the init body as:
FOR i := 0 TO 15 DO
shared := i
END;
where I also print the physical addresses as follows;
Out.Hex(SYSTEM.ADR(shared[0]),0); Out.Ln;
Out.Hex(SYSTEM.ADR(shared[1]),0); Out.Ln;
Out.Hex(SYSTEM.ADR(shared[2]),0); Out.Ln;
getting the following addresses:
2007F5C8H
2007F5C9H
2007F5CAH
Then on PC side I dump that memory area with ST-Link CLI tool:
st-link_cli -r8 2007F5C8 16
...
0x2007F5C8 : 63 69 81 26 6C 81 07 DE 54 EF 0A 9B DC F5 07 20
0x2007F5D8 : 3D 25 00 08 00 00
where dumped values are completely different. Am I missing something?
dumping back the array from the PC.
The array is defined as:
VAR
shared: ARRAY 32 OF BYTE;
and filled in the init body as:
FOR i := 0 TO 15 DO
shared := i
END;
where I also print the physical addresses as follows;
Out.Hex(SYSTEM.ADR(shared[0]),0); Out.Ln;
Out.Hex(SYSTEM.ADR(shared[1]),0); Out.Ln;
Out.Hex(SYSTEM.ADR(shared[2]),0); Out.Ln;
getting the following addresses:
2007F5C8H
2007F5C9H
2007F5CAH
Then on PC side I dump that memory area with ST-Link CLI tool:
st-link_cli -r8 2007F5C8 16
...
0x2007F5C8 : 63 69 81 26 6C 81 07 DE 54 EF 0A 9B DC F5 07 20
0x2007F5D8 : 3D 25 00 08 00 00
where dumped values are completely different. Am I missing something?