aboutsummaryrefslogtreecommitdiffstats
path: root/tools/updater
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2018-09-15 09:19:03 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2018-09-15 09:19:03 +0000
commitd0b04d75d14005d0b25a02426a490e8ce8858b0f (patch)
tree6767a99ec7756d624c913bb652297b20c348b79b /tools/updater
parent34d794f731228f3ea540db71953f8316d732c01f (diff)
downloadChibiOS-d0b04d75d14005d0b25a02426a490e8ce8858b0f.tar.gz
ChibiOS-d0b04d75d14005d0b25a02426a490e8ce8858b0f.tar.bz2
ChibiOS-d0b04d75d14005d0b25a02426a490e8ce8858b0f.zip
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
Diffstat (limited to 'tools/updater')
-rw-r--r--tools/updater/mcuconf_stm32l4r5xx.fmpp11
-rw-r--r--tools/updater/update_mcuconf_stm32l4r5xx.sh29
2 files changed, 40 insertions, 0 deletions
diff --git a/tools/updater/mcuconf_stm32l4r5xx.fmpp b/tools/updater/mcuconf_stm32l4r5xx.fmpp
new file mode 100644
index 000000000..1b2ccf681
--- /dev/null
+++ b/tools/updater/mcuconf_stm32l4r5xx.fmpp
@@ -0,0 +1,11 @@
+sourceRoot: ../ftl/processors/conf/mcuconf_stm32l4r5xx
+outputRoot: .
+dataRoot: .
+
+freemarkerLinks: {
+ lib: ../ftl/libs
+}
+
+data : {
+ doc:properties (./values.txt)
+}
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 <root path>]"
+ 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 <root path>]"
+ echo " update_mcuconf_stm32l4r5xx.sh <configuration file>]"
+fi