public final class MacraigorApi
- .lang.Object
|
Method Summary |
java.lang.String |
AddressSpaceNameList(int address_space_number)
|
int |
AddressSpaceNameListCount()
|
boolean |
AnalyzeJtagScanChain(int JTAG_speed)
|
java.lang.String |
ApiVersion()
|
boolean |
BreakpointMatchesThisAddress(long address,
int[] breakpoint_number, boolean[] software_bkpt)
|
boolean |
ClearHardwareBreakpoint(int number)
|
boolean |
ClearSoftwareBreakpoint(int number)
|
java.lang.String |
ConnectDeviceAddress()
|
void |
ConnectDeviceEepromFlags(byte[] eeprom_flags)
|
int |
ConnectDeviceHardwareFlags()
|
long |
ConnectDeviceSiliconId()
|
java.lang.String |
ConnectDeviceType()
|
int |
CpuStateRegisterListCount()
|
java.lang.String |
CpuStateRegisterNameList(int register_number)
|
java.lang.String |
CurrentEndian()
|
int |
DecodeAddressSpace(java.lang.String address_space_name)
|
boolean |
DoCommand(byte[] command,
byte[] reply)
|
boolean |
DownloadImage(java.lang.String filename,
int address_space,
int write_size)
|
int |
DownloadSpeedTest(long start_address,
int block_count,
int block_size,
int write_size)
|
java.lang.String |
ErrorText()
|
boolean |
FillMemory(long start_address,
byte value,
int count,
boolean verify,
int space)
|
boolean |
FillMemory(long start_address,
int value,
int count,
boolean verify,
int space)
|
boolean |
FillMemory(long start_address,
long value,
int count,
boolean verify,
int space)
|
boolean |
FillMemory(long start_address,
long value,
int count,
int size,
boolean verify,
int space)
|
boolean |
FillMemory(long start_address,
short value,
int count,
boolean verify,
int space)
|
int |
GeneralPurposeRegisterListCount()
|
java.lang.String |
GeneralPurposeRegisterNameList(int register_number)
|
int |
GetActiveDevice()
|
java.lang.String |
GetAssemblyLanguageType(int target_number)
|
int |
GetCpuSize()
|
java.lang.String |
GetDeviceList(int device_number)
|
int |
GetDeviceListCount()
|
java.lang.String |
GetDeviceName(int target_number)
|
int |
GetHardwareBreakpoints(long[] hardware_breakpoint_addresses)
|
java.lang.String |
GetMachineID()
|
java.lang.String |
GetProgramCounterName()
|
int |
GetSoftwareBreakpoints(long[] software_breakpoint_addresses)
|
boolean |
GetStatus()
|
java.lang.String |
GetTargetList(int target_number)
|
java.lang.String |
GetTargetList(java.lang.String vendor,
int target_number)
|
int |
GetTargetListCount()
|
int |
GetTargetListCount(java.lang.String vendor)
|
java.lang.String |
GetVendorList(int target_number)
|
int |
GetVendorListCount()
|
boolean |
InitializeTarget(int JTAG_speed,
java.lang.String[] targets)
|
java.lang.String |
JtagDriverVersion()
|
java.lang.String |
JtagHardwareVersion()
|
int |
JtagScanChainDeviceCount()
|
int |
JtagScanChainIRLength()
|
int |
JtagScanChainJtagID(int scan_chain_position)
|
boolean |
JTAGScanIO(java.lang.String shift_register,
int length_in_bits,
byte[] data_in,
byte[] data_out)
|
boolean |
JTAGScanIOState(java.lang.String shift_register,
java.lang.String final_jtag_state,
int length_in_bits,
byte[] data_in,
byte[] data_out)
|
long |
LoadImageStartsAt(java.lang.String filename)
|
int |
MemoryTest(long start_address,
int block_count,
int block_size,
int write_size)
|
boolean |
MoveMemory(long source_address,
int source_space,
long destination_address,
int destination_space,
int count,
boolean verify)
|
boolean |
RAMTest(long start_address,
int address_space,
int size,
int byte_count)
|
boolean |
ReadCpuStateRegisters(long[] register_values_list)
|
boolean |
ReadGeneralPurposeRegisters(long[] register_values_list)
|
boolean |
ReadMemory(long start_address,
int space,
byte[] memory)
|
boolean |
ReadMemory(long start_address,
int space, int[] memory)
|
boolean |
ReadMemory(long start_address,
int size,
int space,
byte[] memory)
|
boolean |
ReadMemory(long start_address,
int space,
long[] memory)
|
boolean |
ReadMemory(long start_address,
int space,
short[] memory)
|
boolean |
ReadRegister(java.lang.String starting_register_name,
long[] register_list)
|
java.lang.String |
RegisterNameList(int register_number)
|
int |
RegisterNameListCount()
|
boolean |
ResetHaltTarget()
|
boolean |
ResetRunTarget()
|
boolean |
RunTargetFromAddress(long address)
|
boolean |
RunTargetFromPC()
|
boolean |
SetActiveDevice(int target_number)
|
boolean |
SetConnection(java.lang.String device,
java.lang.String address,
java.lang.String license)
|
void |
SetEndian(java.lang.String endian)
|
boolean |
SetHardwareBreakpoint(int number,
long address)
|
boolean |
SetJtagDeviceInfo(int target_number,
int IR_length,
int bypass_instruction,
int bypass_length)
|
boolean |
SetRegisterBufferAddress(long address)
|
boolean |
SetSoftwareBreakpoint(int number,
int space,
long address)
|
boolean |
SetSpeed(int JTAG_speed)
|
boolean |
SingleStep(int count,
long[] returned_registers)
|
java.lang.String |
StatusText()
|
boolean |
StopTarget()
|
boolean |
SynchronizeMultipleCommands(java.lang.String command,
int[] target_list)
|
boolean |
TargetSpecific(byte[] command)
|
java.lang.String |
TemplateVersion()
|
boolean |
TerminateTarget()
|
int |
UsbDeviceCount()
|
boolean |
UsbLed(boolean on)
|
boolean |
WriteMemory(long start_address,
int space,
boolean verify,
byte[] memory)
|
boolean |
WriteMemory(long start_address,
int space,
boolean verify, int[] memory)
|
boolean |
WriteMemory(long start_address,
int space,
boolean verify,
long[] memory)
|
boolean |
WriteMemory(long start_address,
int space,
boolean verify,
short[] memory)
|
boolean |
WriteMemory(long start_address,
int size,
int space,
boolean verify,
byte[] memory)
|
boolean |
WriteRegister(java.lang.String starting_register_name,
long[] register_list)
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EMPTY_BREAKPOINT
public final long EMPTY_BREAKPOINT
- See Also:
- Constant Field Values
USED_BY_SOFTWARE_BKPT
public final long USED_BY_SOFTWARE_BKPT
- See Also:
- Constant Field Values
MacraigorApi
public MacraigorApi()
SetConnection
public boolean SetConnection(java.lang.String device,
java.lang.String address,
java.lang.String license)
// Set type/address of Macraigor Interface Device
// Returns true if command completed successfully
// device [WIGGLER/RAVEN/
// Usb2Demon/Usb2Sprite/UsbWiggler/USB/
// MPDEMON-ETHERNET/MPDEMON-PARALLEL/
// MPDEMON-SERIAL] - string with device name
// address - based on device type :
// WIGGLER/RAVEN/MPDEMON-PARALLEL : "LPT1" - "LPT4"
// USB/Usb2Demon/Usb2Sprite/UsbWiggler: "USB0" - "USB15"
// MPDEMON-SERIAL : "COM1" - "COM4"
// MPDEMON-ETHERNET : "xxx.xxx.xxx.xxx"
// license - IF device = "WIGGLER" or "RAVEN" :
// string in the format "xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx"
// (where each "x" is a hexidecimal digit)
// license code generated by Macraigor based on MachineID
// ELSE (device = "USB" ect) :
// "" (blank string, license not used)
Go To Top
AnalyzeJtagScanChain
public boolean AnalyzeJtagScanChain(int JTAG_speed)
// Analyzes the JTAG scan chain to determine:
// 1) the number of devices in the JTAG scan chain
// 2) the length in bits of the JTAG Instruction Register scan path
// which is made up of one or more device's instruction registers
// 3) the JTAG ID codes of the devices on the scan chain
// JTAG_speed [1 - 8] - indicates JTAG clock rate
// Returns: true - Analysis succeeded, call :
// JtagScanChainDevices() - device count/device'(s) JTAG IDs
// JtagScanChainIRLength() - length of IR scan chain
// false - Analysis failed, call ErrorText() for details
Go To Top
JtagScanChainDeviceCount
public int JtagScanChainDeviceCount()
// Provides information obtained from a previous AnalyzeJtagScanChain() call
// returns: number of devices on the JTAG scan chain
Go To Top
JtagScanChainJtagID
public int JtagScanChainJtagID(int scan_chain_position)
// Provides information obtained from a previous AnalyzeJtagScanChain() call.
// Returns the JTAG ID of the device in the caller specified scan chain
// postion or 0 if the scan_chain_position is equal to or greater than
// the value returned by JtagScanChainDeviceCount()
// when called with scan_chain_position = 0 this method with return the
// JTAG ID of the device closest to TDO, when called with
// scan_chain_position = (JtagScanDeviceCount()-1) it will return the
// JTAG ID of the device closest to TDI
// scan_chain_postion [0 - ...] position in the JTAG scan chain of the
// device that this method will return the JTAG ID of.
// returns: JTAG ID of device at scan_chain_position
Go To Top
JtagScanChainIRLength
public int JtagScanChainIRLength()
// Provides information objtained from previous AnalyzeJtagScanChain() call
// returns: length in bits of the JTAG Instruction Register scan chain
Go To Top
GetMachineID
public java.lang.String GetMachineID()
// Returns string in the format "xxxxxx" where each 'x' is a hexidecimal
// digit. Wigglers and Ravens require a license code based on MachineID
// (the host system's MAC address). This call fetches this value so
// it can be transfered to Macraigor and a license generated for this machine.
Go To Top
GetDeviceList
public java.lang.String GetDeviceList(int device_number)
// Returns list of valid Macraigor JTAG device names, one at a time based on device_number
// when GetDeviceList() returns "" the end of the list has been reached
// device_number [0 - ...] return this device list entry's name
// where 0 = first device in the list,
Go To Top
GetDeviceListCount
public int GetDeviceListCount()
// Returns the number of Macraigor JTAG device names in the device list;
Go To Top
InitializeTarget
public boolean InitializeTarget(int JTAG_speed,
java.lang.String[] targets)
// Connects to one our more target cpus on the JTAG scan chain
// Returns true if command completed successfully
// JTAG_speed [1 - 8] - indicates JTAG clock rate
// targets[] - array of from 1 to 255 target name strings (name list
// supplied by GetTargetList() or "NO_CPU" if device
// is not a CPU supported by the Macragor Drivers (a FPGA
// device for example)
// Curently supported target names :
// Vendor Target Names
// ------ ------------
// ALCHEMY : AU1000, AU1100, AU1200, AU1500, AU1550
// AMCC : PPC405, PPC440EP, AMCC440GP, AMCC440GX
// ARM : ARM7TDMI, ARM920T, ARM922T, ARM925T, ARM926T, ARM940, ARM946T
// ARM1136, ARM1176, CORTEX_M3, CORTEX_M3_2WIRE
// BROADCOM: BCM-MIPS32, BCM-1250
// CAVIUM : O1P/CN300x/CN301x, O2P/CN31xx/CN2020, N3/CN38xx/CN36xx,
// O5020/CN502x, O52/CN52xx, O56/CN56xx
// CIRRUS : CS7xxx, CS89712
// CISCO : MIPS3264
// FREESCALE : CPU32, COLDFIRE, COLDFIRE2,DSP563xx, DSP56800,
// MAC7111, iMX1, iMXL, iMX21, iMX27, iMX31, iMX35,
// MPC5XX, MPC8XX, MPC603RR, MPC740/750, MPC745/755,
// MPC5200, MPC5554, MPC8240, MPC8245, MPC8247/8248,
// MPC825x/826x, MPC827x/828x, MPC8540/8560
// IBM : PPC7xx
// INNOVASIC: FIDO1100
// INTEL : 80200, 80219, 80225, 80321, 80331,IOP315, OP321, IOP33x, IXC1100, IXP42x,
// IXP43x, IXP46x, IXP23xx, IXP2400, IXP2800, IXP2850, PXA210, PXA25x, PXA26x,
// PXA27x, 81341, 81342, IXP23xx, XSCALE-CORE3
// INTRINSITY: FASTMATH
// MARVELL : PXA3xx
// MICROCHIP : PIC32
// MIPS : MIPS32-4Kc, MIPS32-4Ke, MIPS64-5K
// MORPHOTECH : MS1-16
// NETSILICON : NET+ARM, NS7520, NS9360,NS9750,NS9775
// PHILLIPS : PR1900, PR1910
// PLX : IOP480
// SHARP : LH7A4xx, 7952x
// VITESSE : V3000
// XILINX : PPC405SoftCore
// unknown : NO_CPU
Go To Top
GetVendorList
public java.lang.String GetVendorList(int target_number)
// Returns list of valid CPU vendors names, one at a time based on vendor_number
// When GetVendorList() returns "" the end of the list has been reached
// vendort_number [0 - ...] return this target list entry's name
// where 0 = first vendor in the list,
Go To Top
GetVendorListCount
public int GetVendorListCount()
// GetTargetListCount - returns the number of target names in the target
// list;
Go To Top
GetTargetList
public java.lang.String GetTargetList(java.lang.String vendor,
int target_number)
// Returns list of valid target names, one at a time based vendor and
// target_number (ie "ALCHEMY",0 returns "AU1000, "ALCHEMY",1 returns "AU1100")
// When GetTargetList() returns "" the end of the list has been reached
// vendor - vendor name string from list returned by GetVendorList()
// target_number [0 - ...] return this target list entry's name
// where 0 = first device in the list,
Go To Top
GetTargetListCount
public int GetTargetListCount(java.lang.String vendor)
// GetTargetListCount - returns the number of target names in the target
// list for the specified vendor
// vendor - vendor name string from list returned by GetVendorList()
Go To Top
GetTargetList
public java.lang.String GetTargetList(int target_number)
// Returns list of all valid target names, one at a time based on
// target_number.
// When GetTargetList() returns "" the end of the list has been reached
// target_number [0 - ...] return this target list entry's name
// where 0 = first device in the list,
Go To Top
GetTargetListCount
public int GetTargetListCount()
// GetTargetListCount - returns the total number of target names in the
// list of all devices
Go To Top
SetJtagDeviceInfo
public boolean SetJtagDeviceInfo(int target_number,
int IR_length,
int bypass_instruction,
int bypass_length)
// Supplies JTAG information for a device on a JTAG scan
// chain that does not have a template but does occupy some number of
// bits within the JTAG chain (an example of which would be a FPGA device).
// Returns true if command completed successfully
// target_number [0 - ...] - the position of this NO_CPU JTAG device in
// the target_list (any values that index to an NO_CPU target type
// are valid). 0 = the first target type in the list.
// IR Length - the length in bits of the instruction register into which
// the bypass instruction will be written
// Bypass Instruction - bit pattern required to place the NO_CPU JTAG
// device into bypass mode.
// Bypass Length - number of scan chain bits used by this NO_CPU JTAG
// device when it is placed in bypass mode (typically 1)
Go To Top
SetActiveDevice
public boolean SetActiveDevice(int target_number)
// Set which target CPU on JTAG scan chain will receive all subsequent commands
// Returns true if command completed successfully
// target_number [0 - 254] - detination target, matches array index of
// InitializeTargets(targets[]) parameter
Go To Top
GetActiveDevice
public int GetActiveDevice()
// Returns target number of current target CPU on JTAG scan chain
Go To Top
GetAssemblyLanguageType
public java.lang.String GetAssemblyLanguageType(int target_number)
// Returns the name of the assembly language family used by the
// target cpu in the target_number position on the JTAG Scan Chain
// One of the following : "ARM", "PowerPC", "MPCe500", "MIPS"
Go To Top
GetDeviceName
public java.lang.String GetDeviceName(int target_number)
// Returns the name of the target CPU Target in the target_number
// position on the JTAG Scan Chain
Go To Top
GetCpuSize
public int GetCpuSize()
// Returns the address/register field size : 32 or 64. For the
// currently selected CPU
Go To Top
GetStatus
public boolean GetStatus()
// Query current selected target's state, a subsequent call to StatusText()
// will output the results.
// Returns true if command completed successfully
Go To Top
GetProgramCounterName
public java.lang.String GetProgramCounterName()
// Returns the name of the currently selected target's Program Counter register
Go To Top
TerminateTarget
public boolean TerminateTarget()
// Terminates the connection to the current selected target CPU
// Returns true if command completed successfully
Go To Top
ConnectDeviceType
public java.lang.String ConnectDeviceType()
// These 5 methods return parameters of currently connected device
// ConnectDevice:
// Type - returns string : WIGGER/RAVEN/Usb2Demon/Usb2Sprite/UsbWiggler/USB/
// MPDEMON-ETHERNET/MPDEMON-PARALLEL/MPDEMON-SERIAL
// Port - returns string : LPT<1-4>*/USB<0-15>*/COM<1-4>/Ethernet
// address in the format xxx.xxx.xxx.xxx
// SiliconId - returns 64 bit silicon id
// HardwareFlags - returns 32 bit hardware flags
// EepromFlags - returns array of 8 device eeprom flags
Go To Top
ConnectDeviceAddress
public java.lang.String ConnectDeviceAddress()
// These 5 methods return parameters of currently connected device
// ConnectDevice:
// Type - returns string : WIGGER/RAVEN/Usb2Demon/Usb2Sprite/UsbWiggler/USB/
// MPDEMON-ETHERNET/MPDEMON-PARALLEL/MPDEMON-SERIAL
// Port - returns string : LPT<1-4>*/USB<0-15>*/COM<1-4>/Ethernet
// address in the format xxx.xxx.xxx.xxx
// SiliconId - returns 64 bit silicon id
// HardwareFlags - returns 32 bit hardware flags
// EepromFlags - returns array of 8 device eeprom flags
Go To Top
ConnectDeviceSiliconId
public long ConnectDeviceSiliconId()
// These 5 methods return parameters of currently connected device
// ConnectDevice:
// Type - returns string : WIGGER/RAVEN/Usb2Demon/Usb2Sprite/UsbWiggler/USB/
// MPDEMON-ETHERNET/MPDEMON-PARALLEL/MPDEMON-SERIAL
// Port - returns string : LPT<1-4>*/USB<0-15>*/COM<1-4>/Ethernet
// address in the format xxx.xxx.xxx.xxx
// SiliconId - returns 64 bit silicon id
// HardwareFlags - returns 32 bit hardware flags
// EepromFlags - returns array of 8 device eeprom flags
Go To Top
ConnectDeviceHardwareFlags
public int ConnectDeviceHardwareFlags()
// These 5 methods return parameters of currently connected device
// ConnectDevice:
// Type - returns string : WIGGER/RAVEN/Usb2Demon/Usb2Sprite/UsbWiggler/USB/
// MPDEMON-ETHERNET/MPDEMON-PARALLEL/MPDEMON-SERIAL
// Port - returns string : LPT<1-4>*/USB<0-15>*/COM<1-4>/Ethernet
// address in the format xxx.xxx.xxx.xxx
// SiliconId - returns 64 bit silicon id
// HardwareFlags - returns 32 bit hardware flags
// EepromFlags - returns array of 8 device eeprom flags
Go To Top
ConnectDeviceEepromFlags
public void ConnectDeviceEepromFlags(byte[] eeprom_flags)
// These 5 methods return parameters of currently connected device
// ConnectDevice:
// Type - returns string : WIGGER/RAVEN/Usb2Demon/Usb2Sprite/UsbWiggler/USB/
// MPDEMON-ETHERNET/MPDEMON-PARALLEL/MPDEMON-SERIAL
// Port - returns string : LPT<1-4>*/USB<0-15>*/COM<1-4>/Ethernet
// address in the format xxx.xxx.xxx.xxx
// SiliconId - returns 64 bit silicon id
// HardwareFlags - returns 32 bit hardware flags
// EepromFlags - returns array of 8 device eeprom flags
Go To Top
ApiVersion
public java.lang.String ApiVersion()
// These 4 Methods return software/hardware component version numbers
// ApiVersion - returns Macraigor API release version string
// TemplateVersion - returns current targets template version string
// JtagDriverVersion - returns current JTAG device's driver version string
// JtagHardwareVersion - returns current JTAG device's hardware version string
Go To Top
TemplateVersion
public java.lang.String TemplateVersion()
// These 4 Methods return software/hardware component version numbers
// ApiVersion - returns Macraigor API release version string
// TemplateVersion - returns current targets template version string
// JtagDriverVersion - returns current JTAG device's driver version string
// JtagHardwareVersion - returns current JTAG device's hardware version string
Go To Top
JtagDriverVersion
public java.lang.String JtagDriverVersion()
// These 4 Methods return software/hardware component version numbers
// ApiVersion - returns Macraigor API release version string
// TemplateVersion - returns current targets template version string
// JtagDriverVersion - returns current JTAG device's driver version string
// JtagHardwareVersion - returns current JTAG device's hardware version string
Go To Top
JtagHardwareVersion
public java.lang.String JtagHardwareVersion()
// These 4 Methods return software/hardware component version numbers
// ApiVersion - returns Macraigor API release version string
// TemplateVersion - returns current targets template version string
// JtagDriverVersion - returns current JTAG device's driver version string
// JtagHardwareVersion - returns current JTAG device's hardware version string
Go To Top
RunTargetFromPC
public boolean RunTargetFromPC()
// Start currently selected target cpu running from it's PC address
// Returns true if command completed successfully
Go To Top
RunTargetFromAddress
public boolean RunTargetFromAddress(long address)
// Start currently selected target cpu running from address
// Returns true if command completed successfully
// address [0 - 0xFFFFFFFFFFFFFFFF] - start address
Go To Top
StopTarget
public boolean StopTarget()
// Halt currently selected target
// Returns true if command completed successfully
Go To Top
SynchronizeMultipleCommands
public boolean SynchronizeMultipleCommands(java.lang.String command,
int[] target_list)
// Execute command simulaneously on multiple CPUs
// Returns true if command completed successfully
// command ["RunTargetFromPC", "StopTarget"] - command to be executed string
// target_list - list containing the scan chain indexes of the cpus
// that will execute the command ie 0 for first cpu, 1 for second, ect
// The length of target_list will determine how many CPUs receive the
// command
Go To Top
ResetRunTarget
public boolean ResetRunTarget()
// Reset the currently selected target and start it running
// Returns true if command completed successfully
Go To Top
ResetHaltTarget
public boolean ResetHaltTarget()
// Reset the currently selected target but halt it at it's reset vector
// Returns true if command completed successfully
Go To Top
SingleStep
public boolean SingleStep(int count,
long[] returned_registers)
// Single step target <count> times and return PC and cause registers
// Returns true if command completed successfully
// count [ - ...] - number of times to single step the target CPU
// returned_registers - array of length 2, after the method has completed:
// returned_registers[0] = PC - target CPU's PC
// returned_registers[1] = CAUSE - target CPU's PC/cause
// values at end of step(s)
Go To Top
SetSoftwareBreakpoint
public boolean SetSoftwareBreakpoint(int number,
int space,
long address)
// Writes the software breakpoint opcode to the caller
// specified <address> in target memory. If successful
// it adds the breakpoint address, and the opcode it overwrote
// to an internal list and returns true, if not it returns false
// number [0 - 255] - software breakpoint number
// space [0 - ] - target CPU address space that address parameter lives in
// address [0 - 0xFFFFFFFFFFFFFFFF] - software breakpoint address
// in target memory
Go To Top
ClearSoftwareBreakpoint
public boolean ClearSoftwareBreakpoint(int number)
// Searches internal software breakpoint list for a match on
// <number>, if it finds one it replaces the software breakpoint
// in target memory with the opcode it replaced, then returns : true
// otherwize it returns : false.
// number [0 - 255] - software breakpoint number to be cleared
Go To Top
GetSoftwareBreakpoints
public int GetSoftwareBreakpoints(long[] software_breakpoint_addresses)
// Returns the number of software breakpoints supported for this CPU type
// usually either 256 or 0 (if software breakpoints are not supported.
// If there are one or more breakpoints in the
// list, <software_breakpoint_addresses> will contain they're addresses
// in memory.
// software_breakpoint_adddresses - array of length 256, after the method
// has completed AND return value > 0 :
// software_breakpoint_addresses[0] - software breakpoint address OR
// EMPTY_BREAKPOINT
// software_breakpoint_addresses[return value - 1] - last soft breakpt addr OR
// EMPTY_BREAKPOINT
Go To Top
SetHardwareBreakpoint
public boolean SetHardwareBreakpoint(int number,
long address)
// Attempts to configure the target CPU to set a hardware breakpoint
// at the caller specified <address>. If successful it adds the
// breakpoint address to an internal list and returns true, if
// not it returns false
// number [0 - NUMBER OF HARDWARE BREAKPOINTS - 1] - hardware
// breakpoint number to assign breakpoint address to
// address [0 - 0xFFFFFFFFFFFFFFFF] - hardware breakpoint address
// in target memory
Go To Top
ClearHardwareBreakpoint
public boolean ClearHardwareBreakpoint(int number)
// Searches internal hardware breakpoint list for a match on
// <number>, if it finds one it disables the hardware breakpoint
// at that address, then returns : true
// otherwize it returns : false.
// number [0 - NUMBER OF HARDWARE BREAKPOINTS - 1] - hardware
// number to be cleared
Go To Top
GetHardwareBreakpoints
public int GetHardwareBreakpoints(long[] hardware_breakpoint_addresses)
// Returns the the maximim number of hardware breakpoints
// supported by this CPU's architecture and a
// breakpoint address list. If one or more breakpoints are supported,
// <hardware_breakpoint_addresses> will contain the current active
// hardware breakpoint addresses in memory OR -1 if this hardware breakpoint
// is currently not in use.
// hardware_breakpoint_addresses - array of length 256, after the method
// has completed AND return value > 0 :
// hardware_breakpoint_addresses[0] - first hdw breakpoint address OR
// EMPTY_BREAKPOINT
// hardware_breakpoint_addresses[N] - last hdw breakpoint address OR
// EMPTY_BREAKPOINT
Go To Top
BreakpointMatchesThisAddress
public boolean BreakpointMatchesThisAddress(long address,
int[] breakpoint_number,
boolean[] software_bkpt)
// Returns true if the caller supplied address matches a hardware or software
// breakpoint. If so breakpoint_number[0]/software_bkpt[0] will contain the
// matching breakpoint's number and type
// address - address to search software and hardware breakpoint tables
// looking for a match
// breakpoint_number[1] - one element array used to pass matching breakpoint
// number back to the caller in breakpoint_number[0]
// software_bkpt[1] - one element array used to pass the breapoint type
// back to the caller (true = software/false=hardware) in
// software_bkpt[0]
Go To Top
ReadRegister
public boolean ReadRegister(java.lang.String starting_register_name,
long[] register_list)
// Returns list of register values read from currently selected CPU starting
// with starting register name and continuing for the length of
// register_list.
// Returns true if command completed successfully
// starting_register_name - ascii name of first register to be read (from
// RegisterNameList() or GeneralPurposeRegisterNameList() or by typing "names" command
// in the OcdCommander), Supported Register Names :
// ALCHEMY: AU1000, AU1100, AU1200: AU1500, AU1550 :
// r<0-31>,sr,index,rand,elo<0-1>,ctxt,pgmask,wired,count,badvaddr,
// entryhi,compare,status,cause,epc,prid,config,lladdr,lladdr,
// watchlo,watchhi,scratch,debug,depc,perfcnt,dtag,itag,errorepc,
// desave,config1,iwatchlo,iwatchlo,ddata,idata
// AMCC: PPC405 :
// XILINX: PPC405SoftCore :
// spr<0-1023>,dcr<0-1023>,gpr<0-31>,fpr<0-31>,fpr<0-31>h,cr,fpscr,msr,pc/iar
// AMCC: PPC440EP, AMCC440GP, AMCC440GX :
// PLX: IOP480 :
// spr<0-1023>,dcr<0-1023>,gpr<0-31>,fpr<0-31>,fpr<0-31>h,cr,fpscr,msr,pc/iar
// xer,lr,ctr,dec,srr<0-1>,pid,decar,csrr<0-1>,dear,esr,ivpr,usprg0,sprg<1-3>
// pir,pvr,dbsr,dbcr<0-2>,iac<1-4>,dac<1-2>,tsr,tcr,ivor<0-15>,inv<0-3>,
// itv<0-3>,dnv<0-3>,dtv<0-3>,dvlim,ivlim,rstgfg,dcdbtrl,dcdbtrh,icdbtrl,
// icdbtrh,mmucr,ccr0,iddbdr,dbdr
// ARM: ARM7TDMI :
// CIRRUS: CS7xxx, CS89712 :
// FREESCALE: MAC7111 :
// cpsr,r<0-15>,spsr,r<8-14>_fiq,spsr_svc,r<13-14>_svc,spsr_abt,r<13-14>_abt,
// spsr_irq,r<13-14>_irq,spsr_und,r<13-14>_und,dccr,dcdr,w<0-1>av,w<0-1>am,
// w<0-1>dv,w<0-1>dm,w<0-1>cv,w<0-1>cm,idcode,ctrl,translatetablebase,
// domainaccess,fsr,far,fcsepid,dcccontrol,dccdata,dcctimeout
// ARM: ARM920T, ARM922T :
// FREESCALE : iMX1, iMXL :
// SHARP: LH7A4xx :
// cpsr,r<0-15>,spsr,r<8-14>_fiq,spsr_svc,r<13-14>_svc,spsr_abt,r<13-14>_abt,
// spsr_irq,r<13-14>_irq,spsr_und,r<13-14>_und,dccr,dcdr,w<0-1>av,w<0-1>am,
// w<0-1>dv,w<0-1>dm,w<0-1>cv,w<0-1>cm,idcode,cachetype,ctrl,translatetablebase,
// domainaccess,fsr,far,datacachelockdown,instrcachelockdown,datatlblockdown,
// instrtlblockdown,fcsepid,dcccontrol,dccdata,dcctimeout
// ARM: ARM925T, ARM926T :
// FREESCALE: iMX21, iMX27 :
// NETSILICON: NS9360,NS9750,NS9775:
// cpsr,r<0-15>,spsr,r<8-14>_fiq,spsr_svc,r<13-14>_svc,spsr_abt,r<13-14>_abt,
// spsr_irq,r<13-14>_irq,spsr_und,r<13-14>_und,dccr,dcdr,w<0-1>av,w<0-1>am,
// w<0-1>dv,w<0-1>dm,w<0-1>cv,w<0-1>cm,idcode,cachetype,ctrl,translatetablebase,
// domainaccess,dfsr,ifsr,far,datacachelockdown,instrcachelockdown,
// datatlblockdown,instrtlblockdown,fcsepid,tcmstatus,datatcmregion,
// instrtcmregion,contextid,dcccontrol,dccdata,dcctimeout
// ARM: ARM940 :
// cpsr,r<0-15>,spsr,r<8-14>_fiq,spsr_svc,r<13-14>_svc,spsr_abt,r<13-14>_abt,
// spsr_irq,r<13-14>_irq,spsr_und,r<13-14>_und,dccr,dcdr,w<0-1>av,w<0-1>am,
// w<0-1>dv,w<0-1>dm,w<0-1>cv,w<0-1>cm,idcode,cachetype,ctrl,datacacheattr,
// intrcacheattr,writebufferctrl,dataspaceprotect,instrspaceprotect,
// dataprotectrgn<0-7>,instrprotectrgn<0-7>,datatlblockdown,instrtlblockdown
// dcccontrol,dccdata,dcctimeout
// ARM: ARM946T :
// cpsr,r<0-15>,spsr,r<8-14>_fiq,spsr_svc,r<13-14>_svc,spsr_abt,r<13-14>_abt,
// spsr_irq,r<13-14>_irq,spsr_und,r<13-14>_und,dccr,dcdr,w<0-1>av,w<0-1>am,
// w<0-1>dv,w<0-1>dm,w<0-1>cv,w<0-1>cm,idcode,cachetype,ctrl,datacacheattr,
// instrcacheattr,writebuffctrl,tcmemorysize,dataaccessprm,instraccesprm,
// protectrgn<0-7>,datatlblockdown,instrtlblockdown,tcmdataregion,tcminstrregion,
// fcsepid,tracectrl,dcccontrol,dccdata,dcctimeout
// ARM: ARM1136, ARM1176:
// FREESCALE: iMX31, iMX35:
// cpsr,r<0-15>,spsr,r<8-14>_fiq,spsr_svc,r<13-14>_svc,spsr_abt,r<13-14>_abt,
// spsr_irq,r<13-14>_irq,spsr_und,r<13-14>_und,didr,vcr,bvr<0-5>,bcr<0-5>,
// wvr<0-1>,wcr<0-1>,idcode,cachetype,tcm_status,tbl_type,control,aux_control,
// coprocessor_access,ttb_<0-1>,ttb_control,domainaccess,data_fault_status,
// instr_fault_status,fault_address,watchpt_fault_address,data_cache_lockdown,
// instr_cache_lockdown,data_tcm_region,instr_tcm_region,tlb_lockdown,
// dma_idstatus_present,dma_idstatus_queued,dma_idstatus_running,
// dma_idstatus_interrupt,dma_user_access,dma_channel_number,dma_enable_stop,
// dma_enable_start,dma_enable_clear,dma_control,dma_intrnl_start_addr,
// dma_extrnl_start_addr,dma_intrnl_end_addr,dma_channel_status,
// dma_context_id,fcse_pid,context_id,data_memory_remap,instr_memory_remap,
// dma_memory_remap,pport_memory_remap,pmnc,ccnt,pmn<0-1>,data_tag_ram_read_op,
// isntr_tag_ram_read_op,instr_cache_data_ram_read_op,data_cache_debug,
// isntr_cache_debug,tlb_debug_control,data_microtlb_entry,data_microtlb_va,
// data_micortlb_pa,data_microtbl_attrib,instr_microtbl_entry,instr_microtbl_va,
// instr_microtbl_pa,instr_microtlb_attrib,main_tbl_entry_read,
// main_tlb_entry_write,main_tlb_va,main_tlb_pa,main_tlb_attrib
// ARM: CORTEX_M3, CORTEX_M3_2WIRE :
// cpsr,r<0-13>,pc,xpsr,msp,psp,raz
// FREESCALE: CPU32 :
// MORPHOTECH: MS1-16 :
// d<0-7>,a<0-7>,returnpc,currentpc,status,usp,ssp,sfc,dfc,atemp,far,vbr
// FREESCALE: COLDFIRE, COLDFIRE2 :
// d<0-7>,a<0-7>,cacr,acr<0-1>,vbr,sr,pc,rambar,mbar,csr,aatr,tdr,
// pbr,pbmr,abhr,ablr,dbr,dbmr
// FREESCALE: DSP563xx, DSP56800 :
// a<0-2>,b<1-3>,la,lc,m<0-7>,n<0-7>,omr,r<0-7>,sptr,sr,ssh,ssl,x<0-1>,
// y<0-1>,ep,sz,sc,vba,oscr,ombc,obcr,omlr<0-1>,ogdbr,otc,otagb<0-7>,
// otagbsr,opdbr,opilr,opabfr,opabdr,opabex,opabf<0-11>,gotor,idcode,pc
// FREESCALE: MPC5XX, MPC8XX :
// spr<0-1023>,gpr<0-31>,fpr<0-31><l/h>,cr,fpscr,msr,pc/iar
// FREESCALE: MPC603RR, MPC740/750, MPC745/755, MPC5200, MPC5554, MPC8240,
// MPC8245, MPC8247/8248, MPC825x/826x, MPC827x/828x :
// IBM: PPC7xx :
// spr<0-1023>,gpr<0-31>,fpr<0-31><l/h>,cr,fpscr,msr,pc/iar,sr<0-15>,
// tgpr<0-2>,tgpr
// FREESCALE: MPC8540/8560:
// spr<0-1023>,pc/iarr,gpr<l/h><0-31>,pgmc0,pmlca<0-2>,pmlcb<0-3>,upmc<0-3>,
// upmgc0,upmlca<0-3>,upmlcb<0-3>
// INNOVASIC: FIDO1100 :
// d<0-7>,a<0-6>,a7usp,a7ssp,pc,sr,vbr,sfc,dfc,ccr,mpualloc,maxtime,time,
// swintact,swintctrl,claim,pending,inheritance,faultid,currentcontext,
// active_context,program_counter,dbgctrlscanchain,si_bist,config_acr,mem_offset
// INTEL: 80200, 80219, 80225, 80321, 80331,IOP315"},IOP321, IOP33x, IXC1100, IXP42x,
// IXP43x, IXP46x, IXP23xx, IXP2400, IXP2800, IXP2850, PXA210, PXA25x, PXA26x,
// PXA27x :
// cpsr,r<0-15>,spsvc,chkpt<0-1>,dbcon,dbr<0-1>,ibcr<0-1>,r<8-14>_fiq,spsr_fiq,
// r<13-14>_svc,spsr_svc,r<13-14>_abt,spsr_abt,r<13-14>_irq,spsr_irq,r<13-14>_und,
// spsr_und,r<13-14>_sys,dcsr,tbreg,ctl,auxctl,idcode,cachtype,translatetablebase,
// domainaccess,fsr,far,processid
// INTEL: 81341, 81342, IXP23xx, XSCALE-CORE3 :
// MARVELL: PXA3xx :
// cpsr,r<0-15>,spsvc,chkpt<0-1>,dbcon,dbr<0-1>,ibcr<0-1>,r<8-14>_fiq,spsr_fiq,
// r<13-14>_svc,spsr_svc,r<13-14>_abt,spsr_abt,r<13-14>_irq,spsr_irq,r<13-14>_und,
// spsr_und,r<13-14>_sys,dcsr,tbreg,ctl,auxctl,idcode,cachtype,
// translatetablebase,domainaccess,fsr,far,processid,L2_system_id,L2_cache_type,
// cpar,pmnc,ccnt,inten,flasg,evtsel,pmn<0-3>,pwrmode,cclkcfg,errlog,
// erradrl,erradru
// MICROCHIP: PIC32 :
// r<0-31>,hi,lo,badvaddr,cause,compare,config,config<1-3>,count,debug,depc,
// desave,ebase,epc,errorepc,hwrena,intctl,prid,srsctl,srsmap,status
// MIPS: MIPS32-4Kc, MIPS32-4Ke :
// BROADCOM: BCM-MIPS32 :
// CISCO: MIPS3264 :
// INTRINSITY: FASTMATH :
// r<0-31>,hi,lo,index,rand,elo<0-1>,ctxt,pgmask,wired,bad,count,ehi,
// compare,sr,cause,epc,prid,config,watchlo,watchhi,debug,depc,taglo,
// ,dataloi
// MIPS: MIPS64-5K :
// BROADCOM : BCM-1250 :
// CAVIUM : O1P/CN300x/CN301x, O2P/CN31xx/CN2020, N3/CN38xx/CN36xx,
// O5020/CN502x, O52/CN52xx, O56/CN56xx :
// PHILLIPS : PR1900, PR1910 :
// r<0-31>,hi,lo,index,rand,elo<0-1>,ctxt,pgmask,wired,badvaddr,count,ehi,
// compare,status,cause,epc,prid,config,lladdr,watchlo,watchhi,xcontext,debug,depc,
// taglo,taghi,errorepc,desave,config1
// NETSILICON: NET+ARM, NS7520 :
// cpsr,r<0-15>,spsr,r<8-14>_fiq,spsr_svc,r<13-14>_svc,spsr_abt,r<13-14>_abt,
// spsr_irq,r<13-14>_irq,spsr_und,r<13-14>_und,dccr,dcdr,w<0-1>av,w<0-1>am,
// w<0-1>dv,w<0-1>dm,w<0-1>cv,w<0-1>cm,dcccontrol,dccdata,dcctimeout
// SHARP: 7952x:
// cpsr,r<0-15>,spsr,r<8-14>_fiq,spsr_svc,r<13-14>_svc,spsr_abt,r<13-14>_abt,
// spsr_irq,r<13-14>_irq,spsr_und,r<13-14>_und,dccr,dcdr,w<0-1>av,w<0-1>am,
// w<0-1>dv,w<0-1>dm,w<0-1>cv,w<0-1>cm,ctrl,idcode,dcccontrol,dccdata,dcctimeout
// VITESSE: V3000 :
// gpr<0-31>,cp0-depc,cpu-hi,cpu-lo,cp0-status,cp0-cause,epc,hwbkpt<0-2>,idcode
//
// register_list - on completion contains register values from CPU
// starting with the value of starting_register_name and continuing
// with subsequent values from the registers following
// starting_register_name in RegisterNameList()
Go To Top
WriteRegister
public boolean WriteRegister(java.lang.String starting_register_name,
long[] register_list)
// Writes one or more register values to the currently selected CPU based on
// the length of register_list
// Returns true if command completed successfully
// starting_register_name - name of first register to be written to (from
// RegisterNameList() (See ReadRegister())
// register_list - register values to be written to CPU
// starting with the value of starting_register_name and continuing
// with subsequent values to be written to the registers following
// starting_register_name in RegisterNameList() See ReadRegister() for
// a list of supported cpu register names
Go To Top
RegisterNameList
public java.lang.String RegisterNameList(int register_number)
// Returns list of register names for the ActiveDevice CPU, one at a time
// based on the value of register_number. When RegisterNameList returns ""
// the end of the register name list has been reached.
// register_number [0 - ...] return this register list entry's name
// where 0 = first register in the list,
Go To Top
RegisterNameListCount
public int RegisterNameListCount()
// Returns number of register names in the register name list for the
// currently selected CPU
Go To Top
GeneralPurposeRegisterNameList
public java.lang.String GeneralPurposeRegisterNameList(int register_number)
// Returns list of general purpose register names for the ActiveDevice CPU,
// one at a time based on the value of register_number.
// When RegisterNameList returns "" the end of the register name list
// has been reached.
// register_number [0 - ...] return this general purpose register
// list entry's name
// where 0 = first register in the list,
// The current list of supported General Purpose Register names is:
// ALCHEMY: AU1000, AU1100, AU1200: AU1500, AU1550 :
// r<1-31>
// AMCC: PPC405 :
// XILINX: PPC405SoftCore :
// AMCC: PPC440EP, AMCC440GP, AMCC440GX :
// PLX: IOP480 :
// gpr<0-31>
// ARM: ARM7TDMI ARM920T, ARM922T ARM925T, ARM926T ARM946T ARM1136, ARM1176:
// CIRRUS: CS7xxx, CS89712 :
// FREESCALE: MAC7111 iMX1, iMXL, iMX21, iMX27, iMX31, iMX35:
// SHARP: LH7A4xx 7952x:
// NETSILICON: NS9360,NS9750,NS9775,NET+ARM, NS7520:
// r<0-14>
// ARM: CORTEX_M3, CORTEX_M3_2WIRE :
// r<0-13>
// FREESCALE: CPU32 :
// MORPHOTECH: MS1-16 :
// FREESCALE: COLDFIRE, COLDFIRE2 :
// d<0-7>,a<0-7>
// FREESCALE: DSP563xx, DSP56800 :
// a<0-2>,b<1-3>,la,lc,m<0-7>,n<0-7>,omr,r<0-7>,sptr,sr,ssh,ssl,x<0-1>,
// y<0-1>,ep,sz,sc,vba
// FREESCALE: MPC5XX, MPC8XX :
// FREESCALE: MPC603RR, MPC740/750, MPC745/755, MPC5200, MPC5554, MPC8240,
// MPC8245, MPC8247/8248, MPC825x/826x, MPC827x/828x :
// IBM: PPC7xx :
// gpr<0-31>
// FREESCALE: MPC8540/8560:
// gpr<l/h><0-31>
// INNOVASIC: FIDO1100 :
// d<0-7>,a<0-6>,a7usp,a7ssp
// INTEL: 80200, 80219, 80225, 80321, 80331,IOP315"},IOP321, IOP33x, IXC1100, IXP42x,
// IXP43x, IXP46x, IXP23xx, IXP2400, IXP2800, IXP2850, PXA210, PXA25x, PXA26x,
// PXA27x 81341, 81342, IXP23xx, XSCALE-CORE3:
// MARVELL: PXA3xx :
// r<0-14>
// MICROCHIP: PIC32 :
// MIPS: MIPS32-4Kc, MIPS32-4Ke :
// BROADCOM: BCM-MIPS32 :
// CISCO: MIPS3264 :
// INTRINSITY: FASTMATH :
// MIPS: MIPS64-5K :
// BROADCOM : BCM-1250 :
// CAVIUM : O1P/CN300x/CN301x, O2P/CN31xx/CN2020, N3/CN38xx/CN36xx,
// O5020/CN502x, O52/CN52xx, O56/CN56xx :
// PHILLIPS : PR1900, PR1910 :
// r<1-31>
// VITESSE: V3000 :
// gpr<0-31>
Go To Top
GeneralPurposeRegisterListCount
public int GeneralPurposeRegisterListCount()
// Returns number of register names returned by ReadGeneralPurposeRegisters
// method so value/name arrays can be sized correctly
Go To Top
ReadGeneralPurposeRegisters
public boolean ReadGeneralPurposeRegisters(long[] register_values_list)
// Returns lists of General purpose register values read from currently
// selected CPU starting. Each CPU type has a different general purpose register list
// Returns true if command completed successfully
// register_values_list - on completion array contains General Purpose
// Register values read from the CPU staring with the value of
// the register name returned by GeneralPurposeRegisterNameList(0)
// and ending with the value of the register name returned by
// GeneralPurposeRegisterNameList(GeneralPurposeRegisterNameCount() - 1)
Go To Top
CpuStateRegisterNameList
public java.lang.String CpuStateRegisterNameList(int register_number)
// Returns list of register names for the registers returned by ReadCpuStateRegisters()
// (these are the CPU state registers for the ActiveDevice CPU)
// which are returned one at a time based on the value of register_number.
// When RegisterNameList returns "" the end of the register name list
// has been reached.
// register_number [0 - ...] return this CpuState register
// list entry's name
// where 0 = first register in the list,
// Here is a list of the returned registers for each Vendor/Target type:
// ALCHEMY: AU1000, AU1100, AU1200: AU1500, AU1550 :
// depc, debug, sr, cause
// AMCC: PPC405 :
// XILINX: PPC405SoftCore :
// AMCC: PPC440EP, AMCC440GP, AMCC440GX :
// PLX: IOP480 :
// pc/iar, cr, msr, link, dbsr
// ARM: ARM7TDMI ARM920T, ARM922T ARM925T, ARM926T ARM946T ARM1136, ARM1176:
// CIRRUS: CS7xxx, CS89712 :
// FREESCALE: MAC7111 iMX1, iMXL, iMX21, iMX27, iMX31, iMX35:
// SHARP: LH7A4xx 7952x:
// NETSILICON: NS9360,NS9750,NS9775,NET+ARM, NS7520:
// pc/r15, sp/r13, lr/r14, cpsr
// ARM: CORTEX_M3, CORTEX_M3_2WIRE :
// no state registers are defined> always returns ""
// FREESCALE: CPU32 :
// MORPHOTECH: MS1-16 :
// FREESCALE: COLDFIRE, COLDFIRE2 :
// d<0-7>,a<0-7>
// FREESCALE: DSP563xx, DSP56800 :
// a<0-2>,b<1-3>,la,lc,m<0-7>,n<0-7>,omr,r<0-7>,sptr,sr,ssh,ssl,x<0-1>,
// y<0-1>,ep,sz,sc,vba
// FREESCALE: MPC5XX, MPC8XX :
// pc/iar, cr, msr, link, icr
// FREESCALE: MPC603RR, MPC740/750, MPC745/755, MPC5200, MPC5554, MPC8240,
// MPC8245, MPC8247/8248, MPC825x/826x, MPC827x/828x MPC8540/8560:
// IBM: PPC7xx :
// pc/iar, cr, msr, link
// INNOVASIC: FIDO1100 :
// d<0-7>,a<0-6>,a7usp,a7ssp
// INTEL: 80200, 80219, 80225, 80321, 80331,IOP315"},IOP321, IOP33x, IXC1100, IXP42x,
// IXP43x, IXP46x, IXP23xx, IXP2400, IXP2800, IXP2850, PXA210, PXA25x, PXA26x,
// PXA27x 81341, 81342, IXP23xx, XSCALE-CORE3:
// MARVELL: PXA3xx :
// pc/r15, sp/r13, lr/r14, cpsr
// MICROCHIP: PIC32 :
// MIPS: MIPS32-4Kc, MIPS32-4Ke :
// BROADCOM: BCM-MIPS32 :
// CISCO: MIPS3264 :
// INTRINSITY: FASTMATH :
// BROADCOM : BCM-1250 :
// PHILLIPS : PR1900, PR1910 :
// depc, debug, sr, cause
// CAVIUM : O1P/CN300x/CN301x, O2P/CN31xx/CN2020, N3/CN38xx/CN36xx,
// O5020/CN502x, O52/CN52xx, O56/CN56xx :
// MIPS: MIPS64-5K :
// depc, debug, status, cause
// VITESSE: V3000 :
// no state registers are defined always returns ""
Go To Top
CpuStateRegisterListCount
public int CpuStateRegisterListCount()
// Returns number of register names returned by ReadCpuStateRegisters
// method so value/name arrays can be sized correctly
Go To Top
ReadCpuStateRegisters
public boolean ReadCpuStateRegisters(long[] register_values_list)
// Returns lists of CPU state register values read from currently
// selected CPU. Each CPU type has a different set of CPU state registers.
// The first register in the list will aways be the Program Counter.
// CpuStateRegisterListCount() - tells how many registers total will be returned,
// CpuStateRegisterListName() - returns the names of the CPU State Registers
// Thie method returns true if command completed successfully
// register_values_list - on completion array contains CpuState
// Register values read from the CPU staring with the value of
// the register name returned by CpuStateRegisterNameList(0)
// and ending with the value of the register name returned by
// CpuStateRegisterNameList(CpuStateRegisterNameCount() - 1)
Go To Top
AddressSpaceNameList
public java.lang.String AddressSpaceNameList(int address_space_number)
// Returns list of address space names for the ActiveDevice CPU, one at a time
// based on the value of address_space_number. When AddressSpaceNameList returns ""
// the end of the register name list has been reached. The string
// "NOTUSED" can be returned for an address space number that is not used
// but larger numbers are used.
// address_space_number [0 - ...] return this address space list entry's
// name where 0 = first address space in the list
// This value is used in the 'space' field in ReadMemory(),
// WriteMemory(), FillMemory(), and MoveMemory() methods.
Go To Top
AddressSpaceNameListCount
public int AddressSpaceNameListCount()
// Returns the largest valid address space number in the address space
// name list for the currently selected CPU
Go To Top
DecodeAddressSpace
public int DecodeAddressSpace(java.lang.String address_space_name)
// Returns the address space number (used by ReadMemory/WriteMemory/FillMemory/
// SetSoftwareBreakpoint) when given a valid address space name
// (one returned by AddressSpaceNameList). For example to read
// a 4 byte quantity at 0x100 in the ARM7TDMI CPU's PHYSICAL address space :
// API.ReadMemory(0x100, 4, API.DecodeAddressSpace("PHYSICAL"), read_buffer);
// Here is a Vendor/Target specific valid address space names list :
// ALCHEMY: AU1000, AU1100, AU1200: AU1500, AU1550 :
// "VIRTUAL"
// AMCC: PPC405 :
// XILINX: PPC405SoftCore :
// "PHYSICAL"
// AMCC: PPC440EP, AMCC440GP, AMCC440GX :
// PLX: IOP480 :
// "VIRTUAL"
// ARM: ARM7TDMI, ARM920T, ARM922T, ARM925T, ARM926T, ARM940, ARM946T:
// CIRRUS: CS7xxx, CS89712 :
// FREESCALE: MAC7111, iMX1, iMXL, iMX21, iMX27 :
// SHARP: LH7A4xx, 7952x::
// NETSILICON: NET+ARM, NS7520, NS9360,NS9750,NS9775:
// "MMU-off","MMU-on","DCC"
// ARM: ARM1136, ARM1176:
// FREESCALE: iMX31, iMX35:
// "PHYSICAL"
// ARM: CORTEX_M3, CORTEX_M3_2WIRE :
// "PHYSICAL"
// FREESCALE: CPU32 :
// MORPHOTECH: MS1-16 :
// "PHYSICAL"
// FREESCALE: COLDFIRE, COLDFIRE2 :
// "PHYSICAL"
// FREESCALE: DSP563xx, DSP56800 :
// "Program","X-MEM","Y-MEM","L-MEM"
// FREESCALE: MPC5XX, MPC8XX :
// "PHYSICAL"
// FREESCALE: MPC603RR, MPC740/750, MPC745/755, MPC5200, MPC5554, MPC8240,
// MPC8245, MPC8247/8248, MPC825x/826x, MPC827x/828x :
// IBM: PPC7xx :
// "PHYSICAL","Icache","Dcache","VIRTUAL"
// FREESCALE: MPC8540/8560:
// "PHYSICAL","Nonsnooped-SAP","L1-Icache","L1-Dcache","ELFCore-Physical"};
// INNOVASIC: FIDO1100 :
// "PHYSICAL"
// INTEL: 80200, 80219, 80225, 80321, 80331,IOP315"},IOP321, IOP33x, IXC1100, IXP42x,
// IXP43x, IXP46x, IXP23xx, IXP2400, IXP2800, IXP2850, PXA210, PXA25x, PXA26x,
// PXA27x, 81341, 81342, IXP23xx, XSCALE-CORE3:
// MARVELL: PXA3xx :
// "MMU-on","TraceBuffer","MMU-off"
// MICROCHIP: PIC32 :
// MIPS: MIPS32-4Kc, MIPS32-4Ke, MIPS64-5K :
// BROADCOM: BCM-MIPS32, BCM-1250 :
// CISCO: MIPS3264 :
// INTRINSITY: FASTMATH :
// CAVIUM : O1P/CN300x/CN301x, O2P/CN31xx/CN2020, N3/CN38xx/CN36xx,
// O5020/CN502x, O52/CN52xx, O56/CN56xx :
// PHILLIPS : PR1900, PR1910 :
// "MainMemory","Icache-Tag","Dcache-Tag","Icache-Lines","Dcache-Lines","TLB-entries"
// VITESSE: V3000 :
// "PHYSICAL"
Go To Top
ReadMemory
public boolean ReadMemory(long start_address,
int size,
int space,
byte[] memory)
// Returns list of bytes values read from the currently selected CPU's memory
// starting at start_address and continuing for the length of memory[]
// Returns true if command completed successfully
// start_address [0 - 0xFFFFFFFFFFFFFFFF] - address of first location in
// target memory to read
// size [0,1,2,4,8] - size in bytes of each memory read operation, where
// 0 indicates that the template will select the read size
// space [0 - ...] - target CPU's memory space (see DecodeAddressSpace() )
// memory - array that will be filled with the bytes read from target
// memory. It's length specifies how many bytes will be read.
Go To Top
ReadMemory
public boolean ReadMemory(long start_address,
int space,
byte[] memory)
// These 4 methods return a list of 8/16/32/64 bit values read from the
// currently selected CPU's memory, 8/16/32/64 bits at a time starting at
// start_address and continuing for the length of memory[]
// Return true if command completed successfully
// start_address [0 - 0xFFFFFFFFFFFFFFFF] - address of first location in
// target memory to read
// space [0 - ...] - target CPU's memory space (see DecodeAddressSpace())
// memory - array that will be filled with 8/16/32/64 bits values read from
// target memory. It's length specifies how many values will be read.
Go To Top
ReadMemory
public boolean ReadMemory(long start_address,
int space,
short[] memory)
// These 4 methods return a list of 8/16/32/64 bit values read from the
// currently selected CPU's memory, 8/16/32/64 bits at a time starting at
// start_address and continuing for the length of memory[]
// Return true if command completed successfully
// start_address [0 - 0xFFFFFFFFFFFFFFFF] - address of first location in
// target memory to read
// space [0 - ...] - target CPU's memory space (see DecodeAddressSpace())
// memory - array that will be filled with 8/16/32/64 bits values read from
// target memory. It's length specifies how many values will be read.
Go To Top
ReadMemory
public boolean ReadMemory(long start_address,
int space,
int[] memory)
// These 4 methods return a list of 8/16/32/64 bit values read from the
// currently selected CPU's memory, 8/16/32/64 bits at a time starting at
// start_address and continuing for the length of memory[]
// Return true if command completed successfully
// start_address [0 - 0xFFFFFFFFFFFFFFFF] - address of first location in
// target memory to read
// space [0 - ...] - target CPU's memory space (see DecodeAddressSpace())
// memory - array that will be filled with 8/16/32/64 bits values read from
// target memory. It's length specifies how many values will be read.
Go To Top
ReadMemory
public boolean ReadMemory(long start_address,
int space,
long[] memory)
// These 4 methods return a list of 8/16/32/64 bit values read from the
// currently selected CPU's memory, 8/16/32/64 bits at a time starting at
// start_address and continuing for the length of memory[]
// Return true if command completed successfully
// start_address [0 - 0xFFFFFFFFFFFFFFFF] - address of first location in
// target memory to read
// space [0 - ...] - target CPU's memory space (see DecodeAddressSpace())
// memory - array that will be filled with 8/16/32/64 bits values read from
// target memory. It's length specifies how many values will be read.
Go To Top
WriteMemory
public boolean WriteMemory(long start_address,
int size,
int space,
boolean verify,
byte[] memory)
// Writes one or more bytes to the currently selected CPU's memory
// starting at start_address and continuing for the length of memory[]
// Returns true if command completed successfully
// start_address [0 - 0xFFFFFFFFFFFFFFFF] - address of first location in
// target memory to written
// size [0,1,2,4,8] - size in bytes of each memory write operation, where
// 0 indicates that the template will select the write size
// space [0 - ...] - target CPU's memory space (see DecodeAddressSpace())
// verify [true/false] - true = read after write and verify write succeeded
// false = write without verify
// memory - array that is filled with the values to be written to target
// memory. It's length specifies how many bytes to write.
Go To Top
WriteMemory
public boolean WriteMemory(long start_address,
int space,
boolean verify,
byte[] memory)
// Write one or more 8/16/32/64 bit values to the currently selected CPU's memory
// starting at start_address and continuing for the length of memory[]
// Returns true if command completed successfully
// start_address [0 - 0xFFFFFFFFFFFFFFFF] - address of first location in
// target memory to written
// space [0 - ...] - target CPU's memory space (see DecodeAddressSpace())
// verify [true/false] - true = read after write and verify write succeeded
// false = write without verify
// memory - array that is filled with the 8/16/32/64 bit values to be
// written to target memory. It's length specifies how many
// values to write.
Go To Top
WriteMemory
public boolean WriteMemory(long start_address,
int space,
boolean verify,
short[] memory)
// Write one or more 8/16/32/64 bit values to the currently selected CPU's memory
// starting at start_address and continuing for the length of memory[]
// Returns true if command completed successfully
// start_address [0 - 0xFFFFFFFFFFFFFFFF] - address of first location in
// target memory to written
// space [0 - ...] - target CPU's memory space (see DecodeAddressSpace())
// verify [true/false] - true = read after write and verify write succeeded
// false = write without verify
// memory - array that is filled with the 8/16/32/64 bit values to be
// written to target memory. It's length specifies how many
// values to write.
Go To Top
WriteMemory
public boolean WriteMemory(long start_address,
int space,
boolean verify,
int[] memory)
// Write one or more 8/16/32/64 bit values to the currently selected CPU's memory
// starting at start_address and continuing for the length of memory[]
// Returns true if command completed successfully
// start_address [0 - 0xFFFFFFFFFFFFFFFF] - address of first location in
// target memory to written
// space [0 - ...] - target CPU's memory space (see DecodeAddressSpace())
// verify [true/false] - true = read after write and verify write succeeded
// false = write without verify
// memory - array that is filled with the 8/16/32/64 bit values to be
// written to target memory. It's length specifies how many
// values to write.
Go To Top
WriteMemory
public boolean WriteMemory(long start_address,
int space,
boolean verify,
long[] memory)
// Write one or more 8/16/32/64 bit values to the currently selected CPU's memory
// starting at start_address and continuing for the length of memory[]
// Returns true if command completed successfully
// start_address [0 - 0xFFFFFFFFFFFFFFFF] - address of first location in
// target memory to written
// space [0 - ...] - target CPU's memory space (see DecodeAddressSpace())
// verify [true/false] - true = read after write and verify write succeeded
// false = write without verify
// memory - array that is filled with the 8/16/32/64 bit values to be
// written to target memory. It's length specifies how many
// values to write.
Go To Top
DownloadSpeedTest
public int DownloadSpeedTest(long start_address,
int block_count,
int block_size,
int write_size)
// Write a series of blocks containing a pattern to memory and determine the
// bytes/second download time
// Returns bytes/second or zero if download(s) failed
// start_address [0 - 0xFFFFFFFFFFFFFFFF] - address of first location in
// target memory to written
// block_count [1 - ...] - number of block writes to perform
// block_size [1 - 16*1024] - size of block to be written
// write_size [1,2,4,8] - size of write operation (byte/half/word/dword)
Go To Top
MemoryTest
public int MemoryTest(long start_address,
int block_count,
int block_size,
int write_size)
// Writes then reads/verifies one or more of blocks containing a unique pattern each time
// to memory and determines the write/read times in bytes/sec
// Returns bytes/second or zero if download(s) failed
// start_address [0 - 0xFFFFFFFFFFFFFFFF] - address of first location in
// target memory to written/read
// block_count [1 - ...] - number of block writes to perform
// block_size [1 - 16*1024] - size of block to be written
// write_size [1,2,4,8] - size of write operation (byte/half/word/dword)
Go To Top
FillMemory
public boolean FillMemory(long start_address,
long value,
int count,
int size,
boolean verify,
int space)
// Fill the currently selected CPU's memory with <value> starting at
// <start_address> and continuing for <count> number bytes
// Returns true if command completed successfully
// start_address [0 - 0xFFFFFFFFFFFFFFFF] - address of first location in
// target memory to written
// value [0 - 0xFFFFFFFFFFFFFFFF] - value to be written to memory
// size [1,2,4,8] - size in bytes of each memory write operation
// verify [true/false] - true = read after write and verify write succeeded
// false = write without verify
// space [0 - ...] - target CPU's memory space (see DecodeAddressSpace())
Go To Top
FillMemory
public boolean FillMemory(long start_address,
byte value,
int count,
boolean verify,
int space)
// Fill the currently selected CPU's memory with a 8/16/32/64 bit <value>
// starting at start_address and continuing <count> times
// Returns true if command completed successfully
// start_address [0 - 0xFFFFFFFFFFFFFFFF] - address of first location in
// target memory to written
// value [0 - 0xff/0xFFFF/0xFFFFFFFF/0xFFFFFFFFFFFFFFFF] - value to be
// written to memory
// verify [true/false] - true = read after write and verify write succeeded
// false = write without verify
// space [0 - ...] - target CPU's memory space (see DecodeAddressSpace())
Go To Top
FillMemory
public boolean FillMemory(long start_address,
short value,
int count,
boolean verify,
int space)
// Fill the currently selected CPU's memory with a 8/16/32/64 bit <value>
// starting at start_address and continuing <count> times
// Returns true if command completed successfully
// start_address [0 - 0xFFFFFFFFFFFFFFFF] - address of first location in
// target memory to written
// value [0 - 0xff/0xFFFF/0xFFFFFFFF/0xFFFFFFFFFFFFFFFF] - value to be
// written to memory
// verify [true/false] - true = read after write and verify write succeeded
// false = write without verify
// space [0 - ...] - target CPU's memory space (see DecodeAddressSpace())
Go To Top
FillMemory
public boolean FillMemory(long start_address,
int value,
int count,
boolean verify,
int space)
// Fill the currently selected CPU's memory with a 8/16/32/64 bit <value>
// starting at start_address and continuing <count> times
// Returns true if command completed successfully
// start_address [0 - 0xFFFFFFFFFFFFFFFF] - address of first location in
// target memory to written
// value [0 - 0xff/0xFFFF/0xFFFFFFFF/0xFFFFFFFFFFFFFFFF] - value to be
// written to memory
// verify [true/false] - true = read after write and verify write succeeded
// false = write without verify
// space [0 - ...] - target CPU's memory space (see DecodeAddressSpace())
Go To Top
FillMemory
public boolean FillMemory(long start_address,
long value,
int count,
boolean verify,
int space)
// Fill the currently selected CPU's memory with a 8/16/32/64 bit <value>
// starting at start_address and continuing <count> times
// Returns true if command completed successfully
// start_address [0 - 0xFFFFFFFFFFFFFFFF] - address of first location in
// target memory to written
// value [0 - 0xff/0xFFFF/0xFFFFFFFF/0xFFFFFFFFFFFFFFFF] - value to be
// written to memory
// verify [true/false] - true = read after write and verify write succeeded
// false = write without verify
// space [0 - ...] - target CPU's memory space (see DecodeAddressSpace())
Go To Top
MoveMemory
public boolean MoveMemory(long source_address,
int source_space,
long destination_address,
int destination_space,
int count,
boolean verify)
// Copy <count> bytes starting at <source_address> to the address range
// starting at <destination_address>
// Returns true if command completed successfully
// source_address [0 - 0xFFFFFFFFFFFFFFFF] - address of first location in
// target memory to be read from
// source_space [0 - ...] - source address's target CPU's memory space
// (see DecodeAddressSpace())
// destination_address [0 - 0xFFFFFFFFFFFFFFFF] - address of first location in
// target memory to be copied to
// destination_space [0 - ...] - destination address's target CPU's memory space
// (see DecodeAddressSpace())
// count [0 - 0xFFFFFFFF] - number of bytes to copy
// verify [true/false] - true = read after write and verify write succeeded
// false = write without verify
Go To Top
CurrentEndian
public java.lang.String CurrentEndian()
// returns currently selected CPU's endian configuration either
// "BIG" or "LITTLE"
Go To Top
SetEndian
public void SetEndian(java.lang.String endian)
// Set current selected CPU's endian state (if possible)
// endian ["BIG"/"LITTLE"] - new cpu endian state
Go To Top
JTAGScanIO
public boolean JTAGScanIO(java.lang.String shift_register,
int length_in_bits,
byte[] data_in,
byte[] data_out)
// Use JTAG to scan the stream of bits contained in <data_in> to the
// <shift_register> of the currently selected CPU and at the same time collect
// the bits arriving from the CPU in <data_out> leaving the CPU in
// "RunTestIdle" state at the end of the operation
// Returns true if command completed successfully
// shift_register ["IR"/"DR"] - destination shift register (IR = JTAG
// Instruction register, DR = JTAG Data Register
// length_in_bits [1 - ...] number of bits to shift in/out of the CPU
// data_in[] - array containing the bits to be shifted into the CPU, in
// the format [8,7,6,5,4,3,2,1,0] [15,14,13,12,11,10,9,8] ...
// where at the end of the scan operation bit 0 will be the bit
// closest to SDO and bit N will be the bit closest to SDI
// data_out[] - array containing bit scaned in from CPU in the same format
// as data_in, where bit byte 0 bit 0 contains the first bit scanned
// in from the CPU
Go To Top
JTAGScanIOState
public boolean JTAGScanIOState(java.lang.String shift_register,
java.lang.String final_jtag_state,
int length_in_bits,
byte[] data_in,
byte[] data_out)
// Use JTAG to scan the stream of bits contained in <data_in> to the
// <shift_register> of the currently selected CPU and at the same time collect
// the bits arriving from the CPU in <data_out> leaving the CPU in
// <final_jtag_state> at the end of the operation
// Returns true if command completed successfully
// shift_register ["IR"/"DR"] - destination shift register (IR = JTAG
// Instruction register, DR = JTAG Data Register
// final_jtag_state ["TestLogicReset","RunTestIdle","PauseDR","PauseIR",
// "ShiftDR","ShiftIR"] - JTAG state CPU will be placed
// in at the end of the scan operation
// length_in_bits [1 - ...] number of bits to shift in/out of the CPU
// data_in[] - array containing the bits to be shifted into the CPU, in
// the format [8,7,6,5,4,3,2,1,0] [15,14,13,12,11,10,9,8] ...
// where at the end of the scan operation bit 0 will be the bit
// closest to SDO and bit N will be the bit closest to SDI
// data_out[] - array containing bit scaned in from CPU in the same format
// as data_in, where bit byte 0 bit 0 contains the first bit scanned
// in from the CPU
Go To Top
DoCommand
public boolean DoCommand(byte[] command,
byte[] reply)
// Perform Macraigor API command, returns true if command completed successfully
// command[] - array containing the command stream of bytes to be sent
// to the currently selected CPU's template
// reply[] - array that will be filled with the command reply.
Go To Top
ErrorText
public java.lang.String ErrorText()
// Returns a string describing the error that occured during the last
// command sent to the target or "" if no error occured
Go To Top
StatusText
public java.lang.String StatusText()
// Returns a string describing the state of the currently selected CPU
// as returned by the last command sent to the CPU. This will be one
// of the following :
// "InReset" - CPU held in reset
// "Halted" - CPU halted
// "Stopped" - CPU stopped (in debug mode)
// "Running" - CPU running
// "PowerFailed" - CPU / JTAG device not seeing VCC
// "CableDisconnected" - JTAG device cannot detect CPU
// "CheckStop"
// "DataWaiting"
// "Monitor"
// "NotInitialized" - InitializeTarget has not completed successfully
Go To Top
UsbLed
public boolean UsbLed(boolean on)
// If the current JTAG device is a Usb2Demon/Usb2Sprite or UsbWiggler
// the command turns on/off it's LED
// Returns true if command completed successfully
// on [true/false] - true = turn LED on, false - turn LED off
Go To Top
UsbDeviceCount
public int UsbDeviceCount()
// Returns the number of Macraigor USB devices currently connected to
// the HOST
Go To Top
SetSpeed
public boolean SetSpeed(int JTAG_speed)
// Sets the JTAG clock rate of the currently connected JTAG device
// Returns true if command completed successfully
// jtag_speed [1 - 8] - JTAG clock rate setting. The following table
// shows JTAG speed and JTAG clock rate for each device, JTAG clock rates
// are in MHZ by default.
// Speed mpDemon Usb2Demon Usb2Sprite Raven Wiggler
// UsbWiggler
// 1 18 24 6 8 380 khz
// 2 9 12 3 4 200 khz
// 3 5 8 2 4 140 khz
// 4 4.5 6 1.5 1 100 khz
// 5 2 4.8 1.2 500 khz 80 khz
// 6 1 4 1 125 khz 68 khz
// 7 500 khz 3.5 850 khz 60 khz 59 khz
// 8 4.5 khz 74 khz 1 khz 30 khz 4 khz
Go To Top
SetRegisterBufferAddress
public boolean SetRegisterBufferAddress(long address)
// Some CPUs require part of on board RAM to use temporarily while in
// debug mode. This command tells the template where in target RAM to
// locate this buffer.
// Returns true if command completed successfully
// address [0 = 0xFFFFFFFFFFFFFFFF] - target RAM address
Go To Top
DownloadImage
public boolean DownloadImage(java.lang.String filename,
int address_space,
int write_size)
// DownloadImage()
// Download a .elf/.s19/.hex format file into target RAM
// filename - string containing the full path and name of file to be
// downloaded into target RAM
// address_space - target address space to write to
// write_size [1,2,4] - size of write operations to use, 1 always works,
// 4 is faster.
Go To Top
LoadImageStartsAt
public long LoadImageStartsAt(java.lang.String filename)
// Returns the load image start address of a .elf/.s19/.hex format file or
// 0xFFFFFFFFFFFFFFFF if the file cannot be read.
// filename - string containing the full path and name of file to be
// downloaded into target RAM
Go To Top
RAMTest
public boolean RAMTest(long start_address,
int address_space,
int size,
int byte_count)
// Performs a simple 55's/aa's RAM test with address lines checking, in
// the following manner :
// 1) writes to each address line (offset + 0,2,4,8, ...) it's power of two
// then reads it back. This catches "address stuck at's" and "two
// address lines connected" errors
// 2) writes alternating 55's aa's to memory then reads back and verifies
// 3) writes alternating aa's 55's to memory then reads back and verifyies
// 4) repeats step 1 so when the test completes memory contains:
// 1) it's power of two written to each memory offset + 0,2,4 ... address
// 2) all other memory locations contain alternating 0xAA... 0x55... pattern.
// start_address - first RAM address to be tested
// address_space - target address space to write to
// size [1,2,4,8] - size of write operations to use.
// byte_count - the number of bytes following start_address to test
Go To Top