Do you have a question about the GRMON3 and is the answer not in the manual?
Questions and answers
Subscribe to Our Youtube Channel
Summary of Contents for COBHAM GRMON3
Page 1
GRMON3 A debug monitor for LEON-based computer systems and SOC designs based on the GRLIB IP library 2019 User's Manual The most important thing we build is trust GRMON3 User's Manual GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
3.7.6. GDB Thread support ..................27 3.7.7. Virtual memory ....................29 3.7.8. Specific GDB optimization .................. 31 3.7.9. GRMON GUI considerations ................31 3.7.10. Limitations of GDB interface ................31 3.8. Thread support ......................31 GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 3
5.6. User defined debug link ....................62 5.6.1. API ........................62 6. Debug drivers ......................... 64 6.1. AMBA AHB trace buffer driver ..................64 6.2. Clock gating ........................ 64 6.2.1. Switches ......................64 6.3. DSU Debug drivers ....................... 64 GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 4
D. Fixed target configuration file format ..................234 E. License key installation ......................236 F. Appending environment variables .................... 237 G. Compatibility ........................238 G.1. Compatibility notes for GRMON2 ................. 238 G.2. Compatibility notes for GRMON1 ................. 238 GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
See Chapter 5, Debug link for more information. 1.3. Obtaining GRMON The primary site for GRMON is Cobham Gaisler website [http://www.gaisler.com/], where the latest version of GRMON can be ordered and evaluation versions downloaded.
1.6. GRMON Evaluation version The evaluation version of GRMON can be downloaded from Cobham Gaisler website [http://www.gaisler.com/]. The evaluation version may be used during a period of 21 days without purchasing a license. After this period, any commercial use of GRMON is not permitted without a valid license. The following features are not available in the evaluation version: •...
When GRMON first connects to the target system, it scans the system to detect which IP cores are present. This is done by reading the plug and play information which is normally located at address 0xfffff000 on the AHB bus. A GRMON3-UM www.cobham.com/gaisler...
Page 8
RAM. For a UART, it could consist of initializing the baud rate generator and flushing the FIFOs. After the initialization is complete, the system configuration is printed: GRMON3 LEON debug monitor v3.0.0 32-bit professional version Copyright (C) 2018 Cobham Gaisler - All rights reserved.
Cobham Gaisler General Purpose I/O port APB: 80000800 - 80000900 2.2.1. LEON2 target initialization The plug and play information was introduced in the LEON3 processor (GRLIB), and is not available for LEON2 systems. LEON2 is supported by starting GRMON with the -sys leon2 switch or one of the switches that correspond to a known LEON2 device, see Section 6.12, “LEON2 support”.
GRMON connects to a GRLIB target using one debug link interface, the command line options selects which interface the PC uses to connect to the target and optionally how the debug link is configured. All options are described in Chapter 5, Debug link. GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
UART to be put in debug mode. The device parameter is an index starting with 0 for the first UART and then increasing with one in the order they are found in the bus scan. If the device parameter is not used the first UART is selected. GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Load script specified by filename into system shell. 3.3. GRMON command-line interface (CLI) The GRMON3 command-line interface features a Tcl 8.6 interpreter which will interpret all entered commands substituting variables etc. before GRMON is actually called. Variables exported by GRMON can also be used to access internal states and hardware registers without going through commands.
When connecting for the first time it is essential to verify that GRMON has auto-detected all devices and their configuration correctly. At start-up GRMON will print the cores and the frequency detected. From the command line one can examine the system by executing info sys as below: grmon3> info sys cpu0 Cobham Gaisler...
40003E44 0x40003FB8 npc: 40003E48 grmon3> puts [format %x $::cpu::iu::o6] 407ffff0 Other register windows can be displayed using reg wN, when N denotes the window number. Use the float com- mand to show the FPU registers (if present). 3.4.6. Backtracing function calls When debugging an application it is often most useful to view how the CPU entered the current function.
(%SP) at that time. The first entry (frame #0) indicates the current location of the CPU and the current stack pointer. The right most column print out the %PC address relative the function symbol, i.e. if symbols are present. grmon3> bt 0x40003e24 0x407ffdb8 <Fft+0x4>...
This is useful when GRMON is automated using Tcl scripts. 3.4.8. Instruction disassembly If the memory contents is SPARC machine code, the contents can be displayed in assembly code using the dis- assemble command: grmon3> disassemble 0x40000000 10 0x40000000: 88100000 <start+0> 0x40000004: 09100034 sethi %hi(0x4000d000), %g4 <start+4>...
Page 19
Fft Software breakpoint 1 at <Fft> grmon3> bp watch 0x4000eae0 Hardware watchpoint 2 at 0x4000eae0 grmon3> bp ADRESS MASK TYPE SYMBOL 1 : 0x40003e20 (soft) Fft+0 2 : 0x4000eae0 0xfffffffc (watch rw) floated+0 grmon3> run CPU 0: watchpoint 2 hit...
Even so, it still provides useful information and can be used for application tuning. NOTE: To increase the number of samples, use the fastest debug link available on the target system. I.a. do not use I/O forwarding (start GRMON without the -u commandline option) grmon3> lo v8/stanford.exe 40000000 .text 54.8kB / 54.8kB...
CPU1 is the currently active CPU. grmon3> cpu cpu 0: enabled active cpu 1: enabled grmon3> cpu act 1 grmon3> cpu cpu 0: enabled cpu 1: enabled active grmon3>...
TCL command puts will still print it's output. It is also possible to put the command silent in front of another GRMON command to suppress the output of a single command, e.g. grmon3> puts [expr [silent mem 0x40000000 4] + 4] GRMON3-UM www.cobham.com/gaisler...
Eclipse Workbench and DDD communicate with GRMON via GDB. GDB must be built for the SPARC architecture, a native PC GDB does not work together with GRMON. The toolchains that Cobham Gaisler distributes comes with a patched and tested version of GDB targeting all SPARC LEON development tools.
The target memory and register values can then be examined in GDB to determine the error cause. GRMON implements the GDB breakpoint and watchpoint interface and makes sure that memory and cache are synchronized. GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "--host=i686-pc-linux-gnu --target=sparc-rtems"... GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
GDB is capable of listing a operating system's threads, however it relies on GRMON to implement low-level thread access. GDB normally fetches the threading information on every stop, for example after a breakpoint is GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 28
PC and PSR. The other registers will be displayed as 0: gdb) frame 5 0x40004028 in daemon () at rtems/.../rtems_servers/ftpd.c:1925 1925 ss = accept(s, (struct sockaddr *)&addr, &addrLen); (gdb) info reg GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "--host=i686-pc-linux-gnu --target=sparc-linux". (gdb) file output/images/image.ram Reading symbols from /home/user/linuxbuild-1.0.2/output/images/image.ram...(no d ebugging symbols found)...done. GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
3.7.10. Limitations of GDB interface GDB must be built for the SPARC architecture, a native PC GDB does not work together with GRMON. The toolchains that Cobham Gaisler distributes comes with a patched and tested version of GDB targeting all SPARC LEON development tools.
During debugging sessions it can help the developer a lot to view all threads, their stack traces and their states to understand what is happening in the system. 3.8.1. GRMON thread options The following command-line options are available for selecting how GRMON3 will handle threads. -nothreads Disable thread support.
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 GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Washing memory with EDAC disabled will not generate check bits, however it can be used to clear or set a memory region even if the memory controller does not implement EDAC. grmon3> wash 0x40000000 0x41000000 40000000 16.0MB / 16.0MB...
The flash device configuration is auto-detected, the information is printed out like in the example below. One can verify the configuration so that the auto-detection is correct if problems are experienced. The block lock status (if implement by the flash chip) can be viewed like in the following example: grmon3> flash Manuf. : Intel...
62 @ 0x007c0000 : L Block 63 @ 0x007e0000 : L A typical command sequence to erase and re-program a flash memory could be: grmon3> flash unlock all Unlock complete grmon3> flash erase all Erase in progress Block @ 0x007e0000 : code = 0x80 Erase complete grmon3>...
OS shell. Target state will be dumped in the log file testsuite.log for each test case which returns nonzero or crashes. Example 3.1. Test suite driver example # This is testsuite.tcl set nfail 0 GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 38
{} { global nfail if {0 == $nfail} { puts "### SUMMARY: ALL TESTS PASSED" } else { puts "### SUMMARY: $nfail TEST(S) FAILED" after 2000 testprog test000.elf testprog test001.elf testprog test002.elf printsummary exit GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
4. Graphical user interface This chapter describes how to operate the Grapical User Interface (GUI) introduced with GRMON3. 4.1. Overview The GUI provides the user with a fully interactive environment with the possibility to monitor and control different parts of the system in parallel. All functionality of the GRMON Tcl command line interface are accessible from the terminal emulator view.
The debug link to use is selected in the Choose debug link drop down menu in the Debug Link tab. as illustrated in Figure 4.2. When a debug link has been selected, parameters specific for that debug link are displayed. GRMON3-UM www.cobham.com/gaisler...
All debug links supported by GRMON3 are displayed in the drop down menu, including those which may not be available on the host and target system. For more information on the GRMON3 debug links and their individual options, see Chapter 5, Debug link.
CPUs are added or removed by the user to match the target system. Each setting has a value and some of them can be individually associated with one or more CPUs. For instance a breakpoint and symbol file might be associated with CPU1, but not CPU2. GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Init() in an RTEMS application. At most one Break at Application property can be specified. Command: bp Break at Entry Inserts a breakpoint at the entry point of the loaded image. At most one Break at Application property can be specified. GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Command: ep 4.5. Views GRMON3 GUI provides different views for displaying and managing the target system state. Some views are derived from the Eclipse framework, such as the Memory View and the Disassembly View. Other views are cus- tomized for GRLIB/LEON systems and will be described in this section.
The register view adapts to the register information available in GRMON. Users can add registers and bit-field declarations for custom IP-cores by means of Tcl drivers as described in Appendix C, Tcl API. Registers unknown to GRMON will not appear in the view. GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 46
Click the arrow down icon in the toolbar to access the view pull down menu. Under the Layout item are different options on how to customize the appearance of the view. For instance can which columns to display be specified under Select Columns..Figure 4.8. The I/O registers menu GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Figure 4.9. The sytem informaion view 4.5.4. Terminals View Terminals can be opened to interact with GRMON or to display the output from an application on the target system. Figure 4.10. The terminals view showing a GRMON terminal GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Figure 4.12. Opening a new message view Memory content is modified by double-clicking a cell and typing in a new value. The new value is written to the target when enter is pressed. GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
The right- most column of the Disassembly View describes the name of the function which the instruction belongs to, together with the offset from the function symbol. GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
, or press the copy command keyboard combination. Remove one or more messages by selecting them and pressing the Remove button , or press delete on the keyboard. Remove all messages by clicking the Remove All button GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
4.6.1. Memory view update GRMON3 GUI normally updates the memory views when target execution stops, for example on a breakpoint or after single step. This can generate a large amount of traffic on a slow debug link in combination with large memory views.
Use the -uart <device> option in case the target is not connected to the first UART port of your host. On some hosts, it might be necessary to lower the baud rate in order to achieve a stable connection to the target. In GRMON3-UM www.cobham.com/gaisler...
Device index: greth1 Edcl ip 192.168.0.52, buffer 2 kB grmon3> edcl 192.168.0.53 greth1 Device index: greth1 Edcl ip 192.168.0.53, buffer 2 kB grmon3> info sys greth0 greth1 greth0 Cobham Gaisler GR Ethernet MAC APB: FF940000 - FF980000 IRQ: 24 edcl ip 192.168.0.51, buffer 2 kbyte...
Page 54
GRMON is started with -jtagcfg switch. An example of JTAG configuration file is shown below. If you report the device ID and corresponding JTAG instruction register length to Cobham Gaisler, then the device will be supported in future releases of GRMON.
Figure 5.1 until the last dialog. The libusb-win32-devel-filter-1.2.6.0.exe installation is compatible with both 64-bit and 32-bit Windows. 3. Make sure that 'Launch filter installer wizard' is checked, then press Finish. The wizard can also be launched from the start menu. GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 56
GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Actel's documentation on how to install on your host computer. The connection is only supported by the 32-bit version of GRMON. And it also requires Altera Quartus version less then or equal to 13. GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/quartus/linux $ grmon -altjtag GRMON3 LEON debug monitor v3.0.0 32-bit professional version On Windows, the path to the Quartus binary folder must the added to the environment variable PATH, see Ap- pendix F, Appending environment variables in how to this. The default installation path to the binary folder should be similar to C:\altera\11.1sp2\quartus\bin, where 11.1sp2 is the version of Quartus.
(to be downloaded from Microsemi's website). Windows support is detailed at the website. GRMON is start- ed with the -fpro switch. Technical support is provided through Cobham Gaisler only via support@gaisler.com. JTAG debugging using the Microsemi FlashPro 5 cable is supported on both Linux and Windows, for GRLIB sys- tems implemented on Microsemi devices, using the FTDI debug link.
Page 60
6. Press 'Close' to exit the dialog. The USB DCL driver is now installed and GRMON should be able to connect to the target system using the USB DCL connection. GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
The AGGA4 SpaceWire debug link does not use a regular SpaceWire packet protocol, therefore the GRESB must be setup to tunnel all the packets as raw data. To achieve this the GRESB must be configured to use separate routing tables, this setting can only be enabled via the web interface. GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
A function that reads one or more 32-bit words from the AHB bus. The parameters indicate the AHB (start) address, a pointer to where the read data should be stored, and the number of words to be read. The returned GRMON3-UM www.cobham.com/gaisler...
Page 63
Called when initiating a connection to the target system. The parameter arg is set using the GRMON start-up switch -dbackarg <arg>. This allows to send arbitrary parameters to the DSU interface during start-up. An example module is provided with the professional version of GRMON located at <grmon3>/share/gr- mon/src/dsu_user_backend.
Note that this is an stand alone AHB trace buffer it is not to be confused with the DSU AHB trace facility. When a break point is hit the processor will not stop its execution. The info sys command displays the size of the trace buffer in number of lines. ahbtrace0 Cobham Gaisler AMBA Trace Buffer AHB: FFF40000 - FFF60000 Trace buffer size: 512 lines 6.2.
Print or set the SRMMU registers perf Measure performance profile Enable, disable or show simple profiling Show or set integer registers. Reset and start execution stack Set or show the intial stack-pointer step Step one ore more instructions GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
The GRETH debug driver provides commands to configure the GRETH 10/100/1000 Mbit/s Ethernet controller core. The driver also enables the user to read and write Ethernet PHY registers. The info sys command displays the core’s configuration settings: greth0 Cobham Gaisler GR Ethernet MAC AHB Master 2 APB: C0100100 - C0100200 IRQ: 12 edcl ip 192.168.0.201, buffer 2 kbyte...
The GRUSBHC host controller consists of two host controller types. GRMON provides a debug driver for each type. The info sys command displays the number of ports and the register setting for the enhanced host controller or the universal host controller: usbehci0 Cobham Gaisler USB Enhanced Host Controller AHB Master 4 APB: C0100300 - C0100400...
Appendix B, Command syntax for more information. The info sys command displays information on the cores memory map. I.a. if extended interrupts are enabled it shows the extended interrupt number. irqmp0 Cobham Gaisler Multi-processor Interrupt Ctrl. APB: FF904000 - FF908000 EIRQ: 10 6.10. L2-Cache Controller The debug driver for L2C is accessed using the command l2cache, see command description in Appendix B, Command syntax for more information.
- icache mmu hold dcmiss - dcache miss ... more events are listed ... grmon3> l4stat 1 set 0 1 dcmiss cnt0: Enabling dcache miss on cpu/AHB 1 grmon3> l4stat 1 set 1 0 icmiss cnt1: Enabling icache miss on cpu/AHB 0 grmon3>...
Page 70
Example 6.2 is a transcript from a GRMON session where a vxWorks image is loaded and statistics are collected while it runs. Example 6.2. grmon3> l4stat 1 set 0 0 icmiss 0 cnt0: Configuring icache miss on cpu/AHB 0 grmon3> l4stat 1 set 1 0 dcmiss 0 cnt1: Configuring dcache miss on cpu/AHB 0 grmon3>...
I.e. either start GRMON from the directory where setup.logan is located or use the Tcl command cd, in GRMON, to change directory. Example 6.3. #Name Size edclstate 4 txdstate dataout0 dataout1 dataout2 dataout3 writem writel lock GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
The info sys shows the DDR timing and amount of detected memory Supported cores: DDR2SPA ddr2spa0 Cobham Gaisler Single-port DDR2 controller AHB: 40000000 - 80000000 The memory register reset value will be written when GRMON's resets the drivers, for example when run or load is called.
Overrides the auto-probed ram bit width. Valid values are 8, 16 or 32. (MCTRL, FTMCTRL) -ramrws <n> Set n number of wait-states for ram reads. (MCTRL, FTMCTRL) -ramwws <n> Set n number of wait-states for ram writes. (MCTRL, FTMCTRL) GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
The MEMSCRUB core is accessed using the command scrub, see command description in Appendix B, Command syntax for more information. It provides commands for reading the core’s status, and performing some basic operations such as clearing memory. GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Examining data structures The mil bcx and mil bmx commands prints the contents of memory interpreted as BC descriptors or BM entries, in human readable form, as seen in Example 6.4. Example 6.4. grmon3> mil bcx 0x40000080 Address TType RTAddr:SA...
LEON PCI software, the developer may for example want to see how Linux has configured PCI but not to alter anything that would require Linux to reboot. Below are command sequences of the two typical use cases on the ML510 board: GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 78
ROM: 82100001 [64kB] (ENABLED) When analyzing the system, the sub commands info and scan can be called without altering the hardware config- uration: grmon3> pci info GRPCI initiator/target (in system slot): Bus master: Mem. space en: yes Latency timer: 0x0...
Page 79
BAR 0: 1001 [256B] BAR 1: 82203000 [512B] ROM: 82100001 [64kB] (ENABLED) grmon3> pci bus reg grmon3> info sys pdev0 pdev5 pdev10 pdev0 Bus 00 Slot 01 Func 00 [0:1:0] vendor: 0x10b9 ULi Electronics Inc. device: 0x5451 M5451 PCI AC-Link Controller Audio Device...
The info reg command only displays a subset of all the registers available. Add -all to the info reg command to print all registers, or specify one or more register to print a subset. Add -l to info reg to list all the register names. grmon3> info reg -all -l spwrtr0 GRMON3-UM www.cobham.com/gaisler...
7. Support For support contact the Cobham Gaisler support team at support@gaisler.com. When contacting support, please identify yourself in full, including company affiliation and site name and address. Please identify exactly what product that is used, specifying if it is an IP core (with full name of the library distribution archive file), component, software version, compiler version, operating system version, debug tool version, simulator tool version, board version, etc.
Appendix A. Command index This section lists all documented commands available in GRMON3. Table A.1. GRMON command oveview Command Description Name about Show information about GRMON Print AHB transfer entries in the trace buffer amem Asynchronous bus read attach Stop execution and attach GRMON to processor again...
Page 84
Control the PCI bus master perf Measure performance phyaddr Set the default PHY address profile Enable, disable or show simple profiling quit Quit the GRMON console Show or set integer registers. reset Reset drivers GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 85
Set PHY registers wmemb AMBA bus 8-bit memory write access wmemh AMBA bus 16-bit memory write access wmems Write a string to an AMBA bus memory address wmem AMBA bus 32-bit memory write access GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Appendix B. Command syntax This section lists the syntax of all documented commands available in GRMON3 GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 87
1. about - syntax NAME about - Show information about GRMON SYNOPSIS about DESCRIPTION about Show information about GRMON GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 88
MSB first, depending on the size of AMBA bus. Detailed description about the different fields can be found in the DSU core documentation in document grip.pdf. [http://gaisler.com/products/grlib/grip.pdf] The other subcommands have no return value. GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 90
Create a handle named myhandle and schedule a read of 1 MiB from address 0 in the background. grmon3> amem add myhandle Added amem handle: myhandle grmon3> amem eval myhandle 0 0x100000 grmon3> set myresult [amem result myhandle] List handles grmon3>...
Page 91
NAME STATE ADDRESS LENGTH PRIO NREQ BYTES ERRORS myhandle IDLE 1048576 test0 DONE 0x00000004 0x00000064 SEE ALSO Section 3.4.7, “Displaying memory contents” GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 92
- Stop execution and attach GRMON to processor again SYNOPSIS attach DESCRIPTION attach This command will stop the execution on all CPUs that was started by the command detach and attach GRMON again. RETURN VALUE Command attach has no return value. GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 93
DSU core documentation in document grip.pdf. [http:// gaisler.com/products/grlib/grip.pdf] The other sub commands have no return value. EXAMPLE Print 10 rows grmon3> at TIME ADDRESS D[127:96] D[95:64] D[63:32] D[31:0] TYPE 266718 FF900004...
Page 95
Echo all commands/procedures that the TCL interpreter calls. -prefix ?string? Print a prefix on each row when echoing commands. Has no effect unless -echo is also set. RETURN VALUE Command batch has no return value. GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 96
Dumps length bytes, starting at address, to a file in binary format. The default name of the file is "grmon-dump.bin" RETURN VALUE Command bdump has no return value. EXAMPLE Dump 32kB of data from address 0x40000000 grmon3> bdump 0x40000000 32768 GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 97
Command bload returns a guessed entry point. EXAMPLE Load and then verify a binary data file at a 16MBytes offset into the main memory starting at 0x40000000. grmon3> bload release/ramfs.cpio.gz 0x41000000 grmon3> verify release/ramfs.cpio.gz 0x41000000 SEE ALSO Section 3.4.2, “Uploading application and data to target memory”...
Page 98
Listing all breakpoints will show the indexes of the breakpoints. OPTIONS -read This option will enable a watchpoint to only watch loads at the specified address. The -read and -write are mutual exclusive. GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 99
Create a software breakpoint at the symbol main: grmon3> bp soft main Create a AMBA bus watchpoint that watches loads in the address range of 0x40000000 to 0x400000FF: grmon3> bp bus -read 0x40000000 0xFFFFFF00 SEE ALSO Section 3.4.4, “Inserting breakpoints and watchpoints”...
Page 100
Show backtrace on current active CPU grmon3> bt TCL returns: {1073746404 1342177032} {1073746020 1342177136} {1073781172 1342177200} Show backtrace on CPU 1 grmon3> bt cpu1 TCL returns: {1073746404 1342177032} {1073746020 1342177136} {1073781172 1342177200} SEE ALSO Section 3.4.6, “Backtracing function calls” GRMON3-UM www.cobham.com/gaisler...
Page 101
Flushes both instruction and data cache RETURN VALUE Upon successful completion cctrl will return the value of the cache control register. SEE ALSO -nic and -ndc switches described in Section 6.3.1, “Switches” SEE ALSO Section 3.4.15, “CPU cache support” GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 102
SIGFPE, SIGILL, SIGINT, SIGSEGV, SIGTERM or SIGTRAP. If a CPU is disabled, then a empty string will be returned instead of a signal value. EXAMPLE Continue execution from current PC grmon3> cont SEE ALSO Section 3.4.3, “Running applications” GRMON3-UM www.cobham.com/gaisler...
Page 103
The sub commands has no return value. EXAMPLE Set current active to CPU 1 grmon3> cpu active 1 Print processor status in a two-processor system when CPU 1 is active and disabled. grmon3> cpu TCL returns:...
Page 104
Command dcache tag returns the tag value on read. The other dcache commands have no return value. SEE ALSO Section 3.4.15, “CPU cache support” icache GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 105
RETURN VALUE Upon successful completion dccfg will return the value of the data cache configuration register. SEE ALSO -nic and -ndc switches described in Section 6.3.1, “Switches” SEE ALSO Section 3.4.15, “CPU cache support” GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 106
- Print or clear debug link statistics SYNOPSIS dcom dcom clear DESCRIPTION dcom dcom clear Print debug link statistics. Clear debug link statistics. RETURN VALUE Upon successful completion dcom has no return value. GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 107
Set the reset value of the memory register. If value is left out, then the reset value will be printed. RETURN VALUE Upon successful completion ddrcfg1 returns a the value of the register. SEE ALSO Section 6.14, “Memory controllers ” GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 108
Set the reset value of the memory register. If value is left out, then the reset value will be printed. RETURN VALUE Upon successful completion ddrcfg2 returns a the value of the register. SEE ALSO Section 6.14, “Memory controllers ” GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 109
Set the reset value of the memory register. If value is left out, then the reset value will be printed. RETURN VALUE Upon successful completion ddrcfg3 returns a the value of the register. SEE ALSO Section 6.14, “Memory controllers ” GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 110
Set the reset value of the memory register. If value is left out, then the reset value will be printed. RETURN VALUE Upon successful completion ddrcfg4 returns a the value of the register. SEE ALSO Section 6.14, “Memory controllers ” GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 111
Set the reset value of the memory register. If value is left out, then the reset value will be printed. RETURN VALUE Upon successful completion ddrcfg5 returns a the value of the register. SEE ALSO Section 6.14, “Memory controllers ” GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 112
The scan subcommand will run a calibration routine that searches over all tap delays and read delay values to find working settings. Supports only Xilinx Virtex currently NOTE:The scan may overwrite beginning of memory. RETURN VALUE Command ddr2delay has no return value. SEE ALSO Section 6.14, “Memory controllers ” GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 113
Increment/decrement the delay with one step. Commands inc and dec can optionally be given the number of steps to increment/decrement as an argument. ddr2skew reset Set the skew to the default value. RETURN VALUE Command ddr2skew has no return value. SEE ALSO Section 6.14, “Memory controllers ” GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 114
GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 115
24. detach - syntax detach - Resume execution with GRMON detached from processor SYNOPSIS detach DESCRIPTION detach This command will detach GRMON and resume execution on enabled CPUs. RETURN VALUE Command detach has no return value. GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 116
-r start stop ?cpu#? Disassemble a range of instructions between address start and stop, including start and excluding stop. RETURN VALUE Command disassemble has no return value. SEE ALSO Section 3.4.7, “Displaying memory contents” GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 117
Set the -append option to append the dumped data to the end of the file. The default is to truncate the file to zero length before storing the data into the file. RETURN VALUE Command dump has no return value. EXAMPLE Dump 32kB of data from address 0x40000000 grmon3> dump 0x40000000 32768 GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 118
Upon successful completion dwarf addr2line will return a list where the first element is the filename and the second element is the line number. EXAMPLE Retrieve the line information for address 0xf0014000. grmon3> dwarf addr2line 0xf0014000 SEE ALSO load GRMON3-UM www.cobham.com/gaisler...
Page 119
RETURN VALUE Command edcl has no return value. EXAMPLE Set ip-address 192.168.0.123 grmon3> edcl 192.168.0.123 SEE ALSO Section 6.4, “Ethernet controller” GRMON3-UM www.cobham.com/gaisler...
Page 120
If the -debug option is given the DWARF debug information is read in. RETURN VALUE Command eeload returns the entry point. EXAMPLE Load and then verify a hello_world application grmon3> eeload ../hello_world/hello_world grmon3> verify ../hello_world/hello_world SEE ALSO Section 3.4.2, “Uploading application and data to target memory” GRMON3-UM www.cobham.com/gaisler...
Page 121
?devname? Displays contents of the operational registers ehci reset ?devname? Performs a Host Controller Reset RETURN VALUE Upon successful completion, ehci have no return value. SEE ALSO Section 6.6, “USB Host Controller” GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 122
Configure ei to inject errors only in the data cache tags and instruction cache tags (DTAG and ITAG) of cpu0: grmon3> ei prob 1.0 1.0 0.0 0.0 0.0 0.0 0.0 cpu0 grmon3> ei prob 0.0 0.0 0.0 0.0 0.0 0.0 0.0 cpu1 List the currently configured target probabilities: grmon3>...
Page 123
GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 124
Upon successful completion ep returns a list of entry points, one for each CPU. If cpu# is specified, then only the entry point for that CPU will be returned. EXAMPLE Set current active CPUs entry point to 0x40000000 grmon3> ep 0x40000000 SEE ALSO Section 3.4.12, “Multi-processor support” GRMON3-UM www.cobham.com/gaisler...
Page 125
EXAMPLE Install an execution hook grmon::execsh eval { proc myhook1 {} {puts "Hello World"} lappend ::hooks::preexec ::myhook1 SEE ALSO Section 3.5, “Tcl integration” Appendix C, Tcl API GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 126
?code? Exit the GRMON application. GRMON will return 0 or the code specified. RETURN VALUE Command exit has no return value. EXAMPLE Exit the GRMON application with return code 1. grmon3> exit 1 GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 127
Print the flash memory configuration. flash blank all flash blank start ?stop? Check that the flash memory is blank, i.e. can be re-programmed. See description above about the param- eters. GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 128
Write a 32-bit data word to the flash at address addr. RETURN VALUE Command flash scan returns the base address of the CFI compatible memory. The other flash commands has no return value. GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 129
EXAMPLE A typical command sequence to erase and re-program a flash memory could be: grmon3> flash unlock all grmon3> flash erase all grmon3> flash load file.prom grmon3> flash lock all SEE ALSO Section 3.11.1, “CFI compatible Flash PROM” GRMON3-UM www.cobham.com/gaisler...
Page 130
RETURN VALUE Upon successful completion float returns 2 lists. The first list contains the values when the registers represents floats, and the second list contain the double-values. SEE ALSO Section 3.4.5, “Displaying processor registers” GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 131
Set forwarding mode. Valid values are "loopback", "debug" or "none". RETURN VALUE Upon successful completion forward has no return value. EXAMPLE Enable I/O forwarding grmon3> forward enable uart0 Enable I/O forwarding to a file grmon3> forward enable uart0 [open "grmon3.out" w] GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 132
Only the command 'gdb status' has a return value. Upon successful completion gdb status returns a tuple, where the first value represents the status (0 stopped, 1 connected, 2 waiting for connection) and the second value is the port number. SEE ALSO Section 3.7, “GDB interface” Section 3.2, “Starting GRMON” GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 133
SIGILL, SIGINT, SIGSEGV, SIGTERM or SIGTRAP. If a CPU is disabled, then a empty string will be returned instead of a signal value. EXAMPLE Execute instructions starting at 0x40000000. grmon3> go 0x40000000 SEE ALSO Section 3.4.3, “Running applications” GRMON3-UM www.cobham.com/gaisler...
Page 134
40. gr1553b - syntax gr1553b - MIL-STD-1553B Interface commands SYNOPSIS gr1553b ?subcommand? ?args...? DESCRIPTION The gr1553b command is an alias for the mil> command. See help of command mil> for more information. GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 135
The first mask shows unlock-bits, the second enabled-bits and the third reset-bits. The other sub commands has no return value. EXAMPLE Enable all clock gates grmon3> grcg enable all Clock enable function 7 on the GRCLKGATE core with index 1. grmon3> grcg enable 7 grcg1 GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 136
?devname? Displays information about the GRPWM core grpwm wave ?devname? Displays the waveform table RETURN VALUE Command grpwm wave returns a list of wave data. The other grpwm commands have no return value. GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 137
Set limit length (actual number of bytes) grtmtx on grtmtx off Enable/disable the TM encoder grtmtx reg List register contents grtmtx conf List design options RETURN VALUE Command grtmtx has no return value. GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 138
Only the command 'gui status' has a return value. Upon successful completion gui status returns a tuple, where the first value represents the status (0 stopped, 1 started) and the second value is a reserved number. SEE ALSO Chapter 4, Graphical user interface Section 4.2, “Starting GRMON GUI” GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 139
RETURN VALUE Command help has no return value. EXAMPLE List all commands: grmon3> help Show detailed help of command 'mem': grmon3> help mem GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 141
Upon successful completion i2c read returns a list of values read. The i2c dvi showreg return a list of tuples, where the first element is the register address and the second element is the value. The other sub commands has no return value. GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 142
Command icache tag returns the tag value on read. The other icache commands have no return value. SEE ALSO Section 3.4.15, “CPU cache support” dcache GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 143
RETURN VALUE Upon successful completion iccfg will return the value of the instruction cache configuration register. SEE ALSO -nic and -ndc switches described in Section 6.3.1, “Switches” SEE ALSO Section 3.4.15, “CPU cache support” GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 144
Otherwise it has no return value. Upon successful completion info sys returns a list of all device names. For other info subcommands, see TCL documentation. GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 145
8, hwbp 2, itrace 256, V8 mul/div, srmmu, lddel 1, GRFPU stack pointer 0x07fffff0 icache 4 * 4 kB, 32 B/line lru dcache 4 * 4 kB, 32 B/line lru Show detailed information on status register of uart0. grmon3> info reg -v uart0::status Generic UART 0xff900004 UART Status register 0x00000086...
Page 147
{INST 266951 0x000021D4 0x91E80008 0x0000000D 0 0 0} {INST 266954 0x000019E4 0x82102000 0x00000000 0 0 0} SEE ALSO Section 3.4.9, “Using the trace buffer” GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 148
Create page table starting at base with all writable fields set to writeable and all valid fields set to valid. 1:1 map starting at physical address 0. iommu pagetable lookup base ioaddr Lookup specified IO address in page table starting at base. GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 149
Show info of the second core in a system with multiple cores grmon3> iommu 1 info Writes set address 0x23 with the 128-bit cache line 0x000000008F000000FFFFFFFF00000000 and tag 0x1 (valid line) grmon3> iommu cache write 0x23 0x0 0x8F000000 0xFFFFFFFF 0x0 0x1 GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 150
Display some of the core registers irq routing Decode controller routing (for IRQ(A)MP) irq tstamp Show time stamp registers (for IRQ(A)MP) irq wdog Decode Watchdog control register (for IRQ(A)MP) RETURN VALUE Command irq has no return value. GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 151
?index? ?value? Show all or a specific memory type range register. If value is present, then the specified register will be set. GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 152
Command l2cache status returns control and status register values. Upon successful completion l2cache dcb and l2cache tcb return check bits for data or tags. Command l2cache mtrr returns a list of values. SEE ALSO Section 3.4.15, “CPU cache support” GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 153
EXAMPLE Enable maximum time count, on counter 1, when no instruction cache misses has occurred. grmon3> l3stat set 1 0 icmiss grmon3> l3stat duration 1 1 0 Disable maximum time count on counter 1.
Page 154
EXAMPLE Enable maximum time count, on counter 1, when no instruction cache misses has occurred. grmon3> l4stat set 1 0 icmiss grmon3> l4stat duration 1 1 0 Disable maximum time count on counter 1.
Page 155
Sets/displays the match counter and the trigger condition (1 = trig on equal, 0 = trig on not equal) for the specified trig level. la view start stop ?filename? ?logan#? Prints the specified range of the trace buffer in list format. If no filename is specified the commands prints to the screen. GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 156
SEE ALSO Section 6.13, “On-chip logic analyzer driver” GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 157
58. leon - syntax NAME leon - Print leon specific registers SYNOPSIS leon DESCRIPTION leon Print leon specific registers GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 158
If the -wprot option is given then write protection on the core will be disabled RETURN VALUE Command load returns the entry point. EXAMPLE Load and then verify a hello_world application grmon3> load ../hello_world/hello_world grmon3> verify ../hello_world/hello_world GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 159
SEE ALSO Section 3.4.2, “Uploading application and data to target memory” GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 160
- Show or set reset value of the memory controller register 1 SYNOPSIS mcfg1 ?value? DESCRIPTION mcfg1 ?value? Set the reset value of the memory register. If value is left out, then the reset value will be printed. SEE ALSO Section 6.14, “Memory controllers ” GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 161
- Show or set reset value of the memory controller register 2 SYNOPSIS mcfg2 ?value? DESCRIPTION mcfg2 ?value? Set the reset value of the memory register. If value is left out, then the reset value will be printed. SEE ALSO Section 6.14, “Memory controllers ” GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 162
- Show or set reset value of the memory controller register 3 SYNOPSIS mcfg3 ?value? DESCRIPTION mcfg3 ?value? Set the reset value of the memory register. If value is left out, then the reset value will be printed. SEE ALSO Section 6.14, “Memory controllers ” GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 163
Show value of PHY address paddr and register raddr. If more than one device exists in the system, the greth# can be used to select device, default is dev0. The command tries to disable the EDCL duplex detection if enabled. SEE ALSO Section 6.4, “Ethernet controller” GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 164
Upon successful completion memb returns a list of the requested 8-bit words. Some options changes the result value, see options for more information. EXAMPLE Read 4 bytes from address 0x40000000: grmon3> memb 0x40000000 4 TCL returns: 64 0 0 0 SEE ALSO Section 3.4.7, “Displaying memory contents”...
Page 165
Upon successful completion memh returns a list of the requested 16-bit words. Some options changes the result value, see options for more information. EXAMPLE Read 4 words (8 bytes) from address 0x40000000: grmon3> memh 0x40000000 8 TCL returns: 16384 0 0 0 SEE ALSO Section 3.4.7, “Displaying memory contents”...
Page 166
Upon successful completion mem returns a list of the requested 32-bit words. Some options changes the result value, see options for more information. EXAMPLE Read 4 words from address 0x40000000: grmon3> mem 0x40000000 16 TCL returns: 1073741824 0 0 0 SEE ALSO Section 3.4.7, “Displaying memory contents”...
Page 167
Stop the core and store the state for resuming later. mil resume Resume operation with state stored earlier by the mil halt command. mil lbtest rt mil lbtest bc Runs RT- or BC-part of loopback test GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 169
0x00620000 0x00620fff -r-xr-x 1} {0x00621000 0x00621fff 0x00621000 0x00621fff crwx--- 1} ... SEE ALSO Section 3.4.14, “Memory Management Unit (MMU) support” GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 170
The nolog command be put in front of other GRMON commands to suppress the logging of the output. This can be useful to remove unnecessary output when scripting. EXAMPLE Suppress the memory print. grmon3>nolog mem 0x40000000 GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 171
If -reg is given the configured PCI bus is registered into GRMON device handling system similar to pci bus reg, see above. pci init Initializes the host controller as described above pci info Displays information about the host controller GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 172
Get/set number of extra cycles to sample after disarm. RETURN VALUE Upon successful completion most pci commands have no return value. The read commands return the read value. The write commands have no return value. GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 173
Command pci trace state returns a tuple of the address and a list of signals. EXAMPLE Initialize host controller and configure the PCI bus grmon3> pci init grmon3> pci conf Inspect a PCI bus that has already been setup grmon3> pci scan SEE ALSO Section 6.17, “PCI”...
Page 174
- Measure performance SYNOPSIS perf perf ?subcommand? ?args...? DESCRIPTION The performance command is only available when a DSU4 exists in the system. perf Display result perf ?disable? perf ?enable? Enable or disable the performance measure. GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 175
Set the default PHY address to address. If more than one device exists in the system, the greth# can be used to select device, default is greth0. EXAMPLE Set PHY address to 1 grmon3> phyaddr 1 SEE ALSO Section 6.4, “Ethernet controller” GRMON3-UM www.cobham.com/gaisler...
Page 176
Clear collected information on all CPUs or specified CPU. profile on Turn on profiling all CPUs or a single CPU. profile off Turn off profiling for all CPUs or a single CPU. SEE ALSO Section 3.4.10, “Profiling” GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 177
When using the command line version (cli) of GRMON, this command will be the same as 'exit 0'. In the GUI version it will close down a single console window. Use 'exit' to close down the entire application when using the GUI version of GRMON. EXAMPLE Exit the GRMON console. grmon3> quit GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 178
EXAMPLE Display the current window and special purpose registers grmon3> reg TCL returns: {0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} -213905184...
Page 179
Display the g0, l3 in window 2, f1, pc and w1. grmon3> reg g0 w2l3 f1 pc w1 TCL returns: 0 0 {0.0 0} 1073741824 {0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...
Page 180
DMA. It is in many cases crucial to disable DMA before loading a new binary image since DMA can overwrite the loaded image and destroy the loaded Operating System. EXAMPLE Reset drivers grmon3> reset GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 181
MyInit5 {} { proc ::fddr0::init {} { # Add custom initialization code here proc ::fddr1::init {} { # Add custom initialization code here lappend ::hooks::init5 MyInit5 SEE ALSO Section 3, “User defined hooks” GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 182
EXAMPLE Override the default initialization proc MyInit5 {} { proc ::serdes0::init {} { # Add custom initialization code here lappend ::hooks::init5 MyInit5 SEE ALSO Section 3, “User defined hooks” GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 183
PE, SIGILL, SIGINT, SIGSEGV, SIGTERM or SIGTRAP. If a CPU is disabled, then an empty string will be returned instead of a signal value. EXAMPLE Execute instructions starting at the entry point of the last loaded file. grmon3> run SEE ALSO Section 3.4.3, “Running applications” reset GRMON3-UM www.cobham.com/gaisler...
Page 184
Initialize the memory area from address start up to stop. scrub rst Clear status and reset configuration. EXAMPLE Write pattern 0 1 to the memory 0x0000000 to 0x0000003F grmon3> scrub pattern 0 1 grmon3> scrub init 0 63 Clear a memory area grmon3> scrub clear 0 63 GRMON3-UM www.cobham.com/gaisler...
Page 185
- Show or set reset value of SDRAM controller register 1 SYNOPSIS sdcfg1 ?value? DESCRIPTION sdcfg1 ?value? Set the reset value of the memory register. If value is left out, then the reset value will be printed. SEE ALSO Section 6.14, “Memory controllers ” GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 186
82. sddel - syntax sddel - Show or set the SDCLK delay SYNOPSIS sddel ?value? DESCRIPTION sddel ?value? Set the SDCLK delay value. SEE ALSO Section 6.14, “Memory controllers ” GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 187
::mddr#::init procedure using the init# hook. EXAMPLE Override the default initialization proc MyInit5 {} { proc ::mddr0::init {} { # Add custom initialization code here lappend ::hooks::init5 MyInit5 SEE ALSO Section 3, “User defined hooks” GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 188
::serdes#::init procedure using the init# hook. EXAMPLE Override the default initialization proc MyInit5 {} { proc ::serdes0::init {} { # Add custom initialization code here lappend ::hooks::init5 MyInit5 SEE ALSO Section 3, “User defined hooks” GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 189
[exec ...]. For more information see doc- umentation about the exec command (http://www.tcl.tk/man/tcl8.6/TclCmd/exec.htm). EXAMPLE List all files in the current working directory (Linux) grmon3> shell ls List all files in the current working directory (Windows) grmon3> shell dir GRMON3-UM www.cobham.com/gaisler...
Page 190
The silent command be put in front of other GRMON commands to suppress their output and it will not be logged. This can be useful to remove unnecessary output when scripting. EXAMPLE Suppress the memory print and print the TCL result instead. grmon3> puts [silent mem 0x40000000] SEE ALSO Section 2, “Variables” GRMON3-UM www.cobham.com/gaisler...
Page 191
Sets a custom memory device configuration. Issue spim flash show to see a list of the available parameters. GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 192
Example: Set slave select line 0 to low, all other lines high when selecting a device grmon3> spi flash ssval 0xfffffffe Note: This value is not used when communicating via the SPIMCTRL core, i.e. it is only valid for spi flash.
Page 193
Start/stop automated transfers. spi am extact Enable external activation of AM transfers spi am poll count Poll for count transfers SPI Flash commands: spi flash Prints a list of available commands GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 194
Example: Set slave select line 0 to low, all other lines high when selecting a device grmon3> spi flash ssval 0xfffffffe Note: This value is not used when communicating via the SPIMCTRL core, i.e. it is only valid for spi flash.
Page 195
1000 Poll queue 10 times grmon3> spi am poll 10 Set fields in Mode register grmon3> spi set ms cpha len 7 rev Unset fields in Mode register grmon3> spi unset ms cpha rev SEE ALSO Section 3.11.2, “SPI memory device”...
Page 196
Options -en, -hd, -pr, -sr and -pd can be used to unset the corresponding bits. If no destination port has been specified, the option flags will still unset the corresponding bits. RETURN VALUE Command spwrtr has no return value. SEE ALSO Section 6.19, “SpaceWire router” GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 197
Set the current active CPUs initial stack-pointer, or the CPU specified by cpu#. RETURN VALUE Upon successful completion stack returns a list of initial stack-pointer addresses, one per CPU. EXAMPLE Set current active CPUs initial stack-pointer to 0x4FFFFFF0 grmon3> stack 0x4FFFFFF0 SEE ALSO Section 6.3.1, “Switches” Section 3.4.12, “Multi-processor support” GRMON3-UM www.cobham.com/gaisler...
Page 198
That means that three instructions are executed by one single step command in this particular case. EXAMPLE Step 10 instructions grmon3> step 10 GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 199
Block until on-going CPU execution has been interrupted and then read the registers of CPU0 safely. grmon> stop; reg cpu0 Attempt to interrupt on-going CPU execution if started by another shell or GUI without blocking: grmon> stop -nowait GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 200
Show or set start address of framebuffer memory svga formats Show available display formats svga formatsdetailed Show detailed view of available display formats EXAMPLE Draw a 1024x768, 60Hz test image grmon3> svga draw test_screen 12 32 GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 201
Upon successful completion symbols list will return a list of all symbols and their attributes. Nothing will be returned when loading or clearing. Command symbols lookup will return the corresponding address or symbol. EXAMPLE Load the symbols in the file hello. grmon3> symbols hello GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 202
-all List all function symbols. grmon3> symbols list -func -local -global List all symbols that begins with the letter m grmon3> puts [lsearch -index {3} -subindices -all -inline [symbols list] m*] SEE ALSO Section 3.6, “Symbolic debug information” GRMON3-UM www.cobham.com/gaisler...
Page 203
The thread current command returns information about the current thread only, using the format described for the return value of the command thread info above. The other subcommands have no return value. EXAMPLE List all threads grmon3> thread info NAME TYPE PRIO TIME (h:m:s) ENTRY POINT * Int.
Page 204
?devname? This command will get the timers register. Optionally which device to get can be specified. Device names are listed in 'info sys'. EXAMPLE Execute instructions starting at 0x40000000. grmon3> timer 0x40000000 GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 205
Enable or disable AHB transfer tracing tmode proc ?boolean? ?cpu#? Enable or disable instruction tracing. Use cpu# to toggle a single CPU. EXAMPLE Disable AHB transfer tracing grmon3> tmode ahb disable SEE ALSO Section 3.4.9, “Using the trace buffer” GRMON3-UM www.cobham.com/gaisler...
Page 206
?devname? Displays contents of the I/O registers uhci reset ?devname? Performs a Host Controller Reset RETURN VALUE Upon successful completion, uhci have no return value. SEE ALSO Section 6.6, “USB Host Controller” GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 207
Evaluate command in user shell named myshell in the background and wait for it to finish. grmon3> usrsh eval -bg myshell {after 2000; expr 1+1} grmon3> while {[catch {usrsh result myshell}] && $errorCode == "EBUSY"} {puts "waiting"; after 1000} waiting waiting grmon3>...
Page 208
SEE ALSO Section 3.5, “Tcl integration” GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 209
Translate a virtual address. The command will use the MMU from the current active CPU and the cpu# can be used to select a different CPU. RETURN VALUE Command va returns the translated address. SEE ALSO Section 3.4.14, “Memory Management Unit (MMU) support” GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 210
The formats of the sublists are: MEM address read-value expected-value , READ address num-failed-addresses , UNKNOWN address EXAMPLE Load and then verify a hello_world application grmon3> load ../hello_world/hello_world grmon3> verify ../hello_world/hello_world SEE ALSO Section 3.4.2, “Uploading application and data to target memory”...
Page 211
Upon successful completion vmemb returns a list of the requested 8-bit words. Some options changes the result value, see options for more information. EXAMPLE Read 4 bytes from address 0x40000000: grmon3> vmemb 0x40000000 4 TCL returns: 64 0 0 0 SEE ALSO Section 3.4.7, “Displaying memory contents”...
Page 212
Upon successful completion vmemh returns a list of the requested 16-bit words. Some options changes the result value, see options for more information. EXAMPLE Read 4 words (8 bytes) from address 0x40000000: grmon3> vmemh 0x40000000 8 TCL returns: 16384 0 0 0 SEE ALSO Section 3.4.7, “Displaying memory contents”...
Page 213
Upon successful completion vmem returns a list of the requested 32-bit words. Some options changes the result value, see options for more information. EXAMPLE Read 4 words from address 0x40000000: grmon3> vmem 0x40000000 16 TCL returns: 1073741824 0 0 0 SEE ALSO Section 3.4.7, “Displaying memory contents”...
Page 214
Disable memory controller write protection during the write. RETURN VALUE vwmemb has no return value. EXAMPLE Write 0xAB to address 0x40000000 and 0xCD to 0x40000004: grmon3> vwmemb 0x40000000 0xAB 0xCD SEE ALSO Section 3.4.7, “Displaying memory contents” Section 3.4.14, “Memory Management Unit (MMU) support” GRMON3-UM www.cobham.com/gaisler...
Page 215
Disable memory controller write protection during the write. RETURN VALUE vwmemh has no return value. EXAMPLE Write 0xABCD to address 0x40000000 and 0x1234 to 0x40000004: grmon3> vwmemh 0x40000000 0xABCD 0x1234 SEE ALSO Section 3.4.7, “Displaying memory contents” Section 3.4.14, “Memory Management Unit (MMU) support” GRMON3-UM www.cobham.com/gaisler...
Page 216
RETURN VALUE vwmems has no return value. EXAMPLE Write "Hello World" to address 0x40000000-0x4000000C: grmon3> vwmems 0x40000000 "Hello World" SEE ALSO Section 3.4.7, “Displaying memory contents” Section 3.4.14, “Memory Management Unit (MMU) support” GRMON3-UM www.cobham.com/gaisler...
Page 217
Disable memory controller write protection during the write. RETURN VALUE vwmem has no return value. EXAMPLE Write 0xABCD1234 to address 0x40000000 and to 0x40000004: grmon3> vwmem 0x40000000 0xABCD1234 0xABCD1234 SEE ALSO Section 3.4.7, “Displaying memory contents” Section 3.4.14, “Memory Management Unit (MMU) support” GRMON3-UM www.cobham.com/gaisler...
Page 218
Translate a virtual address and print translation. The command will use the MMU from the current active CPU and the cpu# can be used to select a different CPU. RETURN VALUE Command walk returns the translated address. SEE ALSO Section 3.4.14, “Memory Management Unit (MMU) support” GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 219
If the -wprot option is given then write protection on the memory will be disabled EXAMPLE Clear all memories grmon3> wash Set a memory area to 1 grmon3> wash 0x40000000 0x40000FFF 1 SEE ALSO Section 3.10.1, “Using EDAC protected memory” GRMON3-UM www.cobham.com/gaisler...
Page 220
Set value of PHY address paddr and register raddr. If more than one device exists in the system, the greth# can be used to select device, default is greth0. The command tries to disable the EDCL duplex detection if enabled. SEE ALSO Section 6.4, “Ethernet controller” GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 221
Disable memory controller write protection during the write. RETURN VALUE wmemb has no return value. EXAMPLE Write 0xAB to address 0x40000000 and 0xBC to 0x40000001: grmon3> wmemb 0x40000000 0xAB 0xBC SEE ALSO Section 3.4.7, “Displaying memory contents” GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 222
Disable memory controller write protection during the write. RETURN VALUE wmemh has no return value. EXAMPLE Write 0xABCD to address 0x40000000 and 0x1234 to 0x40000002: grmon3> wmem 0x40000000 0xABCD 0x1234 SEE ALSO Section 3.4.7, “Displaying memory contents” GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 223
NOTE: Only JTAG debug links supports byte accesses. Other debug links will do a 32-bit read-modi- fy-write when writing unaligned data. RETURN VALUE wmems has no return value. EXAMPLE Write "Hello World" to address 0x40000000-0x4000000C: grmon3> wmems 0x40000000 "Hello World" SEE ALSO Section 3.4.7, “Displaying memory contents” GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 224
Disable memory controller write protection during the write. RETURN VALUE wmem has no return value. EXAMPLE Write 0xABCD1234 to address 0x40000000 and to 0x40000004: grmon3> wmem 0x40000000 0xABCD1234 0xABCD1234 SEE ALSO Section 3.4.7, “Displaying memory contents” GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
GRMON will automatically load the scripts in GRMON appdata folder. On Linux the appdata folder is located in ~/.grmon-3.0/ and on Windows it's typically located at C:\Users\%username%\AppDa- ta\Roaming\Cobham Gaisler\GRMON\3.0. In the folder there are two different sub folders where scripts may be found, <appdata>/scripts/sys and <appdata>/scripts/user. Scripts located in the sys- folder will be loaded into the system shell only, before the Plug and Play area is scanned, i.e.
Page 226
Below is an example of how the first MCTRL is named and how the APB register base address is found using Plug and Play information from the GRMON mctrl0 variable. The eleventh PCI device (a network card) is also listed using the unique name pdev10. grmon3> info sys mctrl0 mctrl0 Cobham Gaisler...
Page 227
The AMBA Plug and Play information is available for each AMBA device. If a device has an AHB Master (mst), AHB Slave (ahb) or APB slave (apb) interface, then the corresponding variables will be created. GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 228
::<fldname> Many devices exposes their registers, and register fields, as variables. When writing these variables, the registers on the target system will also be written. grmon3> info sys Replace with a register name Replace with a register field name GRMON3-UM www.cobham.com/gaisler...
Page 229
[TAB-COMPLETION] mctrl0::pnp::apb::irq mctrl0::pnp::apb::mask mctrl0::pnp::apb::start grmon3> puts [ format 0x%x $mctrl0::pnp::apb::start ] 0x80000000 3. User defined hooks GRMON supports user implemented hooks using Tcl procedures. Each hook is variable containing a list of pro- cedure names. GRMON will call all the procedures in the list.
Page 230
Slot index slot integer Function index func integer Offset into the device's configuration space integer Size in bits of the access (8, 16 or 32) size value integer The value to be written GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 231
The plug and play vendor identification number. variable device The plug and play device identification number. variable version_min variable version_min Minimum and maximum version of the core that this driver supports variable description A short description of the device GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 232
# Optional procedure that may be used to present parsed information when # 'info sys' is called. proc info devname { set str "Some extra information about $devname" append str "\nSome more information about $devname" return $str # Proc regaddr # Args devname: Device name, GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 233
[http://www.tcl.tk/man/tcl8.6/TclCmd/proc.htm] on the Tcl website for more in- formation. 6. Links More about Tcl, its syntax and other useful information can be found at: Tcl Website [http://www.tcl.tk] Tcl Commands [http://www.tcl.tk/man/tcl8.6/TclCmd/contents.htm] Tcl Tutorial [http://www.tcl.tk/man/tcl8.5/tutorial/tcltutorial.html] Tcler's Wiki [http://wiki.tcl.tk/] GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Assigned interrupt number <slave> • Parents: bus • Children: bus, bar, custom Attribute Description Core vendor identification number vendor Core device identification number device Version number version Assigned interrupt number <bar> • Parents: slave GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Page 235
</slave> <!-- General Purpose I/O port --> <slave vendor="0x1" device="0x1a" version="1"> <bar address="0x80000500" length="0x100"/> </slave> </bus> </slave> <!-- LEON3 Debug Support Unit --> <slave vendor="0x1" device="0x4" version="1"> <bar address="0x90000000" length="0x10000000"/> </slave> </bus> </grlib> </grxml> GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
README file which contains detailed installation instructions. However, ignore all instructions about installing haspvlib_<vendorID>.so and/or haspvlib_x86_64_<vendorID>.so. Administrator privileges are required on Windows. On Linux it is required that the runtime is installed as root user. GRMON download page [http://www.gaisler.com/index.php/downloads/debug-tools] GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
Use the export <name>=<value> command to set an environment variable. The paths in the variables PATH or LD_LIBRARY_PATH should be separated with a single colon (:). To append a path to PATH or LD_LIBRARY_PATH, add the path to the end of the variable. See example below. $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/my/path/to/appand GRMON3-UM www.cobham.com/gaisler June 2019, Version 3.1.0...
G.1. Compatibility notes for GRMON2 Default startup-behavior If GRMON3 is started without a debug link option on the command line, then the GRMON3 GUI connec- tion dialog will be opened. Furthermore, if no debug link option is given on the command line, then any other command line options are also ignored.
Page 239
Cobham convey a license under any patent rights, copyrights, trademark rights, or any other of the intellectual rights of Cobham or of third parties. All information is provided as is. There is no warranty that it is correct or suitable for any purpose, neither implicit nor explicit.
Need help?
Do you have a question about the GRMON3 and is the answer not in the manual?
Questions and answers