Skip to content

Instantly share code, notes, and snippets.

@shinyquagsire23
Created May 29, 2018 03:25
Show Gist options
  • Save shinyquagsire23/adcea31ab6ca0b3f88e4252cb18524e5 to your computer and use it in GitHub Desktop.
Save shinyquagsire23/adcea31ab6ca0b3f88e4252cb18524e5 to your computer and use it in GitHub Desktop.
#!/bin/bash
if [ "$1" = "" ]
then
echo "Usage: thumb <input file> {output file}"
exit
fi
if [ "$2" = "" ]
then
output=${1%.asm}.bin
else
output=$2
fi
if [ -e "$output".out ]
then
rm "$output".out
fi
arm-none-eabi-as "$1" -mfpu=vfp -o "$output".out
arm-none-eabi-objcopy -O binary "$output".out "$output"
if [ -e "$output".out ]
then
rm "$output".out
fi
echo "Assembled Successfully. :)"
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment