The Devil In The Detail

Important Notes that forgotten [mulyanto at gmail dot com]

Using DDD and GRMON

Posted by mulyanto on February 13, 2008

Open GRMON in a terminal (shell).

grmon-eval -nosram -uart /dev/ttyUSB0 -u -nb

GRMON LEON debug monitor v1.1.27b (evaluation version)

Copyright (C) 2004,2005 Gaisler Research – all rights reserved.
For latest updates, go to http://www.gaisler.com/
Comments or bug-reports to support@gaisler.com

This evaluation version will expire on 28/6/2008
using port /dev/ttyUSB0 @ 115200 baud

GRLIB build version: 2710

initialising ……….
detected frequency: 50 MHz

Component Vendor
LEON3 SPARC V8 Processor Gaisler Research
AHB Debug UART Gaisler Research
AHB Debug JTAG TAP Gaisler Research
LEON2 Memory Controller European Space Agency
AHB/APB Bridge Gaisler Research
LEON3 Debug Support Unit Gaisler Research
Generic APB UART Gaisler Research
Multi-processor Interrupt Ctrl Gaisler Research
Modular Timer Unit Gaisler Research
General purpose I/O port Gaisler Research

Use command ‘info sys’ to print a detailed report of attached cores

grlib> gdb

you will get a message:

gdb interface: using port 2222

On the other terminal (shell), run the DDD using the following command:

target extended-remote localhost:2222

The grmon shell will generate a message:

connected to port 2222

In the DDD, open program systes2.exe
On the DDD, gdb prompt, type “lo systest2.exe” , then run.

GNU DDD 3.3.11 (i386-suse-linux-gnu), by Dorothea Lütkehaus and Andreas Zeller.
Copyright © 1995-1999 Technische Universität Braunschweig, Germany.
Copyright © 1999-2001 Universität Passau, Germany.
Copyright © 2001 Universität des Saarlandes, Germany.
Copyright © 2001-2004 Free Software Foundation, Inc.
(gdb) file /home/mul/grlib-gpl-1.0.17-b2710/designs/leon3-altera-ep1s40/systest2.exe
(gdb) lo systest2.exe
You can’t do that when your target is `exec’
(gdb) target extended-remote localhost:2222
start () at ../../../../../newlib-1.13.0/libgloss/sparc_leon/locore_mvt.S:58
in ../../../../../newlib-1.13.0/libgloss/sparc_leon/locore_mvt.S
Current language: auto; currently asm
(gdb) lo systest2.exe
Loading section .text, size 0×10db0 lma 0×40000000
Loading section .data, size 0×7e14 lma 0×40011000
Start address 0×40000000, load size 101316
Transfer rate: 42659 bits/sec, 278 bytes/write.
(gdb) run

Starting test …
LEON3 V8 Processor
register file
multiplier
radix-2 divider
cache system
memory management unit
Interrupt Controller
Modular Timer unit
timer 0
timer 1
chain-mode
UART
sub-test

Tested ended

Program exited normally.
(gdb)

2 Responses to “Using DDD and GRMON”

  1. Ravi said

    What are the necessary steps needed to be taken care of before using grmon? As in, grmon is capable of detecting the IP cores on the board even before the bit file is downloaded on to it right? For some reason I’m not able to connect to the board. It keeps saying failed to connect. What can be the reasons?

  2. mulyanto said

    @Rafi
    It could be:
    1. Cable problem and interface problem
    2. Your design not synthesized properly

    First (to solve problem 2), find *.soft from LEON that match your board. Or you buy/use the board that supported by grlib. If you use board that supported by grlib, you don’t have to care about synthesize setting (*.qsf file) and leon setting. Probably, there are some *.sof file ready to use.

    Second, if your Leon still not connected. Maybe you get cable problem and interface problem. You can not use serial/parallel port in XP Windows (Cygwin), unless you open that ports first.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>