forked from ROMEO/obsw
Merge remote-tracking branch 'origin/main' into hinkel/readme
This commit is contained in:
commit
4b8e352d4c
3
.gitignore
vendored
3
.gitignore
vendored
@ -3,4 +3,5 @@
|
|||||||
/build*
|
/build*
|
||||||
.vscode
|
.vscode
|
||||||
__pycache__/*
|
__pycache__/*
|
||||||
**/__pycache__/*
|
**/__pycache__/*
|
||||||
|
*.elf
|
118
README.md
118
README.md
@ -1,43 +1,106 @@
|
|||||||
# FSBL
|
# The ROMEO Flight Software
|
||||||
|
|
||||||
FSBL code is at https://github.com/Xilinx/embeddedsw/
|
[For a broader introduction and documentation refer to the OBSW Wiki in the ROMEO Knowledge Base](https://openproject.mm.intra.irs.uni-stuttgart.de/projects/romeo-phase-c/wiki/obsw). This README gives a very brief introduction and aims to document the compile process for experienced developers.
|
||||||
|
|
||||||
there:
|
## Scope
|
||||||
```sh
|
This is the central repository for the flight software of the ROMEO satellite.
|
||||||
cd lib/sw_apps/zynq_fsbl/src/ && make BOARD=zed CFLAGS=-DFSBL_DEBUG_INFO
|
It will eventually become the new base of a Rust Flight Software Framework replacing the C++ Flight Software Framework of the FLP, EIVE and SOURCE.
|
||||||
|
|
||||||
|
The current working steps are:
|
||||||
|
|
||||||
|
- Build Toolchain (Daniel Philipp)
|
||||||
|
- Hardware itnerfaces (Paul Nehlich)
|
||||||
|
- CAN Bus (Andy Hinkel)
|
||||||
|
- RS422 (Paul Nehlich, Joris Janßen)
|
||||||
|
- Device Handling Fundamentals (Joris Janßen)
|
||||||
|
- Framework Core Component Implementation (Paul Nehlich, Ulrich Mohr)
|
||||||
|
- Integration of Space Packets and PUS Services (to be scheduled, Paul Nehlich)
|
||||||
|
- OBC Board support and Linux Boot Management (Michael Steinert)
|
||||||
|
|
||||||
|
- Device Integration
|
||||||
|
- AOCS
|
||||||
|
- TCS
|
||||||
|
- Communications Interfaces
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Prerequisits for build with Docker
|
||||||
|
##### Info
|
||||||
|
IRS wireguard VPN can cause network issues with docker.
|
||||||
|
|
||||||
|
##### Install Docker
|
||||||
|
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:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
sudo systemctl start docker
|
||||||
|
sudo groupadd docker
|
||||||
|
sudo usermod -aG docker $USER
|
||||||
|
sudo reboot
|
||||||
```
|
```
|
||||||
|
|
||||||
# Building
|
|
||||||
|
|
||||||
Requirements [TBC]:
|
## FSBL
|
||||||
- cmake
|
|
||||||
- arm-none-eabi-gcc
|
|
||||||
- doxygen
|
|
||||||
- graphviz
|
|
||||||
|
|
||||||
Configure doxygen:
|
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.
|
||||||
- export DOT_PATH=/usr/local/bin
|
|
||||||
|
##### Clone the repository and build the docker image:
|
||||||
|
|
||||||
satisfy Rust requirements
|
|
||||||
```sh
|
```sh
|
||||||
cd ../mission_rust
|
cd docker/compile_fsbl/
|
||||||
cargo update
|
git clone https://github.com/Xilinx/embeddedsw/
|
||||||
rustup toolchain install nightly
|
docker build -t compile_fsbl .
|
||||||
rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu
|
|
||||||
rustup override set nightly
|
|
||||||
cargo build -Z build-std
|
|
||||||
```
|
```
|
||||||
|
|
||||||
In .../obsw/
|
##### To build the FSBL, run the following command in the `docker/compile-fsbl` directory:
|
||||||
|
```sh
|
||||||
|
docker run -v ./embeddedsw:/fsbl compile_fsbl /bin/bash -c "cd lib/sw_apps/zynq_fsbl/src && make BOARD=zed SHELL=/bin/bash"
|
||||||
|
```
|
||||||
|
|
||||||
|
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 .
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
## mission_rust
|
||||||
|
|
||||||
|
##### Build the docker image:
|
||||||
|
```sh
|
||||||
|
cd docker/compile_mission/
|
||||||
|
docker build -t compile_mission .
|
||||||
|
```
|
||||||
|
|
||||||
|
##### 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
|
||||||
|
|
||||||
|
##### Clone the submodules (FreeRTOS and lwIP):
|
||||||
```sh
|
```sh
|
||||||
git submodule init
|
git submodule init
|
||||||
git submodule update
|
git submodule update
|
||||||
mkdir build_cli
|
|
||||||
cd build_cli
|
|
||||||
cmake -DCMAKE_TOOLCHAIN_FILE=../bsp_z7/cmake/arm-none-eabi.toolchain ..
|
|
||||||
make -j 4
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
##### Build the docker image:
|
||||||
|
```sh
|
||||||
|
cd docker/compile_obsw/
|
||||||
|
docker build -t compile_obsw .
|
||||||
|
```
|
||||||
|
|
||||||
|
##### To build the obsw, run the following command in the `docker/compile_obsw` directory:
|
||||||
|
```sh
|
||||||
|
docker run -v $(pwd)/../..:/obsw compile_obsw /bin/bash -c "mkdir -p build_cli && cd build_cli && cmake -DCMAKE_TOOLCHAIN_FILE=../bsp_z7/cmake/arm-none-eabi.toolchain .. && make -j 8"
|
||||||
|
```
|
||||||
|
|
||||||
|
The romeo-obsw binary can now be found in the `build_cli` directory.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Debugging on zedboard
|
# Debugging on zedboard
|
||||||
@ -53,6 +116,11 @@ On PC connected to zedboard jtag usb port:
|
|||||||
openocd -f board/digilent_zedboard.cfg
|
openocd -f board/digilent_zedboard.cfg
|
||||||
```
|
```
|
||||||
|
|
||||||
|
If you have one around, load bitstream at startup (go get a coffee, takes time with onboard JTAG, blue LED lights up when done):
|
||||||
|
```sh
|
||||||
|
openocd -f board/digilent_zedboard.cfg -c "init" -c "pld load 0 system.bit"
|
||||||
|
```
|
||||||
|
|
||||||
To use JTAG Boot for the obsw, you first need to run the FSBL once.
|
To use JTAG Boot for the obsw, you first need to run the FSBL once.
|
||||||
|
|
||||||
On build PC (adapt IP if different from debugging PC) in the folder where you build the FSBL as above:
|
On build PC (adapt IP if different from debugging PC) in the folder where you build the FSBL as above:
|
||||||
|
15
docker/compile_fsbl/Dockerfile
Normal file
15
docker/compile_fsbl/Dockerfile
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
FROM debian:12.5
|
||||||
|
|
||||||
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
# Install required packages
|
||||||
|
RUN apt-get update && apt-get install -y \
|
||||||
|
make \
|
||||||
|
cmake \
|
||||||
|
gcc-arm-none-eabi \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
# Remove the package lists to reduce the image size
|
||||||
|
|
||||||
|
|
||||||
|
WORKDIR /fsbl/
|
||||||
|
|
26
docker/compile_mission/Dockerfile
Normal file
26
docker/compile_mission/Dockerfile
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
# Use Debian 12.5 as the base image
|
||||||
|
FROM debian:12.5
|
||||||
|
|
||||||
|
# Set environment variables to avoid any interactive dialogue
|
||||||
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
# Install dependencies required for Rust and rustup
|
||||||
|
RUN apt-get update && apt-get install -y curl gcc cmake && \
|
||||||
|
# Clean up the apt cache to reduce image size
|
||||||
|
apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# Install Rustup and select the nightly toolchain
|
||||||
|
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly && \
|
||||||
|
. $HOME/.cargo/env
|
||||||
|
|
||||||
|
# Add the Rust toolchain binaries to PATH
|
||||||
|
ENV PATH="/root/.cargo/bin:${PATH}"
|
||||||
|
|
||||||
|
# Install the nightly Rust toolchain, the rust-src component, and set the override
|
||||||
|
RUN rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu
|
||||||
|
|
||||||
|
|
||||||
|
# Your project's specific setup steps here
|
||||||
|
# For example, setting the working directory and copying your project files into the container
|
||||||
|
WORKDIR /mission_rust/
|
||||||
|
|
29
docker/compile_obsw/Dockerfile
Normal file
29
docker/compile_obsw/Dockerfile
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
FROM debian:12.5
|
||||||
|
|
||||||
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
# Install required packages
|
||||||
|
RUN apt-get update && apt-get install -y \
|
||||||
|
make \
|
||||||
|
cmake \
|
||||||
|
gcc \
|
||||||
|
curl \
|
||||||
|
gcc-arm-none-eabi \
|
||||||
|
doxygen \
|
||||||
|
graphviz \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
# Remove the package lists to reduce the image size
|
||||||
|
|
||||||
|
# Install Rustup and select the nightly toolchain
|
||||||
|
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly && \
|
||||||
|
. $HOME/.cargo/env
|
||||||
|
|
||||||
|
# Add the Rust toolchain binaries to PATH
|
||||||
|
ENV PATH="/root/.cargo/bin:${PATH}"
|
||||||
|
|
||||||
|
# Install the nightly Rust toolchain, the rust-src component, and set the override
|
||||||
|
RUN rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu
|
||||||
|
|
||||||
|
WORKDIR /obsw/
|
||||||
|
|
||||||
|
# ENV DOT_PATH=/usr/local/bin # Works without this in debian @paul
|
1
fsfw
Submodule
1
fsfw
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 8b9a468893a49d100ad5a543656c3864e0be8203
|
Loading…
x
Reference in New Issue
Block a user