Overwritten README added agein, yet moved to BUILD_WITH_DOCKER.md

This commit is contained in:
paul nehlich 2024-06-26 16:20:46 +02:00
parent 9986ccd9e9
commit 9b4be95619
2 changed files with 43 additions and 14 deletions

View File

@ -1,7 +1,7 @@
## Prerequisits for build with Docker
##### Info
## Prerequisites for building with Docker
##### Please Note
IRS wireguard VPN can cause network issues with docker.
##### Install Docker
@ -9,6 +9,11 @@ If you are using macOS or Windows, please use this tutorial:
- https://www.docker.com/get-started/
On Linux simply use your package manager to install ```docker``` and prepare everything using these commands, to avoid permission denied errors:
On Arch Linux this would look like
```sh
sudo apt-get install docker # Ubuntu
sudo packman -Syy docker # Arch
```
```sh
sudo systemctl start docker
@ -16,9 +21,9 @@ sudo groupadd docker
sudo usermod -aG docker $USER
sudo reboot
```
Congratulations, you installed docker. Please proceed.
## FSBL
## First Stage Boot Loader (FSBL)
FSBL is the First Stage Boot Loader and prepares the CPU and FPGA configuration for booting up the Second Stage Bootloader and finally the flight software.
@ -27,7 +32,7 @@ FSBL is the First Stage Boot Loader and prepares the CPU and FPGA configuration
```sh
cd docker/compile_fsbl/
git clone https://github.com/Xilinx/embeddedsw/
docker build -t compile_fsbl .
docker build -t compile_fsbl . # Legacy builder is deprecated and will be removed in future release. TODO
```
##### To build the FSBL, run the following command in the `docker/compile-fsbl` directory:
@ -35,14 +40,23 @@ docker build -t compile_fsbl .
docker run -v ./embeddedsw:/fsbl compile_fsbl /bin/bash -c "cd lib/sw_apps/zynq_fsbl/src && make BOARD=zed SHELL=/bin/bash"
```
## Requirements [TBC]:
```sh
sudo apt-get install cdoxygen graphviz make arm-none-eabi-gcc # Ubuntu
sudo packman -Syy cmake adoxygen graphviz rm-none-eabi-gcc # Arch
```
1. `doxygen` - tool to generate documentation for C++, C, ...
2. `graphviz` - graph visualisation
3. `cmake` - cross-platform build system
4. `arm-none-eabi-gcc` - precompiled GNU toolchain for certain ARM processors including GCC and GNU Debugger (GDB)
If you want, copy the fsbl.elf to the docker/compile_fsbl directory for easier access:
If you want, copy the `fsbl.elf` to the `docker/compile_fsbl` directory for easier access:
```sh
cp embeddedsw/lib/sw_apps/zynq_fsbl/src/fsbl.elf .
```
## Steps
1. Configure doxygen:
1. Configure `doxygen`:
## mission_rust
@ -50,6 +64,23 @@ cp embeddedsw/lib/sw_apps/zynq_fsbl/src/fsbl.elf .
```sh
export DOT_PATH=/usr/local/bin
```
2. Satisfy Rust requirements
```sh
cd ../mission_rust
cargo update
rustup toolchain install nightly
rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu
rustup override set nightly
cargo build -Z build-std
cd docker/compile_mission/
docker build -t compile_mission .
```
3. Configure the ROMEO OBSW repository in `.../obsw/`
##### To build the mission_rust, run the following command in the `docker/compile_mission` directory:
```sh
docker run -v $(pwd)/../../mission_rust:/mission_rust compile_mission /bin/bash -c "cargo build -Z build-std"
```
## obsw

View File

@ -48,12 +48,10 @@ The current working steps are:
Consider using Docker or setting up a local compile toolchain.
Please refer to [BUILD_WITH_DOCKER.md](./BUILD_WITH_DOCKER.md) or [BUILD_WITH_CMAKE.md](./BUILD_WITH_CMAKE.md).
>cont
```
## How to run the software on a ZedBoard?
Again, `Command Line Interface (CLI) commands` can be moved to the GNU Debugger (DGB) call. Also, a small function is used as marker to return from GDB if the mission code returns (should not happen in production but might be useful during testing).
```sh
arm-none-eabi-gdb romeo-obsw -iex "target extended-remote localhost:3333" -ex "set pagination off" -ex "load" -ex "break done" -ex "cont" -ex="set confirm off" -ex "exit"
```
Please refer to [BUILD_WITH_DOCKER.md](./DEBUG_ON_ZEDBOARD.md).
UART USB port should output something at `115200baud`, (I use moserial to monitor).
## How tu run the software on Linux?
#TODO