Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

quickstart: add riscv64-noelv-fpga target #205

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions index.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ The ARINC653 execution environment (APEX) is under development.
8. [Running system on `ia32-generic-qemu`](quickstart/ia32-generic-qemu.md)
9. [Running system on `riscv64-generic-qemu`](quickstart/riscv64-generic-qemu.md)
10. [Running system on `riscv64-generic-spike`](quickstart/riscv64-generic-spike.md)
11. [Running system on `sparcv8leon3-gr716-mini`](quickstart/sparcv8leon3-gr716-mini.md)
12. [Running system on `sparcv8leon3-gr712rc-board`](quickstart/sparcv8leon3-gr712rc-board)
11. [Running system on riscv64-noelv-fpga](quickstart/riscv64-noelv-fpga.md)
12. [Running system on `sparcv8leon3-gr716-mini`](quickstart/sparcv8leon3-gr716-mini.md)
13. [Running system on `sparcv8leon3-gr712rc-board`](quickstart/sparcv8leon3-gr712rc-board)
5. [Loader](loader/index.md)
1. [Architecture](loader/architecture.md)
2. [Command-line interface](loader/cli.md)
Expand Down
Binary file added quickstart/_images/ArtyA7_Board.bmp
Binary file not shown.
Binary file added quickstart/_images/GRmon_Entry.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added quickstart/_images/GRmon_Phoenix.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added quickstart/_images/GRmon_SBI.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added quickstart/_images/GRmon_bad_connect.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added quickstart/_images/GRmon_run_termin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added quickstart/_images/GRmon_start.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added quickstart/_images/noelv-ls.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added quickstart/_images/noelv-start.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 5 additions & 3 deletions quickstart/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ and building artifacts are available in the `_boot` directory. The building proc
8. [Running system on ia32-generic-qemu](ia32-generic-qemu.md)
9. [Running system on riscv64-generic-qemu](riscv64-generic-qemu.md)
10. [Running system on riscv64-generic-spike](riscv64-generic-spike.md)
11. [Running system on sparcv8leon3-gr716-mini](sparcv8leon3-gr716-mini.md)
12. [Running system on sparcv8leon3-gr712rc-board](sparcv8leon3-gr712rc-board.md)
12. [Table of Contents](../index.md)
11. [Running system on riscv64-noelv-fpga](riscv64-noelv-fpga.md)
12. [Running system on sparcv8leon3-gr716-mini](sparcv8leon3-gr716-mini.md)
13. [Running system on sparcv8leon3-gr712rc-board](sparcv8leon3-gr712rc-board.md)
14. [Table of Contents](../index.md)

```{toctree}
:maxdepth: 1
Expand All @@ -37,6 +38,7 @@ armv8r52-mps3an536-qemu.md
ia32-generic-qemu.md
riscv64-generic-qemu.md
riscv64-generic-spike.md
riscv64-noelv-fpga.md
sparcv8leon3-gr716-mini.md
sparcv8leon3-gr712rc-board
```
117 changes: 117 additions & 0 deletions quickstart/riscv64-noelv-fpga.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
# Running system on <nobr>riscv64-noelv-fpga</nobr>

These instructions describe how to run Phoenix-RTOS on the NOEL-V processor configured on the Digilent Arty A7-100T
FPGA - `riscv64-noelv-fpga` target. Note that the build artifacts, including the system image should be provided in the
`_boot` directory. If you have not built the system image yet, please refer to the
[Building Phoenix-RTOS image](../building/index.md) section.

## Connecting the board

Connect the board to the computer using micro USB cable that provides power and UART communication, like on image
below:

![Image](_images/ArtyA7_Board.bmp)

## Loading the Phoenix-RTOS system image

To load the Phoenix-RTOS system image to the board, you will need to use the `GRMON` debug monitor.

<details>
<summary>How to get GRMON</summary>

- Download the GRMON software from the [official website](https://www.gaisler.com/index.php/downloads/debug-tools)

- After downloading the archive, extract it and optionally add the `grmon` binary to the `PATH` variable
(You can also copy its binary to `/bin` with sudo).

- Install Digilent Adept Runtime for debug link connection:

- On Linux systems, the Digilent Adept2 Runtime must be installed on the host computer, which can be downloaded
from Digilent's website.
- More detailed information you can be found in the
[GRMON User's Manual](https://www.gaisler.com/doc/grmon-eval/grmon3.pdf)
& [Digilent Adept 2](https://digilent.com/reference/software/adept/start).

</details>
</br>

Launch the `GRMON` monitor using the following command:

```console
grmon -digilent
```

Note: The `-digilent` parameter specifies the Digilent JTAG adapter.

If the board is correctly plugged in and Adept2 is present on the system, grmon will display something similar to this:

![Image](_images/GRmon_start.png)

In case of bad connection or problem with Adept2 you may get similar output:

![Image](_images/GRmon_bad_connect.png)

Load the Phoenix-RTOS system image into the RAM by running the following commands in the `GRMON`:

- Load supervisor binary interface for RISC-V:

```console
load phoenix-rtos-project/_boot/riscv64-noelv-fpga/sbi-noelv.elf
```

![Image](_images/GRmon_SBI.png)

- Load Phoenix-RTOS system:

```console
load -binary phoenix-rtos-project/_boot/riscv64-noelv-fpga/phoenix.disk 0x08000000
```

![Image](_images/GRmon_Phoenix.png)

Determine entry point of the program:

```console
ep 0x0
```

![Image](_images/GRmon_Entry.png)

Check on which port the board is connected to the computer. To do this, run the following command:

```console
ls -l /dev/serial/by-id
```

![Image](_images/noelv-ls.png)

In this case, the serial port to use is `/dev/ttyUSB1`. Open the terminal emulator and connect to the board using the
following command:

```console
picocom -b 115200 --imap lfcrlf /dev/ttyUSB1
```

To start the Phoenix-RTOS system, execute the following command in the `GRMON` monitor:

```console
run
```

## Using the Phoenix-RTOS

After executing the `run` command, Phoenix-RTOS will be launched and the `psh` shell command prompt will appear in the
terminal.

![Image](_images/noelv-start.png)

Note: Keep in mind that it is necessary to have grmon running in background. In case of closing emulation via `detach`
or accidental terminating `run` command, it will shut down the connection with the board.
Grmon will inform you of such an event like or similar to this:

![Image](_images/GRmon_run_termin.png)

## See also

1. [Running system on targets](index.md)
2. [Table of Contents](../index.md)
Loading