aboutsummaryrefslogtreecommitdiffstats
path: root/testhal
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2015-03-28 18:10:58 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2015-03-28 18:10:58 +0000
commit46abfd539f96a3aff27b6b38bf9e24b92c0d3917 (patch)
tree64e6d4ade59f391def9beb46b2c3654aed749174 /testhal
parentaa6af756b0f8e8ab1bb5e2fefd27fe34157acffc (diff)
downloadChibiOS-46abfd539f96a3aff27b6b38bf9e24b92c0d3917.tar.gz
ChibiOS-46abfd539f96a3aff27b6b38bf9e24b92c0d3917.tar.bz2
ChibiOS-46abfd539f96a3aff27b6b38bf9e24b92c0d3917.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7826 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'testhal')
-rw-r--r--testhal/STM32/STM32F1xx/ADC/Makefile26
-rw-r--r--testhal/STM32/STM32F1xx/CAN/Makefile26
-rw-r--r--testhal/STM32/STM32F1xx/EXT/Makefile26
-rw-r--r--testhal/STM32/STM32F1xx/I2C/Makefile26
-rw-r--r--testhal/STM32/STM32F1xx/IRQ_STORM/Makefile26
-rw-r--r--testhal/STM32/STM32F1xx/PWM-ICU/Makefile26
-rw-r--r--testhal/STM32/STM32F1xx/RTC/Makefile30
-rw-r--r--testhal/STM32/STM32F1xx/SPI/Makefile26
-rw-r--r--testhal/STM32/STM32F1xx/UART/Makefile26
-rw-r--r--testhal/STM32/STM32F1xx/USB_CDC/Makefile26
-rw-r--r--testhal/STM32/STM32F1xx/USB_CDC_F107/Makefile94
-rw-r--r--testhal/STM32/STM32L1xx/ADC/Makefile33
-rw-r--r--testhal/STM32/STM32L1xx/EXT/Makefile33
-rw-r--r--testhal/STM32/STM32L1xx/IRQ_STORM/Makefile33
-rw-r--r--testhal/STM32/STM32L1xx/PWM-ICU/Makefile33
-rw-r--r--testhal/STM32/STM32L1xx/SPI/Makefile33
-rw-r--r--testhal/STM32/STM32L1xx/UART/Makefile33
17 files changed, 342 insertions, 214 deletions
diff --git a/testhal/STM32/STM32F1xx/ADC/Makefile b/testhal/STM32/STM32F1xx/ADC/Makefile
index 33c678067..2386f0ae0 100644
--- a/testhal/STM32/STM32F1xx/ADC/Makefile
+++ b/testhal/STM32/STM32F1xx/ADC/Makefile
@@ -63,7 +63,7 @@ ifeq ($(USE_EXCEPTIONS_STACKSIZE),)
USE_EXCEPTIONS_STACKSIZE = 0x400
endif
-# Enables the use of FPU on Cortex-M4.
+# Enables the use of FPU on Cortex-M4 (no, softfp, hard).
ifeq ($(USE_FPU),)
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_stm32f1xx.mk
+# HAL-OSAL files (optional).
include $(CHIBIOS)/os/hal/hal.mk
-include $(CHIBIOS)/os/hal/boards/OLIMEX_STM32_P103/board.mk
include $(CHIBIOS)/os/hal/ports/STM32/STM32F1xx/platform.mk
+include $(CHIBIOS)/os/hal/boards/OLIMEX_STM32_P103/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_stm32f1xx.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
-LDSCRIPT = $(PORTLD)/STM32F103xB.ld
+LDSCRIPT= $(STARTUPLD)/STM32F103xB.ld
# C sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
-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,10 +134,10 @@ TCSRC =
TCPPSRC =
# List ASM source files here
-ASMSRC = $(PORTASM)
+ASMSRC = $(STARTUPASM) $(PORTASM) $(OSALASM)
-INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \
- $(HALINC) $(OSALINC) $(PLATFORMINC) $(BOARDINC) \
+INCDIR = $(STARTUPINC) $(KERNINC) $(PORTINC) $(OSALINC) \
+ $(HALINC) $(PLATFORMINC) $(BOARDINC) $(TESTINC) \
$(CHIBIOS)/os/various
#
diff --git a/testhal/STM32/STM32F1xx/CAN/Makefile b/testhal/STM32/STM32F1xx/CAN/Makefile
index 33c678067..2386f0ae0 100644
--- a/testhal/STM32/STM32F1xx/CAN/Makefile
+++ b/testhal/STM32/STM32F1xx/CAN/Makefile
@@ -63,7 +63,7 @@ ifeq ($(USE_EXCEPTIONS_STACKSIZE),)
USE_EXCEPTIONS_STACKSIZE = 0x400
endif
-# Enables the use of FPU on Cortex-M4.
+# Enables the use of FPU on Cortex-M4 (no, softfp, hard).
ifeq ($(USE_FPU),)
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_stm32f1xx.mk
+# HAL-OSAL files (optional).
include $(CHIBIOS)/os/hal/hal.mk
-include $(CHIBIOS)/os/hal/boards/OLIMEX_STM32_P103/board.mk
include $(CHIBIOS)/os/hal/ports/STM32/STM32F1xx/platform.mk
+include $(CHIBIOS)/os/hal/boards/OLIMEX_STM32_P103/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_stm32f1xx.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
-LDSCRIPT = $(PORTLD)/STM32F103xB.ld
+LDSCRIPT= $(STARTUPLD)/STM32F103xB.ld
# C sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
-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,10 +134,10 @@ TCSRC =
TCPPSRC =
# List ASM source files here
-ASMSRC = $(PORTASM)
+ASMSRC = $(STARTUPASM) $(PORTASM) $(OSALASM)
-INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \
- $(HALINC) $(OSALINC) $(PLATFORMINC) $(BOARDINC) \
+INCDIR = $(STARTUPINC) $(KERNINC) $(PORTINC) $(OSALINC) \
+ $(HALINC) $(PLATFORMINC) $(BOARDINC) $(TESTINC) \
$(CHIBIOS)/os/various
#
diff --git a/testhal/STM32/STM32F1xx/EXT/Makefile b/testhal/STM32/STM32F1xx/EXT/Makefile
index 33c678067..2386f0ae0 100644
--- a/testhal/STM32/STM32F1xx/EXT/Makefile
+++ b/testhal/STM32/STM32F1xx/EXT/Makefile
@@ -63,7 +63,7 @@ ifeq ($(USE_EXCEPTIONS_STACKSIZE),)
USE_EXCEPTIONS_STACKSIZE = 0x400
endif
-# Enables the use of FPU on Cortex-M4.
+# Enables the use of FPU on Cortex-M4 (no, softfp, hard).
ifeq ($(USE_FPU),)
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_stm32f1xx.mk
+# HAL-OSAL files (optional).
include $(CHIBIOS)/os/hal/hal.mk
-include $(CHIBIOS)/os/hal/boards/OLIMEX_STM32_P103/board.mk
include $(CHIBIOS)/os/hal/ports/STM32/STM32F1xx/platform.mk
+include $(CHIBIOS)/os/hal/boards/OLIMEX_STM32_P103/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_stm32f1xx.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
-LDSCRIPT = $(PORTLD)/STM32F103xB.ld
+LDSCRIPT= $(STARTUPLD)/STM32F103xB.ld
# C sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
-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,10 +134,10 @@ TCSRC =
TCPPSRC =
# List ASM source files here
-ASMSRC = $(PORTASM)
+ASMSRC = $(STARTUPASM) $(PORTASM) $(OSALASM)
-INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \
- $(HALINC) $(OSALINC) $(PLATFORMINC) $(BOARDINC) \
+INCDIR = $(STARTUPINC) $(KERNINC) $(PORTINC) $(OSALINC) \
+ $(HALINC) $(PLATFORMINC) $(BOARDINC) $(TESTINC) \
$(CHIBIOS)/os/various
#
diff --git a/testhal/STM32/STM32F1xx/I2C/Makefile b/testhal/STM32/STM32F1xx/I2C/Makefile
index 003310836..6900279e8 100644
--- a/testhal/STM32/STM32F1xx/I2C/Makefile
+++ b/testhal/STM32/STM32F1xx/I2C/Makefile
@@ -63,7 +63,7 @@ ifeq ($(USE_EXCEPTIONS_STACKSIZE),)
USE_EXCEPTIONS_STACKSIZE = 0x400
endif
-# Enables the use of FPU on Cortex-M4.
+# Enables the use of FPU on Cortex-M4 (no, softfp, hard).
ifeq ($(USE_FPU),)
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_stm32f1xx.mk
+# HAL-OSAL files (optional).
include $(CHIBIOS)/os/hal/hal.mk
-include $(CHIBIOS)/os/hal/boards/OLIMEX_STM32_103STK/board.mk
include $(CHIBIOS)/os/hal/ports/STM32/STM32F1xx/platform.mk
+include $(CHIBIOS)/os/hal/boards/OLIMEX_STM32_P103/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_stm32f1xx.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
-LDSCRIPT = $(PORTLD)/STM32F103xB.ld
+LDSCRIPT= $(STARTUPLD)/STM32F103xB.ld
# C sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
-CSRC = $(PORTSRC) \
+CSRC = $(STARTUPSRC) \
$(KERNSRC) \
- $(TESTSRC) \
- $(HALSRC) \
+ $(PORTSRC) \
$(OSALSRC) \
+ $(HALSRC) \
$(PLATFORMSRC) \
$(BOARDSRC) \
+ $(TESTSRC) \
main.c \
lis3.c \
fake.c
@@ -130,10 +136,10 @@ TCSRC =
TCPPSRC =
# List ASM source files here
-ASMSRC = $(PORTASM)
+ASMSRC = $(STARTUPASM) $(PORTASM) $(OSALASM)
-INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \
- $(HALINC) $(OSALINC) $(PLATFORMINC) $(BOARDINC) \
+INCDIR = $(STARTUPINC) $(KERNINC) $(PORTINC) $(OSALINC) \
+ $(HALINC) $(PLATFORMINC) $(BOARDINC) $(TESTINC) \
$(CHIBIOS)/os/various
#
diff --git a/testhal/STM32/STM32F1xx/IRQ_STORM/Makefile b/testhal/STM32/STM32F1xx/IRQ_STORM/Makefile
index 33c678067..2386f0ae0 100644
--- a/testhal/STM32/STM32F1xx/IRQ_STORM/Makefile
+++ b/testhal/STM32/STM32F1xx/IRQ_STORM/Makefile
@@ -63,7 +63,7 @@ ifeq ($(USE_EXCEPTIONS_STACKSIZE),)
USE_EXCEPTIONS_STACKSIZE = 0x400
endif
-# Enables the use of FPU on Cortex-M4.
+# Enables the use of FPU on Cortex-M4 (no, softfp, hard).
ifeq ($(USE_FPU),)
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_stm32f1xx.mk
+# HAL-OSAL files (optional).
include $(CHIBIOS)/os/hal/hal.mk
-include $(CHIBIOS)/os/hal/boards/OLIMEX_STM32_P103/board.mk
include $(CHIBIOS)/os/hal/ports/STM32/STM32F1xx/platform.mk
+include $(CHIBIOS)/os/hal/boards/OLIMEX_STM32_P103/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_stm32f1xx.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
-LDSCRIPT = $(PORTLD)/STM32F103xB.ld
+LDSCRIPT= $(STARTUPLD)/STM32F103xB.ld
# C sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
-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,10 +134,10 @@ TCSRC =
TCPPSRC =
# List ASM source files here
-ASMSRC = $(PORTASM)
+ASMSRC = $(STARTUPASM) $(PORTASM) $(OSALASM)
-INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \
- $(HALINC) $(OSALINC) $(PLATFORMINC) $(BOARDINC) \
+INCDIR = $(STARTUPINC) $(KERNINC) $(PORTINC) $(OSALINC) \
+ $(HALINC) $(PLATFORMINC) $(BOARDINC) $(TESTINC) \
$(CHIBIOS)/os/various
#
diff --git a/testhal/STM32/STM32F1xx/PWM-ICU/Makefile b/testhal/STM32/STM32F1xx/PWM-ICU/Makefile
index 33c678067..2386f0ae0 100644
--- a/testhal/STM32/STM32F1xx/PWM-ICU/Makefile
+++ b/testhal/STM32/STM32F1xx/PWM-ICU/Makefile
@@ -63,7 +63,7 @@ ifeq ($(USE_EXCEPTIONS_STACKSIZE),)
USE_EXCEPTIONS_STACKSIZE = 0x400
endif
-# Enables the use of FPU on Cortex-M4.
+# Enables the use of FPU on Cortex-M4 (no, softfp, hard).
ifeq ($(USE_FPU),)
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_stm32f1xx.mk
+# HAL-OSAL files (optional).
include $(CHIBIOS)/os/hal/hal.mk
-include $(CHIBIOS)/os/hal/boards/OLIMEX_STM32_P103/board.mk
include $(CHIBIOS)/os/hal/ports/STM32/STM32F1xx/platform.mk
+include $(CHIBIOS)/os/hal/boards/OLIMEX_STM32_P103/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_stm32f1xx.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
-LDSCRIPT = $(PORTLD)/STM32F103xB.ld
+LDSCRIPT= $(STARTUPLD)/STM32F103xB.ld
# C sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
-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,10 +134,10 @@ TCSRC =
TCPPSRC =
# List ASM source files here
-ASMSRC = $(PORTASM)
+ASMSRC = $(STARTUPASM) $(PORTASM) $(OSALASM)
-INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \
- $(HALINC) $(OSALINC) $(PLATFORMINC) $(BOARDINC) \
+INCDIR = $(STARTUPINC) $(KERNINC) $(PORTINC) $(OSALINC) \
+ $(HALINC) $(PLATFORMINC) $(BOARDINC) $(TESTINC) \
$(CHIBIOS)/os/various
#
diff --git a/testhal/STM32/STM32F1xx/RTC/Makefile b/testhal/STM32/STM32F1xx/RTC/Makefile
index 7cd4bc0cb..7e0e0b343 100644
--- a/testhal/STM32/STM32F1xx/RTC/Makefile
+++ b/testhal/STM32/STM32F1xx/RTC/Makefile
@@ -30,7 +30,7 @@ endif
# Enable this if you want link time optimizations (LTO)
ifeq ($(USE_LTO),)
- USE_LTO = no
+ USE_LTO = yes
endif
# If enabled, this option allows to compile the application in THUMB mode.
@@ -63,7 +63,7 @@ ifeq ($(USE_EXCEPTIONS_STACKSIZE),)
USE_EXCEPTIONS_STACKSIZE = 0x400
endif
-# Enables the use of FPU on Cortex-M4.
+# Enables the use of FPU on Cortex-M4 (no, softfp, hard).
ifeq ($(USE_FPU),)
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_stm32f1xx.mk
+# HAL-OSAL files (optional).
include $(CHIBIOS)/os/hal/hal.mk
-include $(CHIBIOS)/os/hal/boards/OLIMEX_STM32_103STK/board.mk
include $(CHIBIOS)/os/hal/ports/STM32/STM32F1xx/platform.mk
+include $(CHIBIOS)/os/hal/boards/OLIMEX_STM32_P103/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_stm32f1xx.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
-LDSCRIPT = $(PORTLD)/STM32F103xB.ld
+LDSCRIPT= $(STARTUPLD)/STM32F103xB.ld
# C sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
-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,10 +134,10 @@ TCSRC =
TCPPSRC =
# List ASM source files here
-ASMSRC = $(PORTASM)
+ASMSRC = $(STARTUPASM) $(PORTASM) $(OSALASM)
-INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \
- $(HALINC) $(OSALINC) $(PLATFORMINC) $(BOARDINC) \
+INCDIR = $(STARTUPINC) $(KERNINC) $(PORTINC) $(OSALINC) \
+ $(HALINC) $(PLATFORMINC) $(BOARDINC) $(TESTINC) \
$(CHIBIOS)/os/various
#
@@ -194,7 +200,7 @@ UINCDIR =
ULIBDIR =
# List all user libraries here
-ULIBS = -lm
+ULIBS =
#
# End of user defines
diff --git a/testhal/STM32/STM32F1xx/SPI/Makefile b/testhal/STM32/STM32F1xx/SPI/Makefile
index 33c678067..2386f0ae0 100644
--- a/testhal/STM32/STM32F1xx/SPI/Makefile
+++ b/testhal/STM32/STM32F1xx/SPI/Makefile
@@ -63,7 +63,7 @@ ifeq ($(USE_EXCEPTIONS_STACKSIZE),)
USE_EXCEPTIONS_STACKSIZE = 0x400
endif
-# Enables the use of FPU on Cortex-M4.
+# Enables the use of FPU on Cortex-M4 (no, softfp, hard).
ifeq ($(USE_FPU),)
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_stm32f1xx.mk
+# HAL-OSAL files (optional).
include $(CHIBIOS)/os/hal/hal.mk
-include $(CHIBIOS)/os/hal/boards/OLIMEX_STM32_P103/board.mk
include $(CHIBIOS)/os/hal/ports/STM32/STM32F1xx/platform.mk
+include $(CHIBIOS)/os/hal/boards/OLIMEX_STM32_P103/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_stm32f1xx.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
-LDSCRIPT = $(PORTLD)/STM32F103xB.ld
+LDSCRIPT= $(STARTUPLD)/STM32F103xB.ld
# C sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
-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,10 +134,10 @@ TCSRC =
TCPPSRC =
# List ASM source files here
-ASMSRC = $(PORTASM)
+ASMSRC = $(STARTUPASM) $(PORTASM) $(OSALASM)
-INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \
- $(HALINC) $(OSALINC) $(PLATFORMINC) $(BOARDINC) \
+INCDIR = $(STARTUPINC) $(KERNINC) $(PORTINC) $(OSALINC) \
+ $(HALINC) $(PLATFORMINC) $(BOARDINC) $(TESTINC) \
$(CHIBIOS)/os/various
#
diff --git a/testhal/STM32/STM32F1xx/UART/Makefile b/testhal/STM32/STM32F1xx/UART/Makefile
index 33c678067..2386f0ae0 100644
--- a/testhal/STM32/STM32F1xx/UART/Makefile
+++ b/testhal/STM32/STM32F1xx/UART/Makefile
@@ -63,7 +63,7 @@ ifeq ($(USE_EXCEPTIONS_STACKSIZE),)
USE_EXCEPTIONS_STACKSIZE = 0x400
endif
-# Enables the use of FPU on Cortex-M4.
+# Enables the use of FPU on Cortex-M4 (no, softfp, hard).
ifeq ($(USE_FPU),)
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_stm32f1xx.mk
+# HAL-OSAL files (optional).
include $(CHIBIOS)/os/hal/hal.mk
-include $(CHIBIOS)/os/hal/boards/OLIMEX_STM32_P103/board.mk
include $(CHIBIOS)/os/hal/ports/STM32/STM32F1xx/platform.mk
+include $(CHIBIOS)/os/hal/boards/OLIMEX_STM32_P103/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_stm32f1xx.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
-LDSCRIPT = $(PORTLD)/STM32F103xB.ld
+LDSCRIPT= $(STARTUPLD)/STM32F103xB.ld
# C sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
-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,10 +134,10 @@ TCSRC =
TCPPSRC =
# List ASM source files here
-ASMSRC = $(PORTASM)
+ASMSRC = $(STARTUPASM) $(PORTASM) $(OSALASM)
-INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \
- $(HALINC) $(OSALINC) $(PLATFORMINC) $(BOARDINC) \
+INCDIR = $(STARTUPINC) $(KERNINC) $(PORTINC) $(OSALINC) \
+ $(HALINC) $(PLATFORMINC) $(BOARDINC) $(TESTINC) \
$(CHIBIOS)/os/various
#
diff --git a/testhal/STM32/STM32F1xx/USB_CDC/Makefile b/testhal/STM32/STM32F1xx/USB_CDC/Makefile
index 06437122b..5180a9b73 100644
--- a/testhal/STM32/STM32F1xx/USB_CDC/Makefile
+++ b/testhal/STM32/STM32F1xx/USB_CDC/Makefile
@@ -63,7 +63,7 @@ ifeq ($(USE_EXCEPTIONS_STACKSIZE),)
USE_EXCEPTIONS_STACKSIZE = 0x400
endif
-# Enables the use of FPU on Cortex-M4.
+# Enables the use of FPU on Cortex-M4 (no, softfp, hard).
ifeq ($(USE_FPU),)
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_stm32f1xx.mk
+# HAL-OSAL files (optional).
include $(CHIBIOS)/os/hal/hal.mk
-include $(CHIBIOS)/os/hal/boards/OLIMEX_STM32_P103/board.mk
include $(CHIBIOS)/os/hal/ports/STM32/STM32F1xx/platform.mk
+include $(CHIBIOS)/os/hal/boards/OLIMEX_STM32_P103/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_stm32f1xx.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
-LDSCRIPT = $(PORTLD)/STM32F103xB.ld
+LDSCRIPT= $(STARTUPLD)/STM32F103xB.ld
# C sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
-CSRC = $(PORTSRC) \
+CSRC = $(STARTUPSRC) \
$(KERNSRC) \
- $(TESTSRC) \
- $(HALSRC) \
+ $(PORTSRC) \
$(OSALSRC) \
+ $(HALSRC) \
$(PLATFORMSRC) \
$(BOARDSRC) \
+ $(TESTSRC) \
$(CHIBIOS)/os/various/shell.c \
$(CHIBIOS)/os/hal/lib/streams/memstreams.c \
$(CHIBIOS)/os/hal/lib/streams/chprintf.c \
@@ -131,10 +137,10 @@ TCSRC =
TCPPSRC =
# List ASM source files here
-ASMSRC = $(PORTASM)
+ASMSRC = $(STARTUPASM) $(PORTASM) $(OSALASM)
-INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \
- $(HALINC) $(OSALINC) $(PLATFORMINC) $(BOARDINC) \
+INCDIR = $(STARTUPINC) $(KERNINC) $(PORTINC) $(OSALINC) \
+ $(HALINC) $(PLATFORMINC) $(BOARDINC) $(TESTINC) \
$(CHIBIOS)/os/hal/lib/streams $(CHIBIOS)/os/various
#
diff --git a/testhal/STM32/STM32F1xx/USB_CDC_F107/Makefile b/testhal/STM32/STM32F1xx/USB_CDC_F107/Makefile
index 88b8e950b..06e0c3f89 100644
--- a/testhal/STM32/STM32F1xx/USB_CDC_F107/Makefile
+++ b/testhal/STM32/STM32F1xx/USB_CDC_F107/Makefile
@@ -23,6 +23,16 @@ ifeq ($(USE_LINK_GC),)
USE_LINK_GC = yes
endif
+# Linker extra options here.
+ifeq ($(USE_LDOPT),)
+ USE_LDOPT =
+endif
+
+# Enable this if you want link time optimizations (LTO)
+ifeq ($(USE_LTO),)
+ USE_LTO = yes
+endif
+
# If enabled, this option allows to compile the application in THUMB mode.
ifeq ($(USE_THUMB),)
USE_THUMB = yes
@@ -41,9 +51,21 @@ endif
# Architecture or project specific options
#
-# Enable this if you really want to use the STM FWLib.
-ifeq ($(USE_FWLIB),)
- USE_FWLIB = no
+# 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 = 0x400
+endif
+
+# Stack size to the allocated to the Cortex-M main/exceptions stack. This
+# stack is used for processing interrupts and exceptions.
+ifeq ($(USE_EXCEPTIONS_STACKSIZE),)
+ USE_EXCEPTIONS_STACKSIZE = 0x400
+endif
+
+# Enables the use of FPU on Cortex-M4 (no, softfp, hard).
+ifeq ($(USE_FPU),)
+ USE_FPU = no
endif
#
@@ -59,24 +81,32 @@ PROJECT = ch
# Imported source files and paths
CHIBIOS = ../../../..
-include $(CHIBIOS)/boards/OLIMEX_STM32_P107/board.mk
-include $(CHIBIOS)/os/hal/platforms/STM32F1xx/platform_f105_f107.mk
+# Startup files.
+include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/startup_stm32f1xx.mk
+# HAL-OSAL files (optional).
include $(CHIBIOS)/os/hal/hal.mk
-include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32F1xx/port.mk
-include $(CHIBIOS)/os/kernel/kernel.mk
-include $(CHIBIOS)/test/rt/test.mk
+include $(CHIBIOS)/os/hal/ports/STM32/STM32F1xx/platform.mk
+include $(CHIBIOS)/os/hal/boards/OLIMEX_STM32_P107/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
+# Other files (optional).
+#include $(CHIBIOS)/test/rt/test.mk
# Define linker script file here
-LDSCRIPT= $(PORTLD)/STM32F107xC.ld
+LDSCRIPT= $(STARTUPLD)/STM32F103xB.ld
# C sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
-CSRC = $(PORTSRC) \
+CSRC = $(STARTUPSRC) \
$(KERNSRC) \
- $(TESTSRC) \
+ $(PORTSRC) \
+ $(OSALSRC) \
$(HALSRC) \
$(PLATFORMSRC) \
$(BOARDSRC) \
+ $(TESTSRC) \
$(CHIBIOS)/os/various/shell.c \
$(CHIBIOS)/os/hal/lib/streams/memstreams.c \
$(CHIBIOS)/os/hal/lib/streams/chprintf.c \
@@ -107,11 +137,11 @@ TCSRC =
TCPPSRC =
# List ASM source files here
-ASMSRC = $(PORTASM)
+ASMSRC = $(STARTUPASM) $(PORTASM) $(OSALASM)
-INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \
- $(HALINC) $(PLATFORMINC) $(BOARDINC) \
- $(CHIBIOS)/os/various
+INCDIR = $(STARTUPINC) $(KERNINC) $(PORTINC) $(OSALINC) \
+ $(HALINC) $(PLATFORMINC) $(BOARDINC) $(TESTINC) \
+ $(CHIBIOS)/os/hal/lib/streams $(CHIBIOS)/os/various
#
# Project, sources and paths
@@ -136,6 +166,7 @@ CP = $(TRGT)objcopy
AS = $(TRGT)gcc -x assembler-with-cpp
AR = $(TRGT)ar
OD = $(TRGT)objdump
+SZ = $(TRGT)size
HEX = $(CP) -O ihex
BIN = $(CP) -O binary
@@ -156,29 +187,6 @@ CPPWARN = -Wall -Wextra
##############################################################################
##############################################################################
-# Start of default section
-#
-
-# List all default C defines here, like -D_DEBUG=1
-DDEFS =
-
-# List all default ASM defines here, like -D_DEBUG=1
-DADEFS =
-
-# List all default directories to look for include files here
-DINCDIR =
-
-# List the default directory to look for the libraries here
-DLIBDIR =
-
-# List all default libraries here
-DLIBS =
-
-#
-# End of default section
-##############################################################################
-
-##############################################################################
# Start of user section
#
@@ -201,11 +209,5 @@ ULIBS =
# End of user defines
##############################################################################
-ifeq ($(USE_FWLIB),yes)
- include $(CHIBIOS)/ext/stm32lib/stm32lib.mk
- CSRC += $(STM32SRC)
- INCDIR += $(STM32INC)
- USE_OPT += -DUSE_STDPERIPH_DRIVER
-endif
-
-include $(CHIBIOS)/os/ports/GCC/ARMCMx/rules.mk
+RULESPATH = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC
+include $(RULESPATH)/rules.mk
diff --git a/testhal/STM32/STM32L1xx/ADC/Makefile b/testhal/STM32/STM32L1xx/ADC/Makefile
index 9cd12e17d..9d4785aa1 100644
--- a/testhal/STM32/STM32L1xx/ADC/Makefile
+++ b/testhal/STM32/STM32L1xx/ADC/Makefile
@@ -63,6 +63,11 @@ ifeq ($(USE_EXCEPTIONS_STACKSIZE),)
USE_EXCEPTIONS_STACKSIZE = 0x400
endif
+# Enables the use of FPU on Cortex-M4 (no, softfp, hard).
+ifeq ($(USE_FPU),)
+ USE_FPU = no
+endif
+
#
# Architecture or project specific options
##############################################################################
@@ -76,26 +81,32 @@ PROJECT = ch
# Imported source files and paths
CHIBIOS = ../../../..
+# Startup files.
+include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/startup_stm32l1xx.mk
+# HAL-OSAL files (optional).
include $(CHIBIOS)/os/hal/hal.mk
-include $(CHIBIOS)/os/hal/boards/ST_STM32L_DISCOVERY/board.mk
include $(CHIBIOS)/os/hal/ports/STM32/STM32L1xx/platform.mk
+include $(CHIBIOS)/os/hal/boards/ST_STM32L_DISCOVERY/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_stm32l1xx.mk
-#include $(CHIBIOS)/test/rt/test.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
-LDSCRIPT= $(PORTLD)/STM32L152xB.ld
+LDSCRIPT= $(STARTUPLD)/STM32L152xB.ld
# C sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
-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
@@ -123,10 +134,10 @@ TCSRC =
TCPPSRC =
# List ASM source files here
-ASMSRC = $(PORTASM)
+ASMSRC = $(STARTUPASM) $(PORTASM) $(OSALASM)
-INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \
- $(HALINC) $(OSALINC) $(PLATFORMINC) $(BOARDINC) \
+INCDIR = $(STARTUPINC) $(KERNINC) $(PORTINC) $(OSALINC) \
+ $(HALINC) $(PLATFORMINC) $(BOARDINC) $(TESTINC) \
$(CHIBIOS)/os/various
#
@@ -137,7 +148,7 @@ INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \
# Compiler settings
#
-MCU = cortex-m3
+MCU = cortex-m4
#TRGT = arm-elf-
TRGT = arm-none-eabi-
diff --git a/testhal/STM32/STM32L1xx/EXT/Makefile b/testhal/STM32/STM32L1xx/EXT/Makefile
index 9cd12e17d..9d4785aa1 100644
--- a/testhal/STM32/STM32L1xx/EXT/Makefile
+++ b/testhal/STM32/STM32L1xx/EXT/Makefile
@@ -63,6 +63,11 @@ ifeq ($(USE_EXCEPTIONS_STACKSIZE),)
USE_EXCEPTIONS_STACKSIZE = 0x400
endif
+# Enables the use of FPU on Cortex-M4 (no, softfp, hard).
+ifeq ($(USE_FPU),)
+ USE_FPU = no
+endif
+
#
# Architecture or project specific options
##############################################################################
@@ -76,26 +81,32 @@ PROJECT = ch
# Imported source files and paths
CHIBIOS = ../../../..
+# Startup files.
+include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/startup_stm32l1xx.mk
+# HAL-OSAL files (optional).
include $(CHIBIOS)/os/hal/hal.mk
-include $(CHIBIOS)/os/hal/boards/ST_STM32L_DISCOVERY/board.mk
include $(CHIBIOS)/os/hal/ports/STM32/STM32L1xx/platform.mk
+include $(CHIBIOS)/os/hal/boards/ST_STM32L_DISCOVERY/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_stm32l1xx.mk
-#include $(CHIBIOS)/test/rt/test.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
-LDSCRIPT= $(PORTLD)/STM32L152xB.ld
+LDSCRIPT= $(STARTUPLD)/STM32L152xB.ld
# C sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
-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
@@ -123,10 +134,10 @@ TCSRC =
TCPPSRC =
# List ASM source files here
-ASMSRC = $(PORTASM)
+ASMSRC = $(STARTUPASM) $(PORTASM) $(OSALASM)
-INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \
- $(HALINC) $(OSALINC) $(PLATFORMINC) $(BOARDINC) \
+INCDIR = $(STARTUPINC) $(KERNINC) $(PORTINC) $(OSALINC) \
+ $(HALINC) $(PLATFORMINC) $(BOARDINC) $(TESTINC) \
$(CHIBIOS)/os/various
#
@@ -137,7 +148,7 @@ INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \
# Compiler settings
#
-MCU = cortex-m3
+MCU = cortex-m4
#TRGT = arm-elf-
TRGT = arm-none-eabi-
diff --git a/testhal/STM32/STM32L1xx/IRQ_STORM/Makefile b/testhal/STM32/STM32L1xx/IRQ_STORM/Makefile
index 9cd12e17d..9d4785aa1 100644
--- a/testhal/STM32/STM32L1xx/IRQ_STORM/Makefile
+++ b/testhal/STM32/STM32L1xx/IRQ_STORM/Makefile
@@ -63,6 +63,11 @@ ifeq ($(USE_EXCEPTIONS_STACKSIZE),)
USE_EXCEPTIONS_STACKSIZE = 0x400
endif
+# Enables the use of FPU on Cortex-M4 (no, softfp, hard).
+ifeq ($(USE_FPU),)
+ USE_FPU = no
+endif
+
#
# Architecture or project specific options
##############################################################################
@@ -76,26 +81,32 @@ PROJECT = ch
# Imported source files and paths
CHIBIOS = ../../../..
+# Startup files.
+include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/startup_stm32l1xx.mk
+# HAL-OSAL files (optional).
include $(CHIBIOS)/os/hal/hal.mk
-include $(CHIBIOS)/os/hal/boards/ST_STM32L_DISCOVERY/board.mk
include $(CHIBIOS)/os/hal/ports/STM32/STM32L1xx/platform.mk
+include $(CHIBIOS)/os/hal/boards/ST_STM32L_DISCOVERY/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_stm32l1xx.mk
-#include $(CHIBIOS)/test/rt/test.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
-LDSCRIPT= $(PORTLD)/STM32L152xB.ld
+LDSCRIPT= $(STARTUPLD)/STM32L152xB.ld
# C sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
-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
@@ -123,10 +134,10 @@ TCSRC =
TCPPSRC =
# List ASM source files here
-ASMSRC = $(PORTASM)
+ASMSRC = $(STARTUPASM) $(PORTASM) $(OSALASM)
-INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \
- $(HALINC) $(OSALINC) $(PLATFORMINC) $(BOARDINC) \
+INCDIR = $(STARTUPINC) $(KERNINC) $(PORTINC) $(OSALINC) \
+ $(HALINC) $(PLATFORMINC) $(BOARDINC) $(TESTINC) \
$(CHIBIOS)/os/various
#
@@ -137,7 +148,7 @@ INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \
# Compiler settings
#
-MCU = cortex-m3
+MCU = cortex-m4
#TRGT = arm-elf-
TRGT = arm-none-eabi-
diff --git a/testhal/STM32/STM32L1xx/PWM-ICU/Makefile b/testhal/STM32/STM32L1xx/PWM-ICU/Makefile
index 9cd12e17d..9d4785aa1 100644
--- a/testhal/STM32/STM32L1xx/PWM-ICU/Makefile
+++ b/testhal/STM32/STM32L1xx/PWM-ICU/Makefile
@@ -63,6 +63,11 @@ ifeq ($(USE_EXCEPTIONS_STACKSIZE),)
USE_EXCEPTIONS_STACKSIZE = 0x400
endif
+# Enables the use of FPU on Cortex-M4 (no, softfp, hard).
+ifeq ($(USE_FPU),)
+ USE_FPU = no
+endif
+
#
# Architecture or project specific options
##############################################################################
@@ -76,26 +81,32 @@ PROJECT = ch
# Imported source files and paths
CHIBIOS = ../../../..
+# Startup files.
+include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/startup_stm32l1xx.mk
+# HAL-OSAL files (optional).
include $(CHIBIOS)/os/hal/hal.mk
-include $(CHIBIOS)/os/hal/boards/ST_STM32L_DISCOVERY/board.mk
include $(CHIBIOS)/os/hal/ports/STM32/STM32L1xx/platform.mk
+include $(CHIBIOS)/os/hal/boards/ST_STM32L_DISCOVERY/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_stm32l1xx.mk
-#include $(CHIBIOS)/test/rt/test.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
-LDSCRIPT= $(PORTLD)/STM32L152xB.ld
+LDSCRIPT= $(STARTUPLD)/STM32L152xB.ld
# C sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
-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
@@ -123,10 +134,10 @@ TCSRC =
TCPPSRC =
# List ASM source files here
-ASMSRC = $(PORTASM)
+ASMSRC = $(STARTUPASM) $(PORTASM) $(OSALASM)
-INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \
- $(HALINC) $(OSALINC) $(PLATFORMINC) $(BOARDINC) \
+INCDIR = $(STARTUPINC) $(KERNINC) $(PORTINC) $(OSALINC) \
+ $(HALINC) $(PLATFORMINC) $(BOARDINC) $(TESTINC) \
$(CHIBIOS)/os/various
#
@@ -137,7 +148,7 @@ INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \
# Compiler settings
#
-MCU = cortex-m3
+MCU = cortex-m4
#TRGT = arm-elf-
TRGT = arm-none-eabi-
diff --git a/testhal/STM32/STM32L1xx/SPI/Makefile b/testhal/STM32/STM32L1xx/SPI/Makefile
index 9cd12e17d..9d4785aa1 100644
--- a/testhal/STM32/STM32L1xx/SPI/Makefile
+++ b/testhal/STM32/STM32L1xx/SPI/Makefile
@@ -63,6 +63,11 @@ ifeq ($(USE_EXCEPTIONS_STACKSIZE),)
USE_EXCEPTIONS_STACKSIZE = 0x400
endif
+# Enables the use of FPU on Cortex-M4 (no, softfp, hard).
+ifeq ($(USE_FPU),)
+ USE_FPU = no
+endif
+
#
# Architecture or project specific options
##############################################################################
@@ -76,26 +81,32 @@ PROJECT = ch
# Imported source files and paths
CHIBIOS = ../../../..
+# Startup files.
+include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/startup_stm32l1xx.mk
+# HAL-OSAL files (optional).
include $(CHIBIOS)/os/hal/hal.mk
-include $(CHIBIOS)/os/hal/boards/ST_STM32L_DISCOVERY/board.mk
include $(CHIBIOS)/os/hal/ports/STM32/STM32L1xx/platform.mk
+include $(CHIBIOS)/os/hal/boards/ST_STM32L_DISCOVERY/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_stm32l1xx.mk
-#include $(CHIBIOS)/test/rt/test.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
-LDSCRIPT= $(PORTLD)/STM32L152xB.ld
+LDSCRIPT= $(STARTUPLD)/STM32L152xB.ld
# C sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
-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
@@ -123,10 +134,10 @@ TCSRC =
TCPPSRC =
# List ASM source files here
-ASMSRC = $(PORTASM)
+ASMSRC = $(STARTUPASM) $(PORTASM) $(OSALASM)
-INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \
- $(HALINC) $(OSALINC) $(PLATFORMINC) $(BOARDINC) \
+INCDIR = $(STARTUPINC) $(KERNINC) $(PORTINC) $(OSALINC) \
+ $(HALINC) $(PLATFORMINC) $(BOARDINC) $(TESTINC) \
$(CHIBIOS)/os/various
#
@@ -137,7 +148,7 @@ INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \
# Compiler settings
#
-MCU = cortex-m3
+MCU = cortex-m4
#TRGT = arm-elf-
TRGT = arm-none-eabi-
diff --git a/testhal/STM32/STM32L1xx/UART/Makefile b/testhal/STM32/STM32L1xx/UART/Makefile
index 9cd12e17d..9d4785aa1 100644
--- a/testhal/STM32/STM32L1xx/UART/Makefile
+++ b/testhal/STM32/STM32L1xx/UART/Makefile
@@ -63,6 +63,11 @@ ifeq ($(USE_EXCEPTIONS_STACKSIZE),)
USE_EXCEPTIONS_STACKSIZE = 0x400
endif
+# Enables the use of FPU on Cortex-M4 (no, softfp, hard).
+ifeq ($(USE_FPU),)
+ USE_FPU = no
+endif
+
#
# Architecture or project specific options
##############################################################################
@@ -76,26 +81,32 @@ PROJECT = ch
# Imported source files and paths
CHIBIOS = ../../../..
+# Startup files.
+include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/startup_stm32l1xx.mk
+# HAL-OSAL files (optional).
include $(CHIBIOS)/os/hal/hal.mk
-include $(CHIBIOS)/os/hal/boards/ST_STM32L_DISCOVERY/board.mk
include $(CHIBIOS)/os/hal/ports/STM32/STM32L1xx/platform.mk
+include $(CHIBIOS)/os/hal/boards/ST_STM32L_DISCOVERY/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_stm32l1xx.mk
-#include $(CHIBIOS)/test/rt/test.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
-LDSCRIPT= $(PORTLD)/STM32L152xB.ld
+LDSCRIPT= $(STARTUPLD)/STM32L152xB.ld
# C sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
-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
@@ -123,10 +134,10 @@ TCSRC =
TCPPSRC =
# List ASM source files here
-ASMSRC = $(PORTASM)
+ASMSRC = $(STARTUPASM) $(PORTASM) $(OSALASM)
-INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \
- $(HALINC) $(OSALINC) $(PLATFORMINC) $(BOARDINC) \
+INCDIR = $(STARTUPINC) $(KERNINC) $(PORTINC) $(OSALINC) \
+ $(HALINC) $(PLATFORMINC) $(BOARDINC) $(TESTINC) \
$(CHIBIOS)/os/various
#
@@ -137,7 +148,7 @@ INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \
# Compiler settings
#
-MCU = cortex-m3
+MCU = cortex-m4
#TRGT = arm-elf-
TRGT = arm-none-eabi-