-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
boards: riscv: model USB variant of esp32c3_luatos_core
as board revision
#67014
boards: riscv: model USB variant of esp32c3_luatos_core
as board revision
#67014
Conversation
Hello @jonkensta, and thank you very much for your first pull request to the Zephyr project! |
d2464f3
to
4607c58
Compare
4607c58
to
4edcdc0
Compare
4edcdc0
to
2d87928
Compare
2d87928
to
bbb9638
Compare
bbb9638
to
2f7b9b7
Compare
@feilongfl, Hi, as the luatos core support author, could you take a look in this PR? |
@sylvioalves, thanks for considering this PR! I have a couple of questions for you when you have a moment:
|
I'm interested in confirming this PR, but the earliest I can do so is by Saturday. |
@feilongfl ping |
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.
@@ -0,0 +1,8 @@ | |||
if(NOT DEFINED BOARD_REVISION) |
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 believe it's more suitable to use the board_check_revision
macro for this revision check.
However, currently, the board_check_revision
macro does not support strings like 'usb'.
I am considering adding STRING
format to the board_check_revision
macro to support revisions with any text.
Here is the draft pull request:
#67078
with this, we can simply do this in a single command like other revision.cmake
board_check_revision(FORMAT STRING OPTIONAL)
I'd like to hear your thoughts on this matter.
one more thing here:
Please add this line at the top of the file.
# SPDX-License-Identifier: Apache-2.0
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! I added the license identifier, but I'll keep this open in case @sylvioalves weighs in and says we should switch to using board_check_revision()
instead of the custom logic.
2f7b9b7
to
adce8bd
Compare
Remove needless repetition and fix issue zephyrproject-rtos#67013 by modeling board esp32c3_luatos_core_usb as a revision of esp32c3_luatos_core rather than as a separate board. With this change, system builds for esp32c3_luatos_core@usb will now source the existing esp32c3_luatos_core.conf in mcuboot and will not require that file to be copied as detailed in the workaround for zephyrproject-rtos#67013. Fixes zephyrproject-rtos#67014 Signed-off-by: Jonathan Starr <github@jstarr.me>
adce8bd
to
23a913e
Compare
@feilongfl, thank you for the review and the suggested edits! I just realized that there is another luatOS board that uses the esp32s3 and also has a USB variant. Do you think it would be worthwhile to include that one in this change as well? |
To be honest, I am still a little uncertain about whether to implement these two development boards through a board variant or a board revision. |
Okay, understood. I was under the impression that the USB version was the same board with the only difference being that the CH343 chip was removed as a cost and ease-of-use optimization. I tried reading the luatOS board documentation to understand the situation better but it's still not clear to me what the functional differences are between the USB and non-USB versions. If we end up closing this PR, how do you think we should fix sybuilds for the |
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.
Needs to be migrated to hwmv2
@jonkensta, do you plan to update this? |
I don't think @feilongfl is going to approve the PR, so I'm not going to put any more work into it. I'll go ahead and close it out. |
This PR removes needless repetition and fixes issue #67013 by modeling board
esp32c3_luatos_core_usb
as a revision ofesp32c3_luatos_core
rather than as a separate board. With this change, system builds foresp32c3_luatos_core@usb
will now source the existingesp32c3_luatos_core.conf
inmcuboot
and will not require that file to be copied as detailed in the workaround for #67013.Note that as a consequence of moving
esp32c3_luatos_core_usb.dts
toesp32c3_luatos_core_usb.overlay
, the following is implicitly added tochosen
when generating the devicetree foresp32c3_luatos_core_usb
:Before this change, this overlay was present for
esp32c3_luatos_core.dts
and not foresp32c3_luatos_core_usb.dts
. I believe this to be a minor oversight of the commit that added these files b9d3909 and not to be intentional.