From cc883c30f43560372604ccb810065fdf32aff1fe Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Tue, 29 Dec 2020 15:04:08 +0100 Subject: [PATCH] reamde update --- README.md | 88 ++++++++++++++++++++++++++++++++----------------------- 1 file changed, 51 insertions(+), 37 deletions(-) diff --git a/README.md b/README.md index f4d5c5f5..0dd496c5 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Target systems: -* OBC +* OBC with Linux OS * Xiphos Q7S * Based on Zynq-7020 SoC (xc7z020clg484-2) * Dual-core ARM Cortex-A9 @@ -12,16 +12,19 @@ Target systems: * 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 * 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 - * Built with Yocto 2.5 + * Linux OS built with Yocto 2.5 * Linux Kernel https://github.com/XiphosSystemsCorp/linux-xlnx.git * Host System * Generic software components which are not dependant on hardware can also be run. All host code is contained in the hosted folder * 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 + * 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 settings. In the Devices selection, it is sufficient to pick SoC → Zynq-7000:
@@ -133,65 +136,76 @@ git submodule update ## Debugging the software via Flatsat PC Open SSH connection to flatsat PC: -```` + +```sh ssh eive@2001:7c0:2018:1099:babe:0:e1fe:f1a5 -```` +``` + To access the console of the Q7S run the following: ```sh 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. -```` + +```sh ifconfig -```` +``` + Set IP address and netmask with -```` + +```sh ifconfig eth0 192.168.133.10 ifconfig eth0 netmask 255.255.255.0 -```` +``` + 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 -```` +``` + 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 - of the Q7S. - +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. ## 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). Note: It is not possible to modify the current loaded root partition. 1. Disable write protection of the desired root partition -```` -writeprotect 0 0 0 # unlocks nominal image on nor-flash 0 -```` + + ```sh + writeprotect 0 0 0 # unlocks nominal image on nor-flash 0 + ``` + 2. Mount the root partition -```` -xsc_mount_copy 0 0 # Mounts the nominal image from nor-flash 0 -```` + + ```sh + xsc_mount_copy 0 0 # Mounts the nominal image from nor-flash 0 + ``` 3. Copy the executable to /bin/usr 4. Make sure the permissions to execute the application are set -```` -chmod +x application -```` + ```sh + chmod +x application + ``` + 5. Create systemd service in /lib/systemd/system. The following shows an example service. -```` -cat > example.service -[Unit] -Description=Example Service -StartLimitIntervalSec=0 + ```sh + cat > example.service + [Unit] + Description=Example Service + StartLimitIntervalSec=0 -[Service] -Type=simple -Restart=always -RestartSec=1 -User=root -ExecStart=/usr/bin/application + [Service] + Type=simple + Restart=always + RestartSec=1 + User=root + ExecStart=/usr/bin/application -[Install] -WantedBy=multi-user.target -```` + [Install] + WantedBy=multi-user.target + ``` 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. ````