Skip to content

feat: add ESP32 (LX6) WiFi support - #54

Merged
deadprogram merged 3 commits into
mainfrom
esp32
Jul 24, 2026
Merged

feat: add ESP32 (LX6) WiFi support#54
deadprogram merged 3 commits into
mainfrom
esp32

Conversation

@deadprogram

@deadprogram deadprogram commented Jul 13, 2026

Copy link
Copy Markdown
Member

Port the WiFi driver to the original ESP32 (Xtensa LX6), modeled on the ESP32-S3 implementation.

The examples that use lneto directly work, but the net/http package at present uses too much memory to work on this device.

@deadprogram

deadprogram commented Jul 13, 2026

Copy link
Copy Markdown
Member Author

This PR requires the changes in tinygo-org/tinygo#5510 to be compiled. It also requires the changes in tinygo-org/tinygo#5511 to be flashed.

UPDATE: both of those are now complete! 😸

Port the WiFi driver to the original ESP32 (Xtensa LX6), modeled on the
ESP32-S3 implementation.

Signed-off-by: deadprogram <ron@hybridgroup.com>
Signed-off-by: deadprogram <ron@hybridgroup.com>
- NetDev: use global singleton instead of heap-allocating per call
- event_group_wait_bits: inline matches closure to prevent captured
  variables escaping; replace time.Now()/time.Since() with uint64
  microsecond arithmetic
- semphr_take: same time.Now → uint64 microsecond fix
- task_create_pinned_to_core: replace make(chan) with atomic flag +
  Gosched spin
- wifi_thread_semphr_get: use pre-allocated threadSems[8] pool
  instead of heap-allocating &semaphore{} per goroutine

Signed-off-by: deadprogram <ron@hybridgroup.com>
@deadprogram

Copy link
Copy Markdown
Member Author

I have added another commit to this PR which is to reduce heap allocations, both in the ESP32 as well as all of the other supported processors.

@soypat soypat left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lneto part looks good! Also nice to see you brought in latest natiu-mqtt :)

@deadprogram

Copy link
Copy Markdown
Member Author

Now merging, thank you for review @soypat

@deadprogram
deadprogram merged commit 740c1d1 into main Jul 24, 2026
1 check passed
@deadprogram
deadprogram deleted the esp32 branch July 24, 2026 05:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants