Skip to content

Question regarding jlink.exec_command() #264

Description

@TheColector

Hi,
I have a following question.

Question

Does anyone know what might cause execution of certain command to throw exception when called via jlink.exec_command()?

def exec_command(self, cmd):

Context

I'll dig deeper into it tomorrow, but for now I've observed that commands such as Regs, Go or Mem end up throwing exception.
Note: I call the above ones only after jlink.open() and jlink.connect() were called (doesn't matter whether target was halted beforehand or not)

Calling Halt seem to work fine though. Other configuration like commands that get executed before connecting to target work correctly (like JLinkDevicesXMLPath).

Source of confusion

Here, I'm a bit at a loss, because JLink SDK Guide states the following:

  • JLINKARM_ExecCommand() from the JLINK DLL offers a possibility to execute several command strings.
  • "For a detailed description of all available commands strings please refer to the J-Link User Manual (UM08001)"

Initially I thought that all of the commands from jlink commander were supposed to be working via jlink.exec_command(), but then I realized those are not COMMAND STRINGS that you should pass to the aforementioned DLL.
Command strings are defined here.
But that does not explain why Halt works and Go does not (both come from JLink Commander set of commands).

I searched forums and web looking for answer but didn't find any.

BR,
Michael

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions