|
| 1 | +# Running system on <nobr>riscv64-noelv-fpga</nobr> |
| 2 | + |
| 3 | +These instructions describe how to run Phoenix-RTOS on the NOEL-V processor configured on the Digilent Arty A7-100T |
| 4 | +FPGA - `riscv64-noelv-fpga` target. Note that the build artifacts, including the system image should be provided in the |
| 5 | +`_boot` directory. If you have not built the system image yet, please refer to the |
| 6 | +[Building Phoenix-RTOS image](../building/index.md) section. |
| 7 | + |
| 8 | +## Connecting the board |
| 9 | + |
| 10 | +Connect the board to the computer using 1 micro USB cable that provides power and UART communication, like on image |
| 11 | +below: |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | +## Loading the Phoenix-RTOS system image |
| 16 | + |
| 17 | +To load the Phoenix-RTOS system image to the board, you will need to use the `GRMON` debug monitor. |
| 18 | + |
| 19 | +<details> |
| 20 | +<summary>How to get GRMON</summary> |
| 21 | + |
| 22 | +- Download the GRMON software from the [official website](https://www.gaisler.com/index.php/downloads/debug-tools) |
| 23 | + |
| 24 | +- After downloading the archive, extract it and optionally add the `grmon` binary to the `PATH` variable |
| 25 | +(You can also copy its binary to `/bin` with sudo). |
| 26 | + |
| 27 | +- Install Digilent Adept Runtime for debug link connection: |
| 28 | + |
| 29 | + - On Linux systems, the Digilent Adept2 Runtime must be installed on the host computer, which can be downloaded |
| 30 | + from Digilent's website. |
| 31 | + - More detailed information you can be found in the |
| 32 | + [GRMON User's Manual](https://www.gaisler.com/doc/grmon-eval/grmon3.pdf) |
| 33 | + & [Digilent Adept 2](https://digilent.com/reference/software/adept/start). |
| 34 | + |
| 35 | +</details> |
| 36 | +</br> |
| 37 | + |
| 38 | +Launch the `GRMON` monitor using the following command: |
| 39 | + |
| 40 | +```console |
| 41 | +grmon -digilent |
| 42 | +``` |
| 43 | + |
| 44 | +Note: The `-digilent` parameter specifies the Digilent JTAG adapter. |
| 45 | + |
| 46 | +If the board is correctly plugged in and Adept2 is present on the system, grmon will display something similar to this: |
| 47 | + |
| 48 | + |
| 49 | + |
| 50 | +In case of bad connection or problem with Adept2 you may get similar output: |
| 51 | + |
| 52 | + |
| 53 | + |
| 54 | +Load the Phoenix-RTOS system image into the RAM by running the following commands in the `GRMON`: |
| 55 | + |
| 56 | +- Load supervisor binary interface for RISC-V: |
| 57 | + |
| 58 | +```console |
| 59 | +load phoenix-rtos-project/_boot/riscv64-noelv-fpga/sbi-noelv.elf |
| 60 | +``` |
| 61 | + |
| 62 | + |
| 63 | + |
| 64 | +- Load Phoenix-RTOS system: |
| 65 | + |
| 66 | +```console |
| 67 | +load -binary phoenix-rtos-project/_boot/riscv64-noelv-fpga/phoenix.disk 0x08000000 |
| 68 | +``` |
| 69 | + |
| 70 | + |
| 71 | + |
| 72 | +Determine entry point of the program: |
| 73 | + |
| 74 | +```console |
| 75 | +ep 0x0 |
| 76 | +``` |
| 77 | + |
| 78 | + |
| 79 | + |
| 80 | +Check on which port the board is connected to the computer. To do this, run the following command: |
| 81 | + |
| 82 | +```console |
| 83 | +ls -l /dev/serial/by-id |
| 84 | +``` |
| 85 | + |
| 86 | + |
| 87 | + |
| 88 | +In this case, the serial port to use is `/dev/ttyUSB1`. Open the terminal emulator and connect to the board using the |
| 89 | +following command: |
| 90 | + |
| 91 | +```console |
| 92 | +picocom -b 115200 --imap lfcrlf /dev/ttyUSB1 |
| 93 | +``` |
| 94 | + |
| 95 | +To start the Phoenix-RTOS system, execute the following command in the `GRMON` monitor: |
| 96 | + |
| 97 | +```console |
| 98 | +run |
| 99 | +``` |
| 100 | + |
| 101 | +## Using the Phoenix-RTOS |
| 102 | + |
| 103 | +After executing the `run` command, Phoenix-RTOS will be launched and the `psh` shell command prompt will appear in the |
| 104 | +terminal. |
| 105 | + |
| 106 | + |
| 107 | + |
| 108 | +Note: Keep in mind that it is necessary to have grmon running in background. In case of closing or accidental |
| 109 | +terminating `run` command, it will shut down the connection with the board. |
| 110 | +Grmon will inform you of such an event: |
| 111 | + |
| 112 | + |
| 113 | + |
| 114 | +## See also |
| 115 | + |
| 116 | +1. [Running system on targets](index.md) |
| 117 | +2. [Table of Contents](../index.md) |
0 commit comments