Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Is
riscv32imc
really "invalid"? I'm not sure why you'd want to build without the atomic extension but it's perfectly valid to do so. I don't really understand the motivation behind removing it.If we are removing it, then the ESP32-H2 needs to be updated as well.
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.
Not invalid, but almost certainly a mistake. Tbh, I've never really liked that we hard error here on a target mismatch. I think it should be a warning instead, but we can discuss that another time :D.
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 wasn't a mistake, it was to be consistent with the other RISC-V chips. The C2 and C3 both have
riscv32imac
listed as supported, which they do not technically support either. But I guess it doesn't really matter that much.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 not saying using
riscv32imac
for C2/C3 is a mistake, I'm saying usingriscv32imc
on a target that has native support for atomics would be a mistake, there isn't a reason not to use that target for the C6.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.
For IDF, the
std
launches a huge linker error trying to find the functions for "A" forstd
unsuccessfully. So there, it is "invalid". I'll tryimc
forno_std
, but I believe It'll fail for the same reason butcore
this time instead ofstd
.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 tested the
riscv32imc
on the C6. If you don't try to usecore::sync::atomic
, it compiles.But, and this is my opinion: This is a new release of hardware, where among other things, the nice thing is the atomic support and no backward compatibility breaks by changing the target to
imac
. So, if you prefer to supportriscv32imac-unknown-none-elf
andriscv32imc-unknown-none-elf
, let me know to add it too.On the other hand, if you're already deciding to migrate to this hardware, and that "forces" you to change to
imac
the only work you have to do is move out from polyfill, and most of the embedded libs out there already have automatic detection and start using native support if it's available.But for sure, if you try to use
riscv32imc-esp-espidf
, it doesn't compile. I opened an issue with the whole detailThere 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.
Sorry, for whatever reason GitHub doesn't let you control which lines are shown in the preview (kind of defeats the purpose, doesn't it?).
I was referring only to the bare-metal targets; I don't use the IDF stuff and frankly don't really care about it, you can do whatever you want with those targets.
Regardless, my opinion seems to be controversial for whatever reason, so as I requested earlier can we just update the H2 as well please so we can get this wrapped up?