GRMON3-UM
June 2019, Version 3.1.0
2 www.cobham.com/gaisler
Table of Contents
1. Introduction ............................................................................................................................. 5
1.1. Overview ...................................................................................................................... 5
1.2. Supported platforms and system requirements ..................................................................... 5
1.3. Obtaining GRMON ........................................................................................................ 5
1.4. Installation .................................................................................................................... 5
1.5. License ......................................................................................................................... 6
1.6. GRMON Evaluation version ............................................................................................ 6
1.7. Problem reports .............................................................................................................. 6
2. Debugging concept ................................................................................................................... 7
2.1. Overview ...................................................................................................................... 7
2.2. Target initialization ......................................................................................................... 7
2.2.1. LEON2 target initialization .................................................................................... 9
2.2.2. Configuration file target initialization ...................................................................... 9
2.3. Memory register reset values ............................................................................................ 9
3. Operation ............................................................................................................................... 10
3.1. Overview .................................................................................................................... 10
3.2. Starting GRMON ......................................................................................................... 10
3.2.1. Debug link options ............................................................................................. 10
3.2.2. Debug driver options .......................................................................................... 11
3.2.3. General options .................................................................................................. 11
3.3. GRMON command-line interface (CLI) ............................................................................ 12
3.4. Common debug operations ............................................................................................. 13
3.4.1. Examining the hardware configuration ................................................................... 13
3.4.2. Uploading application and data to target memory ..................................................... 14
3.4.3. Running applications .......................................................................................... 15
3.4.4. Inserting breakpoints and watchpoints .................................................................... 16
3.4.5. Displaying processor registers .............................................................................. 16
3.4.6. Backtracing function calls .................................................................................... 16
3.4.7. Displaying memory contents ................................................................................ 17
3.4.8. Instruction disassembly ....................................................................................... 18
3.4.9. Using the trace buffer ......................................................................................... 18
3.4.10. Profiling .......................................................................................................... 20
3.4.11. Attaching to a target system without initialization ................................................... 20
3.4.12. Multi-processor support ..................................................................................... 21
3.4.13. Stack and entry point ........................................................................................ 21
3.4.14. Memory Management Unit (MMU) support .......................................................... 21
3.4.15. CPU cache support ........................................................................................... 22
3.5. Tcl integration .............................................................................................................. 22
3.5.1. Shells ............................................................................................................... 22
3.5.2. Commands ........................................................................................................ 22
3.5.3. API .................................................................................................................. 23
3.6. Symbolic debug information ........................................................................................... 23
3.6.1. Multi-processor symbolic debug information ........................................................... 24
3.7. GDB interface .............................................................................................................. 24
3.7.1. Connecting GDB to GRMON ............................................................................... 24
3.7.2. Executing GRMON commands from GDB ............................................................. 25
3.7.3. Running applications from GDB ........................................................................... 25
3.7.4. Running SMP applications from GDB ................................................................... 26
3.7.5. Running AMP applications from GDB ................................................................... 26
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