#include <jtagpxa250.h>
Collaboration diagram for JTAGpxa250:
Public Types | |
enum | Cp15Reg |
list of registers of the coprocessor 15. See User's manual, section 10.2. | |
Public Methods | |
void | registerTargetReadyCallback (void(*func)(void *), void *arg) |
Register a callback function, that will be called each time the target gets ready. | |
void | unregisterTargetReadyCallback (void(*func)(void *)) |
Unregister a callback function, so it won't be called each time the target gets ready. | |
bool | targetReady () |
Returns true if target is ready to accept new commands. | |
bool | init (int argc, char **argv) |
initialize the JTAG connection.
| |
bool | loadDebugHandler () |
stop CPU execution, load the debug handler and boot it.
| |
bool | check () |
prints some information on the connected device.
| |
void | invalidateMiniIC () |
invalidates the mini instruction cache. | |
void | invalidateMainICLine (unsigned int address) |
invalidate a main cache line. More... | |
void | loadICLine (bool mini, unsigned int address, unsigned int instructions[]) |
load a line of 8 instructions of 32 bits each. | |
void | getReadyForUpload () |
reset the CPU, invalidate the cache and put the cpu in hold_rst mode. | |
void | boot () |
let the cpu boot by unsetting hold_rst. | |
bool | loadIC (bool mini, unsigned int startAddr, unsigned int instructions[], unsigned int nbInst) |
Load arbitrary code in the instruction cache. | |
void | putData (unsigned int startAddr, unsigned int words, unsigned int data[], bool halfword=false) |
Put any data into any memory address in the device's address space. More... | |
void | putData (unsigned int addr, unsigned int data, bool halfWord=false) |
Put a single word of data into any memory address in the device's address space. | |
void | getData (unsigned int startAddr, unsigned int words, unsigned int data[]) |
Get any data from any memory address in the device's address space. More... | |
void | execute (unsigned int startAddr, unsigned int spAddr) |
Execute from memory with a given stack pointer. Obsoleted by continueCmd(). | |
void | extBreak () |
Cause an external break, enterring a debug exception. | |
void | reboot () |
reboot the CPU. | |
void | pollForTX () |
void | continueCmd () |
send a 'c' command to the debug handler, telling it to resume execution. | |
bool | setSavePlace (unsigned int place, unsigned int value) |
unsigned int | getSavePlace (unsigned int place) |
bool | setCp15DebugRegister (unsigned int value, Cp15Reg reg) |
write debug registers. | |
Static Public Methods | |
void | intToCharArrayLE (unsigned int src, unsigned char dest[]) |
Convert an int in host endianness format to little endian. | |
int | charArrayLEToInt (unsigned char src[]) |
Convert a little endian char array to a host endian coded int. | |
Private Methods | |
void | fastWriteRX (unsigned int val, bool cont) |
write RX fast, do not wait for answer. | |
bool | readTX (unsigned int *val, int max_retry=MAX_RETRY_COUNT) |
Private Attributes | |
unsigned char | currentIREG |
cache current instruction, to gain speed. | |
bool | isTargetReady |
Definition at line 95 of file jtagpxa250.h.
|
Get any data from any memory address in the device's address space. This function save size 32 bits words data from any address.
Definition at line 514 of file jtagpxa250.cpp. |
|
Read a register. The result is only meaningfull if the target is ready.
Definition at line 664 of file jtagpxa250.cpp. References isTargetReady. |
|
invalidate a main cache line. Invalidate a cache line. A cache line contains 8 instructions, thus addresses in the range [address, address + 31] will be invalidated.
Definition at line 179 of file jtagpxa250.cpp. References JTAGControl::dreg(). |
|
stop CPU execution, load the debug handler and boot it.
I'm not sure about this method. The work is also done in LoadICCmd::exec(). Anyway, it might still be usefull. Definition at line 76 of file jtagpxa250.cpp. References boot(), charArrayLEToInt(), check(), DEBUG_HANDLER_FILE, getReadyForUpload(), and loadIC(). |
|
This function polls the TX jtag register. If it's empty, pollForTX returns immediatly. Otherwise, it reads what the debug handler wants to say, and do the required processing. Definition at line 583 of file jtagpxa250.cpp. References isTargetReady, and readTX(). Referenced by boot(), continueCmd(), extBreak(), getData(), putData(), reboot(), and setCp15DebugRegister(). |
|
Put any data into any memory address in the device's address space. This function loads size 32 bits words data into any address.
Definition at line 475 of file jtagpxa250.cpp. References fastWriteRX(), pollForTX(), and readTX(). Referenced by putData(). |
|
read the TX JTAG register.
Definition at line 435 of file jtagpxa250.cpp. References JTAGControl::dreg(). |
|
used to write registers. Look in target_to_host.h to know what place contains which register.
Definition at line 653 of file jtagpxa250.cpp. |
|
true if the target is currently running the debug handler, ready to receive commands. Definition at line 104 of file jtagpxa250.h. Referenced by execute(), getSavePlace(), pollForTX(), reboot(), and targetReady(). |