17 lines
331 B
Bash
Executable File
17 lines
331 B
Bash
Executable File
#!/usr/bin/sh
|
|
DEFMT_LOG=trace cargo build --release
|
|
if [ $? -ne 0 ]
|
|
then
|
|
exit $?
|
|
fi
|
|
|
|
# Account for different toolchains
|
|
if command -v riscv64-unknown-elf-objcopy
|
|
then
|
|
objcopy=riscv64-unknown-elf-objcopy
|
|
else
|
|
objcopy=riscv64-linux-gnu-objcopy
|
|
fi
|
|
|
|
$objcopy -S -O binary target/riscv32i-unknown-none-elf/release/fw fw.bin
|