obu-firmware builds against the vanetza-idf C-ITS library, which until now came from the colleague's microbu-esp32c5 tree beside the repository and was not tracked here, so a clone of this repository could not build the firmware it ships. The library alone is now part of obu-firmware, as obu-firmware/external/vanetza-idf: their external/vanetza-idf at commit cf4b99f, unchanged (9775 files; see its PROVENANCE.md). CMake takes it from there by default; -DVANETZA_IDF_DIR still points the build elsewhere. The rest of the colleague's tree (their own VAM firmware, PKI tooling, station-link Python tools, the V2X2MAP bridge) stays out of this repository and gitignored; nothing is pushed to their repository. NOTES.md, docs/06, TODO.md and the pcap verifier's usage line point at the new location.
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")
|