Skip to content

Commit 78a5974

Browse files
committed
or1ksim: fixup docs to be more correct
1 parent 4911ab8 commit 78a5974

2 files changed

Lines changed: 26 additions & 9 deletions

File tree

docs/linux-on-or1ksim.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ nav_order: 2
1818
We will download these below.
1919

2020
- [or1ksim.cfg](https://github.com/stffrdhrn/or1k-utils/raw/refs/heads/master/or1ksim.cfg) - config needed for or1ksim
21-
- [or1ksim-2025-04-27.tar.gz](https://github.com/openrisc/or1ksim/releases/download/2025-04-27/or1ksim-2025-04-27.tar.gz) - The OpenRISC simulator source code
21+
- [or1ksim-2025-04-27.tar.gz](https://github.com/openrisc/or1ksim/releases/download/2025-04-27/or1ksim-2025-04-27.tar.gz) - The OpenRISC simulator
2222
- [or1k-none-linux-musl-15.1.0-20250621.tar.xz](https://github.com/stffrdhrn/or1k-toolchain-build/releases/download/or1k-15.1.0-20250621/or1k-none-linux-musl-15.1.0-20250621.tar.xz) - OpenRISC musl linux userspace toolchain
2323
- [linux-6.15.5.tar.xz](https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.15.5.tar.xz) - Linux kernel source code
2424
- [busybox-small-rootfs-20250708.tar.xz](https://github.com/stffrdhrn/or1k-rootfs-build/releases/download/or1k-20250708/busybox-small-rootfs-20250708.tar.xz) - Linux rootfs for userspace programs

or1ksim/index.md

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,25 @@ nav_order: 2
1010
#### System
1111

1212
- An x86 Linux workstation
13-
- The `curl` and `telnet` command line utilities
13+
- The `curl` command line utility
1414

1515
#### Files
1616

1717
We will download these below.
1818

1919
- [or1ksim.cfg](or1ksim.cfg) - config needed for or1ksim
20-
- [or1ksim-2025-04-27.tar.gz](https://github.com/openrisc/or1ksim/releases/download/2025-04-27/or1ksim-2025-04-27.tar.gz) - The OpenRISC simulator source code
21-
- [timer.c](./sw/timer/timer.c) - timer program
20+
- [hello.c](../sw/hello/hello.c) - hello world program
21+
- [timer.c](../sw/timer/timer.c) - timer program
22+
- [or1ksim-2025-04-27.tar.gz](https://github.com/openrisc/or1ksim/releases/download/2025-04-27/or1ksim-2025-04-27.tar.gz) - The OpenRISC simulator
2223

2324
# or1ksim Tutorial
2425

2526
The or1ksim program is the OpenRISC [instruction set simulator](https://en.wikipedia.org/wiki/Instruction_set_simulator) which
26-
provides accurate tracing. A simulator is a fast way to debug and ensure
27+
provides accurate tracing of OpenRISC programs. A simulator is a fast way to debug and ensure
2728
your software works before deploying it to real hardware.
2829

29-
In this tutorial we will cover getting and building or1ksim, and building simple
30-
programs to run on or1ksim.
30+
In this tutorial we will cover getting or1ksim, and building simple programs to
31+
run on or1ksim.
3132

3233
We break this tutorial down into parts:
3334

@@ -42,7 +43,7 @@ To get started we will create a temporary directly and setup our environment, if
4243
you plan to do a lot of OpenRISC development consider adding these tools to your
4344
`PATH` permanently.
4445

45-
To get everything you need run:
46+
To get everything run:
4647

4748
```bash
4849
mkdir /tmp/or1ksim/
@@ -79,6 +80,22 @@ or1k-elf-gcc -g -Og $CFLAGS -o hello.elf hello.c
7980
or1k-elf-gcc -g -Og $CFLAGS -o timer.elf timer.c
8081
```
8182

83+
The `-mboard=` option tells the toolchain to link in our board settings, you can see
84+
the available boards by looking in the toolchain native lib directory:
85+
86+
```
87+
/tmp/or1ksim $ ls -l or1k-elf/or1k-elf/lib/libboard-*
88+
-rw-r--r--. 1 shorne shorne 1178 Jun 21 07:04 or1k-elf/or1k-elf/lib/libboard-atlys.a
89+
-rw-r--r--. 1 shorne shorne 1178 Jun 21 07:04 or1k-elf/or1k-elf/lib/libboard-de0_nano.a
90+
-rw-r--r--. 1 shorne shorne 1178 Jun 21 07:04 or1k-elf/or1k-elf/lib/libboard-ml501.a
91+
-rw-r--r--. 1 shorne shorne 1482 Jun 21 07:04 or1k-elf/or1k-elf/lib/libboard-optimsoc.a
92+
-rw-r--r--. 1 shorne shorne 1178 Jun 21 07:04 or1k-elf/or1k-elf/lib/libboard-or1ksim.a
93+
-rw-r--r--. 1 shorne shorne 1178 Jun 21 07:04 or1k-elf/or1k-elf/lib/libboard-or1ksim-uart.a
94+
-rw-r--r--. 1 shorne shorne 1178 Jun 21 07:04 or1k-elf/or1k-elf/lib/libboard-ordb1a3pe1500.a
95+
-rw-r--r--. 1 shorne shorne 1178 Jun 21 07:04 or1k-elf/or1k-elf/lib/libboard-ordb2a.a
96+
-rw-r--r--. 1 shorne shorne 1258 Jun 21 07:04 or1k-elf/or1k-elf/lib/libboard-orpsocrefdesign.a
97+
```
98+
8299
## Running Programs
83100

84101
To run the demo you need `or1k-elf-sim` in your `PATH`, check with:
@@ -176,4 +193,4 @@ Also checkout our tutorial on how to run [Linux on or1ksim](../docs/linux-on-or1
176193
## Further Reading
177194

178195
- [openrisc/or1ksim](https://github.com/openrisc/or1ksim) - The home page and git repo
179-
- [Releases](https://github.com/openrisc/or1ksim/releases) - Nightly build and point release
196+
- [or1ksim Releases](https://github.com/openrisc/or1ksim/releases) - Nightly build and point release

0 commit comments

Comments
 (0)