This addendum contains the following sections:
Introduction
Executable Names
Supported Features
CrossView Pro Restrictions
Serial Communication
RISM XA
Introduction to RISM
RISM Commands
This addendum contains information specific to the ROM monitor version of CrossView Pro for the XA.
CrossView Pro ROM is a ROM monitor-based source level debugger for debugging real-time embedded C and assembly programs. CrossView Pro ROM integrates two separate debugging components. The figure below shows these two components and how they communicate with each other.
Figure Rom-1: CrossView Pro ROM hardware configuration
The first component is CrossView Pro, the source level debugger that runs on the host development system. CrossView Pro translates the low level target information obtained from the embedded ROM monitor to the C and assembly language source level. CrossView Pro has both a powerful command language to control the target's execution and a multi-window user interface to display target and debugging information.
The second component of CrossView Pro ROM is the ROM monitor, also referred to as the target monitor. The ROM monitor is a low level debugging program that normally resides in ROM on the target board and runs directly on the target microprocessor. The ROM monitor must be running on the target board at CrossView Pro startup time. The ROM monitor includes a serial communications interface that lets it accept and interpret commands from CrossView Pro.
The ROM monitor has the following general capabilities:
The following CrossView Pro executable is delivered with the package (for PC with .exe extension):
xfwxa CrossView Pro Debugger.
A LAN version of the CrossView Pro debugger for the XA is available. Please contact your local TASKING representative for more information.
Except for the restrictions mentioned in the next section, the debugger cleanly supports the standard features of CrossView Pro, including single stepping, code breakpoints, trace support, C expression evaluation and record/playback capability.
Facilities for background mode, transparency mode, coverage and profiling are absent in the monitor. As a consequence, the CrossView Pro commands CB, st, u, and wt for background mode, and the o command for transparency mode are not available. Virtual I/O is not supported. Also, the debugger does not support command line function calling.
CrossView Pro ROM uses a BKPT instruction as a software breakpoint. This BKPT instruction will only occupy one byte. This means it is always possible to set a breakpoint on any C line without the risk of overlapping breakpoints. Also it is not possible to have breakpoints overlapping with labels.
CrossView Pro communicates with the ROM monitor residing on the target board using a serial connection. No hardware handshaking is used, so only the signals TxD, RxD and GND need to be connected. The ROM monitor will use auto baud rate detection with a currently accepted range of 2400-38400 baud.
CrossView Pro ROM can be used with any XA evaluation board, running RISM XA(Reduced Instruction Set Monitor). Crossview Pro communicates with the monitor on the target board via a RS232 interface, using a very efficient binary protocol. The resources used by the monitor program are kept to a minimum: it only uses 21 bytes of internal RAM, one timer and the serial interrupt, a maximum of 25 bytes of stack space and dependent on the target between 3K and 6K of code.
RISM uses a number of internal registers (not in the sense of hardware registers) and flags. The most important registers are: a 32-bit DATA register containing all data sent from and to the host, a 24-bit ADDR register containing a memory address, SFR address or register address, and a SELECTOR byte defining which type of memory to be accessed.
The SELECTOR byte can have the following values:
For any command accessing a certain type of memory it is necessary to set the SELECTOR byte to the right value. Thus, to get the value of register R4, the SELECTOR byte should contain 01 and the ADDR-register should contain the value 4. A READ_WORD command will then retrieve the value of R4.
Upon reset RISM runs an initialization section of code and enters the diagnostic mode. At this point one of two bytes ('/' or '\') can be sent to leave diagnostic mode and enter command mode. In command mode RISM will wait for characters across the serial port. A received character can either be actual data or a RISM command.
RISM commands can have values between 00 and 19H, data can have any byte-value. To distinguish the lower data values from matching commands these data values should be prefixed by sending a SET_DLE command, this command will set the internal DLE flag. When this flag is set the next received character will be interpreted as a data-value instead of being interpreted as a command.
The following table shows a list of all RISM commands:
Code | Name | Description |
00 | SET_DLE | Force the next byte received to be treated as data instead of being treated as a command |
01 | WRITE_SELECTOR | Loads the SELECTOR byte with the lowest byte of the DATA register. Valid selector register values are: 00 for DATA space, 01 for registers, 02 for CODE space and 08 for SFR space |
02 | XMIT | Transmit the low byte of the 32-bit DATA register to the host, right shifting it one byte |
03 | XMITA | Same as Xmit, but also increment the ADDR register by one |
04 | READ_BYTE | Read the byte of memory pointed to by the ADDR register and place it in the least significant byte of the DATA register |
05 | READ_WORD | Read the word of memory pointed to by the ADDR register and place it in the least significant word of the DATA register |
06 | READ_LONG | Read the double-word of memory pointed to by the ADDR register and place it in the DATA register |
07 | WRITE_BYTE | Store the least significant byte of the DATA register in the byte of memory pointed to by the ADDR register, and increment the ADDR register by one |
08 | WRITE_WORD | Store the least significant word of the DATA register in the word of memory pointed to by the ADDR register, and increment the ADDR register by two |
09 | WRITE_LONG | Store the DATA register in the double-word of memory pointed to by the ADDR register, and increment the ADDR register by four |
0A | READ_BYTE_XMITA | Same as the commands READ_BYTE and XMITA performed consecutively |
0B | DATA_TO_ADDR | Load the ADDR register with the DATA register |
0C | READ_PSW | Load the low word of the DATA register with PSW |
0D | WRITE_PSW | Load PSW with the low word of the DATA register |
0E | READ_SP | Load the DATA register with the SP (Stack Pointer) register |
0F | WRITE_SP | Load the SP (Stack Pointer) register with the DATA register |
10 | READ_USP | Load the DATA register with the USP (user stack pointer) |
11 | WRITE_USP | Load the USP (user stack pointer) with the DATA register |
12 | READ_PC | Load the DATA register with the user_PC (Program Counter) register |
13 | WRITE_PC | Load the user_PC (Program Counter) register with the DATA register |
14 | GO | Start execution of the user code at the address in the user_PC register |
15 | STEP | Step one instruction of user code |
16 | HALT | Stop execution of user code and return to RISMs "Monitor_pause" |
17 | REPORT | Load the lowest byte of the DATA register with status information, which is transmitted back to the host (status values are: 00=stopped, 01=running, 02=trapped (at break) |
18 | REPORT_VERSION | Load the lowest byte of the DATA register with the version of the monitor, which is transmitted back to the host |