aboutsummaryrefslogtreecommitdiffstats
path: root/testhal/STM32F4xx/UART
diff options
context:
space:
mode:
Diffstat (limited to 'testhal/STM32F4xx/UART')
-rw-r--r--testhal/STM32F4xx/UART/Makefile19
-rw-r--r--testhal/STM32F4xx/UART/chconf.h2
-rw-r--r--testhal/STM32F4xx/UART/halconf.h2
3 files changed, 19 insertions, 4 deletions
diff --git a/testhal/STM32F4xx/UART/Makefile b/testhal/STM32F4xx/UART/Makefile
index de1ac051f..86de6d81c 100644
--- a/testhal/STM32F4xx/UART/Makefile
+++ b/testhal/STM32F4xx/UART/Makefile
@@ -5,7 +5,7 @@
# Compiler options here.
ifeq ($(USE_OPT),)
- USE_OPT = -O2 -ggdb -fomit-frame-pointer -falign-functions=16 -mhard-float -mfpu=fpv4-sp-d16 -fsingle-precision-constant
+ USE_OPT = -O2 -ggdb -fomit-frame-pointer -falign-functions=16
endif
# C specific options here (added to USE_OPT).
@@ -41,6 +41,12 @@ endif
# Architecture or project specific options
#
+# Enables the use of FPU on Cortex-M4.
+# Enable this if you really want to use the STM FWLib.
+ifeq ($(USE_FPU),)
+ USE_FPU = no
+endif
+
# Enable this if you really want to use the STM FWLib.
ifeq ($(USE_FWLIB),)
USE_FWLIB = no
@@ -64,10 +70,11 @@ include $(CHIBIOS)/os/hal/platforms/STM32F4xx/platform.mk
include $(CHIBIOS)/os/hal/hal.mk
include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32F4xx/port.mk
include $(CHIBIOS)/os/kernel/kernel.mk
-#include $(CHIBIOS)/test/test.mk
+include $(CHIBIOS)/test/test.mk
# Define linker script file here
LDSCRIPT= $(PORTLD)/STM32F407xG.ld
+#LDSCRIPT= $(PORTLD)/STM32F407xG_CCM.ld
# C sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
@@ -77,6 +84,7 @@ CSRC = $(PORTSRC) \
$(HALSRC) \
$(PLATFORMSRC) \
$(BOARDSRC) \
+ $(CHIBIOS)/os/various/chprintf.c \
main.c
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
@@ -197,6 +205,13 @@ ULIBS =
# End of user defines
##############################################################################
+ifeq ($(USE_FPU),yes)
+ USE_OPT += -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -fsingle-precision-constant
+ DDEFS += -DCORTEX_USE_FPU=TRUE
+else
+ DDEFS += -DCORTEX_USE_FPU=FALSE
+endif
+
ifeq ($(USE_FWLIB),yes)
include $(CHIBIOS)/ext/stm32lib/stm32lib.mk
CSRC += $(STM32SRC)
diff --git a/testhal/STM32F4xx/UART/chconf.h b/testhal/STM32F4xx/UART/chconf.h
index c0181fef5..290044421 100644
--- a/testhal/STM32F4xx/UART/chconf.h
+++ b/testhal/STM32F4xx/UART/chconf.h
@@ -459,7 +459,7 @@
* @brief Threads initialization hook.
* @details User initialization code added to the @p chThdInit() API.
*
- * @note It is invoked from within @p chThdInit() and implicitily from all
+ * @note It is invoked from within @p chThdInit() and implicitly from all
* the threads creation APIs.
*/
#if !defined(THREAD_EXT_INIT_HOOK) || defined(__DOXYGEN__)
diff --git a/testhal/STM32F4xx/UART/halconf.h b/testhal/STM32F4xx/UART/halconf.h
index 5f667087c..60af9dec0 100644
--- a/testhal/STM32F4xx/UART/halconf.h
+++ b/testhal/STM32F4xx/UART/halconf.h
@@ -268,7 +268,7 @@
/**
* @brief Number of initialization attempts before rejecting the card.
- * @note Attempts are performed at 10mS intevals.
+ * @note Attempts are performed at 10mS intervals.
*/
#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
#define SDC_INIT_RETRY 100