diff --git a/BUILD_WITH_CMAKE.md b/BUILD_WITH_CMAKE.md index 598751b..f8a5393 100644 --- a/BUILD_WITH_CMAKE.md +++ b/BUILD_WITH_CMAKE.md @@ -73,7 +73,7 @@ The romeo-obsw binary can now be found in the `build_z7` directory. The next ste ## Linux -The obsw can also be compiled and run on linux using the gcc-posix port of FreeRTOS. +The obsw can also be compiled and run on linux using the `gcc-posix` port of FreeRTOS. ### build diff --git a/README.md b/README.md index 2e2e753..6f9ad3a 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,22 @@ 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). +### Compiling Annotations +Bare metal rust on the Zynq requires the use of C-libraries, which affects the compilation. +The current setup includes `cmake` which calls `cargo`to compile the rust `mission` and `framework` creates as `static libraries`. +Then, `gcc` is used to link those two libraries , the `Xilinx Board Support Packages (BSP)` (incl. all hardware drivers), and supplier libraries in the final binary. + +The canocial compiler is debian bookkworm's `arm-none-eabi-gcc 12.2` using `newlib 3.3.0`. + +The **minimum** set of **compiler** (not linker) **flags** (as used by Xilinx to build the First Stage Bootloader (FSBL)) are ++ hardware (HW) type: `-mcpu=cortex-a9 -mfpu=vfpv3 -mfloat-abi=hard` ++ function and data sections, to be able to garbage-collect unused code: `-ffunction-sections -fdata-sections` ++ optimization for release: `-O2` + +Link Time Optimization (LTO) TBD + ## How to debug on hardware? Please refer to [DEBUG_ON_ZEDBOARD.md](./DEBUG_ON_ZEDBOARD.md) \ No newline at end of file