From 098725c2e2b943b5b84c4a3a0a9f49e900a51954 Mon Sep 17 00:00:00 2001 From: Quinn Painter Date: Thu, 1 Sep 2022 10:23:15 +0100 Subject: Fix filename of armv4t-none-eabi.md The filename differed from the link in SUMMARY.md, causing it to 404. --- .../rustc/src/platform-support/armv4t-none-eabi.md | 70 ++++++++++++++++++++++ .../rustc/src/platform-support/armv4t_none_eabi.md | 70 ---------------------- 2 files changed, 70 insertions(+), 70 deletions(-) create mode 100644 src/doc/rustc/src/platform-support/armv4t-none-eabi.md delete mode 100644 src/doc/rustc/src/platform-support/armv4t_none_eabi.md (limited to 'src') diff --git a/src/doc/rustc/src/platform-support/armv4t-none-eabi.md b/src/doc/rustc/src/platform-support/armv4t-none-eabi.md new file mode 100644 index 00000000000..cf831e1595e --- /dev/null +++ b/src/doc/rustc/src/platform-support/armv4t-none-eabi.md @@ -0,0 +1,70 @@ +# armv4t-none-eabi + +Tier 3 + +Bare-metal target for any cpu in the ARMv4T architecture family, supporting +ARM/Thumb code interworking (aka `a32`/`t32`), with ARM code as the default code +generation. + +In particular this supports the Gameboy Advance (GBA), but there's nothing GBA +specific with this target, so any ARMv4T device should work fine. + +## Target Maintainers + +* [@Lokathor](https://github.com/lokathor) + +## Requirements + +The target is cross-compiled, and uses static linking. + +The linker that comes with rustc cannot link for this platform (the platform is +too old). You will need the `arm-none-eabi-ld` linker from a GNU Binutils +targeting ARM. This can be obtained for Windows/Mac/Linux from the [ARM +Developer Website][arm-dev], or possibly from your OS's package manager. + +[arm-dev]: https://developer.arm.com/Tools%20and%20Software/GNU%20Toolchain + +This target doesn't provide a linker script, you'll need to bring your own +according to the specific device you want to target. Pass +`-Clink-arg=-Tyour_script.ld` as a rustc argument to make the linker use +`your_script.ld` during linking. + +## Building Rust Programs + +Because it is Tier 3, rust does not yet ship pre-compiled artifacts for this target. + +Just use the `build-std` nightly cargo feature to build the `core` library. You +can pass this as a command line argument to cargo, or your `.cargo/config.toml` +file might include the following lines: + +```toml +[unstable] +build-std = ["core"] +``` + +Most of `core` should work as expected, with the following notes: +* the target is "soft float", so `f32` and `f64` operations are emulated in + software. +* integer division is also emulated in software. +* the target is old enough that it doesn't have atomic instructions. + +Rust programs are output as ELF files. + +For running on hardware, you'll generally need to extract the "raw" program code +out of the ELF and into a file of its own. The `objcopy` program provided as +part of the GNU Binutils can do this: + +```shell +arm-none-eabi-objcopy --output-target binary [in_file] [out_file] +``` + +## Testing + +This is a cross-compiled target that you will need to emulate during testing. + +Because this is a device-agnostic target, and the exact emulator that you'll +need depends on the specific device you want to run your code on. + +For example, when programming for the Gameboy Advance, the +[mgba-test-runner](https://github.com/agbrs/agb) program could be used to make a +normal set of rust tests be run within the `mgba` emulator. diff --git a/src/doc/rustc/src/platform-support/armv4t_none_eabi.md b/src/doc/rustc/src/platform-support/armv4t_none_eabi.md deleted file mode 100644 index cf831e1595e..00000000000 --- a/src/doc/rustc/src/platform-support/armv4t_none_eabi.md +++ /dev/null @@ -1,70 +0,0 @@ -# armv4t-none-eabi - -Tier 3 - -Bare-metal target for any cpu in the ARMv4T architecture family, supporting -ARM/Thumb code interworking (aka `a32`/`t32`), with ARM code as the default code -generation. - -In particular this supports the Gameboy Advance (GBA), but there's nothing GBA -specific with this target, so any ARMv4T device should work fine. - -## Target Maintainers - -* [@Lokathor](https://github.com/lokathor) - -## Requirements - -The target is cross-compiled, and uses static linking. - -The linker that comes with rustc cannot link for this platform (the platform is -too old). You will need the `arm-none-eabi-ld` linker from a GNU Binutils -targeting ARM. This can be obtained for Windows/Mac/Linux from the [ARM -Developer Website][arm-dev], or possibly from your OS's package manager. - -[arm-dev]: https://developer.arm.com/Tools%20and%20Software/GNU%20Toolchain - -This target doesn't provide a linker script, you'll need to bring your own -according to the specific device you want to target. Pass -`-Clink-arg=-Tyour_script.ld` as a rustc argument to make the linker use -`your_script.ld` during linking. - -## Building Rust Programs - -Because it is Tier 3, rust does not yet ship pre-compiled artifacts for this target. - -Just use the `build-std` nightly cargo feature to build the `core` library. You -can pass this as a command line argument to cargo, or your `.cargo/config.toml` -file might include the following lines: - -```toml -[unstable] -build-std = ["core"] -``` - -Most of `core` should work as expected, with the following notes: -* the target is "soft float", so `f32` and `f64` operations are emulated in - software. -* integer division is also emulated in software. -* the target is old enough that it doesn't have atomic instructions. - -Rust programs are output as ELF files. - -For running on hardware, you'll generally need to extract the "raw" program code -out of the ELF and into a file of its own. The `objcopy` program provided as -part of the GNU Binutils can do this: - -```shell -arm-none-eabi-objcopy --output-target binary [in_file] [out_file] -``` - -## Testing - -This is a cross-compiled target that you will need to emulate during testing. - -Because this is a device-agnostic target, and the exact emulator that you'll -need depends on the specific device you want to run your code on. - -For example, when programming for the Gameboy Advance, the -[mgba-test-runner](https://github.com/agbrs/agb) program could be used to make a -normal set of rust tests be run within the `mgba` emulator. -- cgit 1.4.1-3-g733a5