aboutsummaryrefslogtreecommitdiffstats
path: root/testhal/STM32/STM32F1xx/onewire
diff options
context:
space:
mode:
authorbarthess <barthess@yandex.ru>2016-03-15 10:19:56 +0300
committerbarthess <barthess@yandex.ru>2016-03-15 10:19:56 +0300
commit04c11df0b2d3ef9fa2e8f6d9a27668a8d3d24c7c (patch)
tree0ca05f1814b8202dc6eacbac28d60369437e4584 /testhal/STM32/STM32F1xx/onewire
parent37ac6a4611ca3625343ef1a17943e66459f825af (diff)
downloadChibiOS-Contrib-04c11df0b2d3ef9fa2e8f6d9a27668a8d3d24c7c.tar.gz
ChibiOS-Contrib-04c11df0b2d3ef9fa2e8f6d9a27668a8d3d24c7c.tar.bz2
ChibiOS-Contrib-04c11df0b2d3ef9fa2e8f6d9a27668a8d3d24c7c.zip
Updated some testhal projects to new ChibiOS code
Diffstat (limited to 'testhal/STM32/STM32F1xx/onewire')
-rw-r--r--testhal/STM32/STM32F1xx/onewire/.cproject37
-rw-r--r--testhal/STM32/STM32F1xx/onewire/Makefile6
-rw-r--r--testhal/STM32/STM32F1xx/onewire/chconf.h59
-rw-r--r--testhal/STM32/STM32F1xx/onewire/halconf_community.h9
-rw-r--r--testhal/STM32/STM32F1xx/onewire/onewire_test.c6
5 files changed, 79 insertions, 38 deletions
diff --git a/testhal/STM32/STM32F1xx/onewire/.cproject b/testhal/STM32/STM32F1xx/onewire/.cproject
index 7f2b4f5..11b29ed 100644
--- a/testhal/STM32/STM32F1xx/onewire/.cproject
+++ b/testhal/STM32/STM32F1xx/onewire/.cproject
@@ -1,8 +1,8 @@
<?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.965944321">
- <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="0.965944321" moduleId="org.eclipse.cdt.core.settings" name="Default">
+ <cconfiguration id="0.1459621859">
+ <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="0.1459621859" moduleId="org.eclipse.cdt.core.settings" name="Default">
<externalSettings/>
<extensions>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
@@ -14,20 +14,20 @@
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
- <configuration buildProperties="" description="" id="0.965944321" name="Default" parent="org.eclipse.cdt.build.core.prefbase.cfg">
- <folderInfo id="0.965944321." name="/" resourcePath="">
- <toolChain id="org.eclipse.cdt.build.core.prefbase.toolchain.413278222" name="No ToolChain" resourceTypeBasedDiscovery="false" superClass="org.eclipse.cdt.build.core.prefbase.toolchain">
- <targetPlatform id="org.eclipse.cdt.build.core.prefbase.toolchain.413278222.1368507417" name=""/>
- <builder id="org.eclipse.cdt.build.core.settings.default.builder.427261447" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="org.eclipse.cdt.build.core.settings.default.builder"/>
- <tool id="org.eclipse.cdt.build.core.settings.holder.libs.2082885086" name="holder for library settings" superClass="org.eclipse.cdt.build.core.settings.holder.libs"/>
- <tool id="org.eclipse.cdt.build.core.settings.holder.784750750" name="Assembly" superClass="org.eclipse.cdt.build.core.settings.holder">
- <inputType id="org.eclipse.cdt.build.core.settings.holder.inType.697232822" languageId="org.eclipse.cdt.core.assembly" languageName="Assembly" sourceContentType="org.eclipse.cdt.core.asmSource" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
+ <configuration buildProperties="" description="" id="0.1459621859" name="Default" parent="org.eclipse.cdt.build.core.prefbase.cfg">
+ <folderInfo id="0.1459621859." name="/" resourcePath="">
+ <toolChain id="org.eclipse.cdt.build.core.prefbase.toolchain.1024118346" name="No ToolChain" resourceTypeBasedDiscovery="false" superClass="org.eclipse.cdt.build.core.prefbase.toolchain">
+ <targetPlatform id="org.eclipse.cdt.build.core.prefbase.toolchain.1024118346.1502432096" name=""/>
+ <builder id="org.eclipse.cdt.build.core.settings.default.builder.1761538208" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="org.eclipse.cdt.build.core.settings.default.builder"/>
+ <tool id="org.eclipse.cdt.build.core.settings.holder.libs.2076156817" name="holder for library settings" superClass="org.eclipse.cdt.build.core.settings.holder.libs"/>
+ <tool id="org.eclipse.cdt.build.core.settings.holder.683366766" name="Assembly" superClass="org.eclipse.cdt.build.core.settings.holder">
+ <inputType id="org.eclipse.cdt.build.core.settings.holder.inType.682376688" 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.1023219889" name="GNU C++" superClass="org.eclipse.cdt.build.core.settings.holder">
- <inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1531333443" 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 id="org.eclipse.cdt.build.core.settings.holder.412113623" name="GNU C++" superClass="org.eclipse.cdt.build.core.settings.holder">
+ <inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1923392762" 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.115444433" name="GNU C" superClass="org.eclipse.cdt.build.core.settings.holder">
- <inputType id="org.eclipse.cdt.build.core.settings.holder.inType.950308988" 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 id="org.eclipse.cdt.build.core.settings.holder.769374214" name="GNU C" superClass="org.eclipse.cdt.build.core.settings.holder">
+ <inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1530291878" 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>
@@ -37,15 +37,18 @@
</cconfiguration>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
- <project id="onewire_f1x.null.88425993" name="onewire_f1x"/>
+ <project id="onewire_f1x.null.2102082926" name="onewire_f1x"/>
</storageModule>
<storageModule moduleId="scannerConfiguration">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
+ <scannerConfigBuildInfo instanceId="0.114656749">
+ <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
+ </scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="0.965944321">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
- <scannerConfigBuildInfo instanceId="0.114656749">
- <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
+ <scannerConfigBuildInfo instanceId="0.1459621859">
+ <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
diff --git a/testhal/STM32/STM32F1xx/onewire/Makefile b/testhal/STM32/STM32F1xx/onewire/Makefile
index 1484a28..73e87b7 100644
--- a/testhal/STM32/STM32F1xx/onewire/Makefile
+++ b/testhal/STM32/STM32F1xx/onewire/Makefile
@@ -83,7 +83,7 @@ PROJECT = ch
CHIBIOS = ../../../../../ChibiOS-RT
CHIBIOS_CONTRIB = $(CHIBIOS)/../ChibiOS-Contrib
# Startup files.
-include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/startup_stm32f1xx.mk
+include $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32f1xx.mk
# HAL-OSAL files (optional).
include $(CHIBIOS_CONTRIB)/os/hal/hal.mk
include $(CHIBIOS)/os/hal/ports/STM32/STM32F1xx/platform.mk
@@ -91,7 +91,7 @@ include $(CHIBIOS)/os/hal/boards/OLIMEX_STM32_103STK/board.mk
include $(CHIBIOS)/os/hal/osal/rt/osal.mk
# RTOS files (optional).
include $(CHIBIOS)/os/rt/rt.mk
-include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk
+include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk
# Other files (optional).
#include $(CHIBIOS)/test/rt/test.mk
@@ -208,6 +208,6 @@ ULIBS =
# End of user defines
##############################################################################
-RULESPATH = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC
+RULESPATH = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC
include $(RULESPATH)/rules.mk
diff --git a/testhal/STM32/STM32F1xx/onewire/chconf.h b/testhal/STM32/STM32F1xx/onewire/chconf.h
index e714890..732776d 100644
--- a/testhal/STM32/STM32F1xx/onewire/chconf.h
+++ b/testhal/STM32/STM32F1xx/onewire/chconf.h
@@ -1,5 +1,5 @@
/*
- ChibiOS - Copyright (C) 2006-2014 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2015 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.
@@ -28,6 +28,8 @@
#ifndef _CHCONF_H_
#define _CHCONF_H_
+#define _CHIBIOS_RT_CONF_
+
/*===========================================================================*/
/**
* @name System timers settings
@@ -39,14 +41,14 @@
* @brief System time counter resolution.
* @note Allowed values are 16 or 32 bits.
*/
-#define CH_CFG_ST_RESOLUTION 32
+#define CH_CFG_ST_RESOLUTION 16
/**
* @brief System tick frequency.
* @details Frequency of the system timer that drives the system ticks. This
* setting also defines the system tick time unit.
*/
-#define CH_CFG_ST_FREQUENCY 1000
+#define CH_CFG_ST_FREQUENCY 10000
/**
* @brief Time delta constant for the tick-less mode.
@@ -56,7 +58,7 @@
* The value one is not valid, timeouts are rounded up to
* this value.
*/
-#define CH_CFG_ST_TIMEDELTA 0
+#define CH_CFG_ST_TIMEDELTA 2
/** @} */
@@ -99,7 +101,8 @@
* @details When this option is activated the function @p chSysInit()
* does not spawn the idle thread. The application @p main()
* function becomes the idle thread and must implement an
- * infinite loop. */
+ * infinite loop.
+ */
#define CH_CFG_NO_IDLE_THREAD FALSE
/** @} */
@@ -359,9 +362,16 @@
* @details If enabled then the context switch circular trace buffer is
* activated.
*
- * @note The default is @p FALSE.
+ * @note The default is @p CH_DBG_TRACE_MASK_NONE.
+ */
+#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_ALL
+
+/**
+ * @brief Trace buffer entries.
+ * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is
+ * different from @p CH_DBG_TRACE_MASK_NONE.
*/
-#define CH_DBG_ENABLE_TRACE FALSE
+#define CH_DBG_TRACE_BUFFER_SIZE 128
/**
* @brief Debug option, stack checks.
@@ -426,10 +436,6 @@
/**
* @brief Threads finalization hook.
* @details User finalization code added to the @p chThdExit() API.
- *
- * @note It is inserted into lock zone.
- * @note It is also invoked when the threads simply return in order to
- * terminate.
*/
#define CH_CFG_THREAD_EXIT_HOOK(tp) { \
/* Add threads finalization code here.*/ \
@@ -440,7 +446,21 @@
* @details This hook is invoked just before switching between threads.
*/
#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \
- /* System halt code here.*/ \
+ /* Context switch code here.*/ \
+}
+
+/**
+ * @brief ISR enter hook.
+ */
+#define CH_CFG_IRQ_PROLOGUE_HOOK() { \
+ /* IRQ prologue code here.*/ \
+}
+
+/**
+ * @brief ISR exit hook.
+ */
+#define CH_CFG_IRQ_EPILOGUE_HOOK() { \
+ /* IRQ epilogue code here.*/ \
}
/**
@@ -449,7 +469,8 @@
* should be invoked from here.
* @note This macro can be used to activate a power saving mode.
*/
-#define CH_CFG_IDLE_ENTER_HOOK() { \
+#define CH_CFG_IDLE_ENTER_HOOK() { \
+ /* Idle-enter code here.*/ \
}
/**
@@ -458,7 +479,8 @@
* should be invoked from here.
* @note This macro can be used to deactivate a power saving mode.
*/
-#define CH_CFG_IDLE_LEAVE_HOOK() { \
+#define CH_CFG_IDLE_LEAVE_HOOK() { \
+ /* Idle-leave code here.*/ \
}
/**
@@ -487,6 +509,15 @@
/* System halt code here.*/ \
}
+/**
+ * @brief Trace hook.
+ * @details This hook is invoked each time a new record is written in the
+ * trace buffer.
+ */
+#define CH_CFG_TRACE_HOOK(tep) { \
+ /* Trace code here.*/ \
+}
+
/** @} */
/*===========================================================================*/
diff --git a/testhal/STM32/STM32F1xx/onewire/halconf_community.h b/testhal/STM32/STM32F1xx/onewire/halconf_community.h
index 8da4af6..91dbfbc 100644
--- a/testhal/STM32/STM32F1xx/onewire/halconf_community.h
+++ b/testhal/STM32/STM32F1xx/onewire/halconf_community.h
@@ -53,12 +53,19 @@
#endif
/**
- * @brief Enables the community subsystem.
+ * @brief Enables the CRC subsystem.
*/
#if !defined(HAL_USE_CRC) || defined(__DOXYGEN__)
#define HAL_USE_CRC FALSE
#endif
+/**
+ * @brief Enables the RNG subsystem.
+ */
+#if !defined(HAL_USE_RNG) || defined(__DOXYGEN__)
+#define HAL_USE_RNG FALSE
+#endif
+
/*===========================================================================*/
/* FSMCNAND driver related settings. */
/*===========================================================================*/
diff --git a/testhal/STM32/STM32F1xx/onewire/onewire_test.c b/testhal/STM32/STM32F1xx/onewire/onewire_test.c
index 87ed160..719420a 100644
--- a/testhal/STM32/STM32F1xx/onewire/onewire_test.c
+++ b/testhal/STM32/STM32F1xx/onewire/onewire_test.c
@@ -35,7 +35,7 @@
#if defined(BOARD_ST_STM32F0308_DISCOVERY)
#define ONEWIRE_PORT GPIOB
#define ONEWIRE_PIN GPIOB_PIN0
- #define ONEWIRE_PAD_MODE_ACTIVE (PAL_MODE_ALTERNATE(1) | PAL_STM32_OTYPE_OPENDRAIN | PAL_STM32_PUDR_PULLUP)
+ #define ONEWIRE_PAD_MODE_ACTIVE (PAL_MODE_ALTERNATE(1) | PAL_STM32_OTYPE_OPENDRAIN)
#define search_led_off() (palClearPad(GPIOC, GPIOC_LED4))
#define search_led_on() (palSetPad(GPIOC, GPIOC_LED4))
#define ONEWIRE_MASTER_CHANNEL 2
@@ -43,7 +43,7 @@
#elif defined(BOARD_ST_STM32F4_DISCOVERY)
#define ONEWIRE_PORT GPIOB
#define ONEWIRE_PIN GPIOB_PIN0
- #define ONEWIRE_PAD_MODE_ACTIVE (PAL_MODE_ALTERNATE(2) | PAL_STM32_OTYPE_OPENDRAIN | PAL_STM32_PUDR_PULLUP)
+ #define ONEWIRE_PAD_MODE_ACTIVE (PAL_MODE_ALTERNATE(2) | PAL_STM32_OTYPE_OPENDRAIN)
#define search_led_off() (palClearPad(GPIOD, GPIOD_LED4))
#define search_led_on() (palSetPad(GPIOD, GPIOD_LED4))
#define ONEWIRE_MASTER_CHANNEL 2
@@ -61,7 +61,7 @@
#define ONEWIRE_PORT GPIOB
#define ONEWIRE_PIN GPIOB_TACHOMETER
#include "pads.h"
- #define ONEWIRE_PAD_MODE_ACTIVE (PAL_MODE_ALTERNATE(2) | PAL_STM32_OTYPE_OPENDRAIN | PAL_STM32_PUDR_PULLUP)
+ #define ONEWIRE_PAD_MODE_ACTIVE (PAL_MODE_ALTERNATE(2) | PAL_STM32_OTYPE_OPENDRAIN)
#define search_led_on red_led_on
#define search_led_off red_led_off
#define ONEWIRE_MASTER_CHANNEL 2