Skip to content
Snippets Groups Projects
Select Git revision
  • 7e9b67742df99ae1dacbf26bb992e871ce096f80
  • student default protected
2 results

build.rs

Blame
  • Forked from Per Lindgren / e7020e_2019
    38 commits ahead of the upstream repository.
    Per Lindgren's avatar
    Per Lindgren authored and Per committed
    bt broken?
    
    Cargo.toml no nightly dep
    
    more examples
    
    preLaunchTask
    
    crash re-added
    
    more preLaunchTasks
    
    example/device and SVD
    
    openocd.gdb comment fixed and ext itm launch config added
    
    bare0
    
    bare1
    
    bare1
    
    bare2 and bare3
    
    bare2 and bare3
    
    bare2 and bare3
    
    bare4 and bare5
    
    bare6 wip
    
    bare6 wip
    
    serial wip
    
    serial wip
    
    bare7
    
    bare8
    
    bare8
    
    to fresk
    
    to fresk
    
    to fresk
    
    to fresk
    
    bare8, 9
    
    to fresk
    
    bare7
    
    polishing
    
    bare9
    
    rtfm_blinky wip
    
    rtfm_blinky
    
    rtfm_blinky
    
    marcus
    
    eq implemented and tested
    
    eq implemented and tested
    
    bare10
    
    bare updates
    
    bare 6 assignment
    
    cargo fix
    
    various fixes
    7d1753a9
    History
    build.rs 571 B
    use std::env;
    use std::fs::File;
    use std::io::Write;
    use std::path::PathBuf;
    
    fn main() {
        // Put the linker script somewhere the linker can find it
        let out = &PathBuf::from(env::var_os("OUT_DIR").unwrap());
        File::create(out.join("memory.x"))
            .unwrap()
            .write_all(include_bytes!("memory.x"))
            .unwrap();
        println!("cargo:rustc-link-search={}", out.display());
    
        // Only re-run the build script when memory.x is changed,
        // instead of when any part of the source code changes.
        println!("cargo:rerun-if-changed=memory.x");
    }