b54e1c22e7
Both compile the same portable core (src/meshcore_companion.c) and differ only in the UART transport: - examples-esp-idf/tty_bridge: full ESP-IDF project (UART driver), core compiled directly via the component CMakeLists (no copy) - examples-stm32/uart_bridge: HAL drop-in (meshcore_setup/meshcore_poll) for a CubeMX/CubeIDE project, with integration README README updated: new examples in layout + an 'Other platform examples' section. Verified host build/test still pass and both new examples pass -Wall -Wextra syntax checks against stubbed platform headers. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
ESP-IDF example: tty_bridge
Drives a MeshCore Companion Radio over a hardware UART using the ESP-IDF UART
driver. The protocol logic is the repo's portable C core
(src/meshcore_companion.c) — this example only supplies the transport and an
app_main() loop.
Wiring
| Companion radio | ESP32 (default pins) |
|---|---|
| TX → host RX | GPIO16 (MC_UART_RX_PIN) |
| RX ← host TX | GPIO17 (MC_UART_TX_PIN) |
| GND | GND |
Change the pins/UART at the top of main/main.c. The radio must run the serial
companion firmware (companion_radio_usb) bound to this UART.
Build
Requires an installed ESP-IDF (v5.x). From this directory:
idf.py set-target esp32s3 # or esp32, esp32c3, ...
idf.py build flash monitor
main/CMakeLists.txt compiles ../../../src/meshcore_companion.c directly, so
there is no copy of the core to keep in sync.