cpu/esp32: fix RISC-V ISA for ESP32-C3 with GCC 12.2#19962
Merged
bors[bot] merged 1 commit intoRIOT-OS:masterfrom Oct 2, 2023
Merged
cpu/esp32: fix RISC-V ISA for ESP32-C3 with GCC 12.2#19962bors[bot] merged 1 commit intoRIOT-OS:masterfrom
bors[bot] merged 1 commit intoRIOT-OS:masterfrom
Conversation
c6f8152 to
9a49dcd
Compare
maribu
approved these changes
Oct 2, 2023
Member
|
bors merge |
Contributor
|
Build succeeded! The publicly hosted instance of bors-ng is deprecated and will go away soon. If you want to self-host your own instance, instructions are here. If you want to switch to GitHub's built-in merge queue, visit their help page. |
Contributor
Author
|
@maribu Thanks. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Contribution description
This PR fixes the RISC-V ISA spec in compiler and linker flags for ESP32-C3 and GCC 12.2.
Earlier versions of the specs and tools subsumed
zicsrandzifenceiinto theIextension which is no longer the case. Therefore, the RISC-V ISA spec in compiler and linker flags had to be changed from-march=rv32imcto-march=rv32imc_zicsr_zifencei.As a consequence floating-point arithmetics and I/O were no longer working with
-march=rv32imcwith GCC 12.2 sinceriscv32-esp-elf/lib/libm_nano.awas linked instead ofriscv32-esp-elf/lib/rv32imc_zicsr_zifencei/ilp32/libm_nano.abecauseriscv32-esp-elf/lib/rv32imc/ilp32/libm_nano.ais not existing in the toolchain.Testing procedure
Add a
in the
mainfunction of any application. Without this PR the application should crash while it should work with this PR.Issues/PRs references