Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Submodules

...

Anchor
libnxembeddedtools.remoteapi.abstract.Interface
libnxembeddedtools.remoteapi.abstract.Interface
class 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.

Anchor
libnxembeddedtools.remoteapi.abstract.Interface.halt
libnxembeddedtools.remoteapi.abstract.Interface.halt
abstract halt(core)

Halt the specified core.

Parameters:

core (int) – Core to halt

Anchor
libnxembeddedtools.remoteapi.abstract.Interface.loadELF
libnxembeddedtools.remoteapi.abstract.Interface.loadELF
abstract 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.abstract.Interface.loadImage
libnxembeddedtools.remoteapi.abstract.Interface.loadImage
abstract 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.abstract.Interface.readMemoryreadCoprocessor
libnxembeddedtools.remoteapi.abstract.Interface.readMemoryreadCoprocessor
abstract readMemory(memType, address, count=1, wordLen=32)
Read some memory from the target
readCoprocessor(core, coprocId, op1, crn, crm, op2)

Read a coprocessor register.

Parameters:
  • memType core (MemoryTypeint) – 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.

Anchor
libnxembeddedtools.remoteapi.abstract.Interface.readRegisterreadMemory
libnxembeddedtools.remoteapi.abstract.Interface.readRegisterreadMemory
abstract 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.

WarningSelected core should be halted before reading a register. You should call halt() method before this.

list(int)

