diff --git a/firmware/build.sh b/firmware/build.sh index f5e3670..bf4acd4 100755 --- a/firmware/build.sh +++ b/firmware/build.sh @@ -23,7 +23,7 @@ svd2rust -i $BUILD_DIR/csr.svd --target riscv # Build the firmware .elf file cd $FW_ROOT/litex-fw -cargo build --target=riscv32imac-unknown-none-elf +cargo build --target=riscv32imac-unknown-none-elf --release # Copy it into a binary that litex_term can upload. -${OBJCOPY} target/riscv32imac-unknown-none-elf/debug/litex-fw -O binary $BUILD_DIR/rust-fw.bin +${OBJCOPY} target/riscv32imac-unknown-none-elf/release/litex-fw -O binary $BUILD_DIR/rust-fw.bin diff --git a/firmware/litex-fw/.cargo/config b/firmware/litex-fw/.cargo/config index c356dba..9b25266 100644 --- a/firmware/litex-fw/.cargo/config +++ b/firmware/litex-fw/.cargo/config @@ -8,3 +8,6 @@ rustflags = [ [build] target = "riscv32imac-unknown-none-elf" + +[profile.release] +opt-level = 1