Files
MicrOBU/microbu-esp32c5/external/vanetza-idf/docs/recipes/cross-compile-dependencies.md
T
Ashin Walpola 0e9525162d Keep the colleague's microbu-esp32c5 tree in this repository
obu-firmware builds against vanetza-idf from microbu-esp32c5/external, but
that tree was gitignored, so a clone of this repository could not build the
firmware it ships. It is now committed here as ordinary files in its own
folder, microbu-esp32c5/: the colleague's commit cf4b99f plus the V2X2MAP
bridge's signature verification (--trust) used on the bench. Nothing is
fetched from or pushed to the colleague's repository; this repository and
its remotes carry everything. The folder's own .gitignore keeps build output,
downloaded components and private key material out, as it did there; the
committed file set is identical to that repository's tracked files.

The ESP32-C5 is still flashed from obu-firmware/, which only takes
vanetza-idf from microbu-esp32c5/, so the two stay separate folders.
FLASHING.md says how to take a newer version of the colleague's tree (copy
it over the folder, rebuild, test, commit).
2026-09-23 17:46:40 +02:00

56 lines
1.8 KiB
Markdown

# Cross-Compilation of Dependencies
This document summarises a few hints for cross-compiling Vanetza's dependencies.
Please note, that cross-compiling is not relevant for you if you plan to use Vanetza on the same system you have built it on.
## Boost
Create a configuration file for Boost.Build in your home directory at `$HOME/user-config.jam` and add following line to it:
using gcc : arm : arm-linux-gnueabihf-g++ ;
The *install* stage does not work in Boost 1.71.0 (and 1.70.0) when cross-compiling.
A workaround for this issue is to remove following lines from `tools/build/src/tools/common.jam` (around line 976):
# From GCC 5, versioning changes and minor becomes patch
if $(tag) = gcc && [ numbers.less 4 $(version[1]) ]
{
version = $(version[1]) ;
}
# Ditto, from Clang 4
if ( $(tag) = clang || $(tag) = clangw ) && [ numbers.less 3 $(version[1]) ]
{
version = $(version[1]) ;
}
Then, the required libraries can be built and installed at given *prefix* path:
:::shell
./b2 --prefix=$HOME/vanetza-deps --with-date_time --with-program_options --with-system --no-samples --no-tests variant=release link=shared cxxstd=11 install
## Crypto++
Version 8.2 can be cross-compiled with the provided `GNUmakefile-cross` makefile.
:::shell
export CXX=arm-linux-gnueabihf-g++
export PREFIX=$HOME/vanetza-deps
export HAS_SOLIB_VERSION=1
make -f GNUmakefile-cross shared
make -f GNUmakefile-cross install
## GeographicLib
Following steps have been tested with version 1.50.
`$VANETZA` refers to the root directory of this repository.
:::shell
mkdir build.arm
cd build.arm
cmake .. -DCMAKE_TOOLCHAIN_FILE=$VANETZA/cmake/Toolchain-Cohda-MK5.cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$HOME/vanetza-deps
make install