diff --git a/platforms/platformio.esp32p4.ini b/platforms/platformio.esp32p4.ini index 2381d0e..0ca70b3 100644 --- a/platforms/platformio.esp32p4.ini +++ b/platforms/platformio.esp32p4.ini @@ -19,9 +19,15 @@ board_build.partitions = huge_app.csv ; stalls during execution, silently corrupting LED protocol timing. ; See FastLED src/platforms/esp/32/drivers/parlio/ for the canonical chipset list. ; -; Do NOT add -DARDUINO_USB_CDC_ON_BOOT=1 or -DARDUINO_USB_MODE=1 here. They -; wire Serial to the USB-CDC interface, which only enumerates when a USB host -; is connected — boards powered from a wall adapter then hang in setup(). +; Do NOT add -DARDUINO_USB_CDC_ON_BOOT=1 here. It wires Serial to the USB-CDC +; interface, which only enumerates when a USB host is connected — sketches +; that touch Serial in setup() (especially `while (!Serial) {}`) then hang +; when the board is powered from a wall adapter instead of a PC. +; +; ARDUINO_USB_MODE selects HWCDC vs TinyUSB *when CDC-on-boot is enabled*; +; it has no effect on Serial routing while CDC_ON_BOOT=0, so we leave it +; unset here. P4's upstream default is 0 (TinyUSB); C3/C5/C6/H2 force it to +; 1 (HWCDC) via platform.txt. build_flags = -DCONFIG_PARLIO_TX_ISR_HANDLER_IN_IRAM=1 -DCONFIG_PARLIO_TX_ISR_CACHE_SAFE=1