OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [hello-uart/] [README.txt] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1223 dries
                README hello-uart
2
 
3
This directory originates from the hello-uart[1].tar.gz that was attached to the
4
openrisc-forum message 2003/06/00075(http://www.opencores.org/forums/openrisc/2003/06/00075)
5
The reason why I put it on the openrisc repository is because I'm experiencing troubles
6
downloading the attachment. Also because in the past this program was a very
7
good starting point for me to start programming the openrisc.
8
 
9
ORIGINAL MESSAGE:
10
 
11
From: "Damjan Lampret" 
12
Date: Sat, 14 Jun 2003 22:40:58 -0700
13
Subject: Re: [openrisc] setting the stall bit using GDB
14
 
15
Michael,
16
 
17
try the following, source files attached (it should run on or1ksim or on
18
your board assuming your SoC on the board uses addresses in board.h, change
19
board.h as needed):
20
 
21
First build the demo (see attached tgz). If you have all the tools installed
22
you can build it using:
23
 
24
 
25
make clean all
26
 
27
 
28
File hello.or32 should be built. Now start jp1-xilinx utility:
29
 
30
./jp1-xilinx 9999
31
 
32
 
33
Instead of 9999, any other port address may be used. Then start GDB with our
34
example:
35
 
36
or32-rtems-gdb hello.or32
37
 
38
 
39
Then load the hello.or32 file onto the board, using gdb:
40
 
41
(gdb) target jtag jtag://localhost:9999
42
(gdb) load
43
 
44
 
45
Now program is loaded and we can start it. Before doing that we must connect
46
serial port cable to our board, start serial port program (e.g. minicom) and
47
set baud rates (default 9600 8N1 in board.h). OR1k has reset vector located
48
at 0x100. We will simulate reset using:
49
(gdb) set $pc=0x100
50
(gdb) continue
51
 
52
 
53
 
54
Hello World!!! should be printed on terminal. Instead of just continue
55
command under gdb we can experiment more with next, step, nexti, stepi,
56
break and others like print:
57
 
58
(gdb) set $pc = 0x100
59
(gdb) break uart_putc
60
(gdb) c
61
(gdb) next
62
(gdb) print c
63
 
64
 
65
Instead of using command line debugging with gdb we can also use Data
66
Display Debugger. Start it with:
67
 
68
ddd --debugger or32-uclinux-gdb hello.or32 &
69
 
70
 
71
Same commands as above can be entered in console below. After program is
72
loaded with:
73
 
74
(gdb) target jtag jtag://localhost:9999
75
(gdb) load
76
(gdb) set $pc=0x100
77
 
78
 
79
We can set breakpoint with mouse clicks and step using step/next buttons.
80
Program can be run with continue button. We can set watchpoints, observe
81
data in Data Display Window or simply by moving mouse over the variable.
82
 
83
 
84
You can play a bit with hello.c file, e. g. by changing case of entered
85
characters.
86
 
87
regards,
88
Damjan
89
 
90
----- Original Message -----
91
From: 
92
To: 
93
Sent: Tuesday, June 10, 2003 2:45 PM
94
Subject: [openrisc] setting the stall bit using GDB
95
 
96
 
97
> Can someone spare a minute to give a pointer for using GDB?  My setup
98
> includes the OR32 processor running on a Xilinx XCV1000, with some
99
> SRAM and a UART attached to it. The Debug unit is compiled into the
100
> core, and I am using a linux box as the host for GDB.  We are using the
101
> XIlinx Parallel-III JTAG cable, and it's attached to the TDI, TDO, TMS,
102
> and TCK lines.
103
>
104
> So my question is, what GDB command do I use to send the stall/un-
105
> stall commend to the TAP?
106
>
107
> Thanks,
108
> Michael McAllister
109
>
110
>
111
 
112
hello-uart[1].tar.gz

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.