Skip to content

Commit

Permalink
add memory.x
Browse files Browse the repository at this point in the history
  • Loading branch information
japaric committed Oct 24, 2018
1 parent a8254c9 commit 3fa89b9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ fn main() {
.unwrap()
.write_all(include_bytes!("device.x"))
.unwrap();
File::create(out.join("memory.x"))
.unwrap()
.write_all(include_bytes!("memory.x"))
.unwrap();
println!("cargo:rustc-link-search={}", out.display());
println!("cargo:rerun-if-changed=device.x");
println!("cargo:rerun-if-changed=memory.x");
println!("cargo:rerun-if-changed=build.rs");
}
5 changes: 5 additions & 0 deletions memory.x
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
MEMORY
{
FLASH : ORIGIN = 0x00000000, LENGTH = 256K
RAM : ORIGIN = 0x20000000, LENGTH = 64K
}

0 comments on commit 3fa89b9

Please sign in to comment.