diff options
author | Giovanni Di Sirio <gdisirio@gmail.com> | 2018-09-17 08:20:44 +0000 |
---|---|---|
committer | Giovanni Di Sirio <gdisirio@gmail.com> | 2018-09-17 08:20:44 +0000 |
commit | 6690b94df39c3d083702d190985f6b91dca52694 (patch) | |
tree | d23e0c8a8f7d7aa4ed0b85714f1b86f496b33400 /tools/updater/update_mcuconf_stm32l496xx.sh | |
parent | 56072db27c590b38d7f2ba1b5b322c871bba7262 (diff) | |
download | ChibiOS-6690b94df39c3d083702d190985f6b91dca52694.tar.gz ChibiOS-6690b94df39c3d083702d190985f6b91dca52694.tar.bz2 ChibiOS-6690b94df39c3d083702d190985f6b91dca52694.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@12269 110e8d01-0319-4d1e-a829-52ad28d1bb01
Diffstat (limited to 'tools/updater/update_mcuconf_stm32l496xx.sh')
-rw-r--r-- | tools/updater/update_mcuconf_stm32l496xx.sh | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/tools/updater/update_mcuconf_stm32l496xx.sh b/tools/updater/update_mcuconf_stm32l496xx.sh new file mode 100644 index 000000000..ae1b95182 --- /dev/null +++ b/tools/updater/update_mcuconf_stm32l496xx.sh @@ -0,0 +1,29 @@ +#!/bin/bash +if [ $# -eq 2 ] + then + if [ $1 = "rootpath" ] + then + find $2 -name "mcuconf.h" -exec bash update_mcuconf_stm32l496xx.sh "{}" \; + else + echo "Usage: update_mcuconf_stm32l496xx.sh [rootpath <root path>]" + fi +elif [ $# -eq 1 ] +then + declare conffile=$(<$1) + if egrep -q "STM32L496_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_stm32l496xx + then + echo + echo "aborted" + exit 1 + fi + cp ./mcuconf.h $1 + rm ./mcuconf.h ./values.txt + fi +else + echo "Usage: update_mcuconf_stm32l496xx.sh [rootpath <root path>]" + echo " update_mcuconf_stm32l496xx.sh <configuration file>]" +fi |