Merge pull request 'Update README' (#222) from mueller/update-README into develop
Some checks are pending
EIVE/eive-obsw/pipeline/head Build queued...
Some checks are pending
EIVE/eive-obsw/pipeline/head Build queued...
Reviewed-on: #222 Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
This commit is contained in:
commit
a9e106bb71
127
README.md
127
README.md
@ -39,12 +39,14 @@ Target systems:
|
|||||||
the [Xiphos Traq Platform](https://trac2.xiphos.ca/eive-q7). Press on index to find all
|
the [Xiphos Traq Platform](https://trac2.xiphos.ca/eive-q7). Press on index to find all
|
||||||
relevant pages. The most recent datasheet can be found
|
relevant pages. The most recent datasheet can be found
|
||||||
[here](https://trac2.xiphos.ca/manual/wiki/Q7RevB/UserManual).
|
[here](https://trac2.xiphos.ca/manual/wiki/Q7RevB/UserManual).
|
||||||
* Linux OS built with Yocto 2.5
|
* Linux OS built with Yocto 2.5. SDK and root filesystem can be rebuilt with
|
||||||
|
[yocto](https://egit.irs.uni-stuttgart.de/eive/q7s-yocto)
|
||||||
* [Linux Kernel](https://github.com/XiphosSystemsCorp/linux-xlnx.git) . EIVE version can be found
|
* [Linux Kernel](https://github.com/XiphosSystemsCorp/linux-xlnx.git) . EIVE version can be found
|
||||||
[here](https://github.com/spacefisch/linux-xlnx) . Pre-compiled files can be
|
[here](https://github.com/spacefisch/linux-xlnx) . Pre-compiled files can be
|
||||||
found [here](https://eive-cloud.irs.uni-stuttgart.de/index.php/apps/files/?dir=/EIVE_IRS/Software/q7s-linux-components&fileid=777299).
|
found [here](https://eive-cloud.irs.uni-stuttgart.de/index.php/apps/files/?dir=/EIVE_IRS/Software/q7s-linux-components&fileid=777299).
|
||||||
* Q7S base project can be found [here](https://egit.irs.uni-stuttgart.de/eive/q7s-base)
|
* Q7S base project can be found [here](https://egit.irs.uni-stuttgart.de/eive/q7s-base)
|
||||||
* Minimal base project files can be found [here](https://eive-cloud.irs.uni-stuttgart.de/index.php/apps/files/?dir=/EIVE_IRS/Software/xiphos-q7s-sdk&fileid=510908)
|
* Minimal base project files and Xiphos SDK can be found
|
||||||
|
[here](https://eive-cloud.irs.uni-stuttgart.de/index.php/apps/files/?dir=/EIVE_IRS/Software/xiphos-q7s-sdk&fileid=510908)
|
||||||
* 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 on a host system. All host code is contained in the `bsp_hosted` folder
|
be run on a host system. All host code is contained in the `bsp_hosted` folder
|
||||||
@ -55,7 +57,8 @@ Target systems:
|
|||||||
The steps in the primary README are related to the main OBC target Q7S.
|
The steps in the primary README are related to the main OBC target Q7S.
|
||||||
The CMake build system can be used to generate build systems as well (see helper scripts in `cmake/scripts`:
|
The CMake build system can be used to generate build systems as well (see helper scripts in `cmake/scripts`:
|
||||||
|
|
||||||
- Linux (Raspberry Pi): See special section below.
|
- Linux Raspberry Pi: See special section below. Uses the `bsp_linux_board` folder
|
||||||
|
- Linux Trenz TE7020_1CFA: Uses the `bsp_te0720_1cfa` folder
|
||||||
- Linux Host: Uses the `bsp_hosted` BSP folder and the CMake Unix Makefiles generator.
|
- Linux Host: Uses the `bsp_hosted` BSP folder and the CMake Unix Makefiles generator.
|
||||||
- Windows Host: Uses the `bsp_hosted` BSP folder, the CMake MinGW Makefiles generator and MSYS2.
|
- Windows Host: Uses the `bsp_hosted` BSP folder, the CMake MinGW Makefiles generator and MSYS2.
|
||||||
|
|
||||||
@ -68,7 +71,7 @@ prerequisites.
|
|||||||
|
|
||||||
1. ARM cross-compiler installed, either as part of [Vivado 2018.2 installation](#vivado) or
|
1. ARM cross-compiler installed, either as part of [Vivado 2018.2 installation](#vivado) or
|
||||||
as a [separate download](#arm-toolchain)
|
as a [separate download](#arm-toolchain)
|
||||||
2. [Q7S sysroot](#q7s-sysroot) on local development machine
|
2. [Q7S sysroot](#sysroot) on local development machine
|
||||||
3. Recommended: Eclipse or [Vivado 2018.2 SDK](#vivado) for OBSW development
|
3. Recommended: Eclipse or [Vivado 2018.2 SDK](#vivado) for OBSW development
|
||||||
3. [TCF agent](https://wiki.eclipse.org/TCF) running on Q7S
|
3. [TCF agent](https://wiki.eclipse.org/TCF) running on Q7S
|
||||||
|
|
||||||
@ -96,11 +99,9 @@ When using Windows, run theses steps in MSYS2.
|
|||||||
git submodule update
|
git submodule update
|
||||||
```
|
```
|
||||||
|
|
||||||
3. Ensure that the cross-compiler is working with `arm-linux-gnueabihf-gcc --version`.
|
3. Ensure that the cross-compiler is working with `arm-linux-gnueabihf-gcc --version` and that
|
||||||
It is recommended to set up a shell script which takes care of setting up the environment
|
the sysroot environmental variables have been set like specified in the
|
||||||
for convenience or to set up the
|
[root filesystem chapter](#sysroot).
|
||||||
[PATH and the CROSS_COMPILE variable permanently](https://unix.stackexchange.com/questions/26047/how-to-correctly-add-a-path-to-path)
|
|
||||||
in the `.profile` file.
|
|
||||||
|
|
||||||
4. Run the CMake configuration to create the build system in a `build-Debug-Q7S` folder.
|
4. Run the CMake configuration to create the build system in a `build-Debug-Q7S` folder.
|
||||||
Add `-G "MinGW Makefiles` in MinGW64 on Windows.
|
Add `-G "MinGW Makefiles` in MinGW64 on Windows.
|
||||||
@ -230,18 +231,19 @@ A serial console session is up permanently in a `tmux` session
|
|||||||
|
|
||||||
### Serial console
|
### Serial console
|
||||||
|
|
||||||
You can check whether the sessions exist with `tmux ls`
|
You can check whether the sessions exist with `tmux ls`.
|
||||||
|
This is the command to connect to the serial interface of the FM using the
|
||||||
|
RS422 interface of the flight preparation panel:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
tmux a -t q7s-serial
|
tmux a -t q7s-fm-fpp
|
||||||
```
|
```
|
||||||
|
|
||||||
If the session does not exist, you can create it like this
|
If the session does not exist, you can create it like this
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
tmux new -s q7s-serial
|
tmux new -s q7s-fm-fpp -t /bin/bash
|
||||||
/bin/bash
|
launch-q7s-fpp
|
||||||
q7s_serial
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Other useful tmux commands:
|
Other useful tmux commands:
|
||||||
@ -261,55 +263,50 @@ Other useful tmux commands:
|
|||||||
You can use the following command to connect to the Q7S with `ssh`:
|
You can use the following command to connect to the Q7S with `ssh`:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
q7s_ssh
|
q7s-fm-ssh
|
||||||
```
|
```
|
||||||
|
|
||||||
## Port forwarding for connection to TCF agent
|
|
||||||
|
|
||||||
This is a required step to connect to the `tcf-agent` on the Q7S, which is required for convenient
|
|
||||||
remote debugging. Assuming the IPv6
|
|
||||||
|
|
||||||
```sh
|
|
||||||
ssh -L 1534:192.168.133.10:1534 eive@2001:7c0:2018:1099:babe:0:e1fe:f1a5 -t /bin/bash
|
|
||||||
```
|
|
||||||
|
|
||||||
You then need to connect to `localhost` with port `1534`.
|
|
||||||
|
|
||||||
## Port forwarding for file transfers with `scp`
|
|
||||||
|
|
||||||
```sh
|
|
||||||
ssh -L 1535:192.168.133.10:22 eive@2001:7c0:2018:1099:babe:0:e1fe:f1a5 -t /bin/bash
|
|
||||||
```
|
|
||||||
|
|
||||||
You then need to run `scp` with the `-P 1535` flag with `localhost` as the target IP address.
|
|
||||||
|
|
||||||
## Port forwarding for TMTC commanding
|
|
||||||
|
|
||||||
You can enable port forwarding for TMTC commanding with the following command:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
ssh -L 1536:192.168.133.10:7301 eive@2001:7c0:2018:1099:babe:0:e1fe:f1a5 -t /bin/bash
|
|
||||||
```
|
|
||||||
|
|
||||||
This forwards TMTC packets on port `1536` of localhost to the TMTC reception port of the Q7S.
|
|
||||||
|
|
||||||
## Set up all port forwarding at once
|
## Set up all port forwarding at once
|
||||||
|
|
||||||
|
Port forwarding is necessary for remote-debugging using the `tcf-agent`, copying files
|
||||||
|
with `scp` & `q7s-cp.py` and sending TMTC commands.
|
||||||
You can specify the `-L` option multiple times to set up all port forwarding at once.
|
You can specify the `-L` option multiple times to set up all port forwarding at once.
|
||||||
Example for using the UDP communication interface:
|
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
ssh -L 1534:192.168.133.10:1534 \
|
ssh -L 1534:192.168.155.55:1534 \
|
||||||
-L 1535:192.168.133.10:22 \
|
-L 1535:192.168.155.55:22 \
|
||||||
-L 1536:192.168.133.10:7301 \
|
-L 1536:192.168.155.55:7301 \
|
||||||
|
-L 1537:127.0.0.1:7100 \
|
||||||
|
-L 1538:192.168.133.10:1534 \
|
||||||
|
-L 1539:192.168.133.10:22 \
|
||||||
|
-L 1540:192.168.133.10:7301 \
|
||||||
eive@2001:7c0:2018:1099:babe:0:e1fe:f1a5 \
|
eive@2001:7c0:2018:1099:babe:0:e1fe:f1a5 \
|
||||||
-t 'export CONSOLE_PREFIX="[Q7S Tunnel] /bin/bash'
|
-t 'CONSOLE_PREFIX="[Q7S Tunnel]" /bin/bash'
|
||||||
```
|
```
|
||||||
|
|
||||||
There is also a shell script called `q7s-port.sh` which can be used to achieve the same.
|
There is also a shell script called `q7s-port.sh` which can be used to achieve the same.
|
||||||
|
|
||||||
# <a id="set-up-prereq"></a> Setting up prerequisites
|
# <a id="set-up-prereq"></a> Setting up prerequisites
|
||||||
|
|
||||||
|
## <a id="sysroot"></a> Getting system root for Linux cross-compilation
|
||||||
|
|
||||||
|
Cross-compiling any program for an embedded Linux board generally required parts of the target root
|
||||||
|
file system on the development/host computer. For the Q7S, you can install the cross-compilation
|
||||||
|
root file system by simply installing the SDK. You can find the most recent SDK
|
||||||
|
[here](https://eive-cloud.irs.uni-stuttgart.de/index.php/apps/files/?dir=/EIVE_IRS/Software/xiphos-q7s-sdk).
|
||||||
|
|
||||||
|
If you are compiling for the Q7S or the TE7020, the `ZYNQ_7020_SYSROOT` environment variable
|
||||||
|
must be set to the location of the SDK compile sysroot. Here is an example on how to do this
|
||||||
|
in Ubuntu, assuming the SDK was installed in the default location
|
||||||
|
|
||||||
|
```sh
|
||||||
|
export ZYNQ_7020_SYSROOT="/opt/xiphos/sdk/ark/sysroots/cortexa9hf-neon-xiphos-linux-gnueabi"
|
||||||
|
```
|
||||||
|
|
||||||
|
If you are comiling for the Raspberry Pi, you have to set the `LINUX_ROOTFS` environmental
|
||||||
|
variable instead. You can find a base root filesystem for the Raspberry Pi
|
||||||
|
[here](https://eive-cloud.irs.uni-stuttgart.de/index.php/apps/files/?dir=/EIVE_IRS/Software/rootfs).
|
||||||
|
|
||||||
## <a id="vivado"></a> Installing Vivado the the Xilinx development tools
|
## <a id="vivado"></a> Installing Vivado the the Xilinx development tools
|
||||||
|
|
||||||
It's also possible to perform debugging with a normal Eclipse installation by installing
|
It's also possible to perform debugging with a normal Eclipse installation by installing
|
||||||
@ -348,7 +345,9 @@ twice) and generate this list manually with the following commands, according to
|
|||||||
sudo apt install libncurses5
|
sudo apt install libncurses5
|
||||||
```
|
```
|
||||||
|
|
||||||
2. ```sh
|
2. Execute the following command
|
||||||
|
|
||||||
|
```sh
|
||||||
sudo <installRoot>/Vivado/2018.2/bin/vivado -nolog -nojournal -mode batch -source
|
sudo <installRoot>/Vivado/2018.2/bin/vivado -nolog -nojournal -mode batch -source
|
||||||
<installRoot>/.xinstall/Vivado_2018.2/scripts/xlpartinfo.tcl -tclargs
|
<installRoot>/.xinstall/Vivado_2018.2/scripts/xlpartinfo.tcl -tclargs
|
||||||
<installRoot>/Vivado/2018.2/data/parts/installed_devices.txt
|
<installRoot>/Vivado/2018.2/data/parts/installed_devices.txt
|
||||||
@ -422,21 +421,6 @@ You can download the toolchains for Windows and Linux
|
|||||||
```sh
|
```sh
|
||||||
sudo apt-get install cmake
|
sudo apt-get install cmake
|
||||||
````
|
````
|
||||||
|
|
||||||
## <a id="q7s-sysroot"></a> Getting the Q7S system root
|
|
||||||
|
|
||||||
It is necessary to copy the Q7S system root to your local development machine for libraries
|
|
||||||
like `libgpio`. You can find the system root for the Q7S, the Raspberry Pi and the
|
|
||||||
Beagle Bone Black for download here
|
|
||||||
[here](https://eive-cloud.irs.uni-stuttgart.de/index.php/apps/files/?dir=/EIVE_IRS/Software/rootfs&fileid=831849).
|
|
||||||
Download it and unzip it somewhere in the Xilinx installation folder.
|
|
||||||
You can use the following command if `wget` can be used or for CI/CD:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
wget https://eive-cloud.irs.uni-stuttgart.de/index.php/s/SyXpdBBQX32xPgE/download/cortexa9hf-neon-xiphos-linux-gnueabi.tar.gz
|
|
||||||
```
|
|
||||||
|
|
||||||
Then, create a new environmental variables `Q7S_SYSROOT` and set it to the local system root path.
|
|
||||||
|
|
||||||
### Updating system root for CI
|
### Updating system root for CI
|
||||||
|
|
||||||
@ -727,7 +711,10 @@ More detailed information about the used q7s commands can be found in the Q7S us
|
|||||||
|
|
||||||
# <a id="q7s"></a> Q7S OBC
|
# <a id="q7s"></a> Q7S OBC
|
||||||
|
|
||||||
## Launching an application at start-up
|
## Launching an application at start-up - deprecated
|
||||||
|
|
||||||
|
This way to enable auto-startup is deprecated. It is instead recommended to tweak the yocto
|
||||||
|
recipes file for the related `systemd` service to enable auto-startup with `SYSTEMD_AUTO_ENABLE`.
|
||||||
|
|
||||||
You can also do the steps performed here on a host computer inside the `q7s-rootfs` directory
|
You can also do the steps performed here on a host computer inside the `q7s-rootfs` directory
|
||||||
of the [Q7S base repository](https://egit.irs.uni-stuttgart.de/eive/q7s-base). This might
|
of the [Q7S base repository](https://egit.irs.uni-stuttgart.de/eive/q7s-base). This might
|
||||||
@ -829,10 +816,9 @@ If a timeout occurs, this special file will be deleted as well.
|
|||||||
The watchdog and its configuration will be directly integrated into this repostory, which
|
The watchdog and its configuration will be directly integrated into this repostory, which
|
||||||
makes adaptions easy.
|
makes adaptions easy.
|
||||||
|
|
||||||
### `tcfagent`
|
### `tcf-agent`
|
||||||
|
|
||||||
This starts the `/usr/bin/agent` program to allows remote debugging. Might not be part of
|
This starts the `/usr/bin/tcf-agent` program to allows remote debugging
|
||||||
the mission code
|
|
||||||
|
|
||||||
### `eive-early-config`
|
### `eive-early-config`
|
||||||
|
|
||||||
@ -1196,8 +1182,11 @@ Alternatively, changes from other upstreams (forks) and branches can be merged l
|
|||||||
in the same way.
|
in the same way.
|
||||||
|
|
||||||
# <a id="coding-style"></a> Coding Style
|
# <a id="coding-style"></a> Coding Style
|
||||||
|
|
||||||
* the formatting is based on the clang-format tools
|
* the formatting is based on the clang-format tools
|
||||||
|
|
||||||
## Setting up eclipse auto-fromatter with clang-format
|
## Setting up eclipse auto-fromatter with clang-format
|
||||||
|
|
||||||
1. Help → Install New Software → Add
|
1. Help → Install New Software → Add
|
||||||
2. In location insert the link http://www.cppstyle.com/luna
|
2. In location insert the link http://www.cppstyle.com/luna
|
||||||
3. The software package CppStyle should now be available for installation
|
3. The software package CppStyle should now be available for installation
|
||||||
|
Loading…
Reference in New Issue
Block a user