aboutsummaryrefslogtreecommitdiffstats
path: root/testhal/STM32F1xx/ADC
diff options
context:
space:
mode:
Diffstat (limited to 'testhal/STM32F1xx/ADC')
-rw-r--r--testhal/STM32F1xx/ADC/.cproject11
-rw-r--r--testhal/STM32F1xx/ADC/Makefile6
-rw-r--r--testhal/STM32F1xx/ADC/chconf.h14
-rw-r--r--testhal/STM32F1xx/ADC/main.c5
4 files changed, 21 insertions, 15 deletions
diff --git a/testhal/STM32F1xx/ADC/.cproject b/testhal/STM32F1xx/ADC/.cproject
index f5300537d..96718979f 100644
--- a/testhal/STM32F1xx/ADC/.cproject
+++ b/testhal/STM32F1xx/ADC/.cproject
@@ -20,7 +20,7 @@
<folderInfo id="0.689012726." name="/" resourcePath="">
<toolChain id="org.eclipse.cdt.build.core.prefbase.toolchain.1927048022" name="No ToolChain" resourceTypeBasedDiscovery="false" superClass="org.eclipse.cdt.build.core.prefbase.toolchain">
<targetPlatform id="org.eclipse.cdt.build.core.prefbase.toolchain.1927048022.133421332" name=""/>
- <builder id="org.eclipse.cdt.build.core.settings.default.builder.860237702" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="org.eclipse.cdt.build.core.settings.default.builder"/>
+ <builder id="org.eclipse.cdt.build.core.settings.default.builder.860237702" 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.1015298275" name="holder for library settings" superClass="org.eclipse.cdt.build.core.settings.holder.libs"/>
<tool id="org.eclipse.cdt.build.core.settings.holder.1849946851" name="Assembly" superClass="org.eclipse.cdt.build.core.settings.holder">
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.782791296" languageId="org.eclipse.cdt.core.assembly" languageName="Assembly" sourceContentType="org.eclipse.cdt.core.asmSource" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
@@ -41,11 +41,16 @@
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<project id="STM32F1xx-ADC.null.964703683" name="STM32F1xx-ADC"/>
</storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
+ <storageModule moduleId="refreshScope" versionNumber="2">
+ <configuration configurationName="Default">
+ <resource resourceType="PROJECT" workspacePath="/STM32F1xx-ADC"/>
+ </configuration>
+ </storageModule>
<storageModule moduleId="scannerConfiguration">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
<scannerConfigBuildInfo instanceId="0.689012726">
- <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
+ <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
</scannerConfigBuildInfo>
</storageModule>
- <storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
</cproject>
diff --git a/testhal/STM32F1xx/ADC/Makefile b/testhal/STM32F1xx/ADC/Makefile
index dc0ec1b0b..edae9130e 100644
--- a/testhal/STM32F1xx/ADC/Makefile
+++ b/testhal/STM32F1xx/ADC/Makefile
@@ -5,7 +5,7 @@
# Compiler options here.
ifeq ($(USE_OPT),)
- USE_OPT = -O2 -ggdb -fomit-frame-pointer
+ USE_OPT = -O2 -ggdb -fomit-frame-pointer -falign-functions=16
endif
# C specific options here (added to USE_OPT).
@@ -49,7 +49,7 @@ endif
# Stack size to be allocated to the Cortex-M process stack. This stack is
# the stack used by the main() thread.
ifeq ($(USE_PROCESS_STACKSIZE),)
- USE_PROCESS_STACKSIZE = 0x100
+ USE_PROCESS_STACKSIZE = 0x400
endif
# Stack size to the allocated to the Cortex-M main/exceptions stack. This
@@ -82,7 +82,7 @@ include $(CHIBIOS)/os/hal/ports/STM32F1xx/platform.mk
include $(CHIBIOS)/os/rt/rt.mk
include $(CHIBIOS)/os/rt/osal/osal.mk
include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_stm32f1xx.mk
-include $(CHIBIOS)/test/test.mk
+#include $(CHIBIOS)/test/test.mk
# Define linker script file here
LDSCRIPT = $(PORTLD)/STM32F103xB.ld
diff --git a/testhal/STM32F1xx/ADC/chconf.h b/testhal/STM32F1xx/ADC/chconf.h
index 137c85c31..55bf10794 100644
--- a/testhal/STM32F1xx/ADC/chconf.h
+++ b/testhal/STM32F1xx/ADC/chconf.h
@@ -321,7 +321,7 @@
*
* @note The default is @p FALSE.
*/
-#define CH_DBG_STATISTICS FALSE
+#define CH_DBG_STATISTICS TRUE
/**
* @brief Debug option, system state check.
@@ -330,7 +330,7 @@
*
* @note The default is @p FALSE.
*/
-#define CH_DBG_SYSTEM_STATE_CHECK FALSE
+#define CH_DBG_SYSTEM_STATE_CHECK TRUE
/**
* @brief Debug option, parameters checks.
@@ -339,7 +339,7 @@
*
* @note The default is @p FALSE.
*/
-#define CH_DBG_ENABLE_CHECKS FALSE
+#define CH_DBG_ENABLE_CHECKS TRUE
/**
* @brief Debug option, consistency checks.
@@ -349,7 +349,7 @@
*
* @note The default is @p FALSE.
*/
-#define CH_DBG_ENABLE_ASSERTS FALSE
+#define CH_DBG_ENABLE_ASSERTS TRUE
/**
* @brief Debug option, trace buffer.
@@ -358,7 +358,7 @@
*
* @note The default is @p FALSE.
*/
-#define CH_DBG_ENABLE_TRACE FALSE
+#define CH_DBG_ENABLE_TRACE TRUE
/**
* @brief Debug option, stack checks.
@@ -370,7 +370,7 @@
* @note The default failure mode is to halt the system with the global
* @p panic_msg variable set to @p NULL.
*/
-#define CH_DBG_ENABLE_STACK_CHECK FALSE
+#define CH_DBG_ENABLE_STACK_CHECK TRUE
/**
* @brief Debug option, stacks initialization.
@@ -380,7 +380,7 @@
*
* @note The default is @p FALSE.
*/
-#define CH_DBG_FILL_THREADS FALSE
+#define CH_DBG_FILL_THREADS TRUE
/**
* @brief Debug option, threads profiling.
diff --git a/testhal/STM32F1xx/ADC/main.c b/testhal/STM32F1xx/ADC/main.c
index 43ae179ee..3fcbafbfc 100644
--- a/testhal/STM32F1xx/ADC/main.c
+++ b/testhal/STM32F1xx/ADC/main.c
@@ -89,10 +89,11 @@ static const ADCConversionGroup adcgrpcfg2 = {
/*
* Red LEDs blinker thread, times are in milliseconds.
*/
-static WORKING_AREA(waThread1, 128);
-static msg_t Thread1(void *arg) {
+static THD_WORKING_AREA(waThread1, 128);
+static THD_FUNCTION(Thread1, arg) {
(void)arg;
+
chRegSetThreadName("blinker");
while (TRUE) {
palClearPad(IOPORT3, GPIOC_LED);