-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Automate the build system with a
build.rs
This replaces the AoT processing we did to generate the Rust modules locally. It generates them on the fly at build-time, and only for the selected MCUs. The process is mostly the same, just automated, with the addition of what is described in the next paragraph. Some things became unnecessary though, such as the `modrs.patch` and `Makefile`, and therefore were removed. `form` is no longer run, in order to minimize the number of files and directories. The patches were updated to not have the `_svd` key, since that's now handled by the build script. Those that ended up empty were removed. It also updates our `interrupt` macro, adapting it from a newer iteration of `cortex-m-rt`'s and adding logic to make the vector module unnecessary. It would be hard to generate it correctly for the macros crate, since it compiles before the main one where the build logic is hosted. Instead, we generate a macro `__avr_device_trampoline` in the main crate, and `#[interrupt(chip)]` calls into that giving the MCU name, interrupt name and trampoline item to define. This new macro converts the interrupt's name into a `__vector_N` symbol, which the linker understands as being an interrupt, and changes the function's name to it with `#[export_name = "..."]`. CI code was updated as well. Co-authored-by: Rahix <rahix@rahix.de> Co-authored-by: tones111 <tones111@users.noreply.github.com>
- Loading branch information
1 parent
95f5810
commit 8086eb5
Showing
66 changed files
with
658 additions
and
389 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,9 +2,3 @@ | |
/macros/target/ | ||
**/*.rs.bk | ||
Cargo.lock | ||
|
||
svd/ | ||
.deps/ | ||
src/devices/*/* | ||
src/generic.rs | ||
__pycache__/ |
This file contains 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
This file contains 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
Oops, something went wrong.