-
-
Save spirilis/115655b9bf206402ff50 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 | |
INSTALL_TARGET_PREFIX=/raptor/spirilis/mspgcc49_bin/msp430-elf-dev-20140423 | |
PATH_TO_ZIP=/home/spirilis/inst/GCC_RH_20131206.zip | |
cd $INSTALL_TARGET_PREFIX/msp430-elf | |
unzip -u $PATH_TO_ZIP | |
# Header files should be inside include/, but also a boatload of directories containing the linker scripts; they need | |
# to be combined and stored into lib/<part#>.ld. | |
cd include | |
echo "Generating ldscripts-" | |
for i in $(find . -maxdepth 1 -name 'msp430*' -type d | sed -e 's/^\.\///') $(find . -maxdepth 1 -name 'cc430*' -type d | sed -e 's/^\.\///') ; do | |
echo "Processing $i..." | |
cat ${i}/memory.ld ${i}/peripherals.ld > ../lib/ldscripts/${i}.ld | |
rm -f ${i}/*.ld | |
rmdir ${i} | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment