Skip to content

Commit 40e9959

Browse files
committed
docs: Cleaning up some old bad links/data
1 parent ebce052 commit 40e9959

4 files changed

Lines changed: 43 additions & 26 deletions

File tree

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
1+
---
2+
title: De0 Nano Tutorial
3+
layout: page
4+
---
5+
16
## DE0 Nano Tutorial
27

38
If you downloaded the tutorials as a release archive, you can directly
49
start. If you have cloned the git repository, you instead need to
510
follow the instructions for building the hardware and software as
611
described below. Please also follow the
7-
[common tutorial setup](../README.md).
12+
[common tutorial setup](../index.html).
813

914
To run the demo you need:
1015

docs/Debugging.md

Lines changed: 27 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,28 @@
11
---
2-
title: Debugging
2+
title: Debugging FPGAs with OpenOCD and GDB
33
layout: home
44
---
55

6-
## Debugging OpenRISC
6+
### Prerequisites
77

8-
The OpenRISC cpu, simulator and toolchain provide a full debugging
9-
environment with gdb and OpenOCD. At a low level this is provided with
10-
[adv_debug_sys](https://github.com/olofk/adv_debug_sys) which provides
11-
jtag interface for OpenOCD to talk to. Much can be done directly in OpenOCD. But
12-
for a full debug environments we recommend GDB. GDB communicates with OpenOCD as
13-
a remote target and provides a familiar debugging environment for programmers.
8+
#### Software
9+
10+
* `or1k-elf` toolchain with gdb [Releases](https://github.com/stffrdhrn/or1k-toolchain-build/releases)
11+
* OpenOCD
12+
* A running OpenRISC SoC using `adv_debug_sys`
13+
14+
## Debugging OpenRISC on FPGAs
15+
16+
The OpenRISC cpu and toolchain provide a full debugging environment when running
17+
on FPGAs using gdb and OpenOCD. At a low level this is provided with
18+
[adv_debug_sys](https://github.com/olofk/adv_debug_sys) which provides jtag
19+
interface for OpenOCD to talk to. Much can be done directly in OpenOCD. But for
20+
a full debug environments we recommend GDB. GDB communicates with OpenOCD as a
21+
remote target and provides a familiar debugging environment for programmers.
1422

1523
### OpenOCD Basics
1624

25+
OpenOCD is a brirdge for accessing hardware connected to a workstation via JTAG.
1726
OpenOCD requires a configuration file to start up. The configuration files
1827
specify the chips details (jtag tap) and the details of the interface we are
1928
using.
@@ -75,7 +84,7 @@ reg npc 0x100
7584
# Resume execution after a halt
7685
resume
7786
78-
# For loading a linux image you can do it all at one time.
87+
# For loading a linux image you can do it all at one time.
7988
# Notice here we also reset r3 which linux uses as a bootargs
8089
# vector.
8190
halt; load_image vmlinux; reg r3 0; reg npc 0x100; resume
@@ -114,7 +123,12 @@ exit
114123

115124
### GDB Basics
116125

117-
When we run GDB we do remote debugging
126+
[GDB](https://sourceware.org/gdb/) is a very popular debugger that allows
127+
inspecting programs running on a cpu (target).
128+
129+
When we debug OpenRISC cpus running on FPGAs GDB connects to the remote OpenRISC
130+
target via the debug tcp port provided by OpenOCD. Once OpenOCD is running we
131+
can start GDB as follows:
118132

119133
```
120134
# Starting up gdb (with a remote target)
@@ -264,6 +278,6 @@ These commands and further reading should get you started.
264278

265279
### Further Reading
266280

267-
* http://openocd.org/doc/html/ - OpenOCD User Guide
268-
* http://www.fpga4fun.com/JTAG2.html - How JTAG works
269-
* https://sourceware.org/gdb/onlinedocs/gdb/ - Debugging with GDB
281+
* [OpenOCD Docs](http://openocd.org/doc/html/) - OpenOCD User Guide
282+
* [JTAG](http://www.fpga4fun.com/JTAG2.html) - How JTAG works
283+
* [GDD Docs](https://sourceware.org/gdb/onlinedocs/gdb/) - Debugging with GDB

docs/Linux.md

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,29 +9,27 @@ layout: home
99

1010
#### Software
1111

12-
* Linux source code with OpenRISC patches
13-
* or1k-elf toolchain
12+
* Linux source code
13+
* `or1k-elf` or `or1k-linux` toolchain [Releases](https://github.com/stffrdhrn/or1k-toolchain-build/releases)
1414
* or1ksim (optional)
15-
* or1k-linux toolchain (optional)
16-
17-
#### Files
18-
* Device tree file (*.dts, optional)
19-
* Default Linux configuration (*_defconfig, optional)
2015

2116
### Setting up
2217

2318
OpenRISC is officially supported in the Linux kernel since 2011 and can be downloaded from https://www.kernel.org.
24-
We do however recommend that you use the kernel from https://github.com/openrisc/linux/ as it contains some convenient
25-
features such as a built-in initramfs and extra board configurations for OpenRISC not found in the upstream kernel.
2619

2720
#### Get Linux source code
28-
git clone https://github.com/openrisc/linux
21+
22+
```
23+
git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
24+
```
2925

3026
#### Set up Linux source code
3127

28+
```
3229
cd linux
3330
export ARCH=openrisc
3431
export CROSS_COMPILE=or1k-elf-
32+
```
3533

3634
The device tree file (.dts) is used to specify hardware configuration settings, such as base addresses and interrupt numbers
3735
for peripherals, memory sizes, the numbers of CPUs in the system and other things. If no custom device tree is used, a default one
@@ -77,5 +75,5 @@ halt; load_image vmlinux; reg r3 0; reg npc 0x100; resume
7775
The kernel image is now available as an elf file called `vmlinux`. This file can be used as any other bare-metal program for OpenRISC. To test the Linux image, you can:
7876
* Run it in the reference C simulator (or1ksim)
7977
* Run it on a simulated RTL model (Most likely extremely slow, unless using verilator)
80-
* [Load it to RAM on an FPGA board with a debugger](Debugging.md)
78+
* [Load it to RAM on an FPGA board with a debugger](Debugging.html)
8179
* Program it to non-volatile flash on an FPGA board

index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jtag interface for OpenOCD to talk to. Much debugging can be done
6565
directly in OpenOCD. GDB communicates with OpenOCD to provide a familiar
6666
debugging environment for programmers. For more details see:
6767

68-
* [Debugging OpenRISC](docs/Debugging.md)
68+
* [Debugging OpenRISCi FPGAs with OpenOCD](docs/Debugging.html)
6969

7070
## Tools (partially required)
7171

0 commit comments

Comments
 (0)