Generate ESP-IDF Unity test firmware for prototype board validation. Run after PCB assembly to verify all GPIOs, buses, and peripherals work correctly.
Generates Unity test firmware from board_config.h for post-assembly prototype validation.
cd /Users/pierrejonnycau/Documents/WORKS/esp32-emu-turbo
python3 scripts/generate_hw_tests.py
Reads software/main/board_config.h and generates software/test/test_hardware.c with 20 tests:
# Option A: replace app_main temporarily
cd software
cp main/main.c main/main.c.bak
cp test/test_hardware.c main/main.c
idf.py build flash monitor
mv main/main.c.bak main/main.c
# Option B: use ESP-IDF test component (preferred)
idf.py -T test build flash monitor
USB-CDC serial output (115200 baud):
20 Tests 0 Failures 1 Ignored
OK
scripts/generate_hw_tests.py — test generator scriptsoftware/test/test_hardware.c — generated test firmwaresoftware/main/board_config.h — GPIO pin definitions (input)