Anchor
libnxembeddedtools.remoteapi.abstract.Interface.removeBreakpointreadRegister
libnxembeddedtools.remoteapi.abstract.Interface.removeBreakpointreadRegister
abstract removeBreakpointreadRegister(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.

Anchor
libnxembeddedtools.remoteapi.abstract.Interface.resumeremoveBreakpoint
libnxembeddedtools.remoteapi.abstract.Interface.resumeremoveBreakpoint
abstract resumeremoveBreakpoint(core, address)

Resume Remove a breakpoint from the specified core.

Parameters:
  • core (int) – Core

to resume
  • where the breakpoint is placed.

  • address (int) – Address of the breakpoint.

Anchor
libnxembeddedtools.remoteapi.abstract.Interface.setBreakpointresume
libnxembeddedtools.remoteapi.abstract.Interface.setBreakpointresume
abstract setBreakpointresume(core, address, length)

Set a breakpoint on Resume the specified 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.

  • resume

    Anchor
    libnxembeddedtools.remoteapi.abstract.Interface.setThumbModesendCmd
    libnxembeddedtools.remoteapi.abstract.Interface.setThumbModesendCmd
    setThumbMode abstract sendCmd(core, cmd)

    Set the current core on Thumb execution modeSend debugger command to execute on the specified core.

    Parameters:
    • core (int) – Core

    you want to switch execution
    • to send the command to.

    • cmd (str) –

      .

    Anchor
    libnxembeddedtools.remoteapi.abstract.Interface.stepsetARMMode
    libnxembeddedtools.remoteapi.abstract.Interface.stepsetARMMode
    abstract 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.

    Anchor
    libnxembeddedtools.remoteapi.abstract.Interface.waitHaltsetBreakpoint
    libnxembeddedtools.remoteapi.abstract.Interface.waitHaltsetBreakpoint
    abstract waitHaltsetBreakpoint(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.

    Anchor
    libnxembeddedtools.remoteapi.abstract.Interface.wakeupCoresetThumbMode
    libnxembeddedtools.remoteapi.abstract.Interface.wakeupCoresetThumbMode
    abstract 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’).

  • offset (int) – Offset in the file where to begin.

  • size (int) – Size to read from the file

    Core to resume

    Anchor
    libnxembeddedtools.remoteapi.abstract.Interface.waitHalt
    libnxembeddedtools.remoteapi.abstract.Interface.waitHalt
    abstract waitHalt(core, timeout)

    Wait for the halt state on the specified core.

    Parameters:
    • core (int) – Core to halt.

    • timeout (int) – Timeout in ms.

    Anchor
    libnxembeddedtools.remoteapi.abstract.Interface.writeMemorywakeupCore
    libnxembeddedtools.remoteapi.abstract.Interface.writeMemorywakeupCore
    abstract writeMemory(memType, address, data, wordLen=32)
    Write memory on the target
    wakeupCore(core)

    Wake up the specified core.

    Parameters:memType

    core (

    MemoryType

    int) –

    Access type

    Core to

    perform.
  • address (int) – First address to be read.

  • data (list) – Data to write.

  • wordLen (int) – Word length in bits.

  • Anchorlibnxembeddedtools

    wake up.

    Info

    Core 0 is always waked up.

    Anchor
    libnxembeddedtools.remoteapi.abstract.Interface.writeRegisterwriteCoprocessor
    libnxembeddedtools.remoteapi.abstract.Interface.writeRegisterwriteCoprocessor
    abstract writeRegisterwriteCoprocessor(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.

    WarningSelected core should be halted before reading a register. You should call halt() method before this
    • 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.abstract.
    MemoryType
    Interface.writeFile
    libnxembeddedtools.remoteapi.abstract.Interface.
    MemoryType class libnxembeddedtools.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_APBwriteFile
    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 = 1

    Memory Access from the APB available on the DAP

    anchor
    Anchor
    Interface.writeMemory
    libnxembeddedtools.remoteapi.abstract.MemoryTypeInterface.MEMORY_AXIlibnxembeddedtools.remoteapi.abstract.MemoryType.MEMORY_AXI
    MEMORY_AXI = 2

    Memory Access from the AXI available on the DAP

    libnxembeddedtools.remoteapi.abstract.MemoryType.MEMORY_CORE_0writeMemory
    abstract 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 = 3

    Memory Access from the core 0 of the SoC

    Anchorlibnxembeddedtools.remoteapi.abstract.MemoryType.MEMORY_CORE_1libnxembeddedtools.remoteapi.abstract.MemoryType.MEMORY_CORE_1 MEMORY_CORE_1 = 4Memory Access from the core 1 of the SoC
    Interface.writeRegister
    abstract 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_2
    libnxembeddedtools.remoteapi.abstract.MemoryType
    .MEMORY_CORE_2 MEMORY_CORE_2 = 5Memory Access from the core 2 of the SoC
    class libnxembeddedtools.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 = 61

    Memory Access from the core 3 of the SoCAPB available on the DAP

    Anchor
    libnxembeddedtools.remoteapi.abstract.MemoryType.getCoreMEMORY_AXI
    libnxembeddedtools.remoteapi.abstract.MemoryType.getCore
    static getCore(memType)

    Get the core corresponding to a memory access.

    Parameters:

    memType (MemoryType) – Memory type to check

    Returns:

    Core number corresponding to the access, None if the access is not from a core.

    Return type:

    int

    MEMORY_AXI
    MEMORY_AXI = 2

    Memory Access from the AXI available on the DAP

    Return type:MemoryType
    Anchor
    libnxembeddedtools.remoteapi.abstract.MemoryType.getFromCoreMEMORY_CORE_0
    libnxembeddedtools.remoteapi.abstract.MemoryType.getFromCore
    static 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.

    MEMORY_CORE_0
    MEMORY_CORE_0 = 3

    Memory Access from the core 0 of the SoC

    Anchor
    libnxembeddedtools.remoteapi.abstract.MemoryType.MEMORY_CORE_1
    libnxembeddedtools.remoteapi.abstract.MemoryType.MEMORY_CORE_1
    MEMORY_CORE_1 = 4

    Memory Access from the core 1 of the SoC

    Anchor
    libnxembeddedtools.remoteapi.abstract.MemoryType.isCoreAccessMEMORY_CORE_2
    libnxembeddedtools.remoteapi.abstract.MemoryType.isCoreAccess
    static isCoreAccess(memType)

    Check if a memory type is from a core.

    Parameters:

    memType (MemoryType) – Memory type to check

    Returns:

    True if the memory type correspond to a core, False otherwise.

    Return type:

    Boolean

    MEMORY_CORE_2
    MEMORY_CORE_2 = 5

    Memory Access from the core 2 of the SoC

    Anchor
    libnxembeddedtools.remoteapi.abstract.
    getIfaceName
    MemoryType.MEMORY_CORE_3
    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:

    IfaceName

    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
    languagebash
    linenumbersfalse
    # 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 = 6

    Memory Access from the core 3 of the SoC

    Anchor
    libnxembeddedtools.remoteapi.abstract.MemoryType.getCore
    libnxembeddedtools.remoteapi.abstract.MemoryType.getCore
    static getCore(memType)

    Get the core corresponding to a memory access.

    Parameters:

    memType (MemoryType) – Memory type to check

    Returns:

    Core number corresponding to the access, None if the access is not from a core.

    Return type:

    int

    Anchor
    libnxembeddedtools.remoteapi.abstract.MemoryType.getFromCore
    libnxembeddedtools.remoteapi.abstract.MemoryType.getFromCore
    static 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:

    MemoryType

    Anchor
    libnxembeddedtools.remoteapi.abstract.MemoryType.isCoreAccess
    libnxembeddedtools.remoteapi.abstract.MemoryType.isCoreAccess
    static isCoreAccess(memType)

    Check if a memory type is from a core.

    Parameters:

    memType (MemoryType) – Memory type to check

    Returns:

    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:

    IfaceName

    ...

    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
    languagebash
    linenumbersfalse
    # 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:

    Interface

    ...

    libnxembeddedtools.remoteapi.lauterbach module

    Anchor
    libnxembeddedtools.remoteapi.lauterbach.Interface
    libnxembeddedtools.remoteapi.lauterbach.Interface
    class 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.
    factory
    lauterbach.
    getlibnxembeddedtools.remoteapi.factory.get
    Interface.resume
    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: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

    ...

    .Interface.resumeAll
    resumeAll()
    Anchor
    libnxembeddedtools.remoteapi.lauterbach.Interface.sendCmd
    libnxembeddedtools
    .remoteapi.lauterbach.Interface class libnxembeddedtools.remoteapi.lauterbach.Interface(verbose=False)
    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 halt

    Set 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

    where

    to

    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.

    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.readMemorywaitRun
    libnxembeddedtools.remoteapi.lauterbach.Interface.readMemorywaitRun
    readMemory waitRun(memType, address, count=1, wordLen=32)

    Read some memory from the target.

    core, timeout)
    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.

    WarningSelected core should be halted before reading a register. You should call halt() method before this
    • 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.

    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:
  • core (int) – Core where the breakpoint is placed.

  • address (int) – Address of the breakpoint
    • 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

    to resume
    Anchorlibnxembeddedtools.remoteapi.lauterbach.Interface.resumeAll
    • 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.lauterbach.
    Interface.resumeAll resumeAll() Anchor
    toT32CoprocEncoding
    libnxembeddedtools.remoteapi.lauterbach.
    Interface.setBreakpoint
    toT32CoprocEncoding
    libnxembeddedtools.remoteapi.lauterbach.
    Interface.setBreakpoint setBreakpoint(core, address, length)

    Set 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.
    toT32CoprocEncoding(op1, crn, crm, op2)

    ...

    libnxembeddedtools.remoteapi.openocd module

    Anchor
    libnxembeddedtools.remoteapi.
    lauterbach
    openocd.Interface
    .step
    libnxembeddedtools.remoteapi.openocd.Interface
    class libnxembeddedtools.remoteapi.
    lauterbach
    openocd.Interface
    .step step(core)

    Perform a step (single instruction) on the specified core.

    Parameters:core (int) – Core to resume
    (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) Anchorlibnxembeddedtools.remoteapi.lauterbach.Interface.wakeupCorelibnxembeddedtools.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

    to wake up.
    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 (MemoryTypestr) – 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.

    WarningSelected core should be halted before reading a register. You should call 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

    ...

    Anchorlibnxembeddedtools.remoteapi.openocd.Interfacelibnxembeddedtools.remoteapi.openocd.Interface class libnxembeddedtools.remoteapi.openocd.Interface(verbose=False)

    Bases: Interface

    This class is dedicted to the communication with the openocd deamon.
    .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:
    libnxembeddedtools.remoteapi.openocd.Interface.loadELF loadELF(image, core)

    Load an ELF on the selected core.

    Parameters:
    • core (int) – Core

    to halt
    Anchorlibnxembeddedtools.remoteapi.openocd.Interface.loadELF
    • 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.

    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.

    WarningSelected core should be halted before reading a register. You should call halt() method before this

    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.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

    resume
    • 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

    where

    to

    place the breakpoint.
  • address (int) – Address of the breakpoint.

  • length (int) – Length of the access in bytes

    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.

    libnxembeddedtools.remoteapi.openocd.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.

    Anchorlibnxembeddedtools.remoteapi.openocd.Interface.wakeupCorelibnxembeddedtools.remoteapi.openocd.Interface.wakeupCore wakeupCore(core)

    Wake up the specified core.

    Parameters:

    core (int) – Core to wake up.

    InfoCore 0 is always waked up
    Parameters:
    • core (int) – Core used to

    resume
    Anchorlibnxembeddedtools.remoteapi.openocd.Interface.waitHalt
    • 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.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.

    ...