Low-level functions

LinkServer is using the redlinkserv low-level tool to communicate with a debug probe. The tool can be found in the binaries folder.

The functions supported by redlinkserv can be accessed as follows:

  • directly, in command-line mode: binaries/redlinkserv --commandline

  • indirectly, via a client connected to the telnet port 23025 after starting the GDB server:

    • ./LinkServer gdbserver [other OPTIONS] DEVICE

  • indirectly, from Basic like scripts that can be specified within a target JSON data file to be run before a connection and/or before a reset. Refer to Scripting support for details.

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>
QPOKE8  {[THIS] | [<ProbeIndex> <CoreIndex>]} <Address> <Data>
QPOKE16 {[THIS] | [<ProbeIndex> <CoreIndex>]} <Address> <Data>
QPOKE32 {[THIS] | [<ProbeIndex> <CoreIndex>]} <Address> <Data>
QSTARTTRANSFERS {[THIS] | [<ProbeIndex> <CoreIndex>]} <NumReads>
MEMDUMP {[THIS] | [<ProbeIndex> <CoreIndex>]} <Byte Address> <Length>
MEMLOAD {[THIS] | [<ProbeIndex> <CoreIndex>]} <FileName> <Byte Address> <Length Limit> Loads binary file data to memory
MEMSAVE {[THIS] | [<ProbeIndex> <CoreIndex>]} <FileName> <Byte Address> <Length> Saves memory to binary file
EXIT: Exit the server
PRINT "TEXT"[;[~]Variable | Constant]: Print statement. Prints quoted text
  and/or value of an internal variable (a%% - z%%), or constant integer
  expression in decimal, or hexadecimal[~] format
TIME : Returns an incrementing centisecond count from the host
TIMEMS : Returns an incrementing millisecond count from the host
WAIT <msec> : Wait for the number of milliseconds before proceding
LIST: Lists a loaded script
NEW: Erases a loaded script from memory
RENUMBER <Delta>: Renumber script lines with Delta increment (default is 10)
LOAD <"FILENAME">: Loads a script from the current, absolute, or relative directory
SAVE <"FILENAME">: Saves a script to the current, absolute, or relative directory

Generic BASIC like functions that only work inside scripts

GOTO <LineNumber>
IF <relation> THEN <statement> [ELSE <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>
RETURN

Miscellaneous

HELP : display help on LinkServer commands
VERSION : returns the LinkServer version
CONNECTIONS : display active connections