I have having trouble getting STR to work in the following program in simulator mode for the STM32-Discovery with profile STM32F103VB:
AREA ADDR, CODE
; ADDR
THUMB
ALIGN
__main PROC
EXPORT __main
ADR R1,X
ADR R2,Y
LDR R3,[R1]
STR R3,[R2]
LDR R4,[R2]
ENDL B ENDL
ENDP
AREA ADDR, DATA, READWRITE
LTORG
X DCD 0xFFFFFFFF
Y DCD 0xAAAAAAAA
END
This does not seem to carry out the STR and loads R4 with 0xAAAAAAAA.
Any help much appreciated!