To compile and upload the firmware for the Lilygo T-2CAN board using the Arduino IDE, please configure the following settings:
-
Board Selection: Select ESP32S3 Dev Module as your target board.
- If you haven't set up the ESP32 core yet, please follow the LilyGO T-2CAN Quick Start Guide to download the required board files.
-
Serial Output Configuration: USB CDC On Boot needs to be set to "Enabled" for the printouts to appear in the Serial Monitor.
If you prefer using the command line, you can build and flash the firmware using the Arduino CLI.
-
Install the ESP32 core and required libraries:
arduino-cli core update-index --additional-urls https://espressif.github.io/arduino-esp32/package_esp32_index.json arduino-cli core install esp32:esp32 --additional-urls https://espressif.github.io/arduino-esp32/package_esp32_index.json arduino-cli lib install PubSubClient arduino-cli lib install autowp-mcp2515
-
Compile the sketch (ensuring USB CDC On Boot is enabled, and optionally embedding the current git commit hash):
arduino-cli compile --fqbn esp32:esp32:esp32s3:CDCOnBoot=cdc \ --build-property "compiler.cpp.extra_flags=-DGIT_HASH_RAW=$(git rev-parse --short HEAD)" \ simppeliTCU(If compiled in Arduino IDE or without
GIT_HASH_RAW, the version string insimppeliTCU/version.hdefaults to showing(local)as the commit hash.) -
Upload to the board (replace
<PORT>with your COM port, e.g.,COM3or/dev/cu.usbserial...):arduino-cli upload -p <PORT> --fqbn esp32:esp32:esp32s3:CDCOnBoot=cdc simppeliTCU
- CMake 3.14+
- MinGW or Visual Studio (Windows)
- Git (for FetchContent to download Google Test)
# Navigate to test directory
cd test
# Create and enter build directory
mkdir build
cd build
# Configure with MinGW
cmake -G "MinGW Makefiles" ..
# Build the tests
cmake --build .
# Run all tests
ctestReleases are created automatically by GitHub Actions when the version is bumped on the main branch:
- Update
CHANGELOG.md: move or add the changes under a new version heading (e.g.,## [v0.1.1] - YYYY-MM-DD). - Update
simppeliTCU/version.h: bumpFW_VERSIONto the matching version string (e.g.,#define FW_VERSION "v0.1.1"). - Commit and push/merge the changes to
main.
When the workflow runs on main and detects that a git tag for FW_VERSION does not yet exist, it automatically:
- Embeds the short git commit hash into the firmware binaries.
- Creates and pushes the annotated git tag (e.g.,
v0.1.1). - Extracts the matching release notes from
CHANGELOG.md. - Publishes a GitHub Release with the compiled firmware binaries (
.binand.zip) for all supported boards.

