-
Notifications
You must be signed in to change notification settings - Fork 18
/
Quickstart.txt
160 lines (136 loc) · 6.14 KB
/
Quickstart.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
#############################################
1. Program FPGA with bitfile
:~/airisc_core_complex/fpga$ make program-fpga
FPGA board needs to be connected to JTAG and powered
vivado -mode batch -source prog_fpga.tcl -tclargs ARTY_A7_AIRI5C_FPGA
****** Vivado v2019.2.1 (64-bit)
**** SW Build 2729669 on Thu Dec 5 04:48:12 MST 2019
**** IP Build 2729494 on Thu Dec 5 07:38:25 MST 2019
** Copyright 1986-2019 Xilinx, Inc. All Rights Reserved.
source prog_fpga.tcl
# if { $argc != 1 } {
# puts "The script requires one input. PROJ_NAME"
# } else {
# set PROJ_NAME [lindex $argv 0]
# }
# open_project $PROJ_NAME/$PROJ_NAME.xpr
Scanning sources...
Finished scanning sources
INFO: [IP_Flow 19-234] Refreshing IP repositories
INFO: [IP_Flow 19-1704] No user IP repositories specified
INFO: [IP_Flow 19-2313] Loaded Vivado IP repository '/opt/Vivado/Vivado/2019.2/data/ip'.
# open_hw_manager
# connect_hw_server
INFO: [Labtools 27-2285] Connecting to hw_server url TCP:localhost:3121
INFO: [Labtools 27-2222] Launching hw_server...
INFO: [Labtools 27-2221] Launch Output:
****** Xilinx hw_server v2019.2.1
**** Build date : Dec 5 2019 at 05:22:19
** Copyright 1986-2019 Xilinx, Inc. All Rights Reserved.
INFO: [Labtools 27-3415] Connecting to cs_server url TCP:localhost:3042
INFO: [Labtools 27-3417] Launching cs_server...
INFO: [Labtools 27-2221] Launch Output:
****** Xilinx cs_server v2019.2.0
**** Build date : Nov 07 2019-06:41:48
** Copyright 2017-2019 Xilinx, Inc. All Rights Reserved.
# open_hw_target {localhost:3121/xilinx_tcf/Digilent/210319B0C184A}
INFO: [Labtoolstcl 44-466] Opening hw_target localhost:3121/xilinx_tcf/Digilent/210319B0C184A
# set_property PROGRAM.FILE {./sdcard/FPGA_Top.bit} [get_hw_devices xc7a35t_0]
# current_hw_device [get_hw_devices xc7a35t_0]
# refresh_hw_device -update_hw_probes false [lindex [get_hw_devices xc7a35t_0] 0]
INFO: [Labtools 27-1434] Device xc7a35t (JTAG device index = 0) is programmed with a design that has no supported debug core(s) in it.
# set_property PROBES.FILE {} [get_hw_devices xc7a35t_0]
# set_property FULL_PROBES.FILE {} [get_hw_devices xc7a35t_0]
# program_hw_devices [get_hw_devices xc7a35t_0]
INFO: [Labtools 27-3164] End of startup status: HIGH
# refresh_hw_device [lindex [get_hw_devices xc7a35t_0] 0]
INFO: [Labtools 27-1434] Device xc7a35t (JTAG device index = 0) is programmed with a design that has no supported debug core(s) in it.
# close_project
# exit
INFO: [Common 17-206] Exiting Vivado at Thu Jul 29 12:36:32 2021...
#############################################
2. Start openocd and connect to Nexys Video JTAG
:~/airisc_core_complex/$ openocd -f sw/tools/gdb/airisc_usb.cfg
Open On-Chip Debugger 0.10.0+dev-01259-gfb477376d (2020-10-13-09:29)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport "jtag". To override use 'transport select <transport>'.
airi5c.tap
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : clock speed 1000 kHz
Info : JTAG tap: airi5c.tap tap/device found: 0x10001001 (mfg: 0x000 (<invalid>), part: 0x0001, ver: 0x1)
Info : datacount=1 progbufsize=2
Info : Examined RISC-V core; found 1 harts
Info : hart 0: XLEN=32, misa=0x40101120
Info : starting gdb server for airi5ctarget on 3333
Info : Listening on port 3333 for gdb connections
#############################################
3. Start GDB Session
:~/airisc_core_complex/sw/tools$ ./start-gdb.sh
GNU gdb (GDB) 9.1
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "--host=x86_64-pc-linux-gnu --target=riscv32-unknown-elf".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
Es wird angenommen, dass die Ziel-Architektur riscv:rv32 ist
Warnung: No executable has been specified and target does not support
determining executable automatically. Try using the "file" command.
0x80000000 in ?? ()
JTAG tap: riscv.cpu tap/device found: 0x10001001 (mfg: 0x000 (<invalid>), part: 0x0001, ver: 0x1)
Toogle LEDs
Done.
Load Hello_World.elf
Loading section .init, size 0x234 lma 0x80000000
Loading section .text, size 0x76fc lma 0x80000234
Loading section .rodata, size 0x740 lma 0x80007930
Loading section .srodata.gpio1, size 0x4 lma 0x80008070
Loading section .srodata.uart1, size 0x4 lma 0x80008074
Loading section .srodata.cst4, size 0x4 lma 0x80008078
Loading section .srodata._global_impure_ptr, size 0x4 lma 0x8000807c
Loading section .srodata.cst8, size 0x50 lma 0x80008080
Loading section .data, size 0x1cc lma 0x800080d0
Loading section .sdata._impure_ptr, size 0x4 lma 0x8000829c
Start address 0x80000000, load size 33440
Transfer rate: 58 KB/sec, 3040 bytes/write.
Done. Connect to UART 9600 8N1
(gdb)
#############################################
4. Display UART output with picocom
:~/airisc_core_complex$ picocom -b 9600 /dev/ttyUSB2
picocom v3.2a
port is : /dev/UART-NexysVideo
flowcontrol : none
baudrate is : 115200
parity is : none
databits are : 8
stopbits are : 1
escape is : C-a
local echo is : no
noinit is : no
noreset is : yes
hangup is : no
nolock is : yes
send_cmd is : sz -vv
receive_cmd is : rz -vv -E
imap is :
omap is :
emap is : crcrlf,delbs,
logfile is : none
initstring : none
exit_after is : not set
exit is : no
Type [C-a] [C-h] to see available commands
Terminal ready
Hello World AIRISC!
Program executed in 666527 clock cycles (0.020829 s at 32 MHz)