new-sonar/firmware/build_and_strip.sh
David Lenfesty 7b53e8be2a fw: clean up and get command processing actually working
Still an issue where connecting to a socket the first time will time
out, unsure what the cause of that or where to start, but can ignore for
now and figure out more when I have more info later
2023-06-16 14:36:44 -06:00

17 lines
331 B
Bash
Executable File

#!/usr/bin/sh
DEFMT_LOG=debug 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