aboutsummaryrefslogtreecommitdiffstats
path: root/tools/updater
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2018-10-06 07:08:39 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2018-10-06 07:08:39 +0000
commit85641ac646aee189fd7f34b342e24425b668675f (patch)
tree1ad3de2949192506450eef5967e85f0e07f335ef /tools/updater
parentd27c34d080bd4a72169921e2f458546dc621b4e7 (diff)
downloadChibiOS-85641ac646aee189fd7f34b342e24425b668675f.tar.gz
ChibiOS-85641ac646aee189fd7f34b342e24425b668675f.tar.bz2
ChibiOS-85641ac646aee189fd7f34b342e24425b668675f.zip
Added mcuconf.h generators for STM32F746/756.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@12332 110e8d01-0319-4d1e-a829-52ad28d1bb01
Diffstat (limited to 'tools/updater')
-rw-r--r--tools/updater/update_mcuconf_stm32f746xx.sh29
1 files changed, 29 insertions, 0 deletions
diff --git a/tools/updater/update_mcuconf_stm32f746xx.sh b/tools/updater/update_mcuconf_stm32f746xx.sh
new file mode 100644
index 000000000..fa5bc6bee
--- /dev/null
+++ b/tools/updater/update_mcuconf_stm32f746xx.sh
@@ -0,0 +1,29 @@
+#!/bin/bash
+if [ $# -eq 2 ]
+ then
+ if [ $1 = "rootpath" ]
+ then
+ find $2 -name "mcuconf.h" -exec bash update_mcuconf_stm32f746xx.sh "{}" \;
+ else
+ echo "Usage: update_mcuconf_stm32f746xx.sh [rootpath <root path>]"
+ fi
+elif [ $# -eq 1 ]
+then
+ declare conffile=$(<$1)
+ if egrep -q "STM32F746_MCUCONF" <<< "$conffile" || egrep -q "STM32F756_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_stm32f746xx
+ then
+ echo
+ echo "aborted"
+ exit 1
+ fi
+ cp ./mcuconf.h $1
+ rm ./mcuconf.h ./values.txt
+ fi
+else
+ echo "Usage: update_mcuconf_stm32f746xx.sh [rootpath <root path>]"
+ echo " update_mcuconf_stm32f746xx.sh <configuration file>]"
+fi