Skip to content

Commit

Permalink
docs on setting the CPU
Browse files Browse the repository at this point in the history
  • Loading branch information
Lokathor committed May 31, 2024
1 parent 534a4c5 commit aad5ddd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ rustflags = [
"-Zub-checks=no",
"-Clinker=arm-none-eabi-ld",
"-Clink-arg=-Tlinker_scripts/mono_boot.ld",
"-Ctarget-cpu=arm7tdmi",
]
7 changes: 7 additions & 0 deletions src/per_project_setup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@
//! `rustflags` argument with `-Clink-arg=-T<path>`, using the script's path
//! relative to our project root.
//!
//! You can also set `-Ctarget-cpu=arm7tdmi`, because that is the specific CPU
//! of the GBA, though I'm not sure that LLVM really does much with the
//! information. In my very limited testing, I didn't see any different code
//! generated when setting the CPU compared to not doing it, but I do it just in
//! case it helps somehow, because it doesn't hurt.
//!
//! [github_script]:
//! https://github.com/rust-console/gba/blob/main/linker_scripts/mono_boot.ld
//!
Expand All @@ -44,6 +50,7 @@
//! rustflags = [
//! "-Clinker=arm-none-eabi-ld",
//! "-Clink-arg=-Tlinker_scripts/mono_boot.ld",
//! "-Ctarget-cpu=arm7tdmi",
//! ]
//! ```
//!
Expand Down

0 comments on commit aad5ddd

Please sign in to comment.