diff options
author | Giovanni Di Sirio <gdisirio@gmail.com> | 2018-09-23 18:06:57 +0000 |
---|---|---|
committer | Giovanni Di Sirio <gdisirio@gmail.com> | 2018-09-23 18:06:57 +0000 |
commit | d94025f99fd8665a79f1e670a9d77cdf50bfe0cb (patch) | |
tree | 5772ca55ee2e06414e7cf606aa6a4609de8a22bd /tools/updater | |
parent | c27b36536a3e9c98bceedb61efad185ebe836dad (diff) | |
download | ChibiOS-d94025f99fd8665a79f1e670a9d77cdf50bfe0cb.tar.gz ChibiOS-d94025f99fd8665a79f1e670a9d77cdf50bfe0cb.tar.bz2 ChibiOS-d94025f99fd8665a79f1e670a9d77cdf50bfe0cb.zip |
Added mcuconf.h generator for STM32L432xx.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@12289 110e8d01-0319-4d1e-a829-52ad28d1bb01
Diffstat (limited to 'tools/updater')
-rw-r--r-- | tools/updater/update_mcuconf_stm32l432xx.sh | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/tools/updater/update_mcuconf_stm32l432xx.sh b/tools/updater/update_mcuconf_stm32l432xx.sh new file mode 100644 index 000000000..becaea389 --- /dev/null +++ b/tools/updater/update_mcuconf_stm32l432xx.sh @@ -0,0 +1,29 @@ +#!/bin/bash +if [ $# -eq 2 ] + then + if [ $1 = "rootpath" ] + then + find $2 -name "mcuconf.h" -exec bash update_mcuconf_stm32l432xx.sh "{}" \; + else + echo "Usage: update_mcuconf_stm32l432xx.sh [rootpath <root path>]" + fi +elif [ $# -eq 1 ] +then + declare conffile=$(<$1) + if egrep -q "STM32L432_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_stm32l432xx + then + echo + echo "aborted" + exit 1 + fi + cp ./mcuconf.h $1 + rm ./mcuconf.h ./values.txt + fi +else + echo "Usage: update_mcuconf_stm32l432xx.sh [rootpath <root path>]" + echo " update_mcuconf_stm32l432xx.sh <configuration file>]" +fi |