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).
40 lines
2.1 KiB
CMake
40 lines
2.1 KiB
CMake
if(NOT DIRECTORY)
|
|
message(FATAL_ERROR "DIRECTORY variable is undefined")
|
|
endif()
|
|
file(MAKE_DIRECTORY "${DIRECTORY}")
|
|
|
|
macro(download URL FILENAME)
|
|
file(DOWNLOAD "${URL}" "${DIRECTORY}/${FILENAME}"
|
|
STATUS _status)
|
|
list(GET _status 0 _result)
|
|
if(NOT _result EQUAL 0)
|
|
list(GET _status 1 _log)
|
|
message(FATAL_ERROR "Download of ${URL} failed: ${_log}")
|
|
endif()
|
|
endmacro()
|
|
|
|
macro(add_suffix)
|
|
cmake_parse_arguments(ARG "" "FILE;SUFFIX" "SYMBOLS" ${ARGN})
|
|
if (NOT ARG_SUFFIX)
|
|
set(ARG_SUFFIX "Iso")
|
|
endif()
|
|
file(READ "${DIRECTORY}/${ARG_FILE}" _content)
|
|
foreach(_symbol IN LISTS ARG_SYMBOLS)
|
|
string(REPLACE "${_symbol}" "${_symbol}${ARG_SUFFIX}" _content "${_content}")
|
|
endforeach()
|
|
file(WRITE "${DIRECTORY}/${ARG_FILE}" "${_content}")
|
|
endmacro()
|
|
|
|
download("https://standards.iso.org/iso/14816/ISO14816%20ASN.1%20repository/ISO14816_AVIAEINumberingAndDataStructures.asn" "ISO14816.asn")
|
|
add_suffix(FILE "ISO14816.asn" SYMBOLS IssuerIdentifier)
|
|
download("https://forge.etsi.org/rep/ITS/asn1/is_ts103301/-/raw/v2.1.1/iso-patched/ISO24534-3_ElectronicRegistrationIdentificationVehicleDataModule-patched.asn" "ISO24534-3.asn")
|
|
download("https://standards.iso.org/iso/ts/19091/ed-2/en/ISO-TS-19091-addgrp-C-2018.asn" "ISO19091.asn")
|
|
add_suffix(FILE "ISO19091.asn" SYMBOLS HeadingConfidence Heading SpeedConfidence)
|
|
download("https://standards.iso.org/iso/ts/19321/ed-2/en/ISO19321IVIv2.asn" "ISO19321.asn")
|
|
download("https://forge.etsi.org/rep/ITS/asn1/is_ts103301/-/raw/v2.1.1/iso-patched/ISO14906(2018)EfcDsrcGenericv7-patched.asn" "ISO14906-1-7.asn")
|
|
add_suffix(FILE "ISO14906-1-7.asn" SYMBOLS IssuerIdentifier)
|
|
download("https://forge.etsi.org/rep/ITS/asn1/is_ts103301/-/raw/v2.1.1/iso-patched/ISO14906(2018)EfcDsrcApplicationv6-patched.asn" "ISO14906-0-6.asn")
|
|
add_suffix(FILE "ISO14906-0-6.asn" SYMBOLS StationType IssuerIdentifier)
|
|
download("https://forge.etsi.org/rep/ITS/asn1/is_ts103301/-/raw/v2.1.1/iso-patched/ISO14823-missing.asn" "ISO14823.asn")
|
|
download("https://forge.etsi.org/rep/LIBS/LibIts/-/raw/798bfce82f199cdfdef4289098bf900832e3932c/asn1/IS/IVI_ISO_TS_17419.asn" "ISO17419.asn")
|