the led isn't lighting up :'(

This commit is contained in:
benstrb 2026-04-06 19:52:48 +02:00
parent 242f218a62
commit 2854adeb13
7 changed files with 74 additions and 65 deletions

19
build.rs Normal file
View file

@ -0,0 +1,19 @@
// I totally understand this and it's not copied from
// https://github.com/cyang812/rust_stm32f469i/blob/main/led_blinky/
// hehe
use std::env;
use std::fs;
use std::path::PathBuf;
fn main() {
let out = &PathBuf::from(env::var_os("OUT_DIR").unwrap());
fs::write(out.join("memory.x"), include_bytes!("memory.x")).unwrap();
println!("cargo:rustc-link-search={}", out.display());
// Only link CCM script when the feature is enabled.
// Enable with: cargo build --features ccmram
if env::var_os("CARGO_FEATURE_CCMRAM").is_some() {
fs::write(out.join("ccmram.x"), include_bytes!("ccmram.x")).unwrap();
println!("cargo:rustc-link-arg=-Tccmram.x");
}
}