diff --git a/index.md b/index.md index e8f11914..62fa858e 100644 --- a/index.md +++ b/index.md @@ -35,6 +35,7 @@ The ARINC653 execution environment (APEX) is under development. 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) + 13. [Running system on `sparcv8leon3-gr712rc-board`](quickstart/sparcv8leon3-gr716-mimas) 5. [Loader](loader/index.md) 1. [Architecture](loader/architecture.md) 2. [Command-line interface](loader/cli.md) diff --git a/quickstart/_images/MimasA7_Mini_Connected.jpg b/quickstart/_images/MimasA7_Mini_Connected.jpg new file mode 100644 index 00000000..b5adecc8 Binary files /dev/null and b/quickstart/_images/MimasA7_Mini_Connected.jpg differ diff --git a/quickstart/_images/MimasA7_Mini_WD.png b/quickstart/_images/MimasA7_Mini_WD.png new file mode 100644 index 00000000..d0ffed20 Binary files /dev/null and b/quickstart/_images/MimasA7_Mini_WD.png differ diff --git a/quickstart/_images/gr716-mimas-help.png b/quickstart/_images/gr716-mimas-help.png new file mode 100644 index 00000000..ca3ca928 Binary files /dev/null and b/quickstart/_images/gr716-mimas-help.png differ diff --git a/quickstart/_images/gr716-mimas-loading.png b/quickstart/_images/gr716-mimas-loading.png new file mode 100644 index 00000000..fd37a2fd Binary files /dev/null and b/quickstart/_images/gr716-mimas-loading.png differ diff --git a/quickstart/_images/gr716-mimas-picocom-send.png b/quickstart/_images/gr716-mimas-picocom-send.png new file mode 100644 index 00000000..4f6110f1 Binary files /dev/null and b/quickstart/_images/gr716-mimas-picocom-send.png differ diff --git a/quickstart/_images/gr716-mimas-ps.png b/quickstart/_images/gr716-mimas-ps.png new file mode 100644 index 00000000..093bba04 Binary files /dev/null and b/quickstart/_images/gr716-mimas-ps.png differ diff --git a/quickstart/_images/gr716-mimas-start.png b/quickstart/_images/gr716-mimas-start.png new file mode 100644 index 00000000..602537d1 Binary files /dev/null and b/quickstart/_images/gr716-mimas-start.png differ diff --git a/quickstart/index.md b/quickstart/index.md index c68c9932..9f4e5017 100644 --- a/quickstart/index.md +++ b/quickstart/index.md @@ -18,7 +18,8 @@ and building artifacts are available in the `_boot` directory. The building proc 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) +13. [Running system on sparcv8leon3-gr716-mimas](sparcv8leon3-gr716-mimas.md) +14. [Table of Contents](../index.md) ```{toctree} :maxdepth: 1 @@ -38,5 +39,6 @@ ia32-generic-qemu.md riscv64-generic-qemu.md riscv64-generic-spike.md sparcv8leon3-gr716-mini.md -sparcv8leon3-gr712rc-board +sparcv8leon3-gr712rc-board.md +sparcv8leon3-gr716-mimas.md ``` diff --git a/quickstart/sparcv8leon3-gr716-mimas.md b/quickstart/sparcv8leon3-gr716-mimas.md new file mode 100644 index 00000000..569d649f --- /dev/null +++ b/quickstart/sparcv8leon3-gr716-mimas.md @@ -0,0 +1,100 @@ +# Running system on sparcv8leon3-gr716-mimas + +These instructions describe how to run Phoenix-RTOS on the LEON3/GR716 Mimas A7 Mini FPGA - `sparcv8leon3-gr716-mimas` +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 a USB cable which provide power to the board (There is pin jumper which +determinate which power line will be in use). + +Communication with the board in this case is provided via USB-UART converters connected to connector `P4` + +- pins `3-tx`&`5-rx` as used for interfacing with the `phoenixd` server. +- pins `7-tx`&`9-rx` as used for `psh/plo` console. +- pins `37-M4`&`49-GND` must be connected via `10k` ohm resistor. + +Mimas pinout diagram: +![Image](_images/MimasA7_Mini_WD.png) + +This is how connected device suppose to looks like: +![Image](_images/MimasA7_Mini_Connected.jpg) + +## Flashing Artix FPGA + +All information about preparing and uploading a bit stream for the Mimas A7 Mini can be found in the +[phoenix-rtos-hdl](https://github.com/phoenix-rtos/phoenix-rtos-hdl) repository + +## Copying flash image using PHFS (phoenixd) + +To flash the disk image on board, first step is to verify which port the `plo` serial interface is connected using the +following command: + +```console +ls -l /dev/serial/by-id +``` + +The output of this command depends on what interfaces are used. (Easiest way to determinate which one are correct is +run this command, unplug one of them and again using same command check what port disappear) + +To provide the disk image to the bootloader, `phoenixd` has to be launched with the following arguments +(choose suitable ttys device, in this case, USB-UART converter is connected to pins `3 & 5`): + +```console +cd _boot/sparcv8leon3-gr716-mimas + +sudo ./phoenixd -p /dev/ttyUSB(Needed Port) -b 115200 -s . +``` + +Launch `picocom` to connect to the board using the following command: + +```bash +picocom --imap lfcrlf -b 115200 -r -l /dev/ttyUSB0 --send-cmd cat +``` + +In a second terminal, change directory to `_boot/sparcv8leon3-gr716-mimas` and launch `phoenixd` server on `ttyUSB1` +port using the following command: + +```bash +sudo ./phoenixd -p /dev/ttyUSB1 -b 115200 -s . +``` + +After resetting the board using the BTN0 button, you should see `Bootloader` message in the terminal. To load the +bootloader (`plo`) to the RAM, send the image using `picocom` send file command: use `Ctrl+a` followed by `Ctrl+s`, +enter the path to the `plo.img` file and press `Enter`. The file is located in the `_boot/sparcv8leon3-gr716-mimas` +directory. Refer to the image below: + +![Image](_images/gr716-mimas-picocom-send.png) + +If the image has been loaded correctly, you should see the `plo` interface in the terminal and the kernel and +applications will be loaded through `phoenixd`. + +![Image](_images/gr716-mimas-loading.png) + +## Using the Phoenix-RTOS + +After loading, Phoenix-RTOS will be launched and the `psh` shell command prompt will appear in the terminal. + +![Image](_images/gr716-mimas-start.png) + +To get the available command list type: + +```bash +help +``` + +![Image](_images/gr716-mimas-help.png) + +To get the list of working processes type: + +```bash +ps +``` + +![Image](_images/gr716-mimas-ps.png) + +## See also + +1. [Running system on targets](index.md) +2. [Table of Contents](../index.md)