-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add sparcv8leon3-gr716 documentation
JIRA: RTOS-251
- Loading branch information
1 parent
eec6a46
commit 2787805
Showing
17 changed files
with
175 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# HAL for SPARCv8 LEON3 based targets | ||
|
||
SPARCv8 LEON3 HAL layer supports microcontrollers based on SPARCv8 architecture. | ||
Source code is located in `hal/sparcv8leon3` directory. | ||
|
||
## See also | ||
|
||
1. [Kernel - HAL Subsystem](README.md) | ||
2. [Kernel - HAL for ARMv7 Cortex-M based targets](armv7m.md) | ||
3. [Kernel - HAL for ARMv7 Cortex-A based targets](armv7a.md) | ||
4. [Kernel - HAL for RISC-V 64 based targets](riscv64.md) | ||
5. [Kernel - HAL for SPARCv8 LEON3 based targets](sparcv8leon3.md) | ||
6. [Table of Contents](../../README.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,143 @@ | ||
# Running system on `sparcv8leon3-gr716-mini` | ||
|
||
These instructions describe how to run Phoenix-RTOS on the `sparcv8leon3-gr716-mini` 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/README.md) section. | ||
|
||
## Connecting the board | ||
|
||
Connect the board to the computer using a USB cable. The board provides a 4-channel USB-UART bridge, of which three may | ||
be used: | ||
|
||
- Channel 0 - `if00` - used for `GRMON` debug connection, interfaces to `AHBUART1` on the board, | ||
- Channel 2 - `if02` - used for console, interfaces to `UART2` on the board, | ||
- Channel 3 - `if03` - used for interfacing with the `phoenixd` server, interfaces to `UART3` on the board. | ||
|
||
## Flashing the Phoenix-RTOS system image | ||
|
||
The process comes down to a few steps, described below. | ||
|
||
### Using `GRMON` to upload Phoenix-RTOS loader (`PLO`) to RAM | ||
|
||
First, check on which port the board is connected to the computer. To do this, run the following command: | ||
|
||
```bash | ||
ls -l /dev/serial/by-id | ||
``` | ||
|
||
<img src="_images/gr716-ls.png" width="700px"> | ||
|
||
In this case, the debug UART is connected to the `ttyUSB0` port. | ||
Launch the `GRMON` monitor using the following command: | ||
|
||
```bash | ||
grmon -uart /dev/ttyUSB0 -baud 115200 | ||
``` | ||
|
||
<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. | ||
|
||
</details> | ||
</br> | ||
|
||
The `-baud` parameter specifies the baud rate of the `AHBUART1` interface. | ||
Optionally you can pass the `-gdb` parameter, which enables the GDB server on port 2222. | ||
Default CPU clock frequency is 50 MHz. | ||
|
||
To load the bootloader (`plo`) to the RAM, run the following commands in the `GRMON` monitor: | ||
|
||
```bash | ||
load phoenix-rtos-project/_boot/sparcv8leon3-gr716-mini/plo-ram.img 0x31000000 | ||
``` | ||
|
||
To verify that the file has been loaded correctly, run the following command: | ||
|
||
```bash | ||
verify phoenix-rtos-project/_boot/sparcv8leon3-gr716-mini/plo-ram.img 0x31000000 | ||
``` | ||
|
||
Set the entry point of the bootloader: | ||
|
||
```bash | ||
ep 0x31000000 | ||
``` | ||
|
||
Open a new terminal window and run the following command: | ||
|
||
```bash | ||
picocom -b 115200 --imap lfcrlf /dev/ttyUSB2 | ||
``` | ||
|
||
This will connect to the `UART2` interface, which is used for the console. | ||
To start the bootloader, execute the following command in the `GRMON` monitor: | ||
|
||
```bash | ||
go | ||
``` | ||
|
||
The bootloader interface should appear in the console. | ||
|
||
<img src="_images/gr716-plo.png" width="700px"> | ||
|
||
### Copying flash image using PHFS (phoenixd) | ||
|
||
To flash the disk image, first, you need to verify to which port the `plo` serial interface is connected using the | ||
following command: | ||
|
||
```bash | ||
ls -l /dev/serial/by-id | ||
``` | ||
|
||
To provide the disk image to the bootloader, `phoenixd` has to be launched with the following arguments | ||
(choose suitable ttyUSBx device, in this case, `ttyUSB3`): | ||
|
||
```bash | ||
sudo ./phoenixd -p /dev/ttyUSB3 -b 115200 -s . | ||
``` | ||
|
||
<img src="_images/gr716-phoenixd.png" width="700px"> | ||
|
||
To start copying a file, write the following command in the console with the `plo` interface: | ||
|
||
```bash | ||
copy uart3 phoenix.disk flash0 0x0 0x0 | ||
``` | ||
|
||
<img src="_images/gr716-copy.png" width="700px"> | ||
|
||
The `flash0` is an external flash memory. | ||
|
||
After copying is done, reset the board to start the operating system. To reboot, write `reboot` command in the `plo` | ||
console. | ||
|
||
## Using Phoenix-RTOS | ||
|
||
After reboot, Phoenix-RTOS will be launched and the `psh` shell command prompt will appear in the terminal. | ||
|
||
<img src="_images/gr716-start.png" width="700px"> | ||
|
||
- Note: You can also enter `plo` by pressing any button within some time after reset. | ||
|
||
To get the available command list type: | ||
|
||
```bash | ||
help | ||
``` | ||
|
||
<img src="_images/gr716-help.png" width="700px"> | ||
|
||
To get the list of working processes type: | ||
|
||
```bash | ||
ps | ||
``` | ||
|
||
<img src="_images/gr716-ps.png" width="700px"> | ||
|
||
## See also | ||
|
||
1. [Running system on targets](README.md) | ||
2. [Table of Contents](../README.md) |