aboutsummaryrefslogtreecommitdiffstats
path: root/testhal/STM32
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2018-11-25 13:56:44 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2018-11-25 13:56:44 +0000
commit6268914b7c6eac2a8ee04b2f9d4c270fc5363dee (patch)
tree49eb94045477dd3d2794afee365adfb21dcee5f0 /testhal/STM32
parentb8a4c26a9cab50e5a845d0033665a4d74b17444b (diff)
downloadChibiOS-6268914b7c6eac2a8ee04b2f9d4c270fc5363dee.tar.gz
ChibiOS-6268914b7c6eac2a8ee04b2f9d4c270fc5363dee.tar.bz2
ChibiOS-6268914b7c6eac2a8ee04b2f9d4c270fc5363dee.zip
RTC adjustments for F0 devices.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@12439 110e8d01-0319-4d1e-a829-52ad28d1bb01
Diffstat (limited to 'testhal/STM32')
-rw-r--r--testhal/STM32/multi/RTC/.cproject35
-rw-r--r--testhal/STM32/multi/RTC/Makefile6
-rw-r--r--testhal/STM32/multi/RTC/main.c6
3 files changed, 47 insertions, 0 deletions
diff --git a/testhal/STM32/multi/RTC/.cproject b/testhal/STM32/multi/RTC/.cproject
index 428122619..8125e9043 100644
--- a/testhal/STM32/multi/RTC/.cproject
+++ b/testhal/STM32/multi/RTC/.cproject
@@ -103,12 +103,47 @@
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
</cconfiguration>
+ <cconfiguration id="0.365230168.523175374.896040759">
+ <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="0.365230168.523175374.896040759" 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.365230168.523175374.896040759" name="Build for STM32F051-Discovery" parent="org.eclipse.cdt.build.core.prefbase.cfg">
+ <folderInfo id="0.365230168.523175374.896040759." name="/" resourcePath="">
+ <toolChain id="org.eclipse.cdt.build.core.prefbase.toolchain.1591624430" name="No ToolChain" resourceTypeBasedDiscovery="false" superClass="org.eclipse.cdt.build.core.prefbase.toolchain">
+ <targetPlatform id="org.eclipse.cdt.build.core.prefbase.toolchain.1591624430.585408115" name=""/>
+ <builder arguments="-f ./make/stm32f051_discovery.make" autoBuildTarget="all" cleanBuildTarget="clean" command="make" enableAutoBuild="false" enableCleanBuild="true" enabledIncrementalBuild="true" id="org.eclipse.cdt.build.core.settings.default.builder.645638722" incrementalBuildTarget="all" 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.921531948" name="holder for library settings" superClass="org.eclipse.cdt.build.core.settings.holder.libs"/>
+ <tool id="org.eclipse.cdt.build.core.settings.holder.396453866" name="Assembly" superClass="org.eclipse.cdt.build.core.settings.holder">
+ <inputType id="org.eclipse.cdt.build.core.settings.holder.inType.900903179" 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.962709498" name="GNU C++" superClass="org.eclipse.cdt.build.core.settings.holder">
+ <inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1901095465" 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.1142526812" name="GNU C" superClass="org.eclipse.cdt.build.core.settings.holder">
+ <inputType id="org.eclipse.cdt.build.core.settings.holder.inType.165943227" 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="STM32-RTC.null.1829068891" name="STM32-RTC"/>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
<storageModule moduleId="refreshScope" versionNumber="2">
+ <configuration configurationName="Build for STM32L4R5ZI-Nucleo144"/>
<configuration configurationName="Default">
<resource resourceType="PROJECT" workspacePath="/STM32-RTC"/>
</configuration>
diff --git a/testhal/STM32/multi/RTC/Makefile b/testhal/STM32/multi/RTC/Makefile
index 6266997ef..72e30918f 100644
--- a/testhal/STM32/multi/RTC/Makefile
+++ b/testhal/STM32/multi/RTC/Makefile
@@ -4,6 +4,10 @@
all:
@echo
+ @echo === Building for STM32F0-Discovery ===============================
+ +@make --no-print-directory -f ./make/stm32f051_discovery.make all
+ @echo ====================================================================
+ @echo
@echo === Building for STM32L476-Discovery ===============================
+@make --no-print-directory -f ./make/stm32l476_discovery.make all
@echo ====================================================================
@@ -15,6 +19,8 @@ all:
clean:
@echo
+ +@make --no-print-directory -f ./make/stm32f051_discovery.make clean
+ @echo
+@make --no-print-directory -f ./make/stm32l476_discovery.make clean
@echo
+@make --no-print-directory -f ./make/stm32l4r5zi_nucleo144.make clean
diff --git a/testhal/STM32/multi/RTC/main.c b/testhal/STM32/multi/RTC/main.c
index f4dfb5334..6f9fdbe34 100644
--- a/testhal/STM32/multi/RTC/main.c
+++ b/testhal/STM32/multi/RTC/main.c
@@ -49,6 +49,7 @@ static void cmd_date(BaseSequentialStream *chp, int argc, char *argv[]) {
timespec.year + 1980U);
}
+#if RTC_HAS_STORAGE
static void cmd_storage(BaseSequentialStream *chp, int argc, char *argv[]) {
size_t storage_size = psGetStorageSize(&RTCD1);
ps_offset_t i;
@@ -69,10 +70,13 @@ static void cmd_storage(BaseSequentialStream *chp, int argc, char *argv[]) {
}
}
}
+#endif
static const ShellCommand commands[] = {
{"date", cmd_date},
+#if RTC_HAS_STORAGE
{"storage", cmd_storage},
+#endif
{NULL, NULL}
};
@@ -162,7 +166,9 @@ int main(void) {
rtcSetAlarm(&RTCD1, 0, &alarm1);
rtcSetAlarm(&RTCD1, 1, &alarm2);
rtcSetCallback(&RTCD1, alarmcb);
+#if RTC_HAS_STORAGE
psWrite(&RTCD1, 0U, 12U, (const uint8_t *)"Hello World!");
+#endif
/* Normal main() thread activity, spawning shells.*/
while (true) {