...
- libnxembeddedtools.remoteapi.runner package
Submodules
...
classAnchor libnxembeddedtools.remoteapi.abstract.Interface libnxembeddedtools.remoteapi.abstract.Interface libnxembeddedtools.remoteapi.abstract.
Interface
Bases:
ABC
Interface thatdescribes the hardware interface between the PC and the board.
Info Object implementing this class should be construct via the
get()
method.Anchor libnxembeddedtools.remoteapi.abstract.Interface.dumpMemory libnxembeddedtools.remoteapi.abstract.Interface.dumpMemory dumpMemory
(memType, address, count, outFile, append=False)Dump memory into a file.
Parameters: memType (
MemoryType
) – Access type to perform.address (int) – First address to be read.
outFile (str) – Path of the file where to dump the memory.
count (int) – Number of word to read.
append (Boolean) – Open the filed in append mode.
abstractAnchor libnxembeddedtools.remoteapi.abstract.Interface.halt libnxembeddedtools.remoteapi.abstract.Interface.halt halt
(core)Halt the specified core.
Parameters: core (int) – Core to halt
abstractAnchor libnxembeddedtools.remoteapi.abstract.Interface.loadELF libnxembeddedtools.remoteapi.abstract.Interface.loadELF loadELF
(image, core)Load an ELF on the selected core.
Parameters: image (str) – Path of the ELF to load.
core (int) – Core where to load the ELF file.
abstractAnchor libnxembeddedtools.remoteapi.abstract.Interface.loadImage libnxembeddedtools.remoteapi.abstract.Interface.loadImage loadImage
(image, core, address)Load a binary on the specified core.
Parameters: image (str) – Path of the binary to load.
core (int) – Core where to load the binary file.
abstractAnchor libnxembeddedtools.remoteapi.abstract.Interface.readMemoryreadCoprocessor libnxembeddedtools.remoteapi.abstract.Interface.readMemoryreadCoprocessor readMemory
(memType, address, count=1, wordLen=32) Read some memory from the targetreadCoprocessor
(core, coprocId, op1, crn, crm, op2)Read a coprocessor register.
Parameters: memType core (
MemoryType
int) – Access type Core used to perform .the read;address coprocId (int) – First address Coprocessor to be read.;count
op1 (int) – Number of word to read.wordLen op1 to use;
crn (int) – Word length in bits.
Returns: Memory read from the target.
Return type: list(int) crn to use;
crm (int) – crm to use;
op2 (int) – op2 to use.
abstractAnchor libnxembeddedtools.remoteapi.abstract.Interface.readRegisterreadMemory libnxembeddedtools.remoteapi.abstract.Interface.readRegisterreadMemory readRegister
(core, namereadMemory
(memType, address, count=1, wordLen=32)Read a register some memory from the selected coretarget.
Parameters:core memType (
MemoryType
) – Access type to perform.address (int) – Core from which to want to read the registername (str) – Name of the register you want First address to be read.
count (int) – Number of word to read.
wordLen (int) – Word length in bits.
Returns: The value of the registerMemory read from the target.
Return type: int
Raises: Exception – if the register can’t be found.
Selected core should be halted before reading a register. You should callWarning halt()
method before this.list(int)
abstractAnchor libnxembeddedtools.remoteapi.abstract.Interface.removeBreakpointreadRegister libnxembeddedtools.remoteapi.abstract.Interface.removeBreakpointreadRegister removeBreakpoint
readRegister
(core, address name)Remove Read a breakpoint register from the specified selected core.
Parameters: core (int) – Core where the breakpoint is placed.address (int) – Address of the breakpointfrom which to want to read the register
name (str) – Name of the register you want to read.
Returns: The value of the register
Return type: int
Raises: Exception – if the register can’t be found.
Warning Selected core should be halted before reading a register. You should call
halt()
method before this.
abstractAnchor libnxembeddedtools.remoteapi.abstract.Interface.resumeremoveBreakpoint libnxembeddedtools.remoteapi.abstract.Interface.resumeremoveBreakpoint resume
removeBreakpoint
(core, address)Resume Remove a breakpoint from the specified core.
Parameters: core (int) – Core
where the breakpoint is placed.
address (int) – Address of the breakpoint.
abstractAnchor libnxembeddedtools.remoteapi.abstract.Interface.setBreakpointresume libnxembeddedtools.remoteapi.abstract.Interface.setBreakpointresume setBreakpoint
resume
(core, address, length)Set a breakpoint on Resume the specified core at the specified address.
Parameters: core (int) – Core
whereto
place the breakpoint.address (int) – Address of the breakpoint.
length (int) – Length of the access in bytes.
resume
Anchor libnxembeddedtools.remoteapi.abstract.Interface.setThumbModesendCmd libnxembeddedtools.remoteapi.abstract.Interface.setThumbModesendCmd setThumbMode
abstractsendCmd
(core, cmd)Set the current core on Thumb execution modeSend debugger command to execute on the specified core.
Parameters: core (int) – Core
to send the command to.
cmd (str) –
.
abstractAnchor libnxembeddedtools.remoteapi.abstract.Interface.stepsetARMMode libnxembeddedtools.remoteapi.abstract.Interface.stepsetARMMode step
setARMMode
(core)Perform a step (single instruction) on the specified coreSet the current core on ARM execution mode.
Parameters: core (int) – Core you want to resumeswitch execution.
abstractAnchor libnxembeddedtools.remoteapi.abstract.Interface.waitHaltsetBreakpoint libnxembeddedtools.remoteapi.abstract.Interface.waitHaltsetBreakpoint waitHalt
setBreakpoint
(core, timeout address, length)Wait for the halt state on Set a breakpoint on the core at the specified coreaddress.
Parameters: core (int) – Core to haltwhere to place the breakpoint.
address (int) – Address of the breakpoint.
timeout length (int) – Timeout in msLength of the access in bytes.
abstractAnchor libnxembeddedtools.remoteapi.abstract.Interface.wakeupCoresetThumbMode libnxembeddedtools.remoteapi.abstract.Interface.wakeupCoresetThumbMode wakeupCore
setThumbMode
(core)Wake up Set the specified current core on Thumb execution mode.
Parameters: core (int) – Core you want to wake upswitch execution.
Info Core 0 is always waked up.
libnxembeddedtools.Anchor Anchor libnxembeddedtools.remoteapi.abstract.Interface.writeFilestep libnxembeddedtools.remoteapi.abstract.Interface.writeFilestep writeFile
(memType, address, inputFile, byteorder='little', offset=0, size=-1) Write memory on the whith values from the source file- abstract
step
(core) Perform a step (single instruction) on the specified core.
Parameters: memType core (
MemoryType
int) –
Access type to perform.address (int) – First address to be read.
inputFile (str) – File path.
byteorder (str) – Byteorder of the file (‘big’ or ‘little’).
size (int) – Size to read from the fileoffset (int) – Offset in the file where to begin.
Core to resume
abstractAnchor libnxembeddedtools.remoteapi.abstract.Interface.waitHalt libnxembeddedtools.remoteapi.abstract.Interface.waitHalt waitHalt
(core, timeout)Wait for the halt state on the specified core.
Parameters: core (int) – Core to halt.
timeout (int) – Timeout in ms.
abstractAnchor libnxembeddedtools.remoteapi.abstract.Interface.writeMemorywakeupCore libnxembeddedtools.remoteapi.abstract.Interface.writeMemorywakeupCore writeMemory
(memType, address, data, wordLen=32) Write memory on the targetwakeupCore
(core)Wake up the specified core.
Parameters: memType core (
MemoryType
int) –
Access typeCore to
perform.address (int) – First address to be read.
data (list) – Data to write.
wordLen (int) – Word length in bits.
wake up.
Info Core 0 is always waked up.
libnxembeddedtoolsAnchor
abstractAnchor libnxembeddedtools.remoteapi.abstract.Interface.writeRegisterwriteCoprocessor libnxembeddedtools.remoteapi.abstract.Interface.writeRegisterwriteCoprocessor writeRegister
writeCoprocessor
(core, name, coprocId, op1, crn, crm, op2, value)Write Read a coprocessor register from the selected core.
Parameters: core (int) – Core from which to want to write the register
name (str) – Name of the register you want to write.
value used to perform the read;
coprocId (int) – Coprocessor to read;
op1 (int) – Value you want to write in the register.
Raises: Exception – if the register can’t be found.
Selected core should be halted before reading a register. You should callWarning halt()
method before thisop1 to use;
crn (int) – crn to use;
crm (int) – crm to use;
op2 (int) – op2 to use;
value (int) – value to write.
Anchor libnxembeddedtools.remoteapi.abstract.
MemoryTypeInterface.writeFile libnxembeddedtools.remoteapi.abstract.Interface.
MemoryType class Bases:
Enum
Enumeration that describe the type of memory acces to perform on the interface.
Anchor libnxembeddedtools.remoteapi.abstract.MemoryType.MEMORY_APB writeFile writeFile
(memType, address, inputFile, byteorder='little', offset=0, size=-1)Write memory on the whith values from the source file.
Parameters: memType (
MemoryType
) – Access type to perform.address (int) – First address to be read.
inputFile (str) – File path.
byteorder (str) – Byteorder of the file (‘big’ or ‘little’).
offset (int) – Offset in the file where to begin.
size (int) – Size to read from the file.
Anchor libnxembeddedtools.remoteapi.abstract.MemoryType.MEMORY_APB MEMORY_APB
= 1Memory Access from the APB available on the DAP
anchor
Anchor Interface.writeMemory libnxembeddedtools.remoteapi.abstract.MemoryTypeInterface.MEMORY_AXI libnxembeddedtools.remoteapi.abstract.MemoryType.MEMORY_AXI MEMORY_AXI
= 2Memory Access from the AXI available on the DAP
abstractlibnxembeddedtools.remoteapi.abstract.MemoryType.MEMORY_CORE_0writeMemory writeMemory
(memType, address, data, wordLen=32)Write memory on the target.
Parameters: memType (
MemoryType
) – Access type to perform.address (int) – First address to be read.
data (list) – Data to write.
wordLen (int) – Word length in bits.
Anchor libnxembeddedtools.remoteapi.abstract.Interface.writeRegister libnxembeddedtools.remoteapi.abstract.MemoryType.MEMORY_CORE_0 MEMORY_CORE_0
= 3Memory Access from the core 0 of the SoC
abstractInterface.writeRegister writeRegister
(core, name, value)Write a register from the selected core.
Parameters: core (int) – Core from which to want to write the register
name (str) – Name of the register you want to write.
value (int) – Value you want to write in the register.
Raises: Exception – if the register can’t be found.
Warning Selected core should be halted before reading a register. You should call
halt()
method before this.
Anchor libnxembeddedtools.remoteapi.abstract.MemoryType.MEMORY_CORE_1 libnxembeddedtools.remoteapi.abstract.MemoryType.MEMORY_CORE_1 MEMORY_CORE_1
= 4Memory Access from the core 1 of the SoC
libnxembeddedtools.remoteapi.abstract.
MemoryType
(value)...
Anchor libnxembeddedtools.remoteapi.abstract.MemoryType .MEMORY_CORE_2libnxembeddedtools.remoteapi.abstract.MemoryType .MEMORY_CORE_2
classlibnxembeddedtools.remoteapi.abstract.
MemoryType
(value)Bases:
Enum
Enumeration that describe the type of memory acces to perform on the interface.
Anchor libnxembeddedtools.remoteapi.abstract.MemoryType.MEMORY_CORE_3APB libnxembeddedtools.remoteapi.abstract.MemoryType.MEMORY_CORE_3APB MEMORY_CORE_3APB
= 61Memory Access from the core 3 of the SoCAPB available on the DAP
staticAnchor libnxembeddedtools.remoteapi.abstract.MemoryType.getCoreMEMORY_AXI libnxembeddedtools.remoteapi.abstract.MemoryType.getCore getCore
(memType)Get the core corresponding to a memory access.
Parameters: memType (
MemoryType
) – Memory type to checkReturns: Core number corresponding to the access, None if the access is not from a core.
Return type: int
MEMORY_AXI MEMORY_AXI
= 2Memory Access from the AXI available on the DAP
staticAnchor libnxembeddedtools.remoteapi.abstract.MemoryType.getFromCoreMEMORY_CORE_0 libnxembeddedtools.remoteapi.abstract.MemoryType.getFromCore getFromCore
(core)MEMORY_CORE_0 MEMORY_CORE_0
= 3Memory Access from the core 0 of the SoC
Return type: MemoryType
Get the memory access type corresponding to a particluar core.
Parameters: core (int) – Core to get access type from.
Returns: corresponding to the core or None if an invalid core is passed as parameter.
Anchor libnxembeddedtools.remoteapi.abstract.MemoryType.MEMORY_CORE_1 libnxembeddedtools.remoteapi.abstract.MemoryType.MEMORY_CORE_1 MEMORY_CORE_1
= 4Memory Access from the core 1 of the SoC
staticAnchor libnxembeddedtools.remoteapi.abstract.MemoryType.isCoreAccessMEMORY_CORE_2 libnxembeddedtools.remoteapi.abstract.MemoryType.isCoreAccess isCoreAccess
(memType)Check if a memory type is from a core.
Parameters: memType (
MemoryType
) – Memory type to checkReturns: True if the memory type correspond to a core, False otherwise.
Return type: Boolean
MEMORY_CORE_2 MEMORY_CORE_2
= 5Memory Access from the core 2 of the SoC
Anchor libnxembeddedtools.remoteapi.abstract.
getIfaceNameMemoryType.MEMORY_CORE_3 libnxembeddedtools.remoteapi.abstract.
getIfaceName Get the actuel interface by reading the NX_EMBEDDED_TOOLS_IFACE environment variable.
Returns: The actual interface.
Return type:
MEMORY_CORE_2
= 5Memory Access from the core 2 of the SoClibnxembeddedtools.remoteapi.abstract.
getIfaceName
() libnxembeddedtools.remoteapi.factory module
This module is dedicted to build objects that implements the Interface
interface.
You can change between openocd (Interface
) and Lauterbach (Interface
) interface by only changing the NX_EMBEDDED_TOOLS_IFACE environment variable.
Code Block | ||||
---|---|---|---|---|
| ||||
# If you are using a Lauterbach T32 interface:
$ export NX_EMBEDDED_TOOLS_IFACE=lauterbach
# If you are using an openocd interface:
$ export NX_EMBEDDED_TOOLS_IFACE=openocd |
...
MemoryType.MEMORY_CORE_3 MEMORY_CORE_3
= 6Memory Access from the core 3 of the SoC
staticAnchor libnxembeddedtools.remoteapi.abstract.MemoryType.getCore libnxembeddedtools.remoteapi.abstract.MemoryType.getCore getCore
(memType)Get the core corresponding to a memory access.
Parameters: memType (
MemoryType
) – Memory type to checkReturns: Core number corresponding to the access, None if the access is not from a core.
Return type: int
staticAnchor libnxembeddedtools.remoteapi.abstract.MemoryType.getFromCore libnxembeddedtools.remoteapi.abstract.MemoryType.getFromCore getFromCore
(core)Get the memory access type corresponding to a particluar core.
Parameters: core (int) – Core to get access type from.
Returns: corresponding to the core or None if an invalid core is passed as parameter.
Return type:
staticAnchor libnxembeddedtools.remoteapi.abstract.MemoryType.isCoreAccess libnxembeddedtools.remoteapi.abstract.MemoryType.isCoreAccess isCoreAccess
(memType)Check if a memory type is from a core.
Parameters: memType (
MemoryType
) – Memory type to checkReturns: True if the memory type correspond to a core, False otherwise.
Return type: Boolean
...
Anchor libnxembeddedtools.remoteapi.abstract.getIfaceName libnxembeddedtools.remoteapi.abstract.getIfaceName libnxembeddedtools.remoteapi.abstract.
getIfaceName
()Get the actuel interface by reading the NX_EMBEDDED_TOOLS_IFACE environment variable.
Returns: The actual interface.
Return type:
...
libnxembeddedtools.remoteapi.factory module
This module is dedicated to build objects that implements the Interface
interface.
You can change between openocd (Interface
) and Lauterbach (Interface
) interface by only changing the NX_EMBEDDED_TOOLS_IFACE environment variable.
Code Block | ||||
---|---|---|---|---|
| ||||
# If you are using a Lauterbach T32 interface:
$ export NX_EMBEDDED_TOOLS_IFACE=lauterbach
# If you are using an openocd interface:
$ export NX_EMBEDDED_TOOLS_IFACE=openocd |
Info |
---|
If NX_EMBEDDED_TOOLS_IFACE is not set or if filed with incoherent value, it falls back to openocd. |
...
Anchor libnxembeddedtools.remoteapi.factory.get libnxembeddedtools.remoteapi.factory.get libnxembeddedtools.remoteapi.factory.
get
()Get an instance of
Interface
corresponding to the selected interface that you should use to communicate with the board.Returns: instance to be used to communicate with the board.
Return type:
...
libnxembeddedtools.remoteapi.lauterbach module
classAnchor libnxembeddedtools.remoteapi.lauterbach.Interface libnxembeddedtools.remoteapi.lauterbach.Interface libnxembeddedtools.remoteapi.lauterbach.
Interface
(verbose=False)Bases:
Interface
Anchor libnxembeddedtools.remoteapi.lauterbach.Interface.halt libnxembeddedtools.remoteapi.lauterbach.Interface.halt halt
(core)Halt the specified core.
Parameters: core (int) – Core to halt
Anchor libnxembeddedtools.remoteapi.lauterbach.Interface.loadELF libnxembeddedtools.remoteapi.lauterbach.Interface.loadELF loadELF
(image, core)Load an ELF on the selected core.
Parameters: image (str) – Path of the ELF to load.
core (int) – Core where to load the ELF file.
Anchor libnxembeddedtools.remoteapi.lauterbach.Interface.loadImage libnxembeddedtools.remoteapi.lauterbach.Interface.loadImage loadImage
(image, core, address)Load a binary on the specified core.
Parameters: image (str) – Path of the binary to load.
core (int) – Core where to load the binary file.
Anchor libnxembeddedtools.remoteapi.lauterbach.Interface.readCoprocessor libnxembeddedtools.remoteapi.lauterbach.Interface.readCoprocessor readCoprocessor
(core, coprocId, op1, crn, crm, op2)Read a coprocessor register.
Parameters: core (int) – Core used to perform the read;
coprocId (int) – Coprocessor to read;
op1 (int) – op1 to use;
crn (int) – crn to use;
crm (int) – crm to use;
op2 (int) – op2 to use.
Anchor libnxembeddedtools.remoteapi.lauterbach.Interface.readMemory libnxembeddedtools.remoteapi.lauterbach.Interface.readMemory readMemory
(memType, address, count=1, wordLen=32)Read some memory from the target.
Parameters: memType (
MemoryType
) – Access type to perform.address (int) – First address to be read.
count (int) – Number of word to read.
wordLen (int) – Word length in bits.
Returns: Memory read from the target.
Return type: list(int)
Anchor libnxembeddedtools.remoteapi.lauterbach.Interface.readRegister libnxembeddedtools.remoteapi.lauterbach.Interface.readRegister readRegister
(core, name)Read a register from the selected core.
Parameters: core (int) – Core from which to want to read the register
name (str) – Name of the register you want to read.
Returns: The value of the register
Return type: int
Raises: Exception – if the register can’t be found.
Warning Selected core should be halted before reading a register. You should call
halt()
method before this.
Anchor libnxembeddedtools.remoteapi.lauterbach.Interface.removeBreakpoint libnxembeddedtools.remoteapi.lauterbach.Interface.removeBreakpoint removeBreakpoint
(core, address)Remove a breakpoint from the specified core.
Parameters: core (int) – Core where the breakpoint is placed.
address (int) – Address of the breakpoint.
Anchor libnxembeddedtools.remoteapi.
factorylauterbach.
getlibnxembeddedtools.remoteapi.factory.getInterface.resume libnxembeddedtools.remoteapi.
factory.Get an instance of
Interface
corresponding to the selected interface that you should use to communicate with the board.Returns: instance to be used to communicate with the board.
Return type: Interface
lauterbach.Interface.resume resume
(core)Resume the specified core.
Parameters: core (int) – Core to resume
Anchor libnxembeddedtools.remoteapi.lauterbach.Interface.resumeAll libnxembeddedtools.remoteapi.lauterbach
get
()...
.Interface.resumeAll resumeAll
()
Anchor libnxembeddedtools.remoteapi.lauterbach.Interface.sendCmd libnxembeddedtools
.remoteapi.lauterbach.Interface class - Bases:
Interface
.remoteapi.lauterbach.Interface.sendCmd sendCmd
(core, cmd)Send debugger command to execute on the specified core.
Parameters: core (int) – Core to send the command to.
cmd (str) –
.
Anchor libnxembeddedtools.remoteapi.lauterbach.Interface.haltsetBreakpoint libnxembeddedtools.remoteapi.lauterbach.Interface.haltsetBreakpoint halt
setBreakpoint
(core, address, length)Halt the specified core.
Parameters: core (int) – Core to haltSet a breakpoint on the core at the specified address.
Parameters: core (int) – Core where to place the breakpoint.
address (int) – Address of the breakpoint.
length (int) – Length of the access in bytes.
Anchor libnxembeddedtools.remoteapi.lauterbach.Interface.loadELFstep libnxembeddedtools.remoteapi.lauterbach.Interface.loadELFstep loadELF
step
(image, core)Load an ELF Perform a step (single instruction) on the selected specified core.
Parameters:image (str) – Path of the ELF to load. core (int) – Core
whereto
load the ELF file.resume
Anchor libnxembeddedtools.remoteapi.lauterbach.Interface.loadImagewaitHalt libnxembeddedtools.remoteapi.lauterbach.Interface.loadImagewaitHalt loadImage
waitHalt
(image, core, address timeout)Load a binary Wait for the halt state on the specified core.
Parameters: image core (strint) – Path of the binary to loadCore to halt.core
timeout (int) – Core where to load the binary fileTimeout in ms.
memType (
MemoryType
) – Access type to perform.address (int) – First address to be read.
count (int) – Number of word to read.
wordLen (int) – Word length in bits.
Anchor libnxembeddedtools.remoteapi.lauterbach.Interface.readMemorywaitRun libnxembeddedtools.remoteapi.lauterbach.Interface.readMemorywaitRun readMemory
waitRun
(memType, address, count=1, wordLen=32)- core, timeout)
Parameters: Returns: Memory read from the target.
Return type: list(int)Read some memory from the target.
Anchor libnxembeddedtools.remoteapi.lauterbach.Interface.wakeupCore libnxembeddedtools.remoteapi.lauterbach.Interface.wakeupCore wakeupCore
(core)Wake up the specified core.
Parameters: core (int) – Core to wake up.
Info Core 0 is always waked up.
Anchor libnxembeddedtools.remoteapi.lauterbach.Interface.readRegisterwriteCoprocessor libnxembeddedtools.remoteapi.lauterbach.Interface.readRegisterwriteCoprocessor readRegister
writeCoprocessor
(core, name, coprocId, op1, crn, crm, op2, value)Read a coprocessor register from the selected core.
Parameters: core (int) – Core from which to want to read the register
name (str) – Name of the register you want to read.
Returns: The value of the register
Return type: int
Raises: Exception – if the register can’t be found.
Selected core should be halted before reading a register. You should callWarning halt()
method before thisused to perform the read;
coprocId (int) – Coprocessor to read;
op1 (int) – op1 to use;
crn (int) – crn to use;
crm (int) – crm to use;
op2 (int) – op2 to use;
value (int) – value to write.
Anchor libnxembeddedtools.remoteapi.lauterbach.Interface.removeBreakpointwriteMemory libnxembeddedtools.remoteapi.lauterbach.Interface.removeBreakpointwriteMemory removeBreakpoint
writeMemory
(corememType, address, data, wordLen=32)Remove a breakpoint from the specified coreWrite memory on the target.
Parameters: address (int) – Address of the breakpointcore (int) – Core where the breakpoint is placed.
memType (
MemoryType
) – Access type to perform.address (int) – First address to be read.
data (list) – Data to write.
wordLen (int) – Word length in bits.
Anchor libnxembeddedtools.remoteapi.lauterbach.Interface.resumewriteRegister libnxembeddedtools.remoteapi.lauterbach.Interface.resumewriteRegister resume
writeRegister
(core, name, value)Resume the specified Write a register from the selected core.
Parameters: core (int) – Core
from which to want to write the register
name (str) – Name of the register you want to write.
value (int) – Value you want to write in the register.
Raises: Exception – if the register can’t be found.
Warning Selected core should be halted before reading a register. You should call
halt()
method before this.
libnxembeddedtools.remoteapi.lauterbach.Interface.resumeAllAnchor
libnxembeddedtools.remoteapi.lauterbach.
Interface
(verbose=False)...
Anchor libnxembeddedtools.remoteapi.lauterbach. Interface.resumeAll toT32CoprocEncoding libnxembeddedtools.remoteapi.lauterbach. Interface.setBreakpointtoT32CoprocEncoding libnxembeddedtools.remoteapi.lauterbach.
Interface.setBreakpoint
resumeAll
()setBreakpoint
(core, address, length)Set a breakpoint on the core at the specified address.
core (int) – Core where to place the breakpoint.
address (int) – Address of the breakpoint.
toT32CoprocEncoding
(op1, crn, crm, op2)...
libnxembeddedtools.remoteapi.openocd module
Anchor libnxembeddedtools.remoteapi. lauterbachopenocd.Interface .step
classlibnxembeddedtools.remoteapi.openocd.Interface libnxembeddedtools.remoteapi.
lauterbachopenocd.
Interface
.step - (verbose=False)
Bases:
Interface
This class is dedicated to the communication with the openocd deamon.
Anchor libnxembeddedtools.remoteapi.lauterbachopenocd.Interface.waitHalthalt libnxembeddedtools.remoteapi.lauterbachopenocd.Interface.waitHalthalt waitHalt
halt
(core, timeout)Wait for the halt state on the Halt the specified core.
Parameters: core (int) – Core to halt
.timeout (int) – Timeout in ms.
Anchor libnxembeddedtools.remoteapi.lauterbachopenocd.Interface.waitRunloadELF libnxembeddedtools.remoteapi.lauterbachopenocd.Interface.waitRun waitRun
(core, timeout)Anchor libnxembeddedtools.remoteapi.lauterbach.Interface.wakeupCore libnxembeddedtools.remoteapi.lauterbach.Interface.wakeupCore wakeupCore
(core) Wake up the specified loadELF loadELF
(image, core)Load an ELF on the selected core.
Parameters: image (str) – Path of the ELF to load.
core (int) – Core
Info Core 0 is always waked up.
where to load the ELF file.
Anchor libnxembeddedtools.remoteapi.lauterbachopenocd.Interface.writeMemoryloadImage libnxembeddedtools.remoteapi.lauterbachopenocd.Interface.writeMemoryloadImage writeMemory
loadImage
(memTypeimage, core, address, data, wordLen=32)Write memory Load a binary on the targetspecified core.
Parameters: memType image (
MemoryType
str) – Access type to performPath of the binary to load.address core (int) – First address to be read.
data (list) – Data to write.
wordLen (int) – Word length in bits.
Core where to load the binary file.
Anchor libnxembeddedtools.remoteapi.lauterbachopenocd.Interface.writeRegisterreadCoprocessor libnxembeddedtools.remoteapi.lauterbachopenocd.Interface.writeRegisterreadCoprocessor writeRegister
readCoprocessor
(core, name, value coprocId, op1, crn, crm, op2)Write a register from the selected coreRead a coprocessor register.
Parameters: core (int) – Core from which to want to write the register
name (str) – Name of the register you want to write.
value used to perform the read;
coprocId (int) – Coprocessor to read;
op1 (int) – op1 to use;
crn (int) – Value you want to write in the register.
Raises: Exception – if the register can’t be found.
Selected core should be halted before reading a register. You should callWarning halt()
method before this.crn to use;
crm (int) – crm to use;
op2 (int) – op2 to use.
Anchor libnxembeddedtools.remoteapi.openocd.Interface.readMemory libnxembeddedtools.remoteapi.openocd
step
(core)Perform a step (single instruction) on the specified core.
...
Bases:
This class is dedicted to the communication with the openocd deamon.Interface
.Interface.readMemory readMemory
(memType, address, count=1, wordLen=32)Read some memory from the target.
Parameters: memType (
MemoryType
) – Access type to perform.address (int) – First address to be read.
count (int) – Number of word to read.
wordLen (int) – Word length in bits.
Returns: Memory read from the target.
Return type: list(int)
Anchor libnxembeddedtools.remoteapi.openocd.Interface.haltreadRegister libnxembeddedtools.remoteapi.openocd.Interface.haltreadRegister halt
readRegister
(core, register)Halt the specified Read a register from the selected core.
Parameters: Load an ELF on the selected core.
Parameters: core (int) – Core
image (str) – Path of the ELF to load.
core (int) – Core where to load the ELF filefrom which to want to read the register
name (str) – Name of the register you want to read.
Returns: The value of the register
Return type: int
Raises: Exception – if the register can’t be found.
Warning Selected core should be halted before reading a register. You should call
halt()
method before this.
libnxembeddedtools.remoteapi.openocd.Interface.loadELF loadELF
(image, core)Anchor libnxembeddedtools.remoteapi.openocd.Interface.loadELF Anchor libnxembeddedtools.remoteapi.openocd.Interface.loadImageremoveBreakpoint libnxembeddedtools.remoteapi.openocd.Interface.loadImageremoveBreakpoint loadImage
removeBreakpoint
(image, core, address)Load Remove a binary on breakpoint from the specified core.
Parameters: image core (strint) – Path of the binary to loadCore where the breakpoint is placed.core
address (int) – Core where to load the binary fileAddress of the breakpoint.
Anchor libnxembeddedtools.remoteapi.openocd.Interface.readMemoryresume libnxembeddedtools.remoteapi.openocd.Interface.readMemoryresume readMemory
(memType, address, count=1, wordLen=32) Read some memory from the target-
resume
(core) Resume the specified core.
Parameters: memType core (
MemoryType
int) –
Access type to perform.address (int) – First address to be read.
count (int) – Number of word to read.
wordLen (int) – Word length in bits.
Returns: Memory read from the target.
Return type: list(int)
Core to resume
Anchor libnxembeddedtools.remoteapi.openocd.Interface.sendCmd libnxembeddedtools.remoteapi.openocd.Interface.sendCmd sendCmd
(core, cmd)Send debugger command to execute on the specified core.
Parameters: core (int) – Core to send the command to.
cmd (str) –
.
Anchor libnxembeddedtools.remoteapi.openocd.Interface.readRegistersetBreakpoint libnxembeddedtools.remoteapi.openocd.Interface.readRegistersetBreakpoint readRegister
setBreakpoint
(core, register address, length)Read Set a register from breakpoint on the selected core.
Parameters: core (int) – Core from which to want to read the register
name (str) – Name of the register you want to read.
Returns: The value of the register
Return type: int
Raises: Exception – if the register can’t be found.
Selected core should be halted before reading a register. You should callWarning halt()
method before thiscore at the specified address.
Parameters: core (int) – Core where to place the breakpoint.
address (int) – Address of the breakpoint.
length (int) – Length of the access in bytes.
Anchor libnxembeddedtools.remoteapi.openocd.Interface.removeBreakpointstep libnxembeddedtools.remoteapi.openocd.Interface.removeBreakpointstep removeBreakpoint
step
(core, address) Remove a breakpoint from - )
Perform a step (single instruction) on the specified core.
Parameters: core (int) – Core
where the breakpoint is placed.address (int) – Address of the breakpoint.to resume
Anchor libnxembeddedtools.remoteapi.openocd.Interface.resumewaitHalt libnxembeddedtools.remoteapi.openocd.Interface.resumewaitHalt resume
waitHalt
(core, timeout)Resume Wait for the halt state on the specified core.
Parameters: core (int) – Core to
halt.
timeout (int) – Timeout in ms.
Anchor libnxembeddedtools.remoteapi.openocd.Interface.setBreakpointwakeupCore libnxembeddedtools.remoteapi.openocd.Interface.setBreakpointwakeupCore setBreakpoint
(core, address, length) Set a breakpoint on the core at the specified address-
wakeupCore
(core) Wake up the specified core.
Parameters: core (int) – Core
whereto
place the breakpoint. length (int) – Length of the access in bytesaddress (int) – Address of the breakpoint.
wake up.
Info Core 0 is always waked up.
Anchor libnxembeddedtools.remoteapi.openocd.Interface.stepwriteCoprocessor libnxembeddedtools.remoteapi.openocd.Interface.stepwriteCoprocessor step
writeCoprocessor
(core, coprocId, op1, crn, crm, op2, value)Perform a step (single instruction) on the specified coreRead a coprocessor register.
Wait for the halt state on the specified core.
Parameters: core (int) – Core to halt.
timeout (int) – Timeout in ms.
Wake up the specified core.
Parameters: core (int) – Core to wake up.
Core 0 is always waked upInfo Parameters: core (int) – Core used to
perform the read;
coprocId (int) – Coprocessor to read;
op1 (int) – op1 to use;
crn (int) – crn to use;
crm (int) – crm to use;
op2 (int) – op2 to use;
value (int) – value to write.
libnxembeddedtools.remoteapi.openocd.Interface.waitHalt waitHalt
(core, timeout)Anchor libnxembeddedtools.remoteapi.openocd.Interface.wakeupCore libnxembeddedtools.remoteapi.openocd.Interface.wakeupCore wakeupCore
(core)Anchor libnxembeddedtools.remoteapi.openocd.Interface.waitHalt Anchor libnxembeddedtools.remoteapi.openocd.Interface.writeMemory libnxembeddedtools.remoteapi.openocd.Interface.writeMemory writeMemory
(memType, address, data, wordLen=32)Write memory on the target.
Parameters: memType (
MemoryType
) – Access type to perform.address (int) – First address to be read.
data (list) – Data to write.
wordLen (int) – Word length in bits.
Anchor libnxembeddedtools.remoteapi.openocd.Interface.writeRegister libnxembeddedtools.remoteapi.openocd.Interface.writeRegister writeRegister
(core, register, value)Write a register from the selected core.
Parameters: core (int) – Core from which to want to write the register
name (str) – Name of the register you want to write.
value (int) – Value you want to write in the register.
Raises: Exception – if the register can’t be found.
Warning Selected core should be halted before reading a register. You should call
halt()
method before this.
libnxembeddedtools.remoteapi.openocd.
Interface
(verbose=False)...