1/1

|
Problem using gdb and or1ksim
by Unknown on Feb 7, 2005 |
Not available! | ||
|
Hi All,
I've been trying to do some debug of the 'hello-uart' program running on both or1ksim and our fpga implementation. Unfortunately I seem to get intermittent results when trying to debug. Can someone give me a hand to sort this out.
The bottom line is that I seem to be able to run a program successfully from a reset but when I connect with the debugger I seem to get strange results. Here is what I'm doing for the simulator situation...
1. Downloaded the 'hello-uart' sources and compiled.
- They compiled with my version of the or32-uclinux tools without issue.
2. Start up the or1ksim simulator with the distributed 'sim.cfg' file. By running:
or32-uclinux-sim -f sim.cfg --srv 9999
- Got some warnings about 'depenstats' and the 'keyboard' having problems but seemed to be running.
3. In another terminal, started up the debugger by running:
or32-uclinux-gdb
4. In the debugger:
(gdb) file hello.or32
(gdb) target jtag jtag://localhost:9999
(gdb) load
(gdb) set $PC=_reset
(gdb) break main
(gdb) run
At this stage the program appears to run but the breakpoint never gets hit and the simulator appears to have gone to the bus error handler because of a 'write out of memory' error. Breaking back into the program from the debugger confirms that the program is in the bus error handler.
If anyone can help with this I'd be greatful.
Regards,
Simon
|
|||
|
Problem using gdb and or1ksim
by Unknown on Feb 7, 2005 |
Not available! | ||
|
4. In the debugger:
(gdb) file hello.or32
(gdb) target jtag jtag://localhost:9999
(gdb) load
(gdb) set $PC=_reset
(gdb) break main
(gdb) run
^^^ This is the problem. Run sets the pc to some value (I don't know what) and then executes the program. The c (continue) command should prevent gdb from setting the pc before it executes the program. nog. |
|||
|
Problem using gdb and or1ksim
by Unknown on Feb 8, 2005 |
Not available! | ||
|
Double check your memory size,specially if you followed the tutorial.
The tutorial specifies a different memory size as an example, (than
the one which should be there) and if you were in a hurry have
declared a smaller memory then required.
regards,
Farhan
----- Original Message -----
From: Simon Takitaqxubv3h02@s...>
To:
Date: Mon Feb 7 07:37:18 CET 2005
Subject: [openrisc] Problem using gdb and or1ksim
Hi All,
I've been trying to do some debug of the 'hello-uart' program
running on both or1ksim and our fpga implementation. Unfortunately
I seem to get intermittent results when trying to debug. Can
someone give me a hand to sort this out.
The bottom line is that I seem to be able to run a program
successfully from a reset but when I connect with the debugger I
seem to get strange results. Here is what I'm doing for the
simulator situation...
1. Downloaded the 'hello-uart' sources and compiled.
- They compiled with my version of the or32-uclinux tools without
issue.
2. Start up the or1ksim simulator with the distributed 'sim.cfg'
file. By running:
or32-uclinux-sim -f sim.cfg --srv 9999
- Got some warnings about 'depenstats' and the 'keyboard' having
problems but seemed to be running.
3. In another terminal, started up the debugger by running:
or32-uclinux-gdb
4. In the debugger:
(gdb) file hello.or32
(gdb) target jtag jtag://localhost:9999
(gdb) load
(gdb) set $PC=_reset
(gdb) break main
(gdb) run
At this stage the program appears to run but the breakpoint never
gets hit and the simulator appears to have gone to the bus error
handler because of a 'write out of memory' error. Breaking back
into the program from the debugger confirms that the program is in
the bus error handler.
If anyone can help with this I'd be greatful.
Regards,
Simon
|
|||
1/1

