With SDSORT_USES_RAM minus SDSORT_CACHE_NAMES and SDSORT_USES_STACK, the sortnames pointer is declared (as its declaration covers DISABLED(SDSORT_USES_STACK)) but the constructor only assigned it under ENABLED(SDSORT_CACHE_NAMES). presort() then writes through the NULL pointer via SET_SORTNAME, hard-faulting the board (e.g. LPC1768) as soon as an SD card with two or more files is mounted.
Assign sortnames whenever it is declared and not heap-allocated: whenever SDSORT_DYNAMIC_RAM is off and either SDSORT_CACHE_NAMES is on or SDSORT_USES_STACK is off. This also skips the wasted static allocation when SDSORT_DYNAMIC_RAM applies.
Add a build test (LPC1768/config-07) covering the crashing combo.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Set USE_xMIN_PLUG / USE_xMAX_PLUG from the homing direction when migrating to a version that has them from one that doesn't.
Apply an active second copy of an option to the target's own line when that line is in the same #if context, so it isn't defined twice.
An #endif the user added was dropped as old stock text whenever an earlier, unrelated #if had been dropped, leaving the user's #if unterminated. Added #if, #else and #endif lines are now carried over or dropped as a block, by their own #if.
A commented-out define with an old option name disabled the option under its current name. When the files also have the current name, that one decides and the old-name line is dropped.
Benefits config migration and thus MarlinWebBuild.
set_pwm_frequency() passed 1000 / f_desired to period_ms(), so every frequency above 1 kHz got a period of 0 ms and the others were rounded to whole milliseconds. Use period_us() with the period in microseconds.
set_pwm_duty() picked one more bit of analogWrite resolution than its scale, so with the default v_size of 255 it wrote 256 at 9 bits and the highest duty was 50 %.
* ✨ ESP32-S3 support (arduino-esp32 2.0.7, ESP-IDF 4.4)
Add BOARD_ESPRESSIF_ESP32S3 and env:esp32s3_idf4: timers, PWM, servos, ADC1 and the I2S stepper stream on the S3, native USB serial as -1 with the emergency parser, M997 restart, and S3-safe M43 pin handling.
The WiFi serial port is now -3 on every ESP32 and can be used in any serial port slot. WiFi modem sleep is turned off to keep WebSocket replies from stalling.
* ✨ ESP32-S2 support
Add the ESP32-S2 to the non-classic ESP32 paths used by the S3.
- Native USB (SERIAL_PORT -1) is the USB OTG port through TinyUSB (USBCDC). Output longer than its 64-byte TX FIFO is sent in pieces.
- Two UARTs: serial port 2 is a sanity-check error.
- ADC1 at the chip's full 13-bit width.
- PWM on GPIO 0-45 (46 is input only); M43 skips the flash, PSRAM, native USB and UART0 pins.
- On a single-core build the IDF doesn't set the spinlock owner, so hal.isr_on() never re-enabled interrupts. Count isr_off() instead.
New board BOARD_ESPRESSIF_ESP32S2, env esp32s2_idf4 and CI tests.
The onboard TMC2209 PDN_UART line is wired to D0 directly and to D1 through 1K; the extra driver to D17 directly and to D16 through 1K. Transmitting on the direct pin leaves the drivers unable to reply, so the BricoLeMon's TX 0 / RX 1 and TX 17 / RX 16 didn't work.
Define only the TX pins (D0, D17) and let pins_postprocess set each RX pin to its TX pin, for single-wire on both boards. The commented E1 hardware serial option names Serial3 (D16/D17), not Serial2.
The MMU refuses to load while its FINDA sees filament. Marlin kept resending the command until it gave up after 30 seconds with a generic communication error that tells the user to check the wiring. Check the FINDA first, and show the existing "filament is already loaded, unload it first" message instead.
When nothing was allowed to park the head (a Load error with the nozzle left hot) the "saved" state never became non-empty, so every poll repeated the save, the planner sync and the log line (about once per second while the error screen waited). Mark the state as saved, and clear it when the MMU recovers.