-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
xtensa/esp32: use common Espressif wireless source #15853
xtensa/esp32: use common Espressif wireless source #15853
Conversation
[Experimental Bot, please feedback here] Yes, this PR appears to meet the NuttX requirements, although some minor improvements could be made. Here's a breakdown: Strengths:
Areas for Improvement:
Recommendation: The PR is close to meeting the requirements. Adding the missing issue references, including actual testing logs (or links to them), and clarifying the hardware and build impact will strengthen the PR and make it easier for reviewers to assess. |
default n | ||
depends on ARCH_CHIP_ESP32 | ||
---help--- | ||
Enable optimization of WLAN memory |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please give some hints about that are these optimization. Why are they important? And why did they are enable by default?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's actually disabled by default.
Those are used for dynamic allocation of the buffers used on the WiFi. Seems to be a legacy thing from ESP32.
In fact, this will be probably removed soon as I'm testing an upgrade on esp_wlan.c
to use IOBs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any more updates remaining? Can we move on and merge? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @fdcavalcanti :-) My remarks:
- Please always use
git commit -s
and adhere to commit messages template, see https://github.com/apache/nuttx/blob/master/CONTRIBUTING.md. This is required since 2024 and will be enforced soon. - From what I understand also from other threads and updates Espressif decided to replace "legacy" driver approach with external "HAL" approach? If so this seems a breaking change and should be first discussed on the mailing list with the community. I know this may be easier to code / maintain for you but what is the impact for long term compatibility?
- If external HAL approach is used, what are external packages dependencies required, and can code build fully offline? If no offline build is possible then what packages are required and how to setup them for offline build? This is important for our automated build and runtime testing we are working on. Please update documentation in a free moment where required :-)
Hi Tomek, let me answer about these points:
This isn't true. We are only merging drivers that implement the same peripherals for the same arch in a single common driver. This PR is only removing duplicated code. It's easier for us - Espressif - and for anyone on NuttX to maintain. This isn't a breaking change. The interfaces are the same, but built from a common source at
Offline build isn't possible at the moment. There are static libraries and header files that are downloaded from the internet. The same is true for other chips from other vendors (look for One final explanation because the name "HAL" causes a lot of confusion. We used to download the Wi-Fi library from this esp-wireless-drivers-3rdparty repository up to 2 or 3 years ago. Espressif didn't use this library anymore on ESP-IDF because most of the Wi-Fi-related driver had been opened (the supplicant layer, for instance). What we've done so far in NuttX - especially for the Wi-Fi driver - is to provide a smaller library and build the other required files along with NuttX. These files and the smaller libraries are provided by |
Thanks @tmedicci for the details !! Sorry for the noise :-) We are trying to work out the real world hardware automation and the problem we saw is security - untrusted code from PR lunached on local / home / company device and network. This is a separate subject but thus my questions - would it be possible to download everything before build along with the code, then launch offline jails where execution takes place :-) |
It is possible to do offline build, yes. Of course, with time it must be updated as more boards and bugfixes are added. We can discuss this somewhere else and I can give some more detailed instructions. |
Update the wireless symbols from ESP32_* to ESPRESSIF_* for using common layer. Remove ESP32 specific WiFi files and edit build system to use common layer. Signed-off-by: Filipe Cavalcanti <[email protected]>
ee3805b
to
d6d295d
Compare
Rebased and added a sign off. Can we go forward? |
Hi! Is there anything else on this PR? Can it be merged? (This PR is available for review for 8 days. Previous PR - with both ESP32 and ESP32-S3 - was submitted on Feb 3rd and reviewed there) |
This PR is the second part of the WiFi common layer port for Espressif Xtensa devices.
ESP32S3 has been recently merged here #15816.
Summary
This PR modifies ESP32 to use WiFi source code from the common layer, which is already used by ESP32S2 and ESP32S3. KConfig prefixes such as
ESP32_*
are replaced withESPRESSIF_*
(CONFIG_ESP32_WIFI
->CONFIG_ESPRESSIF_WIFI
). This is applied through arch/ and also board/.BLE symbols are altered as well, since they share some common wireless implementations. However, source code for BLE has not been merged into the common layer.
Impact
arch/xtensa/src/esp32
and merged intoarch/xtensa/src/common/espressif
.Testing
Internal CI testing +
sta_softap
,wifi
,ble
,blewifi
defconfigs (among others) have been tested and are performing as expected.