diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2012-07-18 16:19:35 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2012-07-18 16:19:35 +0000 |
commit | 8c7611e9cac0d3fb9d112797e1d235a25143122b (patch) | |
tree | 81b819058306fb78a8a1f7fa6e0d7abc5f4627b3 /tools/gencfg | |
parent | bec694657d30fcf912138d490828dc6add9042c7 (diff) | |
download | ChibiOS-8c7611e9cac0d3fb9d112797e1d235a25143122b.tar.gz ChibiOS-8c7611e9cac0d3fb9d112797e1d235a25143122b.tar.bz2 ChibiOS-8c7611e9cac0d3fb9d112797e1d235a25143122b.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4470 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'tools/gencfg')
-rw-r--r-- | tools/gencfg/.project | 64 | ||||
-rw-r--r-- | tools/gencfg/config.fmpp | 2 | ||||
-rw-r--r-- | tools/gencfg/fmpp.sh | 7 | ||||
-rw-r--r-- | tools/gencfg/processors/boards/stm32f4xx/templates/board.c.ftl | 27 | ||||
-rw-r--r-- | tools/gencfg/processors/boards/stm32f4xx/templates/board.h.ftl | 2 |
5 files changed, 71 insertions, 31 deletions
diff --git a/tools/gencfg/.project b/tools/gencfg/.project index a112039b3..9872c4eef 100644 --- a/tools/gencfg/.project +++ b/tools/gencfg/.project @@ -1,25 +1,39 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>_Configuration Tool</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
- <triggers>full,incremental,</triggers>
- <arguments>
- <dictionary>
- <key>LaunchConfigHandle</key>
- <value><project>/.externalToolBuilders/FMPP Builder.launch</value>
- </dictionary>
- <dictionary>
- <key>incclean</key>
- <value>true</value>
- </dictionary>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- </natures>
-</projectDescription>
+<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>_Configuration Tool</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name> + <triggers>full,incremental,</triggers> + <arguments> + <dictionary> + <key>LaunchConfigHandle</key> + <value><project>/.externalToolBuilders/FMPP Builder (Windows).launch</value> + </dictionary> + <dictionary> + <key>incclean</key> + <value>true</value> + </dictionary> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name> + <triggers>full,incremental,</triggers> + <arguments> + <dictionary> + <key>LaunchConfigHandle</key> + <value><project>/.externalToolBuilders/FMPP Builder (Linux).launch</value> + </dictionary> + <dictionary> + <key>incclean</key> + <value>true</value> + </dictionary> + </arguments> + </buildCommand> + </buildSpec> + <natures> + </natures> +</projectDescription> diff --git a/tools/gencfg/config.fmpp b/tools/gencfg/config.fmpp index 9fc5a31dd..0f34b0a03 100644 --- a/tools/gencfg/config.fmpp +++ b/tools/gencfg/config.fmpp @@ -1,7 +1,7 @@ # Change the next line to point to the processor you want to use. Processors
# are identified by a file named "config.fmpp" under the "processors" root
# directory.
-inheritConfiguration: processors/hal/stm32f4xx/config.fmpp
+inheritConfiguration: processors/boards/stm32f4xx/config.fmpp
# Settings common to all processors. Do not change the following lines.
freemarkerLinks: {
diff --git a/tools/gencfg/fmpp.sh b/tools/gencfg/fmpp.sh new file mode 100644 index 000000000..b98398702 --- /dev/null +++ b/tools/gencfg/fmpp.sh @@ -0,0 +1,7 @@ +#!/bin/bash +JAVA_HOME=/usr/lib/jvm/java-6-sun +export JAVA_HOME +PATH=$PATH:$JAVA_HOME/bin +export PATH +fmpp -C config.fmpp + diff --git a/tools/gencfg/processors/boards/stm32f4xx/templates/board.c.ftl b/tools/gencfg/processors/boards/stm32f4xx/templates/board.c.ftl index 1e2a8ee95..f38fd106a 100644 --- a/tools/gencfg/processors/boards/stm32f4xx/templates/board.c.ftl +++ b/tools/gencfg/processors/boards/stm32f4xx/templates/board.c.ftl @@ -66,49 +66,68 @@ const PALConfig pal_default_config = void __early_init(void) {
stm32_clock_init();
+[#if doc1.board.board_functions.__early_init[0]??]
+ ${doc1.board.board_functions.__early_init[0]}
+[/#if]
}
#if HAL_USE_SDC || defined(__DOXYGEN__)
/**
* @brief SDC card detection.
- * @todo Fill the implementation.
*/
bool_t sdc_lld_is_card_inserted(SDCDriver *sdcp) {
+[#if doc1.board.board_functions.sdc_lld_is_card_inserted[0]??]
+${doc1.board.board_functions.sdc_lld_is_card_inserted[0]}
+[#else]
(void)sdcp;
+ /* TODO: Fill the implementation.*/
return TRUE;
+[/#if]
}
/**
* @brief SDC card write protection detection.
- * @todo Fill the implementation.
*/
bool_t sdc_lld_is_write_protected(SDCDriver *sdcp) {
+[#if doc1.board.board_functions.sdc_lld_is_write_protected[0]??]
+${doc1.board.board_functions.sdc_lld_is_write_protected[0]}
+[#else]
(void)sdcp;
+ /* TODO: Fill the implementation.*/
return FALSE;
+[/#if]
}
#endif /* HAL_USE_SDC */
#if HAL_USE_MMC_SPI || defined(__DOXYGEN__)
/**
* @brief MMC_SPI card detection.
- * @todo Fill the implementation.
*/
bool_t mmc_lld_is_card_inserted(MMCDriver *mmcp) {
+[#if doc1.board.board_functions.mmc_lld_is_card_inserted[0]??]
+${doc1.board.board_functions.mmc_lld_is_card_inserted[0]}
+[#else]
(void)mmcp;
+ /* TODO: Fill the implementation.*/
return TRUE;
+[/#if]
}
/**
* @brief MMC_SPI card write protection detection.
- * @todo Fill the implementation.
*/
bool_t mmc_lld_is_write_protected(MMCDriver *mmcp) {
+[#if doc1.board.board_functions.mmc_lld_is_write_protected[0]??]
+${doc1.board.board_functions.mmc_lld_is_write_protected[0]}
+[#else]
(void)mmcp;
+ /* TODO: Fill the implementation.*/
return FALSE;
+[/#if]
}
#endif
diff --git a/tools/gencfg/processors/boards/stm32f4xx/templates/board.h.ftl b/tools/gencfg/processors/boards/stm32f4xx/templates/board.h.ftl index 593b3883c..c24c0a355 100644 --- a/tools/gencfg/processors/boards/stm32f4xx/templates/board.h.ftl +++ b/tools/gencfg/processors/boards/stm32f4xx/templates/board.h.ftl @@ -44,7 +44,7 @@ * Ethernet PHY type.
*/
#define BOARD_PHY_ID ${doc1.board.ethernet_phy.identifier[0]}
-[#if doc1.board.ethernet_phy.type[0]?string == "RMII"]
+[#if doc1.board.ethernet_phy.bus_type[0]?string == "RMII"]
#define BOARD_PHY_RMII
[/#if]
[/#if]
|