Heap test passed on k210/qemu, heap size = 3M.
This commit is contained in:
parent
850559e5da
commit
528d99258a
7 changed files with 81 additions and 11 deletions
16
os/build.rs
16
os/build.rs
|
@ -6,7 +6,7 @@ fn main() {
|
|||
insert_app_data().unwrap();
|
||||
}
|
||||
|
||||
static TARGET_PATH: &str = "../user/target/riscv64gc-unknown-none-elf/debug/";
|
||||
static TARGET_PATH: &str = "../user/target/riscv64gc-unknown-none-elf/release/";
|
||||
|
||||
fn insert_app_data() -> Result<()> {
|
||||
let mut f = File::create("src/link_app.S").unwrap();
|
||||
|
@ -26,17 +26,14 @@ fn insert_app_data() -> Result<()> {
|
|||
.section .data
|
||||
.global _num_app
|
||||
_num_app:
|
||||
.quad {}
|
||||
"#, apps.len())?;
|
||||
.quad {}"#, apps.len())?;
|
||||
|
||||
for i in 0..apps.len() {
|
||||
writeln!(f, r#"
|
||||
.quad app_{}_start
|
||||
"#, i)?;
|
||||
.quad app_{}_start"#, i)?;
|
||||
}
|
||||
writeln!(f, r#"
|
||||
.quad app_{}_end
|
||||
"#, apps.len() - 1)?;
|
||||
.quad app_{}_end"#, apps.len() - 1)?;
|
||||
|
||||
for (idx, app) in apps.iter().enumerate() {
|
||||
println!("app_{}: {}", idx, app);
|
||||
|
@ -45,9 +42,8 @@ _num_app:
|
|||
.global app_{0}_start
|
||||
.global app_{0}_end
|
||||
app_{0}_start:
|
||||
.incbin "{2}{1}.bin"
|
||||
app_{0}_end:
|
||||
"#, idx, app, TARGET_PATH)?;
|
||||
.incbin "{2}{1}"
|
||||
app_{0}_end:"#, idx, app, TARGET_PATH)?;
|
||||
}
|
||||
Ok(())
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue