This is fixed in AFS 1.4. There is an error in RMTarget 1.0 that causes the PC to contain an incorrect value when a watchpoint is hit. To fix this, you must perform the following steps: 1) In the Sources/rm_asm.s file, locate the following text in the RM_DataAbortHandler function:
IF RM_OPT_HARDWATCHPOINT ; If we do support hardware watchpoints then create a packet header ; with the opcode set to RM_MSG_HARDWATCH. RM_DEBUG_READ_MOE a4, ip CMP a4, #RM_MOE_HARDWATCH MOVEQ a4, #RM_MSG_HARDWATCH MOVNE a4, #RM_MSG_DATAABORT ELSE
2) Insert two additional instructions immediately before the ELSE statement as follows:
IF RM_OPT_HARDWATCHPOINT ; If we do support hardware watchpoints then create a packet header ; with the opcode set to RM_MSG_HARDWATCH.
RM_DEBUG_READ_MOE a4, ip CMP a4, #RM_MOE_HARDWATCH MOVEQ a4, #RM_MSG_HARDWATCH MOVNE a4, #RM_MSG_DATAABORT
ADDEQ lr, lr, #4 ; change lr to point to the next instruction STREQ lr, [sp, #12] ; overwrite lr on the stack with the new value ELSE
(DE 57614)
|