riscv-macros: add all the macros required by riscv-rt#389
Merged
romancardenas merged 5 commits intorust-embedded:masterfrom Feb 9, 2026
Merged
riscv-macros: add all the macros required by riscv-rt#389romancardenas merged 5 commits intorust-embedded:masterfrom
riscv-macros: add all the macros required by riscv-rt#389romancardenas merged 5 commits intorust-embedded:masterfrom
Conversation
534861c to
aa8c389
Compare
MabezDev
approved these changes
Feb 2, 2026
Member
MabezDev
left a comment
There was a problem hiding this comment.
Macros are not my area of expertise, but this looks okay from my first glance, and reasonably well tested. Thanks!
github-merge-queue bot
pushed a commit
that referenced
this pull request
Feb 9, 2026
`riscv-macros`: add all the macros required by `riscv-rt`
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.
This PR reimplements all the macros previously on
riscv-rt-macrostoriscv-macros.The macro code is now more modular, which will potentially help us maintaining the source code as well as adding new attribute macros if needed. Note also that, now, the attribute macros for
riscv-rtfunctions output multiple errors in a single run. This will improve the developer experience, as with a single compilation attempt, they can see all the errors and address them before re-trying.This PR also deprecates
riscv-rt-macrosin favor ofriscv-macros.Now,
riscv-rtdoes not re-export thepre_initattribute macro, which was already deprecated. Users now have to usecore::arch::global_asm!This PR substitutes #386 , as it contains the same changes but with a clean commit history. I hope it is relatively easy to review now!