From 7f7cf9e8a81388cd68cba4eeb76894549e6755fb Mon Sep 17 00:00:00 2001 From: gdisirio Date: Tue, 10 Jul 2012 17:01:52 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4452 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- .../gencfg/processors/boards/stm32f4xx/config.fmpp | 2 +- .../hal/stm32f4xx/templates/hal_cfg.c.ftl | 30 ++++++++++++++++ .../hal/stm32f4xx/templates/hal_cfg.h.ftl | 40 ++++++++++++++++++++++ 3 files changed, 71 insertions(+), 1 deletion(-) create mode 100644 tools/gencfg/processors/hal/stm32f4xx/templates/hal_cfg.c.ftl create mode 100644 tools/gencfg/processors/hal/stm32f4xx/templates/hal_cfg.h.ftl diff --git a/tools/gencfg/processors/boards/stm32f4xx/config.fmpp b/tools/gencfg/processors/boards/stm32f4xx/config.fmpp index a182fe12e..970d936ca 100644 --- a/tools/gencfg/processors/boards/stm32f4xx/config.fmpp +++ b/tools/gencfg/processors/boards/stm32f4xx/config.fmpp @@ -1,5 +1,5 @@ sourceRoot: templates outputRoot: output data: { - doc1: xml(../datamodel/stm32f4board.xml) + doc1: xml(../input/stm32f4board.xml) } diff --git a/tools/gencfg/processors/hal/stm32f4xx/templates/hal_cfg.c.ftl b/tools/gencfg/processors/hal/stm32f4xx/templates/hal_cfg.c.ftl new file mode 100644 index 000000000..922e614d8 --- /dev/null +++ b/tools/gencfg/processors/hal/stm32f4xx/templates/hal_cfg.c.ftl @@ -0,0 +1,30 @@ +[#ftl] +[#-- + ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010, + 2011,2012 Giovanni Di Sirio. + + This file is part of ChibiOS/RT. + + ChibiOS/RT is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + ChibiOS/RT is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + --] +[@pp.dropOutputFile /] +[#import "/@lib/libutils.ftl" as utils /] +[#import "/@lib/liblicense.ftl" as license /] +[@pp.changeOutputFile name=doc1.configuration.@name[0] + ".c" /] +/* +[@license.EmitLicenseAsText /] +*/ + +#include "ch.h" +#include "hal.h" diff --git a/tools/gencfg/processors/hal/stm32f4xx/templates/hal_cfg.h.ftl b/tools/gencfg/processors/hal/stm32f4xx/templates/hal_cfg.h.ftl new file mode 100644 index 000000000..d4c05c1cf --- /dev/null +++ b/tools/gencfg/processors/hal/stm32f4xx/templates/hal_cfg.h.ftl @@ -0,0 +1,40 @@ +[#ftl] +[#-- + ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010, + 2011,2012 Giovanni Di Sirio. + + This file is part of ChibiOS/RT. + + ChibiOS/RT is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + ChibiOS/RT is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + --] +[@pp.dropOutputFile /] +[#import "/@lib/libutils.ftl" as utils /] +[#import "/@lib/liblicense.ftl" as license /] +[@pp.changeOutputFile name=doc1.configuration.@name[0] + ".h" /] +/* +[@license.EmitLicenseAsText /] +*/ + +#ifndef _x_H_ +#define _x_H_ + +#ifdef __cplusplus +extern "C" { +#endif + void boardInit(void); +#ifdef __cplusplus +} +#endif + +#endif /* _x_H_ */ -- cgit v1.2.3