fix: warn of radio pins that block flashing over USB

GPIO2 on the original ESP32, 46 on the S2/S3 and 8 on the C3/C6 don't stop
a normal boot, but held at the wrong level at reset they keep esptool from
starting the download mode.  The WT32-ETH01 wiring puts TX on GPIO2.

Each warning now says what the pin does and what to do: move it for a pin
that stops the boot, disconnect it to flash for one that only blocks USB.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
cjkas 2026-10-29 22:54:11 +01:00
parent 658f5eabeb
commit 92e69d599f
6 changed files with 87 additions and 40 deletions

View file

@ -17,6 +17,12 @@ static void test_gpio0_picks_the_boot_mode() {
TEST_ASSERT_NOT_NULL(bootPinEffect(0));
}
static void test_gpio46_blocks_flashing_over_usb() {
const char *effect = bootPinEffect(46);
TEST_ASSERT_NOT_NULL(effect);
TEST_ASSERT_NOT_NULL(strstr(effect, "USB"));
}
static void test_gpio12_is_safe() {
// 12 is the S3's default SCK.
TEST_ASSERT_NULL(bootPinEffect(12));
@ -32,6 +38,7 @@ int main(int, char **) {
UNITY_BEGIN();
RUN_TEST(test_gpio45_picks_the_flash_voltage);
RUN_TEST(test_gpio0_picks_the_boot_mode);
RUN_TEST(test_gpio46_blocks_flashing_over_usb);
RUN_TEST(test_gpio12_is_safe);
RUN_TEST(test_default_radio_pins_are_safe);
return UNITY_END();