k210-sdk-stuff/rust/k210-shared/build.rs
Wladimir J. van der Laan 667c051969 rust: Add mandelbrot
Add mandelbrot zoom demo, and move some things to shared crate.

Switch to most recent k210-pac revision to fix fp issue.
2019-05-12 18:17:42 +00:00

14 lines
430 B
Rust

use std::{env, fs};
use std::path::PathBuf;
use std::io::Write;
fn main() {
// Put the linker script somewhere the linker can find it
let out_dir = PathBuf::from(env::var("OUT_DIR").unwrap());
println!("cargo:rustc-link-search={}", out_dir.display());
fs::File::create(out_dir.join("memory.x")).unwrap()
.write_all(include_bytes!("memory.x")).unwrap();
println!("cargo:rerun-if-changed=memory.x");
}