GRMON3 User's Manual
Total Page:16
File Type:pdf, Size:1020Kb
Hardware monitor and debugger for LEON, NOEL-V and GRLIB SoC Systems GRMON3 GRMON3 User's Manual Document: GRMON3-UM Cobham Gaisler AB June 2021, Version 3.2.13 Kungsgatan 12 | SE-41119 Gothenburg | Sweden +46 31 7758650 | www.cobhamaes.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. NOEL-V Support ........................................................................................................ 6 1.6.1. Limitations ....................................................................................................... 6 1.7. GRMON Evaluation version .......................................................................................... 6 1.8. 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 2.4. Hardware reset ............................................................................................................ 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 ....................................................................................... 10 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 .................................................. 15 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 ................................................................................. 17 3.4.7. Displaying memory contents ............................................................................. 17 3.4.8. Instruction disassembly ..................................................................................... 18 3.4.9. Using the trace buffer ...................................................................................... 19 3.4.10. Profiling ....................................................................................................... 20 3.4.11. Attaching to a target system without initialization ................................................ 21 3.4.12. Attaching to a target system without Plug and Play scanning .................................. 21 3.4.13. Multi-processor support .................................................................................. 21 3.4.14. Stack and entry point ..................................................................................... 22 3.4.15. Memory Management Unit (MMU) support ....................................................... 22 3.4.16. CPU cache support ........................................................................................ 22 3.5. Tcl integration ........................................................................................................... 23 3.5.1. Shells ............................................................................................................ 23 3.5.2. Commands ..................................................................................................... 23 3.5.3. API ............................................................................................................... 24 3.6. Symbolic debug information ........................................................................................ 24 3.6.1. Multi-processor symbolic debug information ........................................................ 24 3.7. GDB interface ........................................................................................................... 25 3.7.1. Connecting GDB to GRMON ............................................................................ 25 3.7.2. Executing GRMON commands from GDB ........................................................... 25 3.7.3. Running applications from GDB ........................................................................ 26 3.7.4. Running SMP applications from GDB ................................................................. 26 3.7.5. Running AMP applications from GDB ................................................................ 27 3.7.6. GDB Thread support ........................................................................................ 28 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 Document: GRMON3-UM Cobham Gaisler AB June 2021, Version 3.2.13 2 Kungsgatan 12 | SE-41119 Gothenburg | Sweden +46 31 7758650 | www.cobhamaes.com/gaisler 3.8. Thread support .......................................................................................................... 32 3.8.1. GRMON thread options .................................................................................... 32 3.8.2. GRMON thread commands ............................................................................... 32 3.9. Forwarding application console I/O ............................................................................... 33 3.10. EDAC protection ..................................................................................................... 34 3.10.1. Using EDAC protected memory ....................................................................... 34 3.10.2. LEON3-FT error injection ............................................................................... 34 3.11. FLASH programming ............................................................................................... 35 3.11.1. CFI compatible Flash PROM ........................................................................... 35 3.11.2. SPI memory device ........................................................................................ 36 3.12. Automated operation ................................................................................................. 37 3.12.1. Tcl commanding during CPU execution ............................................................. 37 3.12.2. Communication channel between target and monitor ............................................ 37 3.12.3. Test suite driver ............................................................................................ 37 4. Graphical user interface ......................................................................................................... 39 4.1. Overview .................................................................................................................. 39 4.2. Starting GRMON GUI ................................................................................................ 39 4.3. Connect to target ......................................................................................................