forked from esp-rs/esp-idf-hal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.rs
26 lines (23 loc) · 773 Bytes
/
build.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#[cfg(not(feature = "riscv-ulp-hal"))]
fn main() {
embuild::espidf::sysenv::relay();
embuild::espidf::sysenv::output(); // Only necessary for building the examples
}
#[cfg(feature = "riscv-ulp-hal")]
fn main() {
println!("cargo:rustc-cfg=esp32s2");
let riscv_ulp_dir = std::env::current_dir().unwrap().join("riscv-ulp");
println!("cargo:rustc-link-search={}", riscv_ulp_dir.display());
println!(
"cargo:rerun-if-changed={}",
riscv_ulp_dir.join("libriscv_ulp_start.a").display()
);
println!(
"cargo:rerun-if-changed={}",
riscv_ulp_dir.join("riscv_ulp_link_base.x").display()
);
println!(
"cargo:rerun-if-changed={}",
riscv_ulp_dir.join("riscv_ulp_link_default.x").display()
);
}