-
Notifications
You must be signed in to change notification settings - Fork 2k
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
pkg/wamr: add riscv_esp32 architecture #18338
pkg/wamr: add riscv_esp32 architecture #18338
Conversation
Seems like I should have used |
@@ -47,6 +47,8 @@ else ifeq ($(CPU_ARCH),xtensa) | |||
WAMR_BUILD_TARGET = XTENSA | |||
else ifeq ($(CPU_ARCH),rv32) | |||
WAMR_BUILD_TARGET = RISCV32 | |||
else ifeq ($(CPU_ARCH),riscv_esp32) |
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'm a bit unhappy that there is a special esp32 riscv CPU_ARCH
now.
Why can't this be rv32
?
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'm a bit unhappy that there is a special esp32 riscv
CPU_ARCH
now.
I know.
Why can't this be
rv32
?
We discussed it already in #17841 (review) and #17841 (comment). When I ported RIOT to ESP32-C3, I definitely tried to reuse common parts from cpu/riscv_common
and implement only some specific parts for ESP32-C3. But since using a cpu/*
directory means all or nothing and some parts in cpu/riscv_common
are not compatible with ESP-IDF and ESP32-C3 SoC, a specific architecture had to be defined with its own implementation in PR #18260. I am not happy with it either, but there was no other option.
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.
See also "Background" in #18260 (comment).
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.
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.
Why can't this be
rv32
?
@benpicco If I understand you right, you suggest to use the following for RISC-V based ESP32x SoC?
CPU_ARCH = rv32
CPU_CORE = rv32imc
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.
If that's possible it would certainly make the most sense from a consistency point of view.
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.
Seems to work for ESP32-C3 with these changes so that we could close this PR. I have to check Kconfig before.
|
Contribution description
This PR is a split-off from PR #17844, which extends the makefile of
pkg/wamr
by ESP32 RISC-V architecture.Testing procedure
Here we have a Hen-and-egg problem. It is not possible to cover this PR by compiling it in CI without having a board definition with an ESP32-C3. Conversely, the ESP32-C3 port that requires this PR cannot be compiled in CI without it.
Therefore a green CI with the label
CI: skip compile test
must be sufficient for the moment. If it doesn't work, the problem will pop up as soon as ESP32-C3 support is provided. And of course, I have tested it together with the ESP32-C3 support.Issues/PRs references
Split-off from PR #17844