aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--cortex-m-rt/build.rs15
-rw-r--r--cortex-m-rt/examples/data_overflow.rs4
-rw-r--r--cortex-m-rt/tests/compiletest.rs5
3 files changed, 14 insertions, 10 deletions
diff --git a/cortex-m-rt/build.rs b/cortex-m-rt/build.rs
index 87f000a..67cdfab 100644
--- a/cortex-m-rt/build.rs
+++ b/cortex-m-rt/build.rs
@@ -13,7 +13,8 @@ fn main() {
fs::copy(
format!("bin/{}.a", target),
out_dir.join("libcortex-m-rt.a"),
- ).unwrap();
+ )
+ .unwrap();
println!("cargo:rustc-link-lib=static=cortex-m-rt");
}
@@ -34,7 +35,8 @@ fn main() {
/* Provides weak aliases (cf. PROVIDED) for device specific interrupt handlers */
/* This will usually be provided by a device crate generated using svd2rust (see `device.x`) */
INCLUDE device.x"#
- ).unwrap();
+ )
+ .unwrap();
f
} else {
let mut f = File::create(out.join("link.x")).unwrap();
@@ -55,9 +57,9 @@ INCLUDE device.x"#
println!("cargo:rustc-cfg=armv8m");
240
} else {
- // Non ARM target. We assume you're just testing the syntax.
- // This value seems as soon as any
- 240
+ // Non ARM target. We assume you're just testing the syntax.
+ // This value seems as soon as any
+ 240
};
// checking the size of the interrupts portion of the vector table is sub-architecture dependent
@@ -71,7 +73,8 @@ handlers.");
"#,
max_int_handlers * 4 + 0x40,
max_int_handlers
- ).unwrap();
+ )
+ .unwrap();
println!("cargo:rustc-link-search={}", out.display());
diff --git a/cortex-m-rt/examples/data_overflow.rs b/cortex-m-rt/examples/data_overflow.rs
index ea48b23..a84ec12 100644
--- a/cortex-m-rt/examples/data_overflow.rs
+++ b/cortex-m-rt/examples/data_overflow.rs
@@ -13,11 +13,11 @@ use core::ptr;
use rt::entry;
// This large static array uses most of .rodata
-static RODATA: [u8; 48*1024] = [1u8; 48*1024];
+static RODATA: [u8; 48 * 1024] = [1u8; 48 * 1024];
// This large mutable array causes .data to use the rest of FLASH
// without also overflowing RAM.
-static mut DATA: [u8; 16*1024] = [1u8; 16*1024];
+static mut DATA: [u8; 16 * 1024] = [1u8; 16 * 1024];
#[entry]
fn main() -> ! {
diff --git a/cortex-m-rt/tests/compiletest.rs b/cortex-m-rt/tests/compiletest.rs
index 82dda07..ba2ef73 100644
--- a/cortex-m-rt/tests/compiletest.rs
+++ b/cortex-m-rt/tests/compiletest.rs
@@ -8,8 +8,9 @@ fn run_mode(mode: &'static str) {
config.mode = mode.parse().expect("Invalid mode");
config.src_base = PathBuf::from(format!("tests/{}", mode));
// config.link_deps(); // Populate config.target_rustcflags with dependencies on the path
- config.target_rustcflags =
- Some("-L target/debug -L target/debug/deps -C panic=abort --cfg feature=\"device\"".to_owned());
+ config.target_rustcflags = Some(
+ "-L target/debug -L target/debug/deps -C panic=abort --cfg feature=\"device\"".to_owned(),
+ );
// config.clean_rmeta(); // If your tests import the parent crate, this helps with E0464
compiletest::run_tests(&config);