update README and helper scripts
This commit is contained in:
parent
fdf7f03242
commit
0543f6b425
41
README.md
41
README.md
@ -107,28 +107,47 @@ When using Windows, run theses steps in MSYS2.
|
|||||||
Add `-G "MinGW Makefiles` in MinGW64 on Windows.
|
Add `-G "MinGW Makefiles` in MinGW64 on Windows.
|
||||||
|
|
||||||
```sh
|
```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 -DTGT_BSP="arm/q7s" -DCMAKE_BUILD_TYPE=Debug ..
|
||||||
cmake --build . -j
|
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
|
```sh
|
||||||
cd cmake/scripts/Q7S
|
cp scripts/q7s-env.sh ..
|
||||||
./make_debug_cfg.sh
|
cp scripts/q7s-env-em.sh ..
|
||||||
cd ../../..
|
|
||||||
```
|
```
|
||||||
|
|
||||||
This will invoke a Python script which in turn invokes CMake with the correct
|
Adapt these scripts for your needs by editing the `CROSS_COMPILE_BIN_PATH`
|
||||||
arguments to configure CMake for Q7S cross-compilation.
|
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
|
There are also different values for `-DTGT_BSP` to build for the Raspberry Pi
|
||||||
or the Beagle Bone Black: `arm/raspberrypi` and `arm/beagleboneblack`.
|
or the Beagle Bone Black: `arm/raspberrypi` and `arm/beagleboneblack`.
|
||||||
|
|
||||||
5. Build the software with
|
5. Build the software with
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
cd build-Debug-Q7S
|
cd cmake-build-debug-q7s
|
||||||
cmake --build . -j
|
cmake --build . -j
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -167,7 +186,7 @@ The EIVE OBSW is the default target if no target is specified.
|
|||||||
**Debug**
|
**Debug**
|
||||||
|
|
||||||
```sh
|
```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 -DTGT_BSP=arm/q7s -DCMAKE_BUILD_TYPE=Debug ..
|
||||||
cmake --build . -j
|
cmake --build . -j
|
||||||
```
|
```
|
||||||
@ -175,7 +194,7 @@ cmake --build . -j
|
|||||||
**Release**
|
**Release**
|
||||||
|
|
||||||
```sh
|
```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 -DTGT_BSP=arm/q7s -DCMAKE_BUILD_TYPE=Release ..
|
||||||
cmake --build . -j
|
cmake --build . -j
|
||||||
```
|
```
|
||||||
|
@ -1,8 +1,14 @@
|
|||||||
#!/bin/bash -i
|
#!/bin/bash -i
|
||||||
export PATH=$PATH:"$HOME/EIVE/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf/bin"
|
# This script is intended to be copied outside of the source directory on the
|
||||||
export CROSS_COMPILE="arm-linux-gnueabihf"
|
# 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 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
|
export EIVE_Q7S_EM=1
|
||||||
|
|
||||||
if [[ -d "eive-obsw" ]]; then
|
if [[ -d "eive-obsw" ]]; then
|
||||||
|
@ -1,8 +1,14 @@
|
|||||||
#!/bin/bash -i
|
#!/bin/bash -i
|
||||||
export PATH=$PATH:"$HOME/EIVE/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf/bin"
|
# This script is intended to be copied outside of the source directory on the
|
||||||
export CROSS_COMPILE="arm-linux-gnueabihf"
|
# 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 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
|
# export EIVE_Q7S_EM=1
|
||||||
|
|
||||||
if [[ -d "eive-obsw" ]]; then
|
if [[ -d "eive-obsw" ]]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user