Created
May 29, 2018 03:25
-
-
Save shinyquagsire23/adcea31ab6ca0b3f88e4252cb18524e5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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