Preparing readme's for rebase

This commit is contained in:
Duesentrieb71 2024-06-05 11:27:01 +02:00
parent d64bc617de
commit 6ceef2183c
2 changed files with 89 additions and 75 deletions

58
BUILD_WITH_DOCKER.md Normal file
View File

@ -0,0 +1,58 @@
## 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
```
## 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.
##### Clone the repository and build the docker image:
```sh
cd docker/compile_fsbl/
git clone https://github.com/Xilinx/embeddedsw/
docker build -t compile_fsbl .
```
##### 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"
```
**Binary can be found at ```embeddedsw/lib/sw_apps/zynq_fsbl/src/fsbl.elf```**
## obsw
##### Clone the submodules (FreeRTOS and lwIP):
```sh
git submodule init
git submodule update
```
##### 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"
```
**romeo-obsw binary can be found at ```build_cli/romeo-obsw```**

106
README.md
View File

@ -1,92 +1,48 @@
# ROMEO Onboard Software (OBSW)
## What is ROMEO?
# Build with Docker
##### Info
IRS wireguard VPN can cause network issues with docker.
[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.
[_Research and Observation in Medium Earth Orbit (ROMEO)_](https://www.irs.uni-stuttgart.de/en/research/satellitetechnology-and-instruments/smallsatelliteprogram/romeo/) is the third small satellite of the Institute of Space Systems (IRS), University of Stuttgart with the objective of technology demonstration in Medium and Low Earth Orbit (MEO/LEO) with a mission duration of 1 year.
##### Install Docker
https://www.docker.com/get-started/
The Onboard Software (OBSW) is written in Rust for run-time stability. The implemented framework is losely based on the C++ Flight Software Framework (FSFW) developed at the IRS in cooperation with industry. The shift to Rust was discussed in Paul Nehlich's master thesis: [_Analysis and preparation of the transformation of the Flight Software Framework from C++ to Rust_](https://www.researchgate.net/publication/372439213_Analysis_and_preparation_of_the_transformation_of_the_Flight_Software_Framework_from_C_to_Rust).
<img src="https://egit.irs.uni-stuttgart.de/romeo/obsw/media/branch/main/romeo_design_from_website.bmp" alt="ROMEO Preliminary Design" width="400"/>
## FSBL
(design from IRS ROMEO Website)
##### Clone the repository and build the docker image:
```sh
cd docker/compile_fsbl/
git clone https://github.com/Xilinx/embeddedsw/
docker build -t compile_fsbl .
```
##### 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"
```
**Binary can be found at ```embeddedsw/lib/sw_apps/zynq_fsbl/src/fsbl.elf```**
## obsw
##### Clone the submodules (FreeRTOS and lwIP):
```sh
git submodule init
git submodule update
```
##### 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"
```
**romeo-obsw binary can be found at ```build_cli/romeo-obsw```**
## How to Configure This Repository? TODO
# Debugging on zedboard
# First Stage Bootloader (FSBL)
FSBL code is at https://github.com/Xilinx/embeddedsw/
Requirements [TBC]:
- OpenOCD
- arm-none-eabi-gdb
## Scope
This is the central repository for the flight software of the ROMEO satellite.
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.
Set Zedboard boot mode to jtag and connect debugging PC to zedboard jtag and uart usb port.
The current working steps are:
On PC connected to zedboard jtag usb port:
```sh
openocd -f board/digilent_zedboard.cfg
```
- 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)
To use JTAG Boot for the obsw, you first need to run the FSBL once.
- Device Integration
- AOCS
- TCS
- Communications Interfaces
On build PC (adapt IP if different from debugging PC) in the folder where you build the FSBL as above:
```sh
arm-none-eabi-gdb fsbl.elf
>target extended-remote localhost:3333
>load
>cont
>^C^D^D
```
You can automate this run:
```sh
arm-none-eabi-gdb fsbl.elf -iex "target extended-remote localhost:3333" -ex "set pagination off" -ex "load" -ex "break FsblHandoffJtagExit" -ex "cont" -ex="set confirm off" -ex "exit"
```
## How to build the software?
It will exit after the Zynq is configured and ready to firmware.
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).
Then load the actual obsw, in the build (`build_cli` in the example above) folder run:
```sh
arm-none-eabi-gdb romeo-obsw
>target extended-remote localhost:3333
>load
>cont
```
## How to debug on hardware?
Again, cli commands can be moved to the gdb 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"
```
Uart usb port should output something at 115200baud, (I use moserial to monitor).
Please refer to [DEBUG_ON_ZEDBOARD.md](./DEBUG_ON_ZEDBOARD.md)