duane> (A) Take a page from the "arm-semi-hosting".

oyvind> [snip] What's  "arm-semi-hosting"?

Also see this:
    http://www.arm.com/support/faqdev/1494.html

ARM defined a specific "SWI" instruction & SWI number  that allow the 
debugger to communicate with the host system via the debugger.

Support for it is optional.

You load R0 with a request number (the opcode number)
You load R1 with a pointer to a memory buffer.
You execute in arm:  SWI 123456  (a different number in thumb).

If the debugger is present and semi-hosting is 
available/supported/enabled, the target can:

a)   Open/close/read/write/delete a file.
b)   print a message on the debugger console.
c)   Various other things.

See NEWLIB -
        libgloss/arm/swi.h
and   libgloss/arm/syscalls.c
 
The idea is this: (A) you have a register with a command, and (B) you 
have a register (pointer) with the address of a parameter block.

You could use "SWI" to talk to the debugger, or you could use the 
"brkpt" instruction.

====

We could use a similar technique to download and communicate with a 
'flash helper'

_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to