diff options
author | Uladzimir Pylinski <barthess@yandex.ru> | 2016-05-01 12:54:03 +0300 |
---|---|---|
committer | Uladzimir Pylinski <barthess@yandex.ru> | 2016-05-01 12:54:03 +0300 |
commit | 05a8a76ea0153fb1dded1a92ffc411002c11f612 (patch) | |
tree | 4c582c3a8e2cdb35c33d4c1bc45c6fa5c2655ce7 /testhal/STM32/STM32F4xx/onewire | |
parent | ecab016be95ecfc51d0e0708d473eaf60f5f0ac7 (diff) | |
parent | 09a35652f719e7c21fea4063484625edc4091fe6 (diff) | |
download | ChibiOS-Contrib-05a8a76ea0153fb1dded1a92ffc411002c11f612.tar.gz ChibiOS-Contrib-05a8a76ea0153fb1dded1a92ffc411002c11f612.tar.bz2 ChibiOS-Contrib-05a8a76ea0153fb1dded1a92ffc411002c11f612.zip |
Merge pull request #66 from pl4nkton/stm32_fixes
Stm32 fixes
Diffstat (limited to 'testhal/STM32/STM32F4xx/onewire')
-rw-r--r-- | testhal/STM32/STM32F4xx/onewire/Makefile | 14 | ||||
-rw-r--r-- | testhal/STM32/STM32F4xx/onewire/chconf.h | 19 | ||||
-rw-r--r-- | testhal/STM32/STM32F4xx/onewire/halconf.h | 64 | ||||
-rw-r--r-- | testhal/STM32/STM32F4xx/onewire/halconf_community.h | 2 | ||||
-rw-r--r-- | testhal/STM32/STM32F4xx/onewire/mcuconf.h | 39 | ||||
-rw-r--r-- | testhal/STM32/STM32F4xx/onewire/mcuconf_community.h | 2 |
6 files changed, 111 insertions, 29 deletions
diff --git a/testhal/STM32/STM32F4xx/onewire/Makefile b/testhal/STM32/STM32F4xx/onewire/Makefile index 4ed0f8d..02ab018 100644 --- a/testhal/STM32/STM32F4xx/onewire/Makefile +++ b/testhal/STM32/STM32F4xx/onewire/Makefile @@ -43,6 +43,12 @@ ifeq ($(USE_VERBOSE_COMPILE),) USE_VERBOSE_COMPILE = no endif +# If enabled, this option makes the build process faster by not compiling +# modules not used in the current configuration. +ifeq ($(USE_SMART_BUILD),) + USE_SMART_BUILD = no +endif + # # Build global options ############################################################################## @@ -63,7 +69,7 @@ ifeq ($(USE_EXCEPTIONS_STACKSIZE),) USE_EXCEPTIONS_STACKSIZE = 0x400 endif -# Enables the use of FPU on Cortex-M4 (no, softfp, hard). +# Enables the use of FPU (no, softfp, hard). ifeq ($(USE_FPU),) USE_FPU = no endif @@ -94,7 +100,7 @@ include $(CHIBIOS)/os/rt/rt.mk include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk # Define linker script file here -LDSCRIPT= $(STARTUPLD)/STM32F407xG.ld +LDSCRIPT = $(STARTUPLD)/STM32F407xG.ld # C sources that can be compiled in ARM or THUMB mode depending on the global # setting. @@ -176,10 +182,10 @@ AOPT = TOPT = -mthumb -DTHUMB # Define C warning options here -CWARN = -Wall -Wextra -Wstrict-prototypes -Wundef +CWARN = -Wall -Wextra -Wundef -Wstrict-prototypes # Define C++ warning options here -CPPWARN = -Wall -Wextra -Wundef +CPPWARN = -Wall -Wextra # # Compiler settings diff --git a/testhal/STM32/STM32F4xx/onewire/chconf.h b/testhal/STM32/STM32F4xx/onewire/chconf.h index 01cc4a0..1065821 100644 --- a/testhal/STM32/STM32F4xx/onewire/chconf.h +++ b/testhal/STM32/STM32F4xx/onewire/chconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2016 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. @@ -25,8 +25,8 @@ * @{ */ -#ifndef _CHCONF_H_ -#define _CHCONF_H_ +#ifndef CHCONF_H +#define CHCONF_H #define _CHIBIOS_RT_CONF_ @@ -351,17 +351,16 @@ /** * @brief Debug option, trace buffer. - * @details If enabled then the context switch circular trace buffer is - * activated. + * @details If enabled then the trace buffer is activated. * - * @note The default is @p CH_DBG_TRACE_MASK_NONE. + * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. */ -#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_NONE +#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED /** * @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. + * different from @p CH_DBG_TRACE_MASK_DISABLED. */ #define CH_DBG_TRACE_BUFFER_SIZE 128 @@ -498,7 +497,7 @@ * the system is halted. */ #define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ - /* Halt code here.*/ \ + /* System halt code here.*/ \ } /** @@ -516,6 +515,6 @@ /* Port-specific settings (override port settings defaulted in chcore.h). */ /*===========================================================================*/ -#endif /* _CHCONF_H_ */ +#endif /* CHCONF_H */ /** @} */ diff --git a/testhal/STM32/STM32F4xx/onewire/halconf.h b/testhal/STM32/STM32F4xx/onewire/halconf.h index e6ce929..64811a5 100644 --- a/testhal/STM32/STM32F4xx/onewire/halconf.h +++ b/testhal/STM32/STM32F4xx/onewire/halconf.h @@ -1,5 +1,5 @@ /*
- ChibiOS - Copyright (C) 2006-2014 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2016 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.
@@ -25,8 +25,8 @@ * @{
*/
-#ifndef _HALCONF_H_
-#define _HALCONF_H_
+#ifndef HALCONF_H
+#define HALCONF_H
#include "mcuconf.h"
@@ -45,17 +45,17 @@ #endif
/**
- * @brief Enables the DAC subsystem.
+ * @brief Enables the CAN subsystem.
*/
-#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
-#define HAL_USE_DAC FALSE
+#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
+#define HAL_USE_CAN FALSE
#endif
/**
- * @brief Enables the CAN subsystem.
+ * @brief Enables the DAC subsystem.
*/
-#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
-#define HAL_USE_CAN FALSE
+#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
+#define HAL_USE_DAC FALSE
#endif
/**
@@ -294,7 +294,7 @@ * @brief Serial buffers size.
* @details Configuration parameter, you can change the depth of the queue
* buffers depending on the requirements of your application.
- * @note The default is 64 bytes for both the transmission and receive
+ * @note The default is 16 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
@@ -309,13 +309,21 @@ * @brief Serial over USB buffers size.
* @details Configuration parameter, the buffer size must be a multiple of
* the USB data endpoint maximum packet size.
- * @note The default is 64 bytes for both the transmission and receive
+ * @note The default is 256 bytes for both the transmission and receive
* buffers.
*/
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
#define SERIAL_USB_BUFFERS_SIZE 256
#endif
+/**
+ * @brief Serial over USB number of buffers.
+ * @note The default is 2 buffers.
+ */
+#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
+#define SERIAL_USB_BUFFERS_NUMBER 2
+#endif
+
/*===========================================================================*/
/* SPI driver related settings. */
/*===========================================================================*/
@@ -337,11 +345,43 @@ #endif
/*===========================================================================*/
+/* UART driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
+#define UART_USE_WAIT FALSE
+#endif
+
+/**
+ * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
+#define UART_USE_MUTUAL_EXCLUSION FALSE
+#endif
+
+/*===========================================================================*/
+/* USB driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @brief Enables synchronous APIs.
+ * @note Disabling this option saves both code and data space.
+ */
+#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
+#define USB_USE_WAIT FALSE
+#endif
+
+/*===========================================================================*/
/* Community drivers's includes */
/*===========================================================================*/
#include "halconf_community.h"
-#endif /* _HALCONF_H_ */
+#endif /* HALCONF_H */
/** @} */
diff --git a/testhal/STM32/STM32F4xx/onewire/halconf_community.h b/testhal/STM32/STM32F4xx/onewire/halconf_community.h index 5e36946..91dbfbc 100644 --- a/testhal/STM32/STM32F4xx/onewire/halconf_community.h +++ b/testhal/STM32/STM32F4xx/onewire/halconf_community.h @@ -53,7 +53,7 @@ #endif
/**
- * @brief Enables the community subsystem.
+ * @brief Enables the CRC subsystem.
*/
#if !defined(HAL_USE_CRC) || defined(__DOXYGEN__)
#define HAL_USE_CRC FALSE
diff --git a/testhal/STM32/STM32F4xx/onewire/mcuconf.h b/testhal/STM32/STM32F4xx/onewire/mcuconf.h index 793c925..2111433 100644 --- a/testhal/STM32/STM32F4xx/onewire/mcuconf.h +++ b/testhal/STM32/STM32F4xx/onewire/mcuconf.h @@ -1,5 +1,5 @@ /*
- ChibiOS - Copyright (C) 2006-2014 Giovanni Di Sirio
+ ChibiOS - Copyright (C) 2006..2016 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.
@@ -14,6 +14,9 @@ limitations under the License.
*/
+#ifndef MCUCONF_H
+#define MCUCONF_H
+
/*
* STM32F4xx drivers configuration.
* The following settings override the default settings present in
@@ -88,6 +91,19 @@ #define STM32_CAN_CAN2_IRQ_PRIORITY 11
/*
+ * DAC driver system settings.
+ */
+#define STM32_DAC_DUAL_MODE FALSE
+#define STM32_DAC_USE_DAC1_CH1 FALSE
+#define STM32_DAC_USE_DAC1_CH2 FALSE
+#define STM32_DAC_DAC1_CH1_IRQ_PRIORITY 10
+#define STM32_DAC_DAC1_CH2_IRQ_PRIORITY 10
+#define STM32_DAC_DAC1_CH1_DMA_PRIORITY 2
+#define STM32_DAC_DAC1_CH2_DMA_PRIORITY 2
+#define STM32_DAC_DAC1_CH1_DMA_STREAM STM32_DMA_STREAM_ID(1, 5)
+#define STM32_DAC_DAC1_CH2_DMA_STREAM STM32_DMA_STREAM_ID(1, 6)
+
+/*
* EXT driver system settings.
*/
#define STM32_EXT_EXTI0_IRQ_PRIORITY 6
@@ -155,6 +171,21 @@ #define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure")
/*
+ * I2S driver system settings.
+ */
+#define STM32_I2S_USE_SPI2 FALSE
+#define STM32_I2S_USE_SPI3 FALSE
+#define STM32_I2S_SPI2_IRQ_PRIORITY 10
+#define STM32_I2S_SPI3_IRQ_PRIORITY 10
+#define STM32_I2S_SPI2_DMA_PRIORITY 1
+#define STM32_I2S_SPI3_DMA_PRIORITY 1
+#define STM32_I2S_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3)
+#define STM32_I2S_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4)
+#define STM32_I2S_SPI3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0)
+#define STM32_I2S_SPI3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7)
+#define STM32_I2S_DMA_ERROR_HOOK(i2sp) osalSysHalt("DMA failure")
+
+/*
* ICU driver system settings.
*/
#define STM32_ICU_USE_TIM1 FALSE
@@ -304,7 +335,13 @@ #define STM32_USB_OTGFIFO_FILL_BASEPRI 0
/*
+ * WDG driver system settings.
+ */
+#define STM32_WDG_USE_IWDG FALSE
+
+/*
* header for community drivers.
*/
#include "mcuconf_community.h"
+#endif /* MCUCONF_H */
diff --git a/testhal/STM32/STM32F4xx/onewire/mcuconf_community.h b/testhal/STM32/STM32F4xx/onewire/mcuconf_community.h index 4a13b56..7ca6e71 100644 --- a/testhal/STM32/STM32F4xx/onewire/mcuconf_community.h +++ b/testhal/STM32/STM32F4xx/onewire/mcuconf_community.h @@ -36,7 +36,7 @@ #define STM32_USE_FSMC_SRAM FALSE #define STM32_SRAM_USE_FSMC_SRAM1 FALSE #define STM32_SRAM_USE_FSMC_SRAM2 FALSE -#define STM32_SRAM_USE_FSMC_SRAM3 FLASE +#define STM32_SRAM_USE_FSMC_SRAM3 FALSE #define STM32_SRAM_USE_FSMC_SRAM4 FALSE /* |