Skip to content

Commit f27081a

Browse files
feat(firmware): prepare separate headless S3 Node5 native USB experiment
1 parent a215e6d commit f27081a

7 files changed

Lines changed: 70 additions & 3 deletions

File tree

‎firmware/esp32-csi-node/README.md‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,19 @@ This firmware captures WiFi Channel State Information (CSI) from an ESP32-S3 (pr
2121
2222
## ESP32-C5 candidate: installation and qualification
2323

24+
### Separate local bare S3 Node 5 native USB experiment
25+
26+
The local `sdkconfig.defaults.s3-node5-headless-usb` overlay is for a bare
27+
ESP32-S3-N16R8 without a display. It keeps the normal 2.4 GHz S3 radio, selects
28+
node ID 5 and primary native USB Serial/JTAG, and disables display, external
29+
PSRAM, WASM and all status-LED GPIO initialization. Apply after
30+
`sdkconfig.defaults` and `sdkconfig.defaults.4mb` using a separate build tree
31+
with ESP-IDF 6.0.2. The complete 4 MB layout leaves the extra 12 MB unused.
32+
Embedded local version `0.8.18-s3n5-usb` is not an official release tag.
33+
Credentials are entered through operator setup, never included in this image.
34+
This source profile does not establish physical boot, provisioning or sensing
35+
accuracy; test it independently from the C5 5 GHz experiment.
36+
2437
The source checkout adds an experimental ESP32-C5 headless target. Bounded
2538
real-board boot and CSI transport checks are recorded below; they do not
2639
establish sensing accuracy, consistent cadence or long-run reliability.

‎firmware/esp32-csi-node/main/Kconfig.projbuild‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -585,8 +585,18 @@ endmenu
585585

586586
menu "Onboard LED (ADR-183)"
587587

588+
config S3_DISABLE_STATUS_LED
589+
bool "Do not initialize an ESP32-S3 status LED GPIO"
590+
depends on IDF_TARGET_ESP32S3
591+
default n
592+
help
593+
Use for a bare headless board whose LED wiring is not selected.
594+
Unlike disabling the visualization, this also skips the boot-time
595+
LED clear and never initializes an RMT channel for the LED.
596+
588597
config LED_GAMMA_VIZ
589598
bool "Onboard WS2812: 40 Hz gamma flicker + CSI-motion colour"
599+
depends on !S3_DISABLE_STATUS_LED
590600
default y
591601
help
592602
Drive the onboard WS2812 as a GENUS-style 40 Hz gamma square wave

‎firmware/esp32-csi-node/main/main.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ void app_main(void)
404404
* common module). On C6, GPIO 38/48 don't exist (only 0-30) — gate by target.
405405
* Behaviour is set by CONFIG_LED_GAMMA_VIZ (ADR-183): on = 40 Hz gamma flicker
406406
* coloured by CSI motion; off = clear the LED at boot. */
407-
#if !defined(CONFIG_IDF_TARGET_ESP32C5) || CONFIG_C5_STATUS_LED_GPIO >= 0
407+
#if !defined(CONFIG_S3_DISABLE_STATUS_LED) && (!defined(CONFIG_IDF_TARGET_ESP32C5) || CONFIG_C5_STATUS_LED_GPIO >= 0)
408408
#if defined(CONFIG_IDF_TARGET_ESP32C5)
409409
const int led_gpio = CONFIG_C5_STATUS_LED_GPIO;
410410
#elif defined(CONFIG_IDF_TARGET_ESP32C6)
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Local bare ESP32-S3-N16R8 experiment; no display or external PSRAM.
2+
# Apply after sdkconfig.defaults and sdkconfig.defaults.4mb.
3+
CONFIG_CSI_NODE_ID=5
4+
# CONFIG_DISPLAY_ENABLE is not set
5+
# CONFIG_SPIRAM is not set
6+
# CONFIG_WASM_ENABLE is not set
7+
CONFIG_S3_DISABLE_STATUS_LED=y
8+
# CONFIG_LED_GAMMA_VIZ is not set
9+
# CONFIG_ESP_CONSOLE_UART_DEFAULT is not set
10+
CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG=y
11+
# CONFIG_ESP_CONSOLE_SECONDARY_USB_SERIAL_JTAG is not set

‎firmware/esp32-csi-node/test/Makefile‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,12 @@ test_mmwave_pins: test_mmwave_pins.c $(MAIN_DIR)/mmwave_pins.h
221221
run_mmwave_pins: test_mmwave_pins
222222
./test_mmwave_pins
223223

224-
host_tests: run_mmwave_pins run_self_ping run_edge_stbc run_edge_current_grid run_csi_he_gate run_node_mdns run_adr110 run_vitals run_mmwave_detect run_thermal run_csi_sanitize \
224+
run_s3_headless_led:
225+
python3 test_s3_headless_led.py
226+
227+
.PHONY: run_s3_headless_led
228+
229+
host_tests: run_s3_headless_led run_mmwave_pins run_self_ping run_edge_stbc run_edge_current_grid run_csi_he_gate run_node_mdns run_adr110 run_vitals run_mmwave_detect run_thermal run_csi_sanitize \
225230
run_c6_antenna run_serial_onboarding run_onboarding_identity run_onboarding_console run_delivery_contract run_ota_health \
226231
run_config_rules run_config_recovery
227232
@echo "Host tests passed (firmware contracts, DSP, configuration recovery, onboarding and OTA health)"
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
"""Preprocess the production LED block to prove the profile cannot drive it."""
2+
import pathlib
3+
import subprocess
4+
import tempfile
5+
import unittest
6+
7+
8+
class S3HeadlessLedTests(unittest.TestCase):
9+
def test_bare_profile_removes_led_initialization_without_changing_defaults(self):
10+
source = (pathlib.Path(__file__).resolve().parents[1] / "main/main.c").read_text()
11+
start = source.index("#if !defined(CONFIG_S3_DISABLE_STATUS_LED)")
12+
end_marker = "#endif /* C5 LED wiring is opt-in; never drive an unknown board pin. */"
13+
end = source.index(end_marker, start) + len(end_marker)
14+
with tempfile.TemporaryDirectory() as directory:
15+
path = pathlib.Path(directory) / "led.c"
16+
path.write_text(source[start:end])
17+
for defines, enabled in [
18+
(["-DCONFIG_IDF_TARGET_ESP32S3=1"], True),
19+
(["-DCONFIG_IDF_TARGET_ESP32S3=1", "-DCONFIG_S3_DISABLE_STATUS_LED=1"], False),
20+
(["-DCONFIG_IDF_TARGET_ESP32C6=1"], True),
21+
(["-DCONFIG_IDF_TARGET_ESP32C5=1", "-DCONFIG_C5_STATUS_LED_GPIO=-1"], False),
22+
]:
23+
out = subprocess.check_output(["cc", "-E", "-P", *defines, str(path)], text=True)
24+
self.assertEqual("led_strip_new_rmt_device" in out, enabled)
25+
26+
27+
if __name__ == "__main__":
28+
unittest.main()
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.8.18
1+
0.8.18-s3n5-usb

0 commit comments

Comments
 (0)