-
Notifications
You must be signed in to change notification settings - Fork 7.3k
ESP32 development overview #29394
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I think after ESP32 WiFi Support a lot of basic stuff will be fixed, like WIFI, Flash Cache, 2nd Stage Bootloader support, Linker script updates. Could you please tell us if there are any progress on the mentioned drivers ? (for cooperation and avoiding double efforts) |
The items below are implemented. We are a few days of creating a PR for that: Add ESP-IDF bootloader that handles SoC initialization (cache, MMU and partition tables). In long term, Zephyr's bootloader might be supported as well.
Set XIP support by default to support ESP-IDF bootloader.
Update linker script with proper flash, ram sections and symbols map.
Update clock settings and entropy drivers.
Add timer/counter support.
Add NVS support.
Add Wifi sources and network drivers. We also expect to start working on SPI for the next days. |
Could you add some information when/if Secure Boot and Flash Encryption are planned? |
Sure. I can't tell you exactly when but It is on our development backlog. I'll update you once we get ourselves working on it. |
Note, I added support for ESP32-S2 in a PR a while back but since it required an unreleased version of the ESP-IDF (v4.2), I stalled work on that PR until Espressif officially released a stable version supporting ESP32-S2; If youre changing the way Zephyr includes the IDF, Id be happy to adapt my PR for it but I think waiting on a stable release of it would be best |
Thank you for update.
Yes we are trying to align with stable ESP-IDF v4.2 release timelines. Release candidate is due sometimes next week, followed up by formal announcement. Regarding how Zephyr consumes IDF, some discussions are on-going at zephyrproject-rtos/esp-idf#4, we will keep you posted on your PR for |
@sylvioalves Since ESP-IDF v4.2 has been finally been released, what is the plan for updating the esp-idf/hal_espressif so I can align my ESP32-S2 PR to it? |
@mrrosen, we are waiting approval to use this |
Hi! I saw some forks that contain some features for the esp32. Maybe it will be useful if anyone that works on features for the esp32 can post here his fork. It will remove any duplication of work and allow people to test and use some code which has not upstreamed yet. I intend to add support for spi and I hope that I am not duplicating this. |
Yes, we need to handle that in some way. |
Great to hear of your progress on ESP32! In case you do not have enough to do, if I understand correctly S3 adds USB - perhaps USB support should go on the list? Thanks for your efforts! |
Thanks for your great effort. Is there any chance to support the SmartConfig mechanism? |
It's been awhile, any updates? Just purchased a ESP32-S2 |
@sylvioalves how is the progress going on security features like secure boot and flash encryption? |
Hi @tiborrr, our current efforts are directed to support ESP32S2 and ESP32C3. For security, so far, we haven't advanced on such front. But I invite you to attend to our lightning talk about our plans on Zephyr Summit. |
I already have registered so I will definitely join the talk. Thanks for the update! |
Is there a recording of that talk available somewhere? |
@torntrousers The recording is not yet online however the slides are. Perhaps you can find what you need in there. https://drive.google.com/file/d/1AmP1R9Mr08nqR_wwNLsgOHaiKaLR9UlS/view?usp=sharing |
Thanks! I'm completly new to Zephyr and this morning have been trying to get it running on an ESP32 but really quite lost - none of the doc or guides I can find seem to work right away or be quite up to date. Is there something up to date somewhere that would tell me how to get helloworld or blinky running on an ESP32 (using a Windows environment, sorry)? |
@torntrousers i actually switched to Ubuntu because of your experience. Getting USB to work on WSL was a pain. Now that I've switched to Ubuntu developing has been a treat. |
@torntrousers Hi, after having your environment properly set, follow the guide below: Let us know if you still face any issue. |
Thanks @sylvioalves , I have things compiling but can't get the standard samples working, eg: #36412 and #36414 |
Hi, any progress on this? I ask since I registereded callbacks for CARRIER_UP/DOWN events to get notified when WiFi is connected/disconnected but it is problematic since sometimes the connection attempt fails and the CARRIER_DOWN event is not generated, since it was never up in the first place (I do get the DOWN event after an UP event). |
When approximately ADC and BLE will be supported on ESP32C6? |
It is on short term backlog (i.e. for Q1/Q2-25). I wouldn't hold my breath, though, we have been busy doing lots of bugfixes and things might be delayed. If it is blocking you and given ADC is already supported by other devices, you can give it a try (and please, report back if you do so). |
Hi! Is there an update for 15.4 RF for C6 (to be used as an underlying radio for zephyr oThread) ? Looking at devcon24 video it seemed that 15.4 radio was planned for Q4 but thread stack was on backlog... Also what is the current status of I2C on C6 ? Fix #82941 seems merged but still appears as unsupported on the status table ? Thanks a lot! |
Please, check this WIP: |
@sylvioalves Thanks a lot for pointing this one ! Great to see there is active work on this. Hopefully it will land soon :-) |
Hi @sylvioalves, I want to make a contribution to this project, particulary regarding the USB OTG (as I am exactly from that team). I would like to ask is there any suggestion (notes, lists of issues, so anything), from where to start? Thanks. |
Hi, It starts with hal_espressif, it should contain all the LL layer. Also, I suggest ESP32-S3. The work will be to glue those LL calls to Zephyr API (oversimplified). The hal_espressif is not a public API and lacks user-level documentation, but luckily, you can refer to ESP-IDF and other peripherals already supported in Zephyr. hal_espressif has some developer-level documentation, as it is an extract from ESP-IDF and we try to minimize changes to it because of that. The closest to ESP-IDF it is, the less difficult to update. Related feature request: #46044 |
Hey there :) I might have discovered a bug/regression from zephyr 3.6 -> 3.7 with BT Mesh and wanted to know where I should report this. In the repo for It's about the samples/bluetooth/mesh which perfectly works with an esp32c3 in Zephyr 3.6 but with 3.7 the CPU logs an
Not sure if this particular log is from 3.7, 4.0 or just main (tested all of them with basically the same result). Hope this is the right place to submit such issues :) |
It is not a bug because this is unsupported. While we have feedback from people saying BT mesh works, it's marked as unsupported due to lack of testing (our side) or more reliable feedback, with the tests executed, set-up, etc, then asking here to change status. As for where to add this... You should open a feature request (GH issues) about bt-mesh (if one is not there yet) and then comment these findings there. |
Hello, is low power mode available? I'm aware it's not checked off on the table but I see light/deep sleep examples + read some forums online where it might be. Thank you. https://docs.zephyrproject.org/latest/samples/boards/espressif/index.html |
Only deep sleep. You can also use RTC RAM to save data between deep sleep cycles. |
Please do that, that would be awesome and would be a real help me for porting the of the Adafruit-ESP32-S2 Feather Boards to Zephyr. Right now I have nearly everything running except that someone will not be able to see a serial output over the USB-C Port, because USB-OTG is currently not supported and the only way to get some feedback from the board is currently to hook up an USB-to-RS232 converter on the dedicated RX/TX pins from this board. |
FYI, I've start an Adafruit repo for Zephyr board definitions of Adafruit boards: https://github.com/adafruit/zephyr-support We should have the first few boards there in the next few weeks. We're also working to integrate TinyUSB with Zephyr. That should enable USB support on ESP. hathach/tinyusb#2962 We're moving CircuitPython onto Zephyr so you'll see more Adafruit funded Zephyr work. (Adafruit funds TinyUSB as well.) |
Nice to hear, as you probably already saw, I started to port the Adafruit ESP32-S2 feather boards, my branch could be found here https://github.com/DBS06/zephyr/tree/esp32s2_tft_feather/boards/adafruit/feather_esp32s2_tft |
On 2/4/2025 12:34 PM, Scott Shawcroft wrote:
...We're also working to integrate TinyUSB with Zephyr.
That should enable USB support on ESP. hathach/tinyusb#2962
<hathach/tinyusb#2962>
This is great, but confusing.
As a tinyUSB user (and very minor contributor), it seems tinyUSB is
really two important layers:
- drivers, much more likely to work than some of the extremely
unfortunate vendor-provided code, and
- USB stack
But, Zephyr already has a USB stack?
Can you say a few words about what approach is taken here Scott?
Also, a big problem for some of us is lack of USB-OTG support.
Will this help?
Thanks very much for this work!
Best Regards, Dave
…--
Dave Nadler, USA East Coast voice +01 (978) ***@***.***, Skype
Dave.Nadler1
|
@roma-jam Have you advanced on USB effort? We started to work on it, if you are far advanced, please, share a draft PR so we can contribute. Otherwise we will move ahead internally. |
Hi @rftafas, Thanks, but I don’t have anything so far, as I don’t have any experience with Zephyr. But for the past two days I understood how to build/debug example with the ucd on s3 and interact with |
It has two, but we already have TinyUSB integration in CircuitPython. We'd rather use that.
My goal is for TinyUSB to work as a Zephyr module. It can use the device tree definitions for USB without enabling the Zephyr USB stack. Instead, TinyUSB can hook in instead. TinyUSB also gets a Zephyr OSAL so that it uses Zephyr queues and locks and such.
Problem with TinyUSB? I think that support is orthogonal to Zephyr support. It is also something we'd like to see happen but isn't urgent. |
If TinyUSB uses Zephyr APIs to access USB hardware, then it needs the USB-OTG peripheral supported. It is not, currently and it is a WIP. |
TinyUSB isn't using the Zephyr API to talk to the peripheral. It uses a vendor HAL or registers directly. |
Hello, |
@RootLUG, can you provide which Zephyr rev you tested and also the log output? |
@sylvioalves here are the logs. I am using latest zephyr on macos platform (Zephyr version: 4.1.99, build: v4.1.0-837-g62f5386518a0), the sample is from wifi_shell on esp32c6_devkitc but it exhibits the same behaviour when I use a custom pcb with c6 or non sample code where I attempt initialize wifi interface manually
|
@sylvioalves Are there any plans to add support for Bluetooth to the ESP32-C6? If I remember correctly, it was listed as "work in progress" in the middle of last year. Is there a reason why it's now just marked as unsupported? |
Unsupported is the current status. We know some users got hands on to make it work, but I got no info on results. It is on roadmap. |
ESP32C6 I worked on this yesterday make a patch to add the I2S to dtsi and header files. Now I'm able to run a "west build" but stuck at the point that the hal function from the esp32 blob is not linked.
I need a hint! Here is my patch Happy hacking. Fixed my build issue, under modules/hal/espressif diff --git a/zephyr/esp32c6/CMakeLists.txt b/zephyr/esp32c6/CMakeLists.txt + zephyr_sources_ifdef( |
Can confirm that the BCLK , WS and SD is working. |
ESP32 Development Status
Light sleep/Deep sleep
slave
(Zephyr port - bootloader only)
(Espressif port, secure boot V2)
Last update: 09/Apr/2025
Introduction
This RFC gives an overview of features and enhancements we plan to contribute for Espressif's ESP32 SoC device. It is not intended to be a proper roadmap but it gives some information about our effort on having more support for Zephyr RTOS.
Problem description
Currently, ESP32 support consists of a few peripheral implementations as such as GPIO, UART and I2C, which limits device usage on Zephyr. There are missing peripheral drivers as such as WiFi and BLE that are very often requested by the community, but lack implementation.
Proposed change
The proposal is to enable the powerful features that ESP32 SoC can offer, starting by bringing up WiFi subsystem. Meanwhile, we shall also work on developing yet unsupported peripheral drivers.
Detailed RFC
Initial Development
As there have already been some work on the WiFi bring up, a few modifications can be listed below describing initial requirements:
WiFi Driver and Network Integration
We have already implemented the WiFi adapter driver, which binds ESP32 internal WiFi to Zephyr's
ETHERNET_L2
layer. However, Zephyr has yet no support for WiFI SoC that runs asnon-offloaded
driver. It means that creating a network device followingsubsys/net/l2/wifi/wifi_mgmt.c
API does not allow binding to theETHERNET_L2
. There is no such implementation for aWIFI_L2
layer, which would allow usingWIFI_MGMT
API to integrate withETHERNET_L2
layer.This will be addressed in another issue focused on network integration and user API.
ESP32 HAL Module
To keep the folder structure in sync with other vendors, and to update ESP-IDF source to version 4.2, repository
modules/hal/esp-idf
shall be updated tomodules/hal/espressif
. Only minimal and necessary ESP-IDF sources shall be included in this repository, which includes source files, adapter layers and symbols to handle internal calls.It will require changing
west.yml
to point to this new branch.Peripherals
The list below shows currently unsupported peripherals. We plan to start developing a few drivers in long term. Porting all the components is tricky due to FreeRTOS dependency in the current ESP-IDF implementation. SPI related code has special considerations due to dual-core SoC architecture and XIP (code execution from Flash). BLE and WiFi share the same RF radio, which implies handling their coexistence by hardware or software. ESP-IDF already takes care of everything but the porting is not straightforward. Also, we still have to analyze issues regarding multi-core support, SMP and power management.
Future Plans
Future Devices
It is well known that Espressif has other chipsets on its platforms. We plan to add support to them as well when a reasonable ESP32 support on Zephyr is achieved for product level usage. For the time being, there are plans to add support for (not in any chronological order):
More may be added to the list as Espressif adds more chipsets to its linecard.
The text was updated successfully, but these errors were encountered: