diff options
author | Giovanni Di Sirio <gdisirio@gmail.com> | 2018-10-06 10:08:13 +0000 |
---|---|---|
committer | Giovanni Di Sirio <gdisirio@gmail.com> | 2018-10-06 10:08:13 +0000 |
commit | 89054355ff03d894193c9384460dbb988ffd2981 (patch) | |
tree | 304d7310c19f91611d49f2ef7d1cb165dbabe889 /tools/updater/update_mcuconf_stm32f76xxx.sh | |
parent | b3202ad14163f0f46d224bcde225dec52a45848f (diff) | |
download | ChibiOS-89054355ff03d894193c9384460dbb988ffd2981.tar.gz ChibiOS-89054355ff03d894193c9384460dbb988ffd2981.tar.bz2 ChibiOS-89054355ff03d894193c9384460dbb988ffd2981.zip |
More templates.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@12336 110e8d01-0319-4d1e-a829-52ad28d1bb01
Diffstat (limited to 'tools/updater/update_mcuconf_stm32f76xxx.sh')
-rw-r--r-- | tools/updater/update_mcuconf_stm32f76xxx.sh | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/tools/updater/update_mcuconf_stm32f76xxx.sh b/tools/updater/update_mcuconf_stm32f76xxx.sh new file mode 100644 index 000000000..54ca9dce5 --- /dev/null +++ b/tools/updater/update_mcuconf_stm32f76xxx.sh @@ -0,0 +1,29 @@ +#!/bin/bash +if [ $# -eq 2 ] + then + if [ $1 = "rootpath" ] + then + find $2 -name "mcuconf.h" -exec bash update_mcuconf_stm32f76xxx.sh "{}" \; + else + echo "Usage: update_mcuconf_stm32f76xxx.sh [rootpath <root path>]" + fi +elif [ $# -eq 1 ] +then + declare conffile=$(<$1) + if egrep -q "STM32F765_MCUCONF" <<< "$conffile" || egrep -q "STM32F767_MCUCONF" <<< "$conffile" || egrep -q "STM32F777_MCUCONF" <<< "$conffile" || egrep -q "STM32F769_MCUCONF" <<< "$conffile" || egrep -q "STM32F779_MCUCONF" <<< "$conffile" + then + echo Processing: $1 + egrep -e "\#define\s+[a-zA-Z0-9_()]*\s+[a-zA-Z0-9_]" <<< "$conffile" | sed -r 's/\#define\s+([a-zA-Z0-9_]*)(\([^)]*\))?\s+/\1=/g' > ./values.txt + if ! fmpp -q -C conf.fmpp -S ../ftl/processors/conf/mcuconf_stm32f76xxx + then + echo + echo "aborted" + exit 1 + fi + cp ./mcuconf.h $1 + rm ./mcuconf.h ./values.txt + fi +else + echo "Usage: update_mcuconf_stm32f76xxx.sh [rootpath <root path>]" + echo " update_mcuconf_stm32f76xxx.sh <configuration file>]" +fi |