Files
MicrOBU/obu-firmware/sdkconfig.defaults
T
Ashin Walpola 50bbf6552d Rebuild obu-firmware on Niklas Dathe's microbu-firmware
Replace the vanetza-idf port with his current station firmware (microbu-firmware
e4e4bd8: main/, components/microbu_v2x, components/vanetza, external/vanetza) and
re-apply the MicrOBU additions, each marked "MicrOBU:" in the sources:

- V2X_RX (opcode 0x90): every received ITS message, signed or not, through
  gn_unwrap.c, because the stack drops unsigned and foreign-root traffic. 0x85 is
  the spec's RAW_FRAME and 0x86 is reserved. The body is built in v2x_rx.hpp.
- Unsigned transmission (geonet.c) for security profile 1 or station security 0,
  from a random MAC per configuration.
- Radio polled from STATION_CONFIGURE on; manual country policy, TX power
  read-back, static RX buffer, short frames ignored.
- Battery guard (battery_policy.hpp): deep sleep below 3.30 V with no phone on USB.
- No USB writes without a host; last_frame_ms() for the guard.
- 80 KB NVS with the app at 0x20000, 8 MB flash, XIAO ESP32-C5 board, 20 dBm.

Remove the old C firmware, the bench listener and the old vanetza-idf copy. Add
docs/station-link.tex as revision 2 of the interface reference (V2X_RX, unsigned
sending, battery rule, revision history). Add 39 host unit tests (make firmware in
test/host) next to the existing chain, replay, fuzz and battery tests, and point
tools/station_status_watch.py at the new CONFIRM-based status.
2026-11-11 00:13:57 +01:00

57 lines
2.2 KiB
Plaintext

# obu-firmware defaults (ESP32-C5, ESP-IDF 6.0.2). Based on microbu-firmware/firmware/sdkconfig.defaults;
# the differences for this project are marked "MicrOBU:".
CONFIG_IDF_TARGET="esp32c5"
CONFIG_COMPILER_CXX_EXCEPTIONS=y
CONFIG_COMPILER_CXX_RTTI=y
CONFIG_COMPILER_OPTIMIZATION_SIZE=y
CONFIG_ESP_MAIN_TASK_STACK_SIZE=8192
# MicrOBU: the production board is a Seeed XIAO ESP32-C5 with 8 MB of flash (esptool flash-id reports it);
# the partition table only uses the first 4 MB.
CONFIG_MICROBU_BOARD_XIAO_C5=y
CONFIG_ESPTOOLPY_FLASHSIZE_8MB=y
CONFIG_PARTITION_TABLE_CUSTOM=y
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv"
# Network profile: BTP + GeoNetworking, no facilities codecs (the phone hosts the VBS)
CONFIG_MICROBU_V2X_PROFILE_NETWORK=y
CONFIG_MICROBU_V2X_SECURITY=y
CONFIG_MICROBU_V2X_SECURITY_VERIFY=y
CONFIG_MICROBU_V2X_NVS_CREDENTIALS=y
CONFIG_MICROBU_V2X_PKI=y
CONFIG_MICROBU_V2X_HIL=n
CONFIG_MICROBU_V2X_RADIO_C5=y
CONFIG_ESP_WIFI_STATIC_RX_BUFFER_NUM=6
CONFIG_ESP_WIFI_DYNAMIC_RX_BUFFER_NUM=16
CONFIG_ESP_WIFI_DYNAMIC_TX_BUFFER_NUM=16
CONFIG_ESP_WIFI_MGMT_SBUF_NUM=16
# MicrOBU: 20 dBm ceiling (radio_policy.hpp admits 20 dBm on channel 180 only).
CONFIG_ESP_PHY_MAX_WIFI_TX_POWER=20
# Serial link on the native USB Serial/JTAG port; ESP_LOG is carried as LOG frames
CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG=y
CONFIG_ESP_CONSOLE_SECONDARY_NONE=y
CONFIG_ESP_PANIC_HANDLER_IRAM=y
CONFIG_LOG_DEFAULT_LEVEL_INFO=y
CONFIG_LOG_COLORS=n
# Station-internal BLE GATT link: NimBLE, maximum ATT value, persistent bonds.
CONFIG_BT_ENABLED=y
CONFIG_BT_BLUEDROID_ENABLED=n
CONFIG_BT_NIMBLE_ENABLED=y
CONFIG_BT_NIMBLE_ATT_PREFERRED_MTU=512
CONFIG_BT_NIMBLE_SM_SC=y
CONFIG_BT_NIMBLE_SM_LEGACY=n
CONFIG_BT_NIMBLE_SM_SC_ONLY=1
CONFIG_BT_NIMBLE_NVS_PERSIST=y
CONFIG_BT_NIMBLE_MAX_CONNECTIONS=1
CONFIG_BT_NIMBLE_MAX_BONDS=1
CONFIG_BT_NIMBLE_MAX_CCCDS=8
CONFIG_BT_NIMBLE_MSYS_1_BLOCK_COUNT=12
CONFIG_BT_NIMBLE_MSYS_2_BLOCK_COUNT=12
CONFIG_BT_NIMBLE_ROLE_CENTRAL=n
CONFIG_BT_NIMBLE_ROLE_OBSERVER=n
CONFIG_MBEDTLS_HARDWARE_ECC=y
CONFIG_MBEDTLS_HARDWARE_ECDSA_VERIFY=y
CONFIG_MBEDTLS_HARDWARE_SHA=y
CONFIG_MBEDTLS_HARDWARE_AES=n
# pool); without it the throw itself fails and std::terminate resets the board instead of answering resource_limit.
CONFIG_COMPILER_CXX_EXCEPTIONS_EMG_POOL_SIZE=1024