-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
esp32s3 openeth ethernet driver #13527
base: master
Are you sure you want to change the base?
Conversation
Since this will be used for esp32s3 also, we can have this in common.
As this function will now be used from esp32 and esp32s3 boards
[Experimental Bot, please feedback here] The PR summary is OK, but the other sections need significant work to meet the requirements. Here's a breakdown of what's missing and how to improve it: Impact:
Testing:
Out of Scope:
Example improvements: Impact:
Testing:
Out of Scope:
By providing this level of detail, you make it much easier for reviewers to understand your changes and ensure they meet the project's requirements. |
The current simple boot method is not working with qemu. We enable this option for now until we can make the simple-boot image boot with QEMU.
0e11b48
to
43dbecb
Compare
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 @casaroli amazing work! :-)
Can anyone help me understand why the workflow is failing? What should I do to fix it? |
Looks like internal CI problem, builds fine for me on FreeBSD :-) |
@@ -1,5 +1,5 @@ | |||
/**************************************************************************** | |||
* arch/xtensa/src/esp32/esp32_openeth.c | |||
* arch/xtensa/src/common/xtensa_openeth.c |
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.
can this driver be used by other non esp chip?
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.
No. AFAIK this is only for esp32 family on qemu.
Another chip with a real openeth peripheral will require a more complete driver and features that are not available in the openeth qemu implementation, which has many parts mocked.
Maybe this can be used by other qemu like arm or riscv, but I have not tested as in those cases, network can usually be done with virtio or some other better interface (than mocking openeth nic).
@@ -245,7 +245,7 @@ int board_ws2812_initialize( | |||
* | |||
****************************************************************************/ | |||
#ifdef CONFIG_ESP32_OPENETH |
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.
shouldn't contain chip specific macro in common.folder
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.
I will put header files in the chip specific directory and include them in the common driver. WDYT?
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.
Hello, @xiaoxiang781216 can you please suggest me how to do this?
I thought about moving those definitions to the chip specific chip.h
and including it from the driver. WDYT?
Or should I create another file like openeth.h
in each chips directory?
Do you have any other idea? How should I proceed?
Co-authored-by: Petro Karashchenko <[email protected]>
Summary
Espressif recently added support for esp32s3 on their qemu, so we migrate the openeth ethernet driver to xtensa common and add it to the esp32s3-devkit config.
Impact for the user
ESP32S3_QEMU_IMAGE
andnuttx.merged.bin
will be built (as described in the documentation).ESP32S3_OPENETH
and use network in qemu as described in https://github.com/espressif/esp-toolchain-docs/blob/main/qemu/esp32/README.md#ethernet-supportesp32s3-devkit:qemu-openeth
config which automatically has networking enabled and is ready to boot on qemu with esp-idf legacy bootloader.Currently, the simple boot is not working with QEMU. This issue was not introduced by this PR, as it is an effect or enabling the simple boot by default. The
qemu-openeth
defconfigs enableESP32_APP_FORMAT_LEGACY
orESP32S3_APP_FORMAT_LEGACY
to overcome this limitation._Testing
esp32-devkitc:qemu-openeth
esp32s3-devkit:qemu-openeth
ping
command from the nsh console.Commands
Download espressif qemu from https://github.com/espressif/qemu
esp32s3
esp32
QEMU is not emulating the chip revision
v3.0
, so the user has two options:#define ESP32_IGNORE_CHIP_REVISION_CHECK
inarch/xtensa/src/esp32/esp32_start.c
Out of scope
qemu-openeth
. As this PR did not introduce this defect, I plan on investigating this in the future, however I do not have any timeline for this.3.0
, so we need to either add an efuse storage as described in the espressif documentation or defineESP32_IGNORE_CHIP_REVISION_CHECK
inarch/xtensa/src/esp32/esp32_start.c
. This is a defect of espressif qemu and is out of scope of NuttX. However, I have updated the esp32 documentation to reference this issue.