update README
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good

This commit is contained in:
Robin Müller 2022-04-22 10:48:31 +02:00
parent d6532f8181
commit c4b1703b8e
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814

View File

@ -39,12 +39,14 @@ Target systems:
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
[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
[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).
* 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
* 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
@ -55,7 +57,8 @@ Target systems:
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`:
- 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.
- 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
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. [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
```
3. Ensure that the cross-compiler is working with `arm-linux-gnueabihf-gcc --version`.
It is recommended to set up a shell script which takes care of setting up the environment
for convenience or to set up the
[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.
3. Ensure that the cross-compiler is working with `arm-linux-gnueabihf-gcc --version` and that
the sysroot environmental variables have been set like specified in the
[root filesystem chapter](#sysroot).
4. Run the CMake configuration to create the build system in a `build-Debug-Q7S` folder.
Add `-G "MinGW Makefiles` in MinGW64 on Windows.
@ -261,7 +262,7 @@ Other useful tmux commands:
You can use the following command to connect to the Q7S with `ssh`:
```sh
q7s_ssh
q7s-fm-ssh
```
## Port forwarding for connection to TCF agent
@ -310,6 +311,25 @@ There is also a shell script called `q7s-port.sh` which can be used to achieve t
# <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
It's also possible to perform debugging with a normal Eclipse installation by installing
@ -348,7 +368,9 @@ twice) and generate this list manually with the following commands, according to
sudo apt install libncurses5
```
2. ```sh
2. Execute the following command
```sh
sudo <installRoot>/Vivado/2018.2/bin/vivado -nolog -nojournal -mode batch -source
<installRoot>/.xinstall/Vivado_2018.2/scripts/xlpartinfo.tcl -tclargs
<installRoot>/Vivado/2018.2/data/parts/installed_devices.txt
@ -422,21 +444,6 @@ You can download the toolchains for Windows and Linux
```sh
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
@ -727,7 +734,10 @@ More detailed information about the used q7s commands can be found in the Q7S us
# <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
of the [Q7S base repository](https://egit.irs.uni-stuttgart.de/eive/q7s-base). This might
@ -829,10 +839,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
makes adaptions easy.
### `tcfagent`
### `tcf-agent`
This starts the `/usr/bin/agent` program to allows remote debugging. Might not be part of
the mission code
This starts the `/usr/bin/tcf-agent` program to allows remote debugging
### `eive-early-config`
@ -1196,8 +1205,11 @@ Alternatively, changes from other upstreams (forks) and branches can be merged l
in the same way.
# <a id="coding-style"></a> Coding Style
* the formatting is based on the clang-format tools
## Setting up eclipse auto-fromatter with clang-format
1. Help &rarr; Install New Software &rarr; Add
2. In location insert the link http://www.cppstyle.com/luna
3. The software package CppStyle should now be available for installation