reamde update

This commit is contained in:
Robin Müller 2020-12-29 15:04:08 +01:00
parent 6995d52a9a
commit d07294980a

View File

@ -4,7 +4,7 @@
Target systems: Target systems:
* OBC * OBC with Linux OS
* Xiphos Q7S * Xiphos Q7S
* Based on Zynq-7020 SoC (xc7z020clg484-2) * Based on Zynq-7020 SoC (xc7z020clg484-2)
* Dual-core ARM Cortex-A9 * Dual-core ARM Cortex-A9
@ -12,16 +12,19 @@ Target systems:
* Artix-7 FPGA (85K pogrammable logic cells) * Artix-7 FPGA (85K pogrammable logic cells)
* Datasheet at https://eive-cloud.irs.uni-stuttgart.de/index.php/apps/files/?dir=/EIVE_IRS/Arbeitsdaten/08_Used%20Components/Q7S&fileid=340648 * Datasheet at https://eive-cloud.irs.uni-stuttgart.de/index.php/apps/files/?dir=/EIVE_IRS/Arbeitsdaten/08_Used%20Components/Q7S&fileid=340648
* Also a lot of informatin about the Q7S can be found on the xiphos trac platform: https://trac.xiphos.com/trac/eive-q7/wiki/Q7RevB * Also a lot of informatin about the Q7S can be found on the xiphos trac platform: https://trac.xiphos.com/trac/eive-q7/wiki/Q7RevB
* Linux OS * Linux OS built with Yocto 2.5
* Built with Yocto 2.5
* Linux Kernel https://github.com/XiphosSystemsCorp/linux-xlnx.git * Linux Kernel https://github.com/XiphosSystemsCorp/linux-xlnx.git
* Host System * Host System
* Generic software components which are not dependant on hardware can also * Generic software components which are not dependant on hardware can also
be run. All host code is contained in the hosted folder be run. All host code is contained in the hosted folder
* Tested for Linux (Ubuntu 20.04) and Windows 10 * Tested for Linux (Ubuntu 20.04) and Windows 10
* Raspberry Pi
* EIVE OBC can be built for Raspberry Pi as well (either directly on Raspberry Pi or by installing a cross compiler)
The steps in the primary README are related to the main OBC target Q7S.
## Setting up development environment ## Setting up development environment
* Install Vivado 2018.2 and Xilinx SDK from https://www.xilinx.com/support/download/index.html/content/xilinx/en/downloadNav/vivado-design-tools/archive.html. * Install Vivado 2018.2 and Xilinx SDK from https://www.xilinx.com/support/download/index.html/content/xilinx/en/downloadNav/vivado-design-tools/archive.html.
Install the Vivado Design Suite - HLx Editions - 2018.2 Full Product Installation instead of the updates. It is recommended to use the installer Install the Vivado Design Suite - HLx Editions - 2018.2 Full Product Installation instead of the updates. It is recommended to use the installer
* Install settings. In the Devices selection, it is sufficient to pick SoC &rarr; Zynq-7000: <br> * Install settings. In the Devices selection, it is sufficient to pick SoC &rarr; Zynq-7000: <br>
@ -133,50 +136,61 @@ git submodule update
## Debugging the software via Flatsat PC ## Debugging the software via Flatsat PC
Open SSH connection to flatsat PC: Open SSH connection to flatsat PC:
````
```sh
ssh eive@2001:7c0:2018:1099:babe:0:e1fe:f1a5 ssh eive@2001:7c0:2018:1099:babe:0:e1fe:f1a5
```` ```
To access the console of the Q7S run the following: To access the console of the Q7S run the following:
```sh ```sh
picocom -b 115200 /dev/ttyUSB0 picocom -b 115200 /dev/ttyUSB0
``` ```
To debug an application, first make sure a static IP address is assigned to the Q7S. Run ifconfig on the Q7S serial console. To debug an application, first make sure a static IP address is assigned to the Q7S. Run ifconfig on the Q7S serial console.
````
```sh
ifconfig ifconfig
```` ```
Set IP address and netmask with Set IP address and netmask with
````
```sh
ifconfig eth0 192.168.133.10 ifconfig eth0 192.168.133.10
ifconfig eth0 netmask 255.255.255.0 ifconfig eth0 netmask 255.255.255.0
```` ```
To launch application from Xilinx SDK setup port fowarding on the localhost. To launch application from Xilinx SDK setup port fowarding on the localhost.
````
```sh
ssh -L 1534:192.168.133.10:1534 eive@2001:7c0:2018:1099:babe:0:e1fe:f1a5 ssh -L 1534:192.168.133.10:1534 eive@2001:7c0:2018:1099:babe:0:e1fe:f1a5
```` ```
This forwards any requests to localhost:1534 to the port 1534 of the Q7S with the IP address 192.168.133.10. This forwards any requests to localhost:1534 to the port 1534 of the Q7S with the IP address 192.168.133.10.
Note: When now setting up a debug session in the Xilinx SDK, the host must be set to localhost instead of the IP address Note: When now setting up a debug session in the Xilinx SDK, the host must be set to localhost instead of the IP address of the Q7S.
of the Q7S.
## Launching an application after boot ## Launching an application after boot
Load the root partiton from the flash memory (there are to nor-flash memories and each flash holds two xdi images). Load the root partiton from the flash memory (there are to nor-flash memories and each flash holds two xdi images).
Note: It is not possible to modify the current loaded root partition. Note: It is not possible to modify the current loaded root partition.
1. Disable write protection of the desired root partition 1. Disable write protection of the desired root partition
````
```sh
writeprotect 0 0 0 # unlocks nominal image on nor-flash 0 writeprotect 0 0 0 # unlocks nominal image on nor-flash 0
```` ```
2. Mount the root partition 2. Mount the root partition
````
```sh
xsc_mount_copy 0 0 # Mounts the nominal image from nor-flash 0 xsc_mount_copy 0 0 # Mounts the nominal image from nor-flash 0
```` ```
3. Copy the executable to /bin/usr 3. Copy the executable to /bin/usr
4. Make sure the permissions to execute the application are set 4. Make sure the permissions to execute the application are set
```` ```sh
chmod +x application chmod +x application
```` ```
5. Create systemd service in /lib/systemd/system. The following shows an example service. 5. Create systemd service in /lib/systemd/system. The following shows an example service.
```` ```sh
cat > example.service cat > example.service
[Unit] [Unit]
Description=Example Service Description=Example Service
@ -191,7 +205,7 @@ ExecStart=/usr/bin/application
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target
```` ```
6. Enable the service. This is normally done with systemctl enable. However, this is not possible when the service is 6. Enable the service. This is normally done with systemctl enable. However, this is not possible when the service is
created for a mounted root partition. Therefore create a symlink as follows. created for a mounted root partition. Therefore create a symlink as follows.
```` ````