Release mode app worked on ch3.

This commit is contained in:
Yifan Wu 2020-11-30 10:29:17 +08:00
parent 63aaa9d0a1
commit ca4c6d367a
6 changed files with 6 additions and 6 deletions

View File

@ -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();

View File

@ -1,5 +1,5 @@
TARGET := riscv64gc-unknown-none-elf
MODE := debug
MODE := release
APP_DIR := src/bin
TARGET_DIR := target/$(TARGET)/$(MODE)
APPS := $(wildcard $(APP_DIR)/*.rs)

View File

@ -18,7 +18,7 @@ for app in apps:
lines.append(line)
with open(linker, 'w+') as f:
f.writelines(lines)
os.system('cargo build --bin %s' % app)
os.system('cargo build --bin %s --release' % app)
print('[build.py] application %s start with address %s' %(app, hex(base_address+step*app_id)))
with open(linker, 'w+') as f:
f.writelines(lines_before)

View File

@ -10,7 +10,7 @@ const LEN: usize = 100;
fn main() -> i32 {
let p = 3u64;
let m = 998244353u64;
let iter: usize = 100000;
let iter: usize = 200000;
let mut s = [0u64; LEN];
let mut cur = 0usize;
s[cur] = 1;

View File

@ -10,7 +10,7 @@ const LEN: usize = 100;
fn main() -> i32 {
let p = 5u64;
let m = 998244353u64;
let iter: usize = 70000;
let iter: usize = 140000;
let mut s = [0u64; LEN];
let mut cur = 0usize;
s[cur] = 1;

View File

@ -10,7 +10,7 @@ const LEN: usize = 100;
fn main() -> i32 {
let p = 7u64;
let m = 998244353u64;
let iter: usize = 80000;
let iter: usize = 160000;
let mut s = [0u64; LEN];
let mut cur = 0usize;
s[cur] = 1;