
GRMON3-UM
June 2019, Version 3.1.0
33
www.cobham.com/gaisler
#1 0x400017fc 0x43fea130 console_write_s 0x18
#2 0x4002dde8 0x43fea198 rtems_termio 0x128
#3 0x4002df60 0x43fea200 rtems_termio 0x2a0
#4 0x4002dfe8 0x43fea270 rtems_termios 0x70
#5 0x400180a4 0x43fea2d8 rtems_io 0x48
#6 0x4004eb98 0x43fea340 device 0x2c
#7 0x40036ee4 0x43fea3c0 write + 0x90
#8 0x4001118c 0x43fea428 trace + 0x38
#9 0x4000518c 0x43fea498 websOpen 0x108
#10 0x40004fb4 0x43fea500 websOpen 0xc0
#11 0x40004b0c 0x43fea578 rtems_initialize_web 0x204
#12 0x40004978 0x43fea770 rtems_initialize_web 0x70
#13 0x40053380 0x43fea7d8 _Thread_H 0x10c
#14 0x40053268 0x43fea840 __res_m 0x2c8
3.9. Forwarding application console I/O
If GRMON is started with
-u [N]
(N defaults to zero - the first UART), the LEON UART[N] is placed in
FIFO debug mode or in loop-back mode. Debug mode was added in GRLIB 1.0.17-b2710 and is reported by info
sys in GRMON as "DSU mode (FIFO debug)", older hardware is still supported using loop-back mode. In both
modes flow-control is enabled. Both in loop-back mode and in FIFO debug mode the UART is polled regularly
by GRMON during execution of an application and all console output is printed on the GRMON console. When
-u
is used there is no point in connecting a separate terminal to UART1.
In addition it is possible to enable or disable UART forwarding using the command forward. Optionally it is also
possible to forward the I/O to a custom TCL channel using this command.
With FIFO debug mode it is also possible to enter text in GRMON which is inserted into the UART receive
FIFO. These insertions will trigger interrupts if receiver FIFO interrupts are enabled. This makes it possible to use
GRMON as a terminal when running an interrupt-driven O/S such as Linux or VxWorks.
The following restrictions must be met by the application to support either loop-back mode or FIFO debug mode:
1. The UART control register must not be modified such that neither loop-back nor FIFO debug mode is
disabled
2. In loop-back mode the UART data register must not be read
This means that
-u
cannot be used with PROM images created by MKPROM. Also loop-back mode can not be
used in kernels using interrupt driven UART consoles (e.g. Linux, VxWorks).
NOTE: RXVT must be disabled for debug mode to work in a MSYS console on Windows. This can be done
by deleting or renaming the file
rxvt.exe
inside the bin directory, e.g.,
C:\msys\1.0\bin
. Starting with
MSYS-1.0.11 this will be the default.
3.9.1. UART debug mode
When the application is running with UART debug mode enabled the following key sequences will be available.
The sequences can be used to adjust the input to what the target system expects. For a key sequence to take effect,
both key presses must be pressed within 1.5 seconds of each other. Otherwise, they will be forwarded as is.
Table 3.3. Uart control sequences
Key sequence
Action
Ctrl+A B
Toggle delete to backspace conversion
Ctrl+A C
Send break (Ctrl+C) to the running application
Ctrl+A D
Toggle backspace to delete conversion
Ctrl+A E
Toggle local echo on/off
Ctrl+A H
Show a help message
Ctrl+A N
Enable/disable newline insertion on carriage return
Ctrl+A S
Show current settings
Ctrl+A Z
Send suspend (Ctrl+Z) to the running application
Ctrl+A Ctrl+A
Send a single Ctrl+A to the running application