Hi,
on page 310 of the CoreSight Components Technical Reference Manual (ARM DDI 0314H),there is this assembly snippet which is showing how to do an exclusive write to the stimulus port.
When I'm trying the code, the assembler complains about 'branch out of range'which seems to come from CZBEQ and CZBNE.
CZBEQ
CZBNE.
CZBNE
---------------8<------------
; R0 = FIFO-full/exclusive status; R1 = base of ITM stimulus ports; R2 = value to writeretryLDREX R0,[R1,#??]; read FIFO status and request excl lockCZBEQ R0,retry; FIFO not ready, try againSTREX R0,R2,[R1,#??] ; store if FIFO !Full and excl lockCZBNE R0,retry; excl lock failed, try again
; R0 = FIFO-full/exclusive status
; R1 = base of ITM stimulus ports
; R2 = value to write
retry
LDREX R0,[R1,#??]
; read FIFO status and request excl lock
CZBEQ R0,retry
; FIFO not ready, try again
STREX R0,R2,[R1,#??] ; store if FIFO !Full and excl lock
CZBNE R0,retry
; excl lock failed, try again