Building new EM config #238

Merged
meierj merged 29 commits from mueller/refactoring-conf-handling into develop 2022-05-04 15:08:19 +02:00
3 changed files with 46 additions and 15 deletions
Showing only changes of commit 0543f6b425 - Show all commits

View File

@ -107,28 +107,47 @@ When using Windows, run theses steps in MSYS2.
Add `-G "MinGW Makefiles` in MinGW64 on Windows.
```sh
mkdir build-Debug-Q7S && cd build-Debug-Q7S
mkdir cmake-build-debug-q7s && cd cmake-build-debug-q7s
cmake -DTGT_BSP="arm/q7s" -DCMAKE_BUILD_TYPE=Debug ..
cmake --build . -j
```
You can also use provided shell scripts to perform these commands
You can also use provided shell scripts to perform these commands.
```sh
cd cmake/scripts/Q7S
./make_debug_cfg.sh
cd ../../..
cp scripts/q7s-env.sh ..
cp scripts/q7s-env-em.sh ..
```
This will invoke a Python script which in turn invokes CMake with the correct
arguments to configure CMake for Q7S cross-compilation.
Adapt these scripts for your needs by editing the `CROSS_COMPILE_BIN_PATH`
and `ZYNQ_7020_SYSROOT`. After that, you can run the following commands to set up
the FM build
```sh
cd ..
./q7s-env.sh
q7s-make-debug.sh
```
You can build the EM setup by running
```sh
export EIVE_Q7S_EM=1
```
or by running the `q7s-env-em.sh` script instead before setting up the build
configuration.
The shell scripts will invoke a Python script which in turn invokes CMake with the correct
arguments to configure CMake for Q7S cross-compilation. You can look into the command
output to see which commands were run exactly.
There are also different values for `-DTGT_BSP` to build for the Raspberry Pi
or the Beagle Bone Black: `arm/raspberrypi` and `arm/beagleboneblack`.
5. Build the software with
```sh
cd build-Debug-Q7S
cd cmake-build-debug-q7s
cmake --build . -j
```
@ -167,7 +186,7 @@ The EIVE OBSW is the default target if no target is specified.
**Debug**
```sh
mkdir build-Debug-Q7S && cd build-Debug-Q7S
mkdir cmake-build-debug-q7s && cd cmake-build-debug-q7s
cmake -DTGT_BSP=arm/q7s -DCMAKE_BUILD_TYPE=Debug ..
cmake --build . -j
```
@ -175,7 +194,7 @@ cmake --build . -j
**Release**
```sh
mkdir build-Release-Q7S && cd build-Release-Q7S
mkdir cmake-build-release-q7s && cd cmake-build-release-q7s
cmake -DTGT_BSP=arm/q7s -DCMAKE_BUILD_TYPE=Release ..
cmake --build . -j
```

View File

@ -1,8 +1,14 @@
#!/bin/bash -i
export PATH=$PATH:"$HOME/EIVE/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf/bin"
export CROSS_COMPILE="arm-linux-gnueabihf"
# This script is intended to be copied outside of the source directory on the
# same folder level as the eive-obsw folder. This allows to tweak it to
# custom cross-compiler and sysroot path setups
# Adapt the following two entries to your need
CROSS_COMPILE_BIN_PATH="$HOME/EIVE/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf/bin"
export ZYNQ_7020_SYSROOT="/opt/xiphos/sdk/ark/sysroots/cortexa9hf-neon-xiphos-linux-gnueabi"
export PATH=$PATH:${CROSS_COMPILE_BIN_PATH}
export CROSS_COMPILE="arm-linux-gnueabihf"
export EIVE_Q7S_EM=1
if [[ -d "eive-obsw" ]]; then

View File

@ -1,8 +1,14 @@
#!/bin/bash -i
export PATH=$PATH:"$HOME/EIVE/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf/bin"
export CROSS_COMPILE="arm-linux-gnueabihf"
# This script is intended to be copied outside of the source directory on the
# same folder level as the eive-obsw folder. This allows to tweak it to
# custom cross-compiler and sysroot path setups
# Adapt the following two entries to your need
CROSS_COMPILE_BIN_PATH="$HOME/EIVE/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf/bin"
export ZYNQ_7020_SYSROOT="/opt/xiphos/sdk/ark/sysroots/cortexa9hf-neon-xiphos-linux-gnueabi"
export PATH=$PATH:${CROSS_COMPILE_BIN_PATH}
export CROSS_COMPILE="arm-linux-gnueabihf"
# export EIVE_Q7S_EM=1
if [[ -d "eive-obsw" ]]; then