Added an STM32 WDG "multi" demo. Removed all old WDG demos.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@15058 27425a3e-05d8-49a3-a47f-9c15f0e5edd8
This commit is contained in:
parent
ca0290ace7
commit
e3b5a38b85
|
@ -74,7 +74,7 @@
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
|
|
||||||
*** Next ***
|
*** Next ***
|
||||||
- NEW: Added an STM32 WDG "multi" demo.
|
- NEW: Added an STM32 WDG "multi" demo. Removed all old WDG demos.
|
||||||
- NEW: Added option to copy vectors in RAM on GCC startup for ARMv6-M,
|
- NEW: Added option to copy vectors in RAM on GCC startup for ARMv6-M,
|
||||||
ARMv7-M and ARMv8-M-ML.
|
ARMv7-M and ARMv8-M-ML.
|
||||||
- NEW: On STM32WBxx added a check on STM32_LSI_ENABLE required by IWDG.
|
- NEW: On STM32WBxx added a check on STM32_LSI_ENABLE required by IWDG.
|
||||||
|
|
|
@ -1,52 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
||||||
<?fileVersion 4.0.0?>
|
|
||||||
|
|
||||||
<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
|
||||||
<storageModule moduleId="org.eclipse.cdt.core.settings">
|
|
||||||
<cconfiguration id="0.691815652">
|
|
||||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="0.691815652" moduleId="org.eclipse.cdt.core.settings" name="Default">
|
|
||||||
<externalSettings/>
|
|
||||||
<extensions>
|
|
||||||
<extension id="org.eclipse.cdt.core.VCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
|
||||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
|
||||||
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
|
||||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
|
||||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
|
||||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
|
||||||
</extensions>
|
|
||||||
</storageModule>
|
|
||||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
|
||||||
<configuration artifactName="${ProjName}" buildProperties="" description="" id="0.691815652" name="Default" parent="org.eclipse.cdt.build.core.prefbase.cfg">
|
|
||||||
<folderInfo id="0.691815652." name="/" resourcePath="">
|
|
||||||
<toolChain id="org.eclipse.cdt.build.core.prefbase.toolchain.884342386" name="No ToolChain" resourceTypeBasedDiscovery="false" superClass="org.eclipse.cdt.build.core.prefbase.toolchain">
|
|
||||||
<targetPlatform id="org.eclipse.cdt.build.core.prefbase.toolchain.884342386.339777752" name=""/>
|
|
||||||
<builder id="org.eclipse.cdt.build.core.settings.default.builder.1729138099" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="org.eclipse.cdt.build.core.settings.default.builder"/>
|
|
||||||
<tool id="org.eclipse.cdt.build.core.settings.holder.libs.146870087" name="holder for library settings" superClass="org.eclipse.cdt.build.core.settings.holder.libs"/>
|
|
||||||
<tool id="org.eclipse.cdt.build.core.settings.holder.605490810" name="Assembly" superClass="org.eclipse.cdt.build.core.settings.holder">
|
|
||||||
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.2132469247" languageId="org.eclipse.cdt.core.assembly" languageName="Assembly" sourceContentType="org.eclipse.cdt.core.asmSource" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
|
|
||||||
</tool>
|
|
||||||
<tool id="org.eclipse.cdt.build.core.settings.holder.936236661" name="GNU C++" superClass="org.eclipse.cdt.build.core.settings.holder">
|
|
||||||
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1782745250" languageId="org.eclipse.cdt.core.g++" languageName="GNU C++" sourceContentType="org.eclipse.cdt.core.cxxSource,org.eclipse.cdt.core.cxxHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
|
|
||||||
</tool>
|
|
||||||
<tool id="org.eclipse.cdt.build.core.settings.holder.670706928" name="GNU C" superClass="org.eclipse.cdt.build.core.settings.holder">
|
|
||||||
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.417510158" languageId="org.eclipse.cdt.core.gcc" languageName="GNU C" sourceContentType="org.eclipse.cdt.core.cSource,org.eclipse.cdt.core.cHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
|
|
||||||
</tool>
|
|
||||||
</toolChain>
|
|
||||||
</folderInfo>
|
|
||||||
</configuration>
|
|
||||||
</storageModule>
|
|
||||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
|
||||||
</cconfiguration>
|
|
||||||
</storageModule>
|
|
||||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
|
||||||
<project id="STM32F0xx-WDG.null.219011718" name="STM32F0xx-WDG"/>
|
|
||||||
</storageModule>
|
|
||||||
<storageModule moduleId="scannerConfiguration">
|
|
||||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
|
||||||
<scannerConfigBuildInfo instanceId="0.691815652">
|
|
||||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
|
|
||||||
</scannerConfigBuildInfo>
|
|
||||||
</storageModule>
|
|
||||||
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
|
|
||||||
<storageModule moduleId="refreshScope"/>
|
|
||||||
</cproject>
|
|
|
@ -1,38 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<projectDescription>
|
|
||||||
<name>STM32F0xx-WDG</name>
|
|
||||||
<comment></comment>
|
|
||||||
<projects>
|
|
||||||
</projects>
|
|
||||||
<buildSpec>
|
|
||||||
<buildCommand>
|
|
||||||
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
|
|
||||||
<triggers>clean,full,incremental,</triggers>
|
|
||||||
<arguments>
|
|
||||||
</arguments>
|
|
||||||
</buildCommand>
|
|
||||||
<buildCommand>
|
|
||||||
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
|
|
||||||
<triggers>full,incremental,</triggers>
|
|
||||||
<arguments>
|
|
||||||
</arguments>
|
|
||||||
</buildCommand>
|
|
||||||
</buildSpec>
|
|
||||||
<natures>
|
|
||||||
<nature>org.eclipse.cdt.core.cnature</nature>
|
|
||||||
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
|
|
||||||
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
|
|
||||||
</natures>
|
|
||||||
<linkedResources>
|
|
||||||
<link>
|
|
||||||
<name>board</name>
|
|
||||||
<type>2</type>
|
|
||||||
<locationURI>CHIBIOS/os/hal/boards/ST_STM32F0_DISCOVERY</locationURI>
|
|
||||||
</link>
|
|
||||||
<link>
|
|
||||||
<name>os</name>
|
|
||||||
<type>2</type>
|
|
||||||
<locationURI>CHIBIOS/os</locationURI>
|
|
||||||
</link>
|
|
||||||
</linkedResources>
|
|
||||||
</projectDescription>
|
|
|
@ -1,58 +0,0 @@
|
||||||
/*
|
|
||||||
ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "ch.h"
|
|
||||||
#include "hal.h"
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Watchdog deadline set to more than one second (LSI=40000 / (64 * 1000)).
|
|
||||||
*/
|
|
||||||
static const WDGConfig wdgcfg = {
|
|
||||||
STM32_IWDG_PR_64,
|
|
||||||
STM32_IWDG_RL(1000),
|
|
||||||
STM32_IWDG_WIN_DISABLED
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Application entry point.
|
|
||||||
*/
|
|
||||||
int main(void) {
|
|
||||||
|
|
||||||
/*
|
|
||||||
* System initializations.
|
|
||||||
* - HAL initialization, this also initializes the configured device drivers
|
|
||||||
* and performs the board-specific initializations.
|
|
||||||
* - Kernel initialization, the main() function becomes a thread and the
|
|
||||||
* RTOS is active.
|
|
||||||
*/
|
|
||||||
halInit();
|
|
||||||
chSysInit();
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Starting the watchdog driver.
|
|
||||||
*/
|
|
||||||
wdgStart(&WDGD1, &wdgcfg);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Normal main() thread activity, it resets the watchdog.
|
|
||||||
*/
|
|
||||||
while (true) {
|
|
||||||
wdgReset(&WDGD1);
|
|
||||||
palToggleLine(LINE_LED4);
|
|
||||||
chThdSleepMilliseconds(500);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
|
@ -1,30 +0,0 @@
|
||||||
*****************************************************************************
|
|
||||||
** ChibiOS/HAL - WDG driver demo for STM32F3xx. **
|
|
||||||
*****************************************************************************
|
|
||||||
|
|
||||||
** TARGET **
|
|
||||||
|
|
||||||
The demo runs on an ST STM32F3-Discovery board.
|
|
||||||
|
|
||||||
** The Demo **
|
|
||||||
|
|
||||||
The application demonstrates the use of the STM32F3xx WDG driver.
|
|
||||||
|
|
||||||
** Board Setup **
|
|
||||||
|
|
||||||
None.
|
|
||||||
|
|
||||||
** Build Procedure **
|
|
||||||
|
|
||||||
The demo has been tested using the free Codesourcery GCC-based toolchain
|
|
||||||
and YAGARTO.
|
|
||||||
Just modify the TRGT line in the makefile in order to use different GCC ports.
|
|
||||||
|
|
||||||
** Notes **
|
|
||||||
|
|
||||||
Some files used by the demo are not part of ChibiOS/RT but are copyright of
|
|
||||||
ST Microelectronics and are licensed under a different license.
|
|
||||||
Also note that not all the files present in the ST library are distributed
|
|
||||||
with ChibiOS/RT, you can find the whole library on the ST web site:
|
|
||||||
|
|
||||||
http://www.st.com
|
|
|
@ -1,52 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
||||||
<?fileVersion 4.0.0?>
|
|
||||||
|
|
||||||
<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
|
||||||
<storageModule moduleId="org.eclipse.cdt.core.settings">
|
|
||||||
<cconfiguration id="0.691815652">
|
|
||||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="0.691815652" moduleId="org.eclipse.cdt.core.settings" name="Default">
|
|
||||||
<externalSettings/>
|
|
||||||
<extensions>
|
|
||||||
<extension id="org.eclipse.cdt.core.VCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
|
||||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
|
||||||
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
|
||||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
|
||||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
|
||||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
|
||||||
</extensions>
|
|
||||||
</storageModule>
|
|
||||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
|
||||||
<configuration artifactName="${ProjName}" buildProperties="" description="" id="0.691815652" name="Default" parent="org.eclipse.cdt.build.core.prefbase.cfg">
|
|
||||||
<folderInfo id="0.691815652." name="/" resourcePath="">
|
|
||||||
<toolChain id="org.eclipse.cdt.build.core.prefbase.toolchain.884342386" name="No ToolChain" resourceTypeBasedDiscovery="false" superClass="org.eclipse.cdt.build.core.prefbase.toolchain">
|
|
||||||
<targetPlatform id="org.eclipse.cdt.build.core.prefbase.toolchain.884342386.339777752" name=""/>
|
|
||||||
<builder id="org.eclipse.cdt.build.core.settings.default.builder.1729138099" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="org.eclipse.cdt.build.core.settings.default.builder"/>
|
|
||||||
<tool id="org.eclipse.cdt.build.core.settings.holder.libs.146870087" name="holder for library settings" superClass="org.eclipse.cdt.build.core.settings.holder.libs"/>
|
|
||||||
<tool id="org.eclipse.cdt.build.core.settings.holder.605490810" name="Assembly" superClass="org.eclipse.cdt.build.core.settings.holder">
|
|
||||||
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.2132469247" languageId="org.eclipse.cdt.core.assembly" languageName="Assembly" sourceContentType="org.eclipse.cdt.core.asmSource" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
|
|
||||||
</tool>
|
|
||||||
<tool id="org.eclipse.cdt.build.core.settings.holder.936236661" name="GNU C++" superClass="org.eclipse.cdt.build.core.settings.holder">
|
|
||||||
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1782745250" languageId="org.eclipse.cdt.core.g++" languageName="GNU C++" sourceContentType="org.eclipse.cdt.core.cxxSource,org.eclipse.cdt.core.cxxHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
|
|
||||||
</tool>
|
|
||||||
<tool id="org.eclipse.cdt.build.core.settings.holder.670706928" name="GNU C" superClass="org.eclipse.cdt.build.core.settings.holder">
|
|
||||||
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.417510158" languageId="org.eclipse.cdt.core.gcc" languageName="GNU C" sourceContentType="org.eclipse.cdt.core.cSource,org.eclipse.cdt.core.cHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
|
|
||||||
</tool>
|
|
||||||
</toolChain>
|
|
||||||
</folderInfo>
|
|
||||||
</configuration>
|
|
||||||
</storageModule>
|
|
||||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
|
||||||
</cconfiguration>
|
|
||||||
</storageModule>
|
|
||||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
|
||||||
<project id="STM32F3xx-WDG.null.219011718" name="STM32F3xx-WDG"/>
|
|
||||||
</storageModule>
|
|
||||||
<storageModule moduleId="scannerConfiguration">
|
|
||||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
|
||||||
<scannerConfigBuildInfo instanceId="0.691815652">
|
|
||||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
|
|
||||||
</scannerConfigBuildInfo>
|
|
||||||
</storageModule>
|
|
||||||
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
|
|
||||||
<storageModule moduleId="refreshScope"/>
|
|
||||||
</cproject>
|
|
|
@ -1,38 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<projectDescription>
|
|
||||||
<name>STM32F3xx-WDG</name>
|
|
||||||
<comment></comment>
|
|
||||||
<projects>
|
|
||||||
</projects>
|
|
||||||
<buildSpec>
|
|
||||||
<buildCommand>
|
|
||||||
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
|
|
||||||
<triggers>clean,full,incremental,</triggers>
|
|
||||||
<arguments>
|
|
||||||
</arguments>
|
|
||||||
</buildCommand>
|
|
||||||
<buildCommand>
|
|
||||||
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
|
|
||||||
<triggers>full,incremental,</triggers>
|
|
||||||
<arguments>
|
|
||||||
</arguments>
|
|
||||||
</buildCommand>
|
|
||||||
</buildSpec>
|
|
||||||
<natures>
|
|
||||||
<nature>org.eclipse.cdt.core.cnature</nature>
|
|
||||||
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
|
|
||||||
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
|
|
||||||
</natures>
|
|
||||||
<linkedResources>
|
|
||||||
<link>
|
|
||||||
<name>board</name>
|
|
||||||
<type>2</type>
|
|
||||||
<locationURI>CHIBIOS/os/hal/boards/ST_STM32F3_DISCOVERY</locationURI>
|
|
||||||
</link>
|
|
||||||
<link>
|
|
||||||
<name>os</name>
|
|
||||||
<type>2</type>
|
|
||||||
<locationURI>CHIBIOS/os</locationURI>
|
|
||||||
</link>
|
|
||||||
</linkedResources>
|
|
||||||
</projectDescription>
|
|
|
@ -1,58 +0,0 @@
|
||||||
/*
|
|
||||||
ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "ch.h"
|
|
||||||
#include "hal.h"
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Watchdog deadline set to more than one second (LSI=40000 / (64 * 1000)).
|
|
||||||
*/
|
|
||||||
static const WDGConfig wdgcfg = {
|
|
||||||
STM32_IWDG_PR_64,
|
|
||||||
STM32_IWDG_RL(1000),
|
|
||||||
STM32_IWDG_WIN_DISABLED
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Application entry point.
|
|
||||||
*/
|
|
||||||
int main(void) {
|
|
||||||
|
|
||||||
/*
|
|
||||||
* System initializations.
|
|
||||||
* - HAL initialization, this also initializes the configured device drivers
|
|
||||||
* and performs the board-specific initializations.
|
|
||||||
* - Kernel initialization, the main() function becomes a thread and the
|
|
||||||
* RTOS is active.
|
|
||||||
*/
|
|
||||||
halInit();
|
|
||||||
chSysInit();
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Starting the watchdog driver.
|
|
||||||
*/
|
|
||||||
wdgStart(&WDGD1, &wdgcfg);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Normal main() thread activity, it resets the watchdog.
|
|
||||||
*/
|
|
||||||
while (true) {
|
|
||||||
wdgReset(&WDGD1);
|
|
||||||
palToggleLine(LINE_LED4_BLUE);
|
|
||||||
chThdSleepMilliseconds(500);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
|
@ -1,30 +0,0 @@
|
||||||
*****************************************************************************
|
|
||||||
** ChibiOS/HAL - WDG driver demo for STM32F3xx. **
|
|
||||||
*****************************************************************************
|
|
||||||
|
|
||||||
** TARGET **
|
|
||||||
|
|
||||||
The demo runs on an ST STM32F3-Discovery board.
|
|
||||||
|
|
||||||
** The Demo **
|
|
||||||
|
|
||||||
The application demonstrates the use of the STM32F3xx WDG driver.
|
|
||||||
|
|
||||||
** Board Setup **
|
|
||||||
|
|
||||||
None.
|
|
||||||
|
|
||||||
** Build Procedure **
|
|
||||||
|
|
||||||
The demo has been tested using the free Codesourcery GCC-based toolchain
|
|
||||||
and YAGARTO.
|
|
||||||
Just modify the TRGT line in the makefile in order to use different GCC ports.
|
|
||||||
|
|
||||||
** Notes **
|
|
||||||
|
|
||||||
Some files used by the demo are not part of ChibiOS/RT but are copyright of
|
|
||||||
ST Microelectronics and are licensed under a different license.
|
|
||||||
Also note that not all the files present in the ST library are distributed
|
|
||||||
with ChibiOS/RT, you can find the whole library on the ST web site:
|
|
||||||
|
|
||||||
http://www.st.com
|
|
|
@ -1,52 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
||||||
<?fileVersion 4.0.0?>
|
|
||||||
|
|
||||||
<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
|
||||||
<storageModule moduleId="org.eclipse.cdt.core.settings">
|
|
||||||
<cconfiguration id="0.691815652">
|
|
||||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="0.691815652" moduleId="org.eclipse.cdt.core.settings" name="Default">
|
|
||||||
<externalSettings/>
|
|
||||||
<extensions>
|
|
||||||
<extension id="org.eclipse.cdt.core.VCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
|
||||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
|
||||||
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
|
||||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
|
||||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
|
||||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
|
||||||
</extensions>
|
|
||||||
</storageModule>
|
|
||||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
|
||||||
<configuration artifactName="${ProjName}" buildProperties="" description="" id="0.691815652" name="Default" parent="org.eclipse.cdt.build.core.prefbase.cfg">
|
|
||||||
<folderInfo id="0.691815652." name="/" resourcePath="">
|
|
||||||
<toolChain id="org.eclipse.cdt.build.core.prefbase.toolchain.884342386" name="No ToolChain" resourceTypeBasedDiscovery="false" superClass="org.eclipse.cdt.build.core.prefbase.toolchain">
|
|
||||||
<targetPlatform id="org.eclipse.cdt.build.core.prefbase.toolchain.884342386.339777752" name=""/>
|
|
||||||
<builder id="org.eclipse.cdt.build.core.settings.default.builder.1729138099" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="org.eclipse.cdt.build.core.settings.default.builder"/>
|
|
||||||
<tool id="org.eclipse.cdt.build.core.settings.holder.libs.146870087" name="holder for library settings" superClass="org.eclipse.cdt.build.core.settings.holder.libs"/>
|
|
||||||
<tool id="org.eclipse.cdt.build.core.settings.holder.605490810" name="Assembly" superClass="org.eclipse.cdt.build.core.settings.holder">
|
|
||||||
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.2132469247" languageId="org.eclipse.cdt.core.assembly" languageName="Assembly" sourceContentType="org.eclipse.cdt.core.asmSource" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
|
|
||||||
</tool>
|
|
||||||
<tool id="org.eclipse.cdt.build.core.settings.holder.936236661" name="GNU C++" superClass="org.eclipse.cdt.build.core.settings.holder">
|
|
||||||
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1782745250" languageId="org.eclipse.cdt.core.g++" languageName="GNU C++" sourceContentType="org.eclipse.cdt.core.cxxSource,org.eclipse.cdt.core.cxxHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
|
|
||||||
</tool>
|
|
||||||
<tool id="org.eclipse.cdt.build.core.settings.holder.670706928" name="GNU C" superClass="org.eclipse.cdt.build.core.settings.holder">
|
|
||||||
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.417510158" languageId="org.eclipse.cdt.core.gcc" languageName="GNU C" sourceContentType="org.eclipse.cdt.core.cSource,org.eclipse.cdt.core.cHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
|
|
||||||
</tool>
|
|
||||||
</toolChain>
|
|
||||||
</folderInfo>
|
|
||||||
</configuration>
|
|
||||||
</storageModule>
|
|
||||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
|
||||||
</cconfiguration>
|
|
||||||
</storageModule>
|
|
||||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
|
||||||
<project id="STM32F4xx-WDG.null.219011718" name="STM32F4xx-WDG"/>
|
|
||||||
</storageModule>
|
|
||||||
<storageModule moduleId="scannerConfiguration">
|
|
||||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
|
||||||
<scannerConfigBuildInfo instanceId="0.691815652">
|
|
||||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
|
|
||||||
</scannerConfigBuildInfo>
|
|
||||||
</storageModule>
|
|
||||||
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
|
|
||||||
<storageModule moduleId="refreshScope"/>
|
|
||||||
</cproject>
|
|
|
@ -1,38 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<projectDescription>
|
|
||||||
<name>STM32F4xx-WDG</name>
|
|
||||||
<comment></comment>
|
|
||||||
<projects>
|
|
||||||
</projects>
|
|
||||||
<buildSpec>
|
|
||||||
<buildCommand>
|
|
||||||
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
|
|
||||||
<triggers>clean,full,incremental,</triggers>
|
|
||||||
<arguments>
|
|
||||||
</arguments>
|
|
||||||
</buildCommand>
|
|
||||||
<buildCommand>
|
|
||||||
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
|
|
||||||
<triggers>full,incremental,</triggers>
|
|
||||||
<arguments>
|
|
||||||
</arguments>
|
|
||||||
</buildCommand>
|
|
||||||
</buildSpec>
|
|
||||||
<natures>
|
|
||||||
<nature>org.eclipse.cdt.core.cnature</nature>
|
|
||||||
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
|
|
||||||
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
|
|
||||||
</natures>
|
|
||||||
<linkedResources>
|
|
||||||
<link>
|
|
||||||
<name>board</name>
|
|
||||||
<type>2</type>
|
|
||||||
<locationURI>CHIBIOS/os/hal/boards/ST_STM32F4_DISCOVERY</locationURI>
|
|
||||||
</link>
|
|
||||||
<link>
|
|
||||||
<name>os</name>
|
|
||||||
<type>2</type>
|
|
||||||
<locationURI>CHIBIOS/os</locationURI>
|
|
||||||
</link>
|
|
||||||
</linkedResources>
|
|
||||||
</projectDescription>
|
|
|
@ -1,57 +0,0 @@
|
||||||
/*
|
|
||||||
ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "ch.h"
|
|
||||||
#include "hal.h"
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Watchdog deadline set to more than one second (LSI=40000 / (64 * 1000)).
|
|
||||||
*/
|
|
||||||
static const WDGConfig wdgcfg = {
|
|
||||||
STM32_IWDG_PR_64,
|
|
||||||
STM32_IWDG_RL(1000)
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Application entry point.
|
|
||||||
*/
|
|
||||||
int main(void) {
|
|
||||||
|
|
||||||
/*
|
|
||||||
* System initializations.
|
|
||||||
* - HAL initialization, this also initializes the configured device drivers
|
|
||||||
* and performs the board-specific initializations.
|
|
||||||
* - Kernel initialization, the main() function becomes a thread and the
|
|
||||||
* RTOS is active.
|
|
||||||
*/
|
|
||||||
halInit();
|
|
||||||
chSysInit();
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Starting the watchdog driver.
|
|
||||||
*/
|
|
||||||
wdgStart(&WDGD1, &wdgcfg);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Normal main() thread activity, it resets the watchdog.
|
|
||||||
*/
|
|
||||||
while (true) {
|
|
||||||
wdgReset(&WDGD1);
|
|
||||||
palToggleLine(LINE_LED4);
|
|
||||||
chThdSleepMilliseconds(500);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
|
@ -1,30 +0,0 @@
|
||||||
*****************************************************************************
|
|
||||||
** ChibiOS/HAL - WDG driver demo for STM32F4xx. **
|
|
||||||
*****************************************************************************
|
|
||||||
|
|
||||||
** TARGET **
|
|
||||||
|
|
||||||
The demo runs on an ST STM32F4-Discovery board.
|
|
||||||
|
|
||||||
** The Demo **
|
|
||||||
|
|
||||||
The application demonstrates the use of the STM32F4xx WDG driver.
|
|
||||||
|
|
||||||
** Board Setup **
|
|
||||||
|
|
||||||
None.
|
|
||||||
|
|
||||||
** Build Procedure **
|
|
||||||
|
|
||||||
The demo has been tested using the free Codesourcery GCC-based toolchain
|
|
||||||
and YAGARTO.
|
|
||||||
Just modify the TRGT line in the makefile in order to use different GCC ports.
|
|
||||||
|
|
||||||
** Notes **
|
|
||||||
|
|
||||||
Some files used by the demo are not part of ChibiOS/RT but are copyright of
|
|
||||||
ST Microelectronics and are licensed under a different license.
|
|
||||||
Also note that not all the files present in the ST library are distributed
|
|
||||||
with ChibiOS/RT, you can find the whole library on the ST web site:
|
|
||||||
|
|
||||||
http://www.st.com
|
|
|
@ -69,26 +69,115 @@
|
||||||
</storageModule>
|
</storageModule>
|
||||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||||
</cconfiguration>
|
</cconfiguration>
|
||||||
|
<cconfiguration id="0.1093754934.532782958.134374917.1214787034">
|
||||||
|
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="0.1093754934.532782958.134374917.1214787034" moduleId="org.eclipse.cdt.core.settings" name="Build for STM32F303-Discovery">
|
||||||
|
<externalSettings/>
|
||||||
|
<extensions>
|
||||||
|
<extension id="org.eclipse.cdt.core.VCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
</extensions>
|
||||||
|
</storageModule>
|
||||||
|
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||||
|
<configuration artifactName="${ProjName}" buildProperties="" description="" id="0.1093754934.532782958.134374917.1214787034" name="Build for STM32F303-Discovery" parent="org.eclipse.cdt.build.core.prefbase.cfg">
|
||||||
|
<folderInfo id="0.1093754934.532782958.134374917.1214787034." name="/" resourcePath="">
|
||||||
|
<toolChain id="org.eclipse.cdt.build.core.prefbase.toolchain.1816633289" name="No ToolChain" resourceTypeBasedDiscovery="false" superClass="org.eclipse.cdt.build.core.prefbase.toolchain">
|
||||||
|
<targetPlatform id="org.eclipse.cdt.build.core.prefbase.toolchain.1816633289.1073379510" name=""/>
|
||||||
|
<builder arguments="-f ./make/stm32f303_discovery.make" command="make" id="org.eclipse.cdt.build.core.settings.default.builder.1086796441" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="unlimited" superClass="org.eclipse.cdt.build.core.settings.default.builder"/>
|
||||||
|
<tool id="org.eclipse.cdt.build.core.settings.holder.libs.703376126" name="holder for library settings" superClass="org.eclipse.cdt.build.core.settings.holder.libs"/>
|
||||||
|
<tool id="org.eclipse.cdt.build.core.settings.holder.1068153689" name="Assembly" superClass="org.eclipse.cdt.build.core.settings.holder">
|
||||||
|
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1940272291" languageId="org.eclipse.cdt.core.assembly" languageName="Assembly" sourceContentType="org.eclipse.cdt.core.asmSource" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
|
||||||
|
</tool>
|
||||||
|
<tool id="org.eclipse.cdt.build.core.settings.holder.433339502" name="GNU C++" superClass="org.eclipse.cdt.build.core.settings.holder">
|
||||||
|
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1769960289" languageId="org.eclipse.cdt.core.g++" languageName="GNU C++" sourceContentType="org.eclipse.cdt.core.cxxSource,org.eclipse.cdt.core.cxxHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
|
||||||
|
</tool>
|
||||||
|
<tool id="org.eclipse.cdt.build.core.settings.holder.1439188619" name="GNU C" superClass="org.eclipse.cdt.build.core.settings.holder">
|
||||||
|
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.2084417284" languageId="org.eclipse.cdt.core.gcc" languageName="GNU C" sourceContentType="org.eclipse.cdt.core.cSource,org.eclipse.cdt.core.cHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
|
||||||
|
</tool>
|
||||||
|
</toolChain>
|
||||||
|
</folderInfo>
|
||||||
|
</configuration>
|
||||||
|
</storageModule>
|
||||||
|
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||||
|
</cconfiguration>
|
||||||
|
<cconfiguration id="0.1093754934.532782958.134374917.1214787034.1220923479">
|
||||||
|
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="0.1093754934.532782958.134374917.1214787034.1220923479" moduleId="org.eclipse.cdt.core.settings" name="Build for STM32F051-Discovery">
|
||||||
|
<externalSettings/>
|
||||||
|
<extensions>
|
||||||
|
<extension id="org.eclipse.cdt.core.VCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
</extensions>
|
||||||
|
</storageModule>
|
||||||
|
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||||
|
<configuration artifactName="${ProjName}" buildProperties="" description="" id="0.1093754934.532782958.134374917.1214787034.1220923479" name="Build for STM32F051-Discovery" parent="org.eclipse.cdt.build.core.prefbase.cfg">
|
||||||
|
<folderInfo id="0.1093754934.532782958.134374917.1214787034.1220923479." name="/" resourcePath="">
|
||||||
|
<toolChain id="org.eclipse.cdt.build.core.prefbase.toolchain.1568126169" name="No ToolChain" resourceTypeBasedDiscovery="false" superClass="org.eclipse.cdt.build.core.prefbase.toolchain">
|
||||||
|
<targetPlatform id="org.eclipse.cdt.build.core.prefbase.toolchain.1568126169.1452332196" name=""/>
|
||||||
|
<builder arguments="-f ./make/stm32f051_discovery.make" command="make" id="org.eclipse.cdt.build.core.settings.default.builder.806577568" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="unlimited" superClass="org.eclipse.cdt.build.core.settings.default.builder"/>
|
||||||
|
<tool id="org.eclipse.cdt.build.core.settings.holder.libs.1166419236" name="holder for library settings" superClass="org.eclipse.cdt.build.core.settings.holder.libs"/>
|
||||||
|
<tool id="org.eclipse.cdt.build.core.settings.holder.1672166004" name="Assembly" superClass="org.eclipse.cdt.build.core.settings.holder">
|
||||||
|
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.285350619" languageId="org.eclipse.cdt.core.assembly" languageName="Assembly" sourceContentType="org.eclipse.cdt.core.asmSource" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
|
||||||
|
</tool>
|
||||||
|
<tool id="org.eclipse.cdt.build.core.settings.holder.1378218146" name="GNU C++" superClass="org.eclipse.cdt.build.core.settings.holder">
|
||||||
|
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.2115739934" languageId="org.eclipse.cdt.core.g++" languageName="GNU C++" sourceContentType="org.eclipse.cdt.core.cxxSource,org.eclipse.cdt.core.cxxHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
|
||||||
|
</tool>
|
||||||
|
<tool id="org.eclipse.cdt.build.core.settings.holder.1687001243" name="GNU C" superClass="org.eclipse.cdt.build.core.settings.holder">
|
||||||
|
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.448530516" languageId="org.eclipse.cdt.core.gcc" languageName="GNU C" sourceContentType="org.eclipse.cdt.core.cSource,org.eclipse.cdt.core.cHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
|
||||||
|
</tool>
|
||||||
|
</toolChain>
|
||||||
|
</folderInfo>
|
||||||
|
</configuration>
|
||||||
|
</storageModule>
|
||||||
|
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||||
|
</cconfiguration>
|
||||||
|
<cconfiguration id="0.1093754934.532782958.134374917.1214787034.361384071">
|
||||||
|
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="0.1093754934.532782958.134374917.1214787034.361384071" moduleId="org.eclipse.cdt.core.settings" name="Build for STM32F407-Discovery">
|
||||||
|
<externalSettings/>
|
||||||
|
<extensions>
|
||||||
|
<extension id="org.eclipse.cdt.core.VCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
</extensions>
|
||||||
|
</storageModule>
|
||||||
|
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||||
|
<configuration artifactName="${ProjName}" buildProperties="" description="" id="0.1093754934.532782958.134374917.1214787034.361384071" name="Build for STM32F407-Discovery" parent="org.eclipse.cdt.build.core.prefbase.cfg">
|
||||||
|
<folderInfo id="0.1093754934.532782958.134374917.1214787034.361384071." name="/" resourcePath="">
|
||||||
|
<toolChain id="org.eclipse.cdt.build.core.prefbase.toolchain.1785519854" name="No ToolChain" resourceTypeBasedDiscovery="false" superClass="org.eclipse.cdt.build.core.prefbase.toolchain">
|
||||||
|
<targetPlatform id="org.eclipse.cdt.build.core.prefbase.toolchain.1785519854.731302151" name=""/>
|
||||||
|
<builder arguments="-f ./make/stm32f407_discovery.make" command="make" id="org.eclipse.cdt.build.core.settings.default.builder.1553945788" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="unlimited" superClass="org.eclipse.cdt.build.core.settings.default.builder"/>
|
||||||
|
<tool id="org.eclipse.cdt.build.core.settings.holder.libs.1223466996" name="holder for library settings" superClass="org.eclipse.cdt.build.core.settings.holder.libs"/>
|
||||||
|
<tool id="org.eclipse.cdt.build.core.settings.holder.1365714398" name="Assembly" superClass="org.eclipse.cdt.build.core.settings.holder">
|
||||||
|
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1351686498" languageId="org.eclipse.cdt.core.assembly" languageName="Assembly" sourceContentType="org.eclipse.cdt.core.asmSource" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
|
||||||
|
</tool>
|
||||||
|
<tool id="org.eclipse.cdt.build.core.settings.holder.929392960" name="GNU C++" superClass="org.eclipse.cdt.build.core.settings.holder">
|
||||||
|
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.610701400" languageId="org.eclipse.cdt.core.g++" languageName="GNU C++" sourceContentType="org.eclipse.cdt.core.cxxSource,org.eclipse.cdt.core.cxxHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
|
||||||
|
</tool>
|
||||||
|
<tool id="org.eclipse.cdt.build.core.settings.holder.1386364748" name="GNU C" superClass="org.eclipse.cdt.build.core.settings.holder">
|
||||||
|
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1854099087" languageId="org.eclipse.cdt.core.gcc" languageName="GNU C" sourceContentType="org.eclipse.cdt.core.cSource,org.eclipse.cdt.core.cHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
|
||||||
|
</tool>
|
||||||
|
</toolChain>
|
||||||
|
</folderInfo>
|
||||||
|
</configuration>
|
||||||
|
</storageModule>
|
||||||
|
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||||
|
</cconfiguration>
|
||||||
</storageModule>
|
</storageModule>
|
||||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||||
<project id="STM32-WDG.null.932840044" name="STM32-WDG"/>
|
<project id="STM32-WDG.null.932840044" name="STM32-WDG"/>
|
||||||
</storageModule>
|
</storageModule>
|
||||||
<storageModule moduleId="refreshScope" versionNumber="2">
|
<storageModule moduleId="refreshScope" versionNumber="2">
|
||||||
<configuration configurationName="Build for STM32F407-Discovery">
|
|
||||||
<resource resourceType="PROJECT" workspacePath="/STM32-WDG"/>
|
|
||||||
</configuration>
|
|
||||||
<configuration configurationName="Build for STM32F303-Discovery"/>
|
<configuration configurationName="Build for STM32F303-Discovery"/>
|
||||||
<configuration configurationName="Build for STM32F051-Discovery">
|
|
||||||
<resource resourceType="PROJECT" workspacePath="/STM32-WDG"/>
|
|
||||||
</configuration>
|
|
||||||
<configuration configurationName="Build for STM32L053-Discovery">
|
|
||||||
<resource resourceType="PROJECT" workspacePath="/STM32-WDG"/>
|
|
||||||
</configuration>
|
|
||||||
<configuration configurationName="Build for STM32F103-Olimex"/>
|
<configuration configurationName="Build for STM32F103-Olimex"/>
|
||||||
<configuration configurationName="Build for STM32F373-Eval">
|
|
||||||
<resource resourceType="PROJECT" workspacePath="/STM32-WDG"/>
|
|
||||||
</configuration>
|
|
||||||
<configuration configurationName="Build for STM32F091-Nucleo64"/>
|
|
||||||
<configuration configurationName="Build for STM32L151-Discovery">
|
<configuration configurationName="Build for STM32L151-Discovery">
|
||||||
<resource resourceType="PROJECT" workspacePath="/STM32-WDG"/>
|
<resource resourceType="PROJECT" workspacePath="/STM32-WDG"/>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
@ -99,28 +188,51 @@
|
||||||
<configuration configurationName="Build for STM32F746-Discovery">
|
<configuration configurationName="Build for STM32F746-Discovery">
|
||||||
<resource resourceType="PROJECT" workspacePath="/STM32-WDG"/>
|
<resource resourceType="PROJECT" workspacePath="/STM32-WDG"/>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
<configuration configurationName="Build for STM32F407-Discovery">
|
||||||
|
<resource resourceType="PROJECT" workspacePath="/STM32-WDG"/>
|
||||||
|
</configuration>
|
||||||
|
<configuration configurationName="Build for STM32F051-Discovery">
|
||||||
|
<resource resourceType="PROJECT" workspacePath="/STM32-WDG"/>
|
||||||
|
</configuration>
|
||||||
|
<configuration configurationName="Build for STM32L053-Discovery">
|
||||||
|
<resource resourceType="PROJECT" workspacePath="/STM32-WDG"/>
|
||||||
|
</configuration>
|
||||||
|
<configuration configurationName="Build for STM32F373-Eval">
|
||||||
|
<resource resourceType="PROJECT" workspacePath="/STM32-WDG"/>
|
||||||
|
</configuration>
|
||||||
|
<configuration configurationName="Build for STM32F091-Nucleo64"/>
|
||||||
|
<configuration configurationName="Build for STM32WB55RG-Nucleo68"/>
|
||||||
<configuration configurationName="Build for STM32L476-Discovery">
|
<configuration configurationName="Build for STM32L476-Discovery">
|
||||||
<resource resourceType="PROJECT" workspacePath="/STM32-WDG"/>
|
<resource resourceType="PROJECT" workspacePath="/STM32-WDG"/>
|
||||||
</configuration>
|
</configuration>
|
||||||
</storageModule>
|
</storageModule>
|
||||||
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
|
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
|
||||||
|
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
|
||||||
<storageModule moduleId="scannerConfiguration">
|
<storageModule moduleId="scannerConfiguration">
|
||||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||||
<scannerConfigBuildInfo instanceId="0.1093754934.1516812111">
|
<scannerConfigBuildInfo instanceId="0.1093754934">
|
||||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
|
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
|
||||||
</scannerConfigBuildInfo>
|
</scannerConfigBuildInfo>
|
||||||
<scannerConfigBuildInfo instanceId="0.1093754934.1516812111.421225086">
|
<scannerConfigBuildInfo instanceId="0.1093754934.1516812111.421225086">
|
||||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
|
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
|
||||||
</scannerConfigBuildInfo>
|
</scannerConfigBuildInfo>
|
||||||
<scannerConfigBuildInfo instanceId="0.1093754934.1825368971">
|
<scannerConfigBuildInfo instanceId="0.1093754934.532782958.134374917.1214787034.1220923479">
|
||||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
|
|
||||||
</scannerConfigBuildInfo>
|
|
||||||
<scannerConfigBuildInfo instanceId="0.1093754934">
|
|
||||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
|
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
|
||||||
</scannerConfigBuildInfo>
|
</scannerConfigBuildInfo>
|
||||||
<scannerConfigBuildInfo instanceId="0.1093754934.532782958.134374917">
|
<scannerConfigBuildInfo instanceId="0.1093754934.532782958.134374917">
|
||||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
|
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
|
||||||
</scannerConfigBuildInfo>
|
</scannerConfigBuildInfo>
|
||||||
|
<scannerConfigBuildInfo instanceId="0.1093754934.532782958.134374917.1214787034">
|
||||||
|
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
|
||||||
|
</scannerConfigBuildInfo>
|
||||||
|
<scannerConfigBuildInfo instanceId="0.1093754934.1516812111">
|
||||||
|
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
|
||||||
|
</scannerConfigBuildInfo>
|
||||||
|
<scannerConfigBuildInfo instanceId="0.1093754934.1825368971">
|
||||||
|
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
|
||||||
|
</scannerConfigBuildInfo>
|
||||||
|
<scannerConfigBuildInfo instanceId="0.1093754934.532782958.134374917.1214787034.361384071">
|
||||||
|
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
|
||||||
|
</scannerConfigBuildInfo>
|
||||||
</storageModule>
|
</storageModule>
|
||||||
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
|
|
||||||
</cproject>
|
</cproject>
|
|
@ -3,6 +3,18 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
all:
|
all:
|
||||||
|
@echo
|
||||||
|
@echo === Building for STM32F051-Discovery ===============================
|
||||||
|
+@make --no-print-directory -f make/stm32f051_discovery.make all
|
||||||
|
@echo ====================================================================
|
||||||
|
@echo
|
||||||
|
@echo === Building for STM32F303_Discovery ==============================
|
||||||
|
+@make --no-print-directory -f ./make/stm32f303_discovery.make all
|
||||||
|
@echo ====================================================================
|
||||||
|
@echo
|
||||||
|
@echo === Building for STM32F407-Discovery ===============================
|
||||||
|
+@make --no-print-directory -f make/stm32f407_discovery.make all
|
||||||
|
@echo ====================================================================
|
||||||
@echo
|
@echo
|
||||||
@echo === Building for STM32WB55RG_Nucleo68 =============================
|
@echo === Building for STM32WB55RG_Nucleo68 =============================
|
||||||
+@make --no-print-directory -f ./make/stm32wb55rg_nucleo68.make all
|
+@make --no-print-directory -f ./make/stm32wb55rg_nucleo68.make all
|
||||||
|
@ -10,6 +22,12 @@ all:
|
||||||
@echo
|
@echo
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
@echo
|
||||||
|
+@make --no-print-directory -f ./make/stm32f051_discovery.make clean
|
||||||
|
@echo
|
||||||
|
+@make --no-print-directory -f ./make/stm32f303_discovery.make clean
|
||||||
|
@echo
|
||||||
|
+@make --no-print-directory -f ./make/stm32f407_discovery.make clean
|
||||||
@echo
|
@echo
|
||||||
+@make --no-print-directory -f ./make/stm32wb55rg_nucleo68.make clean
|
+@make --no-print-directory -f ./make/stm32wb55rg_nucleo68.make clean
|
||||||
@echo
|
@echo
|
||||||
|
|
|
@ -152,7 +152,7 @@
|
||||||
/*
|
/*
|
||||||
* SERIAL driver system settings.
|
* SERIAL driver system settings.
|
||||||
*/
|
*/
|
||||||
#define STM32_SERIAL_USE_USART1 FALSE
|
#define STM32_SERIAL_USE_USART1 TRUE
|
||||||
#define STM32_SERIAL_USE_USART2 FALSE
|
#define STM32_SERIAL_USE_USART2 FALSE
|
||||||
|
|
||||||
/*
|
/*
|
|
@ -0,0 +1,55 @@
|
||||||
|
/*
|
||||||
|
ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @file portab.c
|
||||||
|
* @brief Application portability module code.
|
||||||
|
*
|
||||||
|
* @addtogroup application_portability
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "portab.h"
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* Module local definitions. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* Module exported variables. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* Module local types. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* Module local variables. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* Module local functions. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* Module exported functions. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
void portab_setup(void) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @} */
|
|
@ -0,0 +1,68 @@
|
||||||
|
/*
|
||||||
|
ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @file portab.h
|
||||||
|
* @brief Application portability macros and structures.
|
||||||
|
*
|
||||||
|
* @addtogroup application_portability
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef PORTAB_H
|
||||||
|
#define PORTAB_H
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* Module constants. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
#define PORTAB_LINE_LED1 LINE_LED3
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* Module pre-compile time settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* Derived constants and error checks. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* Module data structures and types. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* Module macros. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* External declarations. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
void portab_setup(void);
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* Module inline functions. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
#endif /* PORTAB_H */
|
||||||
|
|
||||||
|
/** @} */
|
|
@ -127,8 +127,8 @@
|
||||||
* DAC driver system settings.
|
* DAC driver system settings.
|
||||||
*/
|
*/
|
||||||
#define STM32_DAC_DUAL_MODE FALSE
|
#define STM32_DAC_DUAL_MODE FALSE
|
||||||
#define STM32_DAC_USE_DAC1_CH1 TRUE
|
#define STM32_DAC_USE_DAC1_CH1 FALSE
|
||||||
#define STM32_DAC_USE_DAC1_CH2 TRUE
|
#define STM32_DAC_USE_DAC1_CH2 FALSE
|
||||||
#define STM32_DAC_DAC1_CH1_IRQ_PRIORITY 10
|
#define STM32_DAC_DAC1_CH1_IRQ_PRIORITY 10
|
||||||
#define STM32_DAC_DAC1_CH2_IRQ_PRIORITY 10
|
#define STM32_DAC_DAC1_CH2_IRQ_PRIORITY 10
|
||||||
#define STM32_DAC_DAC1_CH1_DMA_PRIORITY 2
|
#define STM32_DAC_DAC1_CH1_DMA_PRIORITY 2
|
|
@ -0,0 +1,55 @@
|
||||||
|
/*
|
||||||
|
ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @file portab.c
|
||||||
|
* @brief Application portability module code.
|
||||||
|
*
|
||||||
|
* @addtogroup application_portability
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "portab.h"
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* Module local definitions. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* Module exported variables. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* Module local types. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* Module local variables. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* Module local functions. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* Module exported functions. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
void portab_setup(void) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @} */
|
|
@ -0,0 +1,68 @@
|
||||||
|
/*
|
||||||
|
ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @file portab.h
|
||||||
|
* @brief Application portability macros and structures.
|
||||||
|
*
|
||||||
|
* @addtogroup application_portability
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef PORTAB_H
|
||||||
|
#define PORTAB_H
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* Module constants. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
#define PORTAB_LINE_LED1 LINE_LED4_BLUE
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* Module pre-compile time settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* Derived constants and error checks. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* Module data structures and types. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* Module macros. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* External declarations. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
void portab_setup(void);
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* Module inline functions. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
#endif /* PORTAB_H */
|
||||||
|
|
||||||
|
/** @} */
|
|
@ -64,7 +64,7 @@
|
||||||
#define STM32_MCO1PRE STM32_MCO1PRE_DIV1
|
#define STM32_MCO1PRE STM32_MCO1PRE_DIV1
|
||||||
#define STM32_MCO2SEL STM32_MCO2SEL_SYSCLK
|
#define STM32_MCO2SEL STM32_MCO2SEL_SYSCLK
|
||||||
#define STM32_MCO2PRE STM32_MCO2PRE_DIV5
|
#define STM32_MCO2PRE STM32_MCO2PRE_DIV5
|
||||||
#define STM32_I2SSRC STM32_I2SSRC_PLLI2S
|
#define STM32_I2SSRC STM32_I2SSRC_CKIN
|
||||||
#define STM32_PLLI2SN_VALUE 192
|
#define STM32_PLLI2SN_VALUE 192
|
||||||
#define STM32_PLLI2SR_VALUE 5
|
#define STM32_PLLI2SR_VALUE 5
|
||||||
|
|
||||||
|
@ -267,7 +267,7 @@
|
||||||
* SERIAL driver system settings.
|
* SERIAL driver system settings.
|
||||||
*/
|
*/
|
||||||
#define STM32_SERIAL_USE_USART1 FALSE
|
#define STM32_SERIAL_USE_USART1 FALSE
|
||||||
#define STM32_SERIAL_USE_USART2 FALSE
|
#define STM32_SERIAL_USE_USART2 TRUE
|
||||||
#define STM32_SERIAL_USE_USART3 FALSE
|
#define STM32_SERIAL_USE_USART3 FALSE
|
||||||
#define STM32_SERIAL_USE_UART4 FALSE
|
#define STM32_SERIAL_USE_UART4 FALSE
|
||||||
#define STM32_SERIAL_USE_UART5 FALSE
|
#define STM32_SERIAL_USE_UART5 FALSE
|
|
@ -0,0 +1,55 @@
|
||||||
|
/*
|
||||||
|
ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @file portab.c
|
||||||
|
* @brief Application portability module code.
|
||||||
|
*
|
||||||
|
* @addtogroup application_portability
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "portab.h"
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* Module local definitions. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* Module exported variables. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* Module local types. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* Module local variables. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* Module local functions. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* Module exported functions. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
void portab_setup(void) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @} */
|
|
@ -0,0 +1,68 @@
|
||||||
|
/*
|
||||||
|
ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @file portab.h
|
||||||
|
* @brief Application portability macros and structures.
|
||||||
|
*
|
||||||
|
* @addtogroup application_portability
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef PORTAB_H
|
||||||
|
#define PORTAB_H
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* Module constants. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
#define PORTAB_LINE_LED1 LINE_LED3
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* Module pre-compile time settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* Derived constants and error checks. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* Module data structures and types. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* Module macros. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* External declarations. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
void portab_setup(void);
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* Module inline functions. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
#endif /* PORTAB_H */
|
||||||
|
|
||||||
|
/** @} */
|
|
@ -29,7 +29,7 @@
|
||||||
/* Module constants. */
|
/* Module constants. */
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
||||||
#define PORTAB_BLINK_LED1 LINE_LED_GREEN
|
#define PORTAB_LINE_LED1 LINE_LED_GREEN
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
/* Module pre-compile time settings. */
|
/* Module pre-compile time settings. */
|
||||||
|
|
|
@ -22,9 +22,11 @@
|
||||||
* Watchdog deadline set to more than one second (LSI=40000 / (64 * 1000)).
|
* Watchdog deadline set to more than one second (LSI=40000 / (64 * 1000)).
|
||||||
*/
|
*/
|
||||||
static const WDGConfig wdgcfg = {
|
static const WDGConfig wdgcfg = {
|
||||||
STM32_IWDG_PR_64,
|
.pr = STM32_IWDG_PR_64,
|
||||||
STM32_IWDG_RL(1000),
|
.rlr = STM32_IWDG_RL(1000),
|
||||||
STM32_IWDG_WIN_DISABLED
|
#if STM32_IWDG_IS_WINDOWED
|
||||||
|
.winr = STM32_IWDG_WIN_DISABLED,
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -52,7 +54,7 @@ int main(void) {
|
||||||
*/
|
*/
|
||||||
while (true) {
|
while (true) {
|
||||||
wdgReset(&WDGD1);
|
wdgReset(&WDGD1);
|
||||||
palToggleLine(PORTAB_BLINK_LED1);
|
palToggleLine(PORTAB_LINE_LED1);
|
||||||
chThdSleepMilliseconds(500);
|
chThdSleepMilliseconds(500);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -5,12 +5,12 @@
|
||||||
|
|
||||||
# Compiler options here.
|
# Compiler options here.
|
||||||
ifeq ($(USE_OPT),)
|
ifeq ($(USE_OPT),)
|
||||||
USE_OPT = -O2 -ggdb -fomit-frame-pointer -falign-functions=16
|
USE_OPT = -O0 -ggdb -fomit-frame-pointer -falign-functions=16
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# C specific options here (added to USE_OPT).
|
# C specific options here (added to USE_OPT).
|
||||||
ifeq ($(USE_COPT),)
|
ifeq ($(USE_COPT),)
|
||||||
USE_COPT =
|
USE_COPT =
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# C++ specific options here (added to USE_OPT).
|
# C++ specific options here (added to USE_OPT).
|
||||||
|
@ -18,26 +18,21 @@ ifeq ($(USE_CPPOPT),)
|
||||||
USE_CPPOPT = -fno-rtti
|
USE_CPPOPT = -fno-rtti
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Enable this if you want the linker to remove unused code and data
|
# Enable this if you want the linker to remove unused code and data.
|
||||||
ifeq ($(USE_LINK_GC),)
|
ifeq ($(USE_LINK_GC),)
|
||||||
USE_LINK_GC = yes
|
USE_LINK_GC = yes
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Linker extra options here.
|
# Linker extra options here.
|
||||||
ifeq ($(USE_LDOPT),)
|
ifeq ($(USE_LDOPT),)
|
||||||
USE_LDOPT =
|
USE_LDOPT =
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Enable this if you want link time optimizations (LTO)
|
# Enable this if you want link time optimizations (LTO).
|
||||||
ifeq ($(USE_LTO),)
|
ifeq ($(USE_LTO),)
|
||||||
USE_LTO = yes
|
USE_LTO = yes
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# If enabled, this option allows to compile the application in THUMB mode.
|
|
||||||
ifeq ($(USE_THUMB),)
|
|
||||||
USE_THUMB = yes
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Enable this if you want to see the full log while compiling.
|
# Enable this if you want to see the full log while compiling.
|
||||||
ifeq ($(USE_VERBOSE_COMPILE),)
|
ifeq ($(USE_VERBOSE_COMPILE),)
|
||||||
USE_VERBOSE_COMPILE = no
|
USE_VERBOSE_COMPILE = no
|
||||||
|
@ -66,7 +61,17 @@ endif
|
||||||
# Stack size to the allocated to the Cortex-M main/exceptions stack. This
|
# Stack size to the allocated to the Cortex-M main/exceptions stack. This
|
||||||
# stack is used for processing interrupts and exceptions.
|
# stack is used for processing interrupts and exceptions.
|
||||||
ifeq ($(USE_EXCEPTIONS_STACKSIZE),)
|
ifeq ($(USE_EXCEPTIONS_STACKSIZE),)
|
||||||
USE_EXCEPTIONS_STACKSIZE = 0x400
|
USE_EXCEPTIONS_STACKSIZE = 0x200
|
||||||
|
endif
|
||||||
|
|
||||||
|
# Enables the use of FPU (no, softfp, hard).
|
||||||
|
ifeq ($(USE_FPU),)
|
||||||
|
USE_FPU = no
|
||||||
|
endif
|
||||||
|
|
||||||
|
# FPU-related options.
|
||||||
|
ifeq ($(USE_FPU_OPT),)
|
||||||
|
USE_FPU_OPT = -mfloat-abi=$(USE_FPU) -mfpu=fpv4-sp-d16
|
||||||
endif
|
endif
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -74,14 +79,20 @@ endif
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
# Project, sources and paths
|
# Project, target, sources and paths
|
||||||
#
|
#
|
||||||
|
|
||||||
# Define project name here
|
# Define project name here
|
||||||
PROJECT = ch
|
PROJECT = ch
|
||||||
|
|
||||||
# Imported source files and paths
|
# Target settings.
|
||||||
CHIBIOS = ../../../..
|
MCU = cortex-m0
|
||||||
|
|
||||||
|
# Imported source files and paths.
|
||||||
|
CHIBIOS := ../../../..
|
||||||
|
CONFDIR := ./cfg/stm32f051_discovery
|
||||||
|
BUILDDIR := ./build/stm32f051_discovery
|
||||||
|
DEPDIR := ./.dep/stm32f051_discovery
|
||||||
|
|
||||||
# Licensing files.
|
# Licensing files.
|
||||||
include $(CHIBIOS)/os/license/license.mk
|
include $(CHIBIOS)/os/license/license.mk
|
||||||
|
@ -95,6 +106,8 @@ include $(CHIBIOS)/os/hal/osal/rt-nil/osal.mk
|
||||||
# RTOS files (optional).
|
# RTOS files (optional).
|
||||||
include $(CHIBIOS)/os/rt/rt.mk
|
include $(CHIBIOS)/os/rt/rt.mk
|
||||||
include $(CHIBIOS)/os/common/ports/ARMv6-M/compilers/GCC/mk/port.mk
|
include $(CHIBIOS)/os/common/ports/ARMv6-M/compilers/GCC/mk/port.mk
|
||||||
|
# Auto-build files in ./source recursively.
|
||||||
|
include $(CHIBIOS)/tools/mk/autobuild.mk
|
||||||
# Other files (optional).
|
# Other files (optional).
|
||||||
#include $(CHIBIOS)/os/test/test.mk
|
#include $(CHIBIOS)/os/test/test.mk
|
||||||
#include $(CHIBIOS)/test/rt/rt_test.mk
|
#include $(CHIBIOS)/test/rt/rt_test.mk
|
||||||
|
@ -107,79 +120,30 @@ LDSCRIPT= $(STARTUPLD)/STM32F051x8.ld
|
||||||
# setting.
|
# setting.
|
||||||
CSRC = $(ALLCSRC) \
|
CSRC = $(ALLCSRC) \
|
||||||
$(TESTSRC) \
|
$(TESTSRC) \
|
||||||
|
$(CONFDIR)/portab.c \
|
||||||
main.c
|
main.c
|
||||||
|
|
||||||
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
|
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
|
||||||
# setting.
|
# setting.
|
||||||
CPPSRC = $(ALLCPPSRC)
|
CPPSRC = $(ALLCPPSRC)
|
||||||
|
|
||||||
# C sources to be compiled in ARM mode regardless of the global setting.
|
# List ASM source files here.
|
||||||
# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
|
|
||||||
# option that results in lower performance and larger code size.
|
|
||||||
ACSRC =
|
|
||||||
|
|
||||||
# C++ sources to be compiled in ARM mode regardless of the global setting.
|
|
||||||
# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
|
|
||||||
# option that results in lower performance and larger code size.
|
|
||||||
ACPPSRC =
|
|
||||||
|
|
||||||
# C sources to be compiled in THUMB mode regardless of the global setting.
|
|
||||||
# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
|
|
||||||
# option that results in lower performance and larger code size.
|
|
||||||
TCSRC =
|
|
||||||
|
|
||||||
# C sources to be compiled in THUMB mode regardless of the global setting.
|
|
||||||
# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
|
|
||||||
# option that results in lower performance and larger code size.
|
|
||||||
TCPPSRC =
|
|
||||||
|
|
||||||
# List ASM source files here
|
|
||||||
ASMSRC = $(ALLASMSRC)
|
ASMSRC = $(ALLASMSRC)
|
||||||
|
|
||||||
|
# List ASM with preprocessor source files here.
|
||||||
ASMXSRC = $(ALLXASMSRC)
|
ASMXSRC = $(ALLXASMSRC)
|
||||||
|
|
||||||
INCDIR = $(ALLINC) $(TESTINC)
|
# Inclusion directories.
|
||||||
|
INCDIR = $(CONFDIR) $(ALLINC) $(TESTINC)
|
||||||
|
|
||||||
#
|
# Define C warning options here.
|
||||||
# Project, sources and paths
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
##############################################################################
|
|
||||||
# Compiler settings
|
|
||||||
#
|
|
||||||
|
|
||||||
MCU = cortex-m0
|
|
||||||
|
|
||||||
#TRGT = arm-elf-
|
|
||||||
TRGT = arm-none-eabi-
|
|
||||||
CC = $(TRGT)gcc
|
|
||||||
CPPC = $(TRGT)g++
|
|
||||||
# Enable loading with g++ only if you need C++ runtime support.
|
|
||||||
# NOTE: You can use C++ even without C++ support if you are careful. C++
|
|
||||||
# runtime support makes code size explode.
|
|
||||||
LD = $(TRGT)gcc
|
|
||||||
#LD = $(TRGT)g++
|
|
||||||
CP = $(TRGT)objcopy
|
|
||||||
AS = $(TRGT)gcc -x assembler-with-cpp
|
|
||||||
AR = $(TRGT)ar
|
|
||||||
OD = $(TRGT)objdump
|
|
||||||
SZ = $(TRGT)size
|
|
||||||
HEX = $(CP) -O ihex
|
|
||||||
BIN = $(CP) -O binary
|
|
||||||
|
|
||||||
# ARM-specific options here
|
|
||||||
AOPT =
|
|
||||||
|
|
||||||
# THUMB-specific options here
|
|
||||||
TOPT = -mthumb -DTHUMB
|
|
||||||
|
|
||||||
# Define C warning options here
|
|
||||||
CWARN = -Wall -Wextra -Wundef -Wstrict-prototypes
|
CWARN = -Wall -Wextra -Wundef -Wstrict-prototypes
|
||||||
|
|
||||||
# Define C++ warning options here
|
# Define C++ warning options here.
|
||||||
CPPWARN = -Wall -Wextra -Wundef
|
CPPWARN = -Wall -Wextra -Wundef
|
||||||
|
|
||||||
#
|
#
|
||||||
# Compiler settings
|
# Project, target, sources and paths
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
@ -202,8 +166,25 @@ ULIBDIR =
|
||||||
ULIBS =
|
ULIBS =
|
||||||
|
|
||||||
#
|
#
|
||||||
# End of user defines
|
# End of user section
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
# Common rules
|
||||||
|
#
|
||||||
|
|
||||||
RULESPATH = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/mk
|
RULESPATH = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/mk
|
||||||
|
include $(RULESPATH)/arm-none-eabi.mk
|
||||||
include $(RULESPATH)/rules.mk
|
include $(RULESPATH)/rules.mk
|
||||||
|
|
||||||
|
#
|
||||||
|
# Common rules
|
||||||
|
##############################################################################
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
# Custom rules
|
||||||
|
#
|
||||||
|
|
||||||
|
#
|
||||||
|
# Custom rules
|
||||||
|
##############################################################################
|
|
@ -5,12 +5,12 @@
|
||||||
|
|
||||||
# Compiler options here.
|
# Compiler options here.
|
||||||
ifeq ($(USE_OPT),)
|
ifeq ($(USE_OPT),)
|
||||||
USE_OPT = -O2 -ggdb -fomit-frame-pointer -falign-functions=16
|
USE_OPT = -O0 -ggdb -fomit-frame-pointer -falign-functions=16
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# C specific options here (added to USE_OPT).
|
# C specific options here (added to USE_OPT).
|
||||||
ifeq ($(USE_COPT),)
|
ifeq ($(USE_COPT),)
|
||||||
USE_COPT =
|
USE_COPT =
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# C++ specific options here (added to USE_OPT).
|
# C++ specific options here (added to USE_OPT).
|
||||||
|
@ -18,26 +18,21 @@ ifeq ($(USE_CPPOPT),)
|
||||||
USE_CPPOPT = -fno-rtti
|
USE_CPPOPT = -fno-rtti
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Enable this if you want the linker to remove unused code and data
|
# Enable this if you want the linker to remove unused code and data.
|
||||||
ifeq ($(USE_LINK_GC),)
|
ifeq ($(USE_LINK_GC),)
|
||||||
USE_LINK_GC = yes
|
USE_LINK_GC = yes
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Linker extra options here.
|
# Linker extra options here.
|
||||||
ifeq ($(USE_LDOPT),)
|
ifeq ($(USE_LDOPT),)
|
||||||
USE_LDOPT =
|
USE_LDOPT =
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Enable this if you want link time optimizations (LTO)
|
# Enable this if you want link time optimizations (LTO).
|
||||||
ifeq ($(USE_LTO),)
|
ifeq ($(USE_LTO),)
|
||||||
USE_LTO = yes
|
USE_LTO = yes
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# If enabled, this option allows to compile the application in THUMB mode.
|
|
||||||
ifeq ($(USE_THUMB),)
|
|
||||||
USE_THUMB = yes
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Enable this if you want to see the full log while compiling.
|
# Enable this if you want to see the full log while compiling.
|
||||||
ifeq ($(USE_VERBOSE_COMPILE),)
|
ifeq ($(USE_VERBOSE_COMPILE),)
|
||||||
USE_VERBOSE_COMPILE = no
|
USE_VERBOSE_COMPILE = no
|
||||||
|
@ -74,19 +69,30 @@ ifeq ($(USE_FPU),)
|
||||||
USE_FPU = no
|
USE_FPU = no
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# FPU-related options.
|
||||||
|
ifeq ($(USE_FPU_OPT),)
|
||||||
|
USE_FPU_OPT = -mfloat-abi=$(USE_FPU) -mfpu=fpv4-sp-d16
|
||||||
|
endif
|
||||||
|
|
||||||
#
|
#
|
||||||
# Architecture or project specific options
|
# Architecture or project specific options
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
# Project, sources and paths
|
# Project, target, sources and paths
|
||||||
#
|
#
|
||||||
|
|
||||||
# Define project name here
|
# Define project name here
|
||||||
PROJECT = ch
|
PROJECT = ch
|
||||||
|
|
||||||
# Imported source files and paths
|
# Target settings.
|
||||||
CHIBIOS = ../../../..
|
MCU = cortex-m4
|
||||||
|
|
||||||
|
# Imported source files and paths.
|
||||||
|
CHIBIOS := ../../../..
|
||||||
|
CONFDIR := ./cfg/stm32f303_discovery
|
||||||
|
BUILDDIR := ./build/stm32f303_discovery
|
||||||
|
DEPDIR := ./.dep/stm32f303_discovery
|
||||||
|
|
||||||
# Licensing files.
|
# Licensing files.
|
||||||
include $(CHIBIOS)/os/license/license.mk
|
include $(CHIBIOS)/os/license/license.mk
|
||||||
|
@ -100,6 +106,8 @@ include $(CHIBIOS)/os/hal/osal/rt-nil/osal.mk
|
||||||
# RTOS files (optional).
|
# RTOS files (optional).
|
||||||
include $(CHIBIOS)/os/rt/rt.mk
|
include $(CHIBIOS)/os/rt/rt.mk
|
||||||
include $(CHIBIOS)/os/common/ports/ARMv7-M/compilers/GCC/mk/port.mk
|
include $(CHIBIOS)/os/common/ports/ARMv7-M/compilers/GCC/mk/port.mk
|
||||||
|
# Auto-build files in ./source recursively.
|
||||||
|
include $(CHIBIOS)/tools/mk/autobuild.mk
|
||||||
# Other files (optional).
|
# Other files (optional).
|
||||||
#include $(CHIBIOS)/os/test/test.mk
|
#include $(CHIBIOS)/os/test/test.mk
|
||||||
#include $(CHIBIOS)/test/rt/rt_test.mk
|
#include $(CHIBIOS)/test/rt/rt_test.mk
|
||||||
|
@ -112,79 +120,30 @@ LDSCRIPT= $(STARTUPLD)/STM32F303xC.ld
|
||||||
# setting.
|
# setting.
|
||||||
CSRC = $(ALLCSRC) \
|
CSRC = $(ALLCSRC) \
|
||||||
$(TESTSRC) \
|
$(TESTSRC) \
|
||||||
|
$(CONFDIR)/portab.c \
|
||||||
main.c
|
main.c
|
||||||
|
|
||||||
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
|
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
|
||||||
# setting.
|
# setting.
|
||||||
CPPSRC = $(ALLCPPSRC)
|
CPPSRC = $(ALLCPPSRC)
|
||||||
|
|
||||||
# C sources to be compiled in ARM mode regardless of the global setting.
|
# List ASM source files here.
|
||||||
# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
|
|
||||||
# option that results in lower performance and larger code size.
|
|
||||||
ACSRC =
|
|
||||||
|
|
||||||
# C++ sources to be compiled in ARM mode regardless of the global setting.
|
|
||||||
# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
|
|
||||||
# option that results in lower performance and larger code size.
|
|
||||||
ACPPSRC =
|
|
||||||
|
|
||||||
# C sources to be compiled in THUMB mode regardless of the global setting.
|
|
||||||
# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
|
|
||||||
# option that results in lower performance and larger code size.
|
|
||||||
TCSRC =
|
|
||||||
|
|
||||||
# C sources to be compiled in THUMB mode regardless of the global setting.
|
|
||||||
# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
|
|
||||||
# option that results in lower performance and larger code size.
|
|
||||||
TCPPSRC =
|
|
||||||
|
|
||||||
# List ASM source files here
|
|
||||||
ASMSRC = $(ALLASMSRC)
|
ASMSRC = $(ALLASMSRC)
|
||||||
|
|
||||||
|
# List ASM with preprocessor source files here.
|
||||||
ASMXSRC = $(ALLXASMSRC)
|
ASMXSRC = $(ALLXASMSRC)
|
||||||
|
|
||||||
INCDIR = $(ALLINC) $(TESTINC)
|
# Inclusion directories.
|
||||||
|
INCDIR = $(CONFDIR) $(ALLINC) $(TESTINC)
|
||||||
|
|
||||||
#
|
# Define C warning options here.
|
||||||
# Project, sources and paths
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
##############################################################################
|
|
||||||
# Compiler settings
|
|
||||||
#
|
|
||||||
|
|
||||||
MCU = cortex-m4
|
|
||||||
|
|
||||||
#TRGT = arm-elf-
|
|
||||||
TRGT = arm-none-eabi-
|
|
||||||
CC = $(TRGT)gcc
|
|
||||||
CPPC = $(TRGT)g++
|
|
||||||
# Enable loading with g++ only if you need C++ runtime support.
|
|
||||||
# NOTE: You can use C++ even without C++ support if you are careful. C++
|
|
||||||
# runtime support makes code size explode.
|
|
||||||
LD = $(TRGT)gcc
|
|
||||||
#LD = $(TRGT)g++
|
|
||||||
CP = $(TRGT)objcopy
|
|
||||||
AS = $(TRGT)gcc -x assembler-with-cpp
|
|
||||||
AR = $(TRGT)ar
|
|
||||||
OD = $(TRGT)objdump
|
|
||||||
SZ = $(TRGT)size
|
|
||||||
HEX = $(CP) -O ihex
|
|
||||||
BIN = $(CP) -O binary
|
|
||||||
|
|
||||||
# ARM-specific options here
|
|
||||||
AOPT =
|
|
||||||
|
|
||||||
# THUMB-specific options here
|
|
||||||
TOPT = -mthumb -DTHUMB
|
|
||||||
|
|
||||||
# Define C warning options here
|
|
||||||
CWARN = -Wall -Wextra -Wundef -Wstrict-prototypes
|
CWARN = -Wall -Wextra -Wundef -Wstrict-prototypes
|
||||||
|
|
||||||
# Define C++ warning options here
|
# Define C++ warning options here.
|
||||||
CPPWARN = -Wall -Wextra -Wundef
|
CPPWARN = -Wall -Wextra -Wundef
|
||||||
|
|
||||||
#
|
#
|
||||||
# Compiler settings
|
# Project, target, sources and paths
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
@ -207,8 +166,25 @@ ULIBDIR =
|
||||||
ULIBS =
|
ULIBS =
|
||||||
|
|
||||||
#
|
#
|
||||||
# End of user defines
|
# End of user section
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
# Common rules
|
||||||
|
#
|
||||||
|
|
||||||
RULESPATH = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/mk
|
RULESPATH = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/mk
|
||||||
|
include $(RULESPATH)/arm-none-eabi.mk
|
||||||
include $(RULESPATH)/rules.mk
|
include $(RULESPATH)/rules.mk
|
||||||
|
|
||||||
|
#
|
||||||
|
# Common rules
|
||||||
|
##############################################################################
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
# Custom rules
|
||||||
|
#
|
||||||
|
|
||||||
|
#
|
||||||
|
# Custom rules
|
||||||
|
##############################################################################
|
|
@ -5,12 +5,12 @@
|
||||||
|
|
||||||
# Compiler options here.
|
# Compiler options here.
|
||||||
ifeq ($(USE_OPT),)
|
ifeq ($(USE_OPT),)
|
||||||
USE_OPT = -O2 -ggdb -fomit-frame-pointer -falign-functions=16
|
USE_OPT = -O0 -ggdb -fomit-frame-pointer -falign-functions=16
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# C specific options here (added to USE_OPT).
|
# C specific options here (added to USE_OPT).
|
||||||
ifeq ($(USE_COPT),)
|
ifeq ($(USE_COPT),)
|
||||||
USE_COPT =
|
USE_COPT =
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# C++ specific options here (added to USE_OPT).
|
# C++ specific options here (added to USE_OPT).
|
||||||
|
@ -18,26 +18,21 @@ ifeq ($(USE_CPPOPT),)
|
||||||
USE_CPPOPT = -fno-rtti
|
USE_CPPOPT = -fno-rtti
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Enable this if you want the linker to remove unused code and data
|
# Enable this if you want the linker to remove unused code and data.
|
||||||
ifeq ($(USE_LINK_GC),)
|
ifeq ($(USE_LINK_GC),)
|
||||||
USE_LINK_GC = yes
|
USE_LINK_GC = yes
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Linker extra options here.
|
# Linker extra options here.
|
||||||
ifeq ($(USE_LDOPT),)
|
ifeq ($(USE_LDOPT),)
|
||||||
USE_LDOPT =
|
USE_LDOPT =
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Enable this if you want link time optimizations (LTO)
|
# Enable this if you want link time optimizations (LTO).
|
||||||
ifeq ($(USE_LTO),)
|
ifeq ($(USE_LTO),)
|
||||||
USE_LTO = yes
|
USE_LTO = yes
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# If enabled, this option allows to compile the application in THUMB mode.
|
|
||||||
ifeq ($(USE_THUMB),)
|
|
||||||
USE_THUMB = yes
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Enable this if you want to see the full log while compiling.
|
# Enable this if you want to see the full log while compiling.
|
||||||
ifeq ($(USE_VERBOSE_COMPILE),)
|
ifeq ($(USE_VERBOSE_COMPILE),)
|
||||||
USE_VERBOSE_COMPILE = no
|
USE_VERBOSE_COMPILE = no
|
||||||
|
@ -74,19 +69,30 @@ ifeq ($(USE_FPU),)
|
||||||
USE_FPU = no
|
USE_FPU = no
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# FPU-related options.
|
||||||
|
ifeq ($(USE_FPU_OPT),)
|
||||||
|
USE_FPU_OPT = -mfloat-abi=$(USE_FPU) -mfpu=fpv4-sp-d16
|
||||||
|
endif
|
||||||
|
|
||||||
#
|
#
|
||||||
# Architecture or project specific options
|
# Architecture or project specific options
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
# Project, sources and paths
|
# Project, target, sources and paths
|
||||||
#
|
#
|
||||||
|
|
||||||
# Define project name here
|
# Define project name here
|
||||||
PROJECT = ch
|
PROJECT = ch
|
||||||
|
|
||||||
# Imported source files and paths
|
# Target settings.
|
||||||
CHIBIOS = ../../../..
|
MCU = cortex-m4
|
||||||
|
|
||||||
|
# Imported source files and paths.
|
||||||
|
CHIBIOS := ../../../..
|
||||||
|
CONFDIR := ./cfg/stm32f407_discovery
|
||||||
|
BUILDDIR := ./build/stm32f407_discovery
|
||||||
|
DEPDIR := ./.dep/stm32f407_discovery
|
||||||
|
|
||||||
# Licensing files.
|
# Licensing files.
|
||||||
include $(CHIBIOS)/os/license/license.mk
|
include $(CHIBIOS)/os/license/license.mk
|
||||||
|
@ -100,6 +106,8 @@ include $(CHIBIOS)/os/hal/osal/rt-nil/osal.mk
|
||||||
# RTOS files (optional).
|
# RTOS files (optional).
|
||||||
include $(CHIBIOS)/os/rt/rt.mk
|
include $(CHIBIOS)/os/rt/rt.mk
|
||||||
include $(CHIBIOS)/os/common/ports/ARMv7-M/compilers/GCC/mk/port.mk
|
include $(CHIBIOS)/os/common/ports/ARMv7-M/compilers/GCC/mk/port.mk
|
||||||
|
# Auto-build files in ./source recursively.
|
||||||
|
include $(CHIBIOS)/tools/mk/autobuild.mk
|
||||||
# Other files (optional).
|
# Other files (optional).
|
||||||
#include $(CHIBIOS)/os/test/test.mk
|
#include $(CHIBIOS)/os/test/test.mk
|
||||||
#include $(CHIBIOS)/test/rt/rt_test.mk
|
#include $(CHIBIOS)/test/rt/rt_test.mk
|
||||||
|
@ -112,79 +120,30 @@ LDSCRIPT= $(STARTUPLD)/STM32F407xG.ld
|
||||||
# setting.
|
# setting.
|
||||||
CSRC = $(ALLCSRC) \
|
CSRC = $(ALLCSRC) \
|
||||||
$(TESTSRC) \
|
$(TESTSRC) \
|
||||||
|
$(CONFDIR)/portab.c \
|
||||||
main.c
|
main.c
|
||||||
|
|
||||||
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
|
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
|
||||||
# setting.
|
# setting.
|
||||||
CPPSRC = $(ALLCPPSRC)
|
CPPSRC = $(ALLCPPSRC)
|
||||||
|
|
||||||
# C sources to be compiled in ARM mode regardless of the global setting.
|
# List ASM source files here.
|
||||||
# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
|
|
||||||
# option that results in lower performance and larger code size.
|
|
||||||
ACSRC =
|
|
||||||
|
|
||||||
# C++ sources to be compiled in ARM mode regardless of the global setting.
|
|
||||||
# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
|
|
||||||
# option that results in lower performance and larger code size.
|
|
||||||
ACPPSRC =
|
|
||||||
|
|
||||||
# C sources to be compiled in THUMB mode regardless of the global setting.
|
|
||||||
# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
|
|
||||||
# option that results in lower performance and larger code size.
|
|
||||||
TCSRC =
|
|
||||||
|
|
||||||
# C sources to be compiled in THUMB mode regardless of the global setting.
|
|
||||||
# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
|
|
||||||
# option that results in lower performance and larger code size.
|
|
||||||
TCPPSRC =
|
|
||||||
|
|
||||||
# List ASM source files here
|
|
||||||
ASMSRC = $(ALLASMSRC)
|
ASMSRC = $(ALLASMSRC)
|
||||||
|
|
||||||
|
# List ASM with preprocessor source files here.
|
||||||
ASMXSRC = $(ALLXASMSRC)
|
ASMXSRC = $(ALLXASMSRC)
|
||||||
|
|
||||||
INCDIR = $(ALLINC) $(TESTINC)
|
# Inclusion directories.
|
||||||
|
INCDIR = $(CONFDIR) $(ALLINC) $(TESTINC)
|
||||||
|
|
||||||
#
|
# Define C warning options here.
|
||||||
# Project, sources and paths
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
##############################################################################
|
|
||||||
# Compiler settings
|
|
||||||
#
|
|
||||||
|
|
||||||
MCU = cortex-m4
|
|
||||||
|
|
||||||
#TRGT = arm-elf-
|
|
||||||
TRGT = arm-none-eabi-
|
|
||||||
CC = $(TRGT)gcc
|
|
||||||
CPPC = $(TRGT)g++
|
|
||||||
# Enable loading with g++ only if you need C++ runtime support.
|
|
||||||
# NOTE: You can use C++ even without C++ support if you are careful. C++
|
|
||||||
# runtime support makes code size explode.
|
|
||||||
LD = $(TRGT)gcc
|
|
||||||
#LD = $(TRGT)g++
|
|
||||||
CP = $(TRGT)objcopy
|
|
||||||
AS = $(TRGT)gcc -x assembler-with-cpp
|
|
||||||
AR = $(TRGT)ar
|
|
||||||
OD = $(TRGT)objdump
|
|
||||||
SZ = $(TRGT)size
|
|
||||||
HEX = $(CP) -O ihex
|
|
||||||
BIN = $(CP) -O binary
|
|
||||||
|
|
||||||
# ARM-specific options here
|
|
||||||
AOPT =
|
|
||||||
|
|
||||||
# THUMB-specific options here
|
|
||||||
TOPT = -mthumb -DTHUMB
|
|
||||||
|
|
||||||
# Define C warning options here
|
|
||||||
CWARN = -Wall -Wextra -Wundef -Wstrict-prototypes
|
CWARN = -Wall -Wextra -Wundef -Wstrict-prototypes
|
||||||
|
|
||||||
# Define C++ warning options here
|
# Define C++ warning options here.
|
||||||
CPPWARN = -Wall -Wextra -Wundef
|
CPPWARN = -Wall -Wextra -Wundef
|
||||||
|
|
||||||
#
|
#
|
||||||
# Compiler settings
|
# Project, target, sources and paths
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
@ -207,8 +166,25 @@ ULIBDIR =
|
||||||
ULIBS =
|
ULIBS =
|
||||||
|
|
||||||
#
|
#
|
||||||
# End of user defines
|
# End of user section
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
# Common rules
|
||||||
|
#
|
||||||
|
|
||||||
RULESPATH = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/mk
|
RULESPATH = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/mk
|
||||||
|
include $(RULESPATH)/arm-none-eabi.mk
|
||||||
include $(RULESPATH)/rules.mk
|
include $(RULESPATH)/rules.mk
|
||||||
|
|
||||||
|
#
|
||||||
|
# Common rules
|
||||||
|
##############################################################################
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
# Custom rules
|
||||||
|
#
|
||||||
|
|
||||||
|
#
|
||||||
|
# Custom rules
|
||||||
|
##############################################################################
|
Loading…
Reference in New Issue