From 9c9b99686edfc2809d09eebfb012eaeed5e3bb96 Mon Sep 17 00:00:00 2001 From: Alessandro Gatti Date: Wed, 17 Dec 2025 03:57:52 +0100 Subject: [PATCH] tests/target_wiring: Provide an ESP8266 target wiring module. This commit introduces ESP8266 support for target wiring tests, fixing execution of relevant tests that once failed on that platform. ESP8266 boards need to have GPIO4 and GPIO5 connected together to provide a UART loopback, in order to test whether UART data effectively flows through. The wiring-enabled UART transmission timing test was also updated with measurements compatible with a few ESP8266 test boards. Signed-off-by: Alessandro Gatti --- tests/extmod/machine_uart_tx.py | 2 ++ tests/target_wiring/esp8266.py | 7 +++++++ 2 files changed, 9 insertions(+) create mode 100644 tests/target_wiring/esp8266.py diff --git a/tests/extmod/machine_uart_tx.py b/tests/extmod/machine_uart_tx.py index 70d57be46..1ff9af64b 100644 --- a/tests/extmod/machine_uart_tx.py +++ b/tests/extmod/machine_uart_tx.py @@ -19,6 +19,8 @@ if "alif" in sys.platform: bit_margin = 1 elif "esp32" in sys.platform: timing_margin_us = 400 +elif "esp8266" in sys.platform: + timing_margin_us = 4100 elif "mimxrt" in sys.platform: initial_delay_ms = 20 # UART sends idle frame after init, so wait for that bit_margin = 1 diff --git a/tests/target_wiring/esp8266.py b/tests/target_wiring/esp8266.py new file mode 100644 index 000000000..336deb3dd --- /dev/null +++ b/tests/target_wiring/esp8266.py @@ -0,0 +1,7 @@ +# Target wiring for general esp8266 board. +# +# Connect: +# - GPIO4 to GPIO5 + +uart_loopback_args = (1,) +uart_loopback_kwargs = {}