Skip to content

Commit 703d537

Browse files
Copilotsofthack007
andauthored
Restore bit-shift qualifier; clarify hardware targets across instruction files
Agent-Logs-Url: https://github.com/MoonModules/WLED-MM/sessions/c664078f-1422-4406-980a-1eaa131e6c92 Co-authored-by: softhack007 <91616163+softhack007@users.noreply.github.com>
1 parent 71b8d87 commit 703d537

2 files changed

Lines changed: 13 additions & 2 deletions

File tree

.github/copilot-instructions.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22

33
WLED is a fast, feature-rich ESP32/ESP8266 webserver for controlling NeoPixel (WS2812B, WS2811, SK6812) LEDs and SPI-based chipsets. WLED-MM is a fork focused on higher performance (ESP32, ESP32-S3, PSRAM boards), large installs, and advanced audio analysis.
44

5+
## Hardware Targets
6+
7+
| Target | Status |
8+
|---|---|
9+
| ESP32 (classic Xtensa dual-core) | **Primary target** |
10+
| ESP32-S3 | **Primary target** — preferred for larger installs and HUB75 matrix |
11+
| ESP32-S2, ESP32-C3 | Supported |
12+
| ESP8266 | Deprecated — should still compile, but not actively maintained |
13+
514
Always reference these instructions first and fallback to search or bash commands only when you encounter unexpected information that does not match the info here.
615

716
## Setup
@@ -21,7 +30,7 @@ Always reference these instructions first and fallback to search or bash command
2130

2231
**Always run `npm run build` before `pio run`.** The web UI build generates `wled00/html_*.h` header files required by firmware compilation.
2332

24-
Common firmware environments: `esp32_4MB_V4_M`, `esp32_16MB_V4_S_HUB75`, `esp32S3_8MB_PSRAM_M_qspi`, `esp32_16MB_V4_M_eth`, `esp8266_4MB_S`
33+
Common firmware environments: `esp32_4MB_V4_M`, `esp32_16MB_V4_S_HUB75`, `esp32S3_8MB_PSRAM_M_qspi`, `esp32_16MB_V4_M_eth`, `esp8266_4MB_S` (deprecated)
2534

2635
For detailed build timeouts, development workflows, troubleshooting, and validation steps, see [agent-build-instructions.md](agent-build-instructions.md).
2736

.github/cpp.instructions.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,9 @@ uint32_t wg = (((c1 >> 8) & TWO_CHANNEL_MASK) * amount) & ~TWO_CHANNEL_MASK;
244244
return rb | wg;
245245
```
246246

247-
### Bit Shifts Over Division
247+
### Bit Shifts Over Division (RISC-V boards)
248+
249+
On most ESP32 variants (Xtensa core), the compiler already converts power-of-two divisions to shifts at `-O2`, so manual shifts rarely help. On RISC-V based ESP32 boards (ESP32-C3, ESP32-C6, ESP32-H2) the compiler may not do this automatically, so explicit shifts can be beneficial:
248250

249251
Prefer bit shifts for power-of-two operations:
250252

0 commit comments

Comments
 (0)