From d0b04d75d14005d0b25a02426a490e8ce8858b0f Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Sat, 15 Sep 2018 09:19:03 +0000 Subject: Added generator for L4+, file template not yet complete, drivers need to be tested. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@12258 110e8d01-0319-4d1e-a829-52ad28d1bb01 --- tools/updater/update_mcuconf_stm32l4r5xx.sh | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 tools/updater/update_mcuconf_stm32l4r5xx.sh (limited to 'tools/updater/update_mcuconf_stm32l4r5xx.sh') diff --git a/tools/updater/update_mcuconf_stm32l4r5xx.sh b/tools/updater/update_mcuconf_stm32l4r5xx.sh new file mode 100644 index 000000000..7151d7bf0 --- /dev/null +++ b/tools/updater/update_mcuconf_stm32l4r5xx.sh @@ -0,0 +1,29 @@ +#!/bin/bash +if [ $# -eq 2 ] + then + if [ $1 = "rootpath" ] + then + find $2 -name "mcuconf.h" -exec bash update_mcuconf_stm32l4r5xx.sh "{}" \; + else + echo "Usage: update_mcuconf_stm32l4r5xx.sh [rootpath ]" + fi +elif [ $# -eq 1 ] +then + declare conffile=$(<$1) + if egrep -q "STM32L4R5_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 mcuconf_stm32l4r5xx.fmpp + then + echo + echo "aborted" + exit 1 + fi + cp ./mcuconf.h $1 + rm ./mcuconf.h ./values.txt + fi +else + echo "Usage: update_mcuconf_stm32l4r5xx.sh [rootpath ]" + echo " update_mcuconf_stm32l4r5xx.sh ]" +fi -- cgit v1.2.3