AnsweredAssumed Answered

What commands are supported in Redlink Server?

Question asked by LPCware Support on Mar 31, 2016

The scripts in Redlink server are interpreted by a simplified, but extended, version of the BASIC programming language.


The following is a list of the commands and statements supported by the BASIC interpreter:


Generic BASIC like functions that only work inside scripts

GOTO 'LineNumber' 
IF 'relation' THEN 'statement'
REPEAT : Start of a repeat block
UNTIL 'relation' : End with condition of repeat block
BREAKREPEATTO 'LineNumber' : Premature end of a repeat loop
GOSUB 'LineNumber'
TIME : Returns a 10ms incrementing count from the host


Generic BASIC like functions

PEEK8{[THIS] | ['ProbeIndex' 'CoreIndex']} 'Address' 
PEEK16{[THIS] | ['ProbeIndex' 'CoreIndex']} 'Address'
PEEK32{[THIS] | ['ProbeIndex' 'CoreIndex']} 'Address'
POKE8{[THIS] | ['ProbeIndex' 'CoreIndex']} 'Address' 'Data'
POKE16{[THIS] | ['ProbeIndex' 'CoreIndex']} 'Address' 'Data'
POKE32{[THIS] | ['ProbeIndex' 'CoreIndex']} 'Address' 'Data'
QPOKE32{[THIS] | ['ProbeIndex' 'CoreIndex']} 'Address' 'Data'
QSTARTTRANSFERS{[THIS] | ['ProbeIndex' 'CoreIndex']}
MEMSAVE{[THIS] | ['ProbeIndex' 'CoreIndex']} 'FileName' 'Byte StartAddress' 'Length in Bytes'
MEMLOAD{[THIS] | ['ProbeIndex' 'CoreIndex']} 'Byte StartAddress' 'LengthLimit in Bytes'
MEMDUMP{[THIS] | ['ProbeIndex' 'CoreIndex']} 'Byte StartAddress' 'Length in Bytes'
EXIT: Exit the server
LIST: Lists the script
NEW: Erases script from memory
RENUMBER: Renumbers in increments of 10
LOAD 'FILENAME': Loads a script from current directory
SAVE 'FILENAME': Saves a script to current directory


Probe related functions

PROBELIST : Creates and then returns an indexed list of the probes attached 
PROBENUM : Returns the number of probes attached
PROBEOPENBYINDEX 'ProbeIndex' : Returns a unique probe handle
PROBECLOSE 'ProbeHandle'
PROBECLOSEBYINDEX 'ProbeIndex' : Returns an error code
PROBETIME 'ProbeIndex' : Returns time from firmware in the probe
PROBESTATUS : Returns an indexed list summary of the status of the probes connected to the system
PROBEVERSION 'ProbeIndex': Returns version information about probe firmware
PROBEDIAGNOSTICS 'ProbeIndex' : Return counts of responses from probe


Core/TAP related functions

CORELIST 'ProbeIndex': Returns list of TAPs/Cores found connected to specified probe 
CORECONFIG{[THIS] | ['ProbeIndex']}: Configures the scanchain
COREREADID 'ProbeIndex' 'CoreIndex'


Wire related functions

WIRESWDCONNECT{[THIS] | ['ProbeIndex']}: Returns the DPID 
WIRETIMEDRESET 'ProbeIndex' 'TimeIn_ms': pulls reset and returns the end state of the wire
WIREHOLDRESET 'ProbeIndex' 'State' : pulls reset and returns the end state of the wire
WIRESTATUS 'ProbeIndex' : Returns the status of the wire connection on the probe specified
WIRESETSPEED 'ProbeIndex' 'SpeedInHz': Requests a particular wire speed
WIREGETSPEED 'ProbeIndex' : Returns the current wire speed
WIRESETIDLECYCLES 'ProbeIndex' 'Cycles': Requests a specific number of idle cycles between debug

WIREGETIDLECYCLES 'ProbeIndex' : Returns the current number of debug idle cycles WIREISCONNECTED

SELECTPROBECORE 'ProbeIndex' 'CoreIndex' : sets up for use with following commands
THIS : displays the current Probe, Core pair


Cortex-M related functions

CMINITAPDP{[THIS] | ['ProbeIndex' 'CoreIndex']}: Initialize a CMx core ready for debug 

CMWRITEDP{[THIS] | ['ProbeIndex' 'CoreIndex']} 'REG' 'DATA': returns zero on success
CMWRITEAP{[THIS] | ['ProbeIndex' 'CoreIndex']} 'REG' 'DATA': returns zero on success
CMREADDP{[THIS] | ['ProbeIndex' 'CoreIndex']} 'REG': returns data
CMREADAP{[THIS] | ['ProbeIndex' 'CoreIndex']} 'REG': returns data (note this deals with RDBUF
on AP reads)

CMCLEARERRORS{[THIS] | ['ProbeIndex' 'CoreIndex']}
CMHALT{[THIS] | ['ProbeIndex' 'CoreIndex']}
CMRUN{[THIS] | ['ProbeIndex' 'CoreIndex']}
CMREGS{[THIS] | ['ProbeIndex' 'CoreIndex']}
CMWRITEREG{[THIS] | ['ProbeIndex' 'CoreIndex']} 'RegNumber' 'Value'
CMREADREG{[THIS] | ['ProbeIndex' 'CoreIndex']} 'RegNumber'
CMWATCHLIST{[THIS] | ['ProbeIndex' 'CoreIndex']}
CMWATCHSET{[THIS] | ['ProbeIndex' 'CoreIndex']} 'DWTIndex' 'Address' ['[RW]|R|W']
CMWATCHCLEAR{[THIS] | ['ProbeIndex' 'CoreIndex']} 'DWTIndex'
CMBREAKLIST{[THIS] | ['ProbeIndex' 'CoreIndex']} : List the hardware breakpoints
CMBREAKSET{[THIS] | ['ProbeIndex' 'CoreIndex']} 'Address' : Set an FPB
CMBREAKCLEAR{[THIS] | ['ProbeIndex' 'CoreIndex']} ['Address'] : Clear an FPB
CMSYSRESETREQ{[THIS] | ['ProbeIndex' 'CoreIndex']} : System reset request
CMVECTRESETREQ{[THIS] | ['ProbeIndex' 'CoreIndex']} : Core reset request
CMRESETVECTORCATCHSET{[THIS] | ['ProbeIndex' 'CoreIndex']} : Enable reset vector catch
CMRESETVECTORCATCHCLEAR{[THIS] | ['ProbeIndex' 'CoreIndex']} : Disable reset vector catch