diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/hal/testbuild/Makefile | 35 | ||||
-rw-r--r-- | test/nil/testbuild/Makefile | 41 |
2 files changed, 41 insertions, 35 deletions
diff --git a/test/hal/testbuild/Makefile b/test/hal/testbuild/Makefile index 64a4c98fc..89214a8e4 100644 --- a/test/hal/testbuild/Makefile +++ b/test/hal/testbuild/Makefile @@ -65,7 +65,7 @@ endif # Enables the use of FPU on Cortex-M4 (no, softfp, hard).
ifeq ($(USE_FPU),)
- USE_FPU = hard
+ USE_FPU = no
endif
#
@@ -81,25 +81,32 @@ PROJECT = ch # Imported source files and paths
CHIBIOS = ../../..
+# Startup files.
+include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/startup_stm32f4xx.mk
+# HAL-OSAL files (optional).
include $(CHIBIOS)/os/hal/hal.mk
include $(CHIBIOS)/os/hal/templates/platform.mk
+#include $(CHIBIOS)/os/hal/boards/xxxxxxx/board.mk
include $(CHIBIOS)/os/hal/templates/osal/osal.mk
+# RTOS files (optional).
+#include $(CHIBIOS)/os/rt/rt.mk
+#include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk
+# Other files (optional).
+#include $(CHIBIOS)/test/rt/test.mk
# Define linker script file here
-PORTLD = ${CHIBIOS}/os/common/ports/ARMCMx/compilers/GCC/ld
-LDSCRIPT= $(PORTLD)/STM32F407xG.ld
+LDSCRIPT= $(STARTUPLD)/STM32F407xG.ld
# C sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
-PORTSRC = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/crt0.c \
- $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/vectors.c
-CSRC = $(PORTSRC) \
+CSRC = $(STARTUPSRC) \
$(KERNSRC) \
- $(TESTSRC) \
- $(HALSRC) \
+ $(PORTSRC) \
$(OSALSRC) \
+ $(HALSRC) \
$(PLATFORMSRC) \
$(BOARDSRC) \
+ $(TESTSRC) \
main.c
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
@@ -127,14 +134,10 @@ TCSRC = TCPPSRC =
# List ASM source files here
-PORTASM = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/crt0_v7m.s
-ASMSRC = $(PORTASM)
-
-PORTINC = ${CHIBIOS}/os/ext/CMSIS/include \
- ${CHIBIOS}/os/ext/CMSIS/ST \
- ${CHIBIOS}/os/common/ports/ARMCMx/devices/STM32F4xx
-INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \
- $(HALINC) $(OSALINC) $(PLATFORMINC) $(BOARDINC) \
+ASMSRC = $(STARTUPASM) $(PORTASM) $(OSALASM)
+
+INCDIR = $(STARTUPINC) $(KERNINC) $(PORTINC) $(OSALINC) \
+ $(HALINC) $(PLATFORMINC) $(BOARDINC) $(TESTINC) \
$(CHIBIOS)/os/various
#
diff --git a/test/nil/testbuild/Makefile b/test/nil/testbuild/Makefile index eb9cb7f3a..1de38a2a9 100644 --- a/test/nil/testbuild/Makefile +++ b/test/nil/testbuild/Makefile @@ -65,7 +65,7 @@ endif # Enables the use of FPU on Cortex-M4 (no, softfp, hard).
ifeq ($(USE_FPU),)
- USE_FPU = hard
+ USE_FPU = no
endif
#
@@ -81,26 +81,32 @@ PROJECT = ch # Imported source files and paths
CHIBIOS = ../../..
+# Startup files.
+include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/startup_stm32f3xx.mk
+# HAL-OSAL files (optional).
+#include $(CHIBIOS)/os/hal/hal.mk
+#include $(CHIBIOS)/os/hal/ports/STM32/STM32F3xx/platform.mk
+#include $(CHIBIOS)/os/hal/boards/ST_STM32F3_DISCOVERY/board.mk
+#include $(CHIBIOS)/os/hal/osal/nil/osal.mk
+# RTOS files (optional).
include $(CHIBIOS)/os/nil/nil.mk
-include $(CHIBIOS)/os/nil/ports/ARMCMx/compilers/GCC/mk/port_generic_cm4.mk
-include $(CHIBIOS)/os/hal/osal/nil/osal.mk
+include $(CHIBIOS)/os/nil/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk
+# Other files (optional).
+#include $(CHIBIOS)/test/nil/test.mk
# Define linker script file here
-PORTLD = ${CHIBIOS}/os/common/ports/ARMCMx/compilers/GCC/ld
-LDSCRIPT= $(PORTLD)/STM32F407xG.ld
+LDSCRIPT= $(STARTUPLD)/STM32F303xC.ld
# C sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
-PORTSRC = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/crt0.c \
- $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/vectors.c \
- $(CHIBIOS)/os/nil/templates/nilcore.c
-CSRC = $(PORTSRC) \
+CSRC = $(STARTUPSRC) \
$(KERNSRC) \
- $(TESTSRC) \
- $(HALSRC) \
+ $(PORTSRC) \
$(OSALSRC) \
+ $(HALSRC) \
$(PLATFORMSRC) \
$(BOARDSRC) \
+ $(TESTSRC) \
main.c
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
@@ -128,14 +134,11 @@ TCSRC = TCPPSRC =
# List ASM source files here
-PORTASM = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/crt0_v7m.s
-ASMSRC = $(PORTASM)
+ASMSRC = $(STARTUPASM) $(PORTASM) $(OSALASM)
-PORTINC = ${CHIBIOS}/os/ext/CMSIS/include \
- ${CHIBIOS}/os/ext/CMSIS/ST \
- ${CHIBIOS}/os/common/ports/ARMCMx/devices/STM32F4xx \
- $(CHIBIOS)/os/nil/templates
-INCDIR = $(PORTINC) $(KERNINC)
+INCDIR = $(STARTUPINC) $(KERNINC) $(PORTINC) $(OSALINC) \
+ $(HALINC) $(PLATFORMINC) $(BOARDINC) $(TESTINC) \
+ $(CHIBIOS)/os/various
#
# Project, sources and paths
@@ -185,7 +188,7 @@ CPPWARN = -Wall -Wextra #
# List all user C define here, like -D_DEBUG=1
-UDEFS = -DSTM32F407xx
+UDEFS = -DSTM32F303xC
# Define ASM defines here
UADEFS =
|