User guide

; into r3 and update the pointer
MCR p14,0,r3,c1,c0 ; Write word from r3
SUBS r1,r1,#1 ; Update counter
BNE pollout ; Loop if more words to be written
MOV r0, #0x18 ; Angel_SWIreason_ReportException
LDR r1, =0x20026 ; ADP_Stopped_ApplicationExit
SWI 0x123456 ; ARM semihosting SWI
outdata
DCB "Hello there!"
END
To execute the example:
1. Assemble outchan.s:
armasm -g outchan.s
2. Link the output object:
armlink outchan.o -o outchan.axf
The link step creates the executable file outchan.axf
3. Load the image, enable comms channel viewing, and execute the image. This procedure depends on which
debugger you are using. See:
Using armsd
Using AXD.
Using armsd
If you are using armsd:
1. Load the image into armsd with the command:
armsd -li -adp -port s=1 outchan.axf
2. Enable communication and open the output file, then execute the program:
ccout output
go
3. Quit armsd when execution finishes. You should be able to view the file and see that transfer has occurred.
Using AXD
If you are using AXD:
1. Enable channel viewing. See the description of the Control system view pop-up menu in chapter 5 of the AXD
and armsd Debuggers Guide.
2. Load the image created above into AXD.
3. Use the channel viewer in AXD. See the description of the Comms Channel processor view in chapter 5 of the
AXD and armsd Debuggers Guide
.
4. In the AXD main screen, select Go from the Execute menu (or press F5) to execute the image.
The data sent from the target (in this example, Hello there!) should now be displayed in the Channel Viewer
window.
8.5.3 Debugger to target communication
This is the sequence of events for message transfer from the debugger running on the host to the application running
on the core:
1. The debugger polls the debug communication control register R bit. If the R bit is clear, the debug
communication read register is clear and data can be written there for the target application to read.
2. The debugger scans the data into the debug communication read register via scan chain 2. The R bit in the
debug communication control register is automatically set by this.
3. The target application polls the R bit in the debug communication control register. If it is set, there is data in the
debug communication read register that can be read by the application, using the MRC instruction to read from
coprocessor 14. The R bit is cleared as part of the read instruction.
Debug Communications Channel
Copyright ?1999 2001 ARM Limited 8-6