From 4cd975affe635e7e635a76eafd2b0f9b4b747e07 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Sat, 28 Mar 2015 09:12:09 +0000 Subject: [PATCH] Improved makefiles on STM32F4xx. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7823 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- demos/STM32/RT-STM32F401RE-NUCLEO/Makefile | 24 +++-- .../RT-STM32F407-DISCOVERY-G++/.cproject | 52 ++++++++++ .../STM32/RT-STM32F407-DISCOVERY-G++/.project | 95 +++++++++++++++++++ .../STM32/RT-STM32F407-DISCOVERY-G++/Makefile | 35 ++++--- ...COVERY-G++ (OpenOCD, Flash and Run).launch | 52 ++++++++++ .../RT-STM32F407-DISCOVERY-MEMS/.cproject | 2 +- .../RT-STM32F407-DISCOVERY-MEMS/Makefile | 24 +++-- demos/STM32/RT-STM32F407-DISCOVERY/.cproject | 2 +- demos/STM32/RT-STM32F407-DISCOVERY/Makefile | 24 +++-- .../.cproject | 28 +++--- .../Makefile | 28 +++--- demos/STM32/RT-STM32F411RE-NUCLEO/.cproject | 4 +- demos/STM32/RT-STM32F411RE-NUCLEO/Makefile | 24 +++-- demos/STM32/RT-STM32F429-DISCOVERY/.cproject | 13 ++- demos/STM32/RT-STM32F429-DISCOVERY/Makefile | 24 +++-- demos/various/NIL-ARMCM4-GENERIC/Makefile | 40 ++++---- demos/various/RT-ARMCM4-GENERIC/Makefile | 41 ++++---- demos/various/RT-ARMCM4-GENERIC/ch.ld | 47 --------- .../compilers/GCC/mk/port_generic_cm4.mk | 12 --- .../ARMCMx/compilers/GCC/mk/port_stm32f4xx.mk | 15 --- .../ports/ARMCMx/compilers/GCC/mk/port_v7m.mk | 8 ++ .../compilers/GCC/mk/port_generic_cm4.mk | 12 --- .../ARMCMx/compilers/GCC/mk/port_stm32f4xx.mk | 15 --- .../ports/ARMCMx/compilers/GCC/mk/port_v7m.mk | 8 ++ testhal/STM32/STM32F0xx/ADC/.cproject | 10 +- testhal/STM32/STM32F4xx/ADC/Makefile | 24 +++-- testhal/STM32/STM32F4xx/CAN/Makefile | 24 +++-- testhal/STM32/STM32F4xx/DAC/Makefile | 24 +++-- testhal/STM32/STM32F4xx/DMA_STORM/Makefile | 24 +++-- testhal/STM32/STM32F4xx/EXT/Makefile | 24 +++-- testhal/STM32/STM32F4xx/GPT/Makefile | 24 +++-- testhal/STM32/STM32F4xx/I2C/Makefile | 24 +++-- testhal/STM32/STM32F4xx/I2S/Makefile | 24 +++-- testhal/STM32/STM32F4xx/IRQ_STORM/Makefile | 24 +++-- .../STM32/STM32F4xx/IRQ_STORM_FPU/Makefile | 24 +++-- testhal/STM32/STM32F4xx/PWM-ICU/Makefile | 24 +++-- testhal/STM32/STM32F4xx/RTC/Makefile | 26 +++-- testhal/STM32/STM32F4xx/RTC/main.c | 4 +- testhal/STM32/STM32F4xx/SDC/Makefile | 24 +++-- testhal/STM32/STM32F4xx/SPI/Makefile | 24 +++-- testhal/STM32/STM32F4xx/UART/Makefile | 24 +++-- testhal/STM32/STM32F4xx/USB_CDC/Makefile | 24 +++-- testhal/STM32/STM32F4xx/USB_CDC_IAD/Makefile | 24 +++-- 43 files changed, 660 insertions(+), 393 deletions(-) create mode 100644 demos/STM32/RT-STM32F407-DISCOVERY-G++/.cproject create mode 100644 demos/STM32/RT-STM32F407-DISCOVERY-G++/.project create mode 100644 demos/STM32/RT-STM32F407-DISCOVERY-G++/debug/RT-STM32F407-DISCOVERY-G++ (OpenOCD, Flash and Run).launch delete mode 100644 demos/various/RT-ARMCM4-GENERIC/ch.ld delete mode 100644 os/nil/ports/ARMCMx/compilers/GCC/mk/port_generic_cm4.mk delete mode 100644 os/nil/ports/ARMCMx/compilers/GCC/mk/port_stm32f4xx.mk create mode 100644 os/nil/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk delete mode 100644 os/rt/ports/ARMCMx/compilers/GCC/mk/port_generic_cm4.mk delete mode 100644 os/rt/ports/ARMCMx/compilers/GCC/mk/port_stm32f4xx.mk create mode 100644 os/rt/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk diff --git a/demos/STM32/RT-STM32F401RE-NUCLEO/Makefile b/demos/STM32/RT-STM32F401RE-NUCLEO/Makefile index 1ad9d7bc8..c9055319c 100644 --- a/demos/STM32/RT-STM32F401RE-NUCLEO/Makefile +++ b/demos/STM32/RT-STM32F401RE-NUCLEO/Makefile @@ -81,26 +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/boards/ST_NUCLEO_F401RE/board.mk include $(CHIBIOS)/os/hal/ports/STM32/STM32F4xx/platform.mk +include $(CHIBIOS)/os/hal/boards/ST_NUCLEO_F401RE/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_stm32f4xx.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)/STM32F401xE.ld +LDSCRIPT= $(STARTUPLD)/STM32F401xE.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/demos/STM32/RT-STM32F407-DISCOVERY-G++/.cproject b/demos/STM32/RT-STM32F407-DISCOVERY-G++/.cproject new file mode 100644 index 000000000..d6f18bf89 --- /dev/null +++ b/demos/STM32/RT-STM32F407-DISCOVERY-G++/.cproject @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/demos/STM32/RT-STM32F407-DISCOVERY-G++/.project b/demos/STM32/RT-STM32F407-DISCOVERY-G++/.project new file mode 100644 index 000000000..c42e56612 --- /dev/null +++ b/demos/STM32/RT-STM32F407-DISCOVERY-G++/.project @@ -0,0 +1,95 @@ + + + RT-STM32F407-DISCOVERY-G++ + + + + + + org.eclipse.cdt.managedbuilder.core.genmakebuilder + clean,full,incremental, + + + ?name? + + + + org.eclipse.cdt.make.core.append_environment + true + + + org.eclipse.cdt.make.core.autoBuildTarget + all + + + org.eclipse.cdt.make.core.buildArguments + -j1 + + + org.eclipse.cdt.make.core.buildCommand + make + + + org.eclipse.cdt.make.core.cleanBuildTarget + clean + + + org.eclipse.cdt.make.core.contents + org.eclipse.cdt.make.core.activeConfigSettings + + + org.eclipse.cdt.make.core.enableAutoBuild + false + + + org.eclipse.cdt.make.core.enableCleanBuild + true + + + org.eclipse.cdt.make.core.enableFullBuild + true + + + org.eclipse.cdt.make.core.fullBuildTarget + all + + + org.eclipse.cdt.make.core.stopOnError + true + + + org.eclipse.cdt.make.core.useDefaultBuildCmd + true + + + + + org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder + full,incremental, + + + + + + org.eclipse.cdt.core.cnature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + org.eclipse.cdt.managedbuilder.core.ScannerConfigNature + + + + board + 2 + CHIBIOS/os/hal/boards/ST_STM32F4_DISCOVERY + + + os + 2 + CHIBIOS/os + + + test + 2 + CHIBIOS/test + + + diff --git a/demos/STM32/RT-STM32F407-DISCOVERY-G++/Makefile b/demos/STM32/RT-STM32F407-DISCOVERY-G++/Makefile index b89c2eed9..b1883dcb1 100644 --- a/demos/STM32/RT-STM32F407-DISCOVERY-G++/Makefile +++ b/demos/STM32/RT-STM32F407-DISCOVERY-G++/Makefile @@ -81,32 +81,33 @@ 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/boards/ST_STM32F4_DISCOVERY/board.mk include $(CHIBIOS)/os/hal/ports/STM32/STM32F4xx/platform.mk +include $(CHIBIOS)/os/hal/boards/ST_STM32F4_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_stm32f4xx.mk +include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk +# Other files (optional). include $(CHIBIOS)/test/rt/test.mk include $(CHIBIOS)/os/various/cpp_wrappers/chcpp.mk # Define linker script file here -LDSCRIPT= $(PORTLD)/STM32F407xG.ld +LDSCRIPT= $(STARTUPLD)/STM32F407xG.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) \ - $(CHIBIOS)/os/various/devices_lib/accel/lis302dl.c \ - $(CHIBIOS)/os/various/shell.c \ - $(CHIBIOS)/os/hal/lib/streams/memstreams.c \ - $(CHIBIOS)/os/hal/lib/streams/chprintf.c \ - $(CHIBIOS)/os/various/syscalls.c \ + $(TESTSRC) # C++ sources that can be compiled in ARM or THUMB mode depending on the global # setting. @@ -134,14 +135,11 @@ TCSRC = TCPPSRC = # List ASM source files here -ASMSRC = $(PORTASM) +ASMSRC = $(STARTUPASM) $(PORTASM) $(OSALASM) -INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \ - $(HALINC) $(OSALINC) $(PLATFORMINC) $(BOARDINC) \ - $(CHIBIOS)/os/various/devices_lib/accel \ - $(CHIBIOS)/os/various \ - $(CHIBIOS)/os/various/cpp_wrappers \ - $(CHIBIOS)/os/hal/lib/streams +INCDIR = $(STARTUPINC) $(KERNINC) $(PORTINC) $(OSALINC) \ + $(HALINC) $(PLATFORMINC) $(BOARDINC) $(TESTINC) \ + $(CHCPPINC) $(CHIBIOS)/os/various # # Project, sources and paths @@ -169,7 +167,6 @@ OD = $(TRGT)objdump SZ = $(TRGT)size HEX = $(CP) -O ihex BIN = $(CP) -O binary -SREC = $(CP) -O srec # ARM-specific options here AOPT = diff --git a/demos/STM32/RT-STM32F407-DISCOVERY-G++/debug/RT-STM32F407-DISCOVERY-G++ (OpenOCD, Flash and Run).launch b/demos/STM32/RT-STM32F407-DISCOVERY-G++/debug/RT-STM32F407-DISCOVERY-G++ (OpenOCD, Flash and Run).launch new file mode 100644 index 000000000..34c552911 --- /dev/null +++ b/demos/STM32/RT-STM32F407-DISCOVERY-G++/debug/RT-STM32F407-DISCOVERY-G++ (OpenOCD, Flash and Run).launch @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/demos/STM32/RT-STM32F407-DISCOVERY-MEMS/.cproject b/demos/STM32/RT-STM32F407-DISCOVERY-MEMS/.cproject index 4c0ec4132..ed0bb07d9 100644 --- a/demos/STM32/RT-STM32F407-DISCOVERY-MEMS/.cproject +++ b/demos/STM32/RT-STM32F407-DISCOVERY-MEMS/.cproject @@ -39,7 +39,7 @@ - + diff --git a/demos/STM32/RT-STM32F407-DISCOVERY-MEMS/Makefile b/demos/STM32/RT-STM32F407-DISCOVERY-MEMS/Makefile index 8653fa10e..dafaed5c0 100644 --- a/demos/STM32/RT-STM32F407-DISCOVERY-MEMS/Makefile +++ b/demos/STM32/RT-STM32F407-DISCOVERY-MEMS/Makefile @@ -81,26 +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/boards/ST_STM32F4_DISCOVERY/board.mk include $(CHIBIOS)/os/hal/ports/STM32/STM32F4xx/platform.mk +include $(CHIBIOS)/os/hal/boards/ST_STM32F4_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_stm32f4xx.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)/STM32F407xG.ld +LDSCRIPT= $(STARTUPLD)/STM32F407xG.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/devices_lib/accel/lis302dl.c \ $(CHIBIOS)/os/various/shell.c \ $(CHIBIOS)/os/hal/lib/streams/memstreams.c \ @@ -132,10 +138,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/devices_lib/accel \ $(CHIBIOS)/os/hal/lib/streams $(CHIBIOS)/os/various diff --git a/demos/STM32/RT-STM32F407-DISCOVERY/.cproject b/demos/STM32/RT-STM32F407-DISCOVERY/.cproject index 72f67ff4d..f7b704f20 100644 --- a/demos/STM32/RT-STM32F407-DISCOVERY/.cproject +++ b/demos/STM32/RT-STM32F407-DISCOVERY/.cproject @@ -39,7 +39,7 @@ - + diff --git a/demos/STM32/RT-STM32F407-DISCOVERY/Makefile b/demos/STM32/RT-STM32F407-DISCOVERY/Makefile index eb2f10684..e56e7e88c 100644 --- a/demos/STM32/RT-STM32F407-DISCOVERY/Makefile +++ b/demos/STM32/RT-STM32F407-DISCOVERY/Makefile @@ -81,26 +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/boards/ST_STM32F4_DISCOVERY/board.mk include $(CHIBIOS)/os/hal/ports/STM32/STM32F4xx/platform.mk +include $(CHIBIOS)/os/hal/boards/ST_STM32F4_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_stm32f4xx.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)/STM32F407xG.ld +LDSCRIPT= $(STARTUPLD)/STM32F407xG.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/demos/STM32/RT-STM32F407-OLIMEX_E407-LWIP-FATFS-USB/.cproject b/demos/STM32/RT-STM32F407-OLIMEX_E407-LWIP-FATFS-USB/.cproject index 3dece31c0..5c5a27f7a 100644 --- a/demos/STM32/RT-STM32F407-OLIMEX_E407-LWIP-FATFS-USB/.cproject +++ b/demos/STM32/RT-STM32F407-OLIMEX_E407-LWIP-FATFS-USB/.cproject @@ -5,13 +5,13 @@ + - @@ -22,24 +22,18 @@ - - + - - + - - + @@ -50,6 +44,7 @@ + @@ -58,5 +53,10 @@ - + + + + + + diff --git a/demos/STM32/RT-STM32F407-OLIMEX_E407-LWIP-FATFS-USB/Makefile b/demos/STM32/RT-STM32F407-OLIMEX_E407-LWIP-FATFS-USB/Makefile index b5baf594a..13b697eb0 100644 --- a/demos/STM32/RT-STM32F407-OLIMEX_E407-LWIP-FATFS-USB/Makefile +++ b/demos/STM32/RT-STM32F407-OLIMEX_E407-LWIP-FATFS-USB/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. @@ -81,28 +81,34 @@ 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/boards/OLIMEX_STM32_E407_REV_D/board.mk include $(CHIBIOS)/os/hal/ports/STM32/STM32F4xx/platform.mk +include $(CHIBIOS)/os/hal/boards/OLIMEX_STM32_E407/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_stm32f4xx.mk +include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk +# Other files (optional). +include $(CHIBIOS)/test/rt/test.mk include $(CHIBIOS)/os/various/lwip_bindings/lwip.mk include $(CHIBIOS)/os/various/fatfs_bindings/fatfs.mk -include $(CHIBIOS)/test/rt/test.mk # Define linker script file here -LDSCRIPT= $(PORTLD)/STM32F407xG.ld +LDSCRIPT= $(STARTUPLD)/STM32F407xG.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) \ $(LWSRC) \ $(FATFSSRC) \ $(CHIBIOS)/os/various/evtimer.c \ @@ -136,10 +142,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) \ $(LWINC) $(FATFSINC) \ $(CHIBIOS)/os/hal/lib/streams $(CHIBIOS)/os/various diff --git a/demos/STM32/RT-STM32F411RE-NUCLEO/.cproject b/demos/STM32/RT-STM32F411RE-NUCLEO/.cproject index 209060fd4..f0beab8d0 100644 --- a/demos/STM32/RT-STM32F411RE-NUCLEO/.cproject +++ b/demos/STM32/RT-STM32F411RE-NUCLEO/.cproject @@ -1,7 +1,5 @@ - - - + diff --git a/demos/STM32/RT-STM32F411RE-NUCLEO/Makefile b/demos/STM32/RT-STM32F411RE-NUCLEO/Makefile index 1681fc58c..f47158d83 100644 --- a/demos/STM32/RT-STM32F411RE-NUCLEO/Makefile +++ b/demos/STM32/RT-STM32F411RE-NUCLEO/Makefile @@ -81,26 +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/boards/ST_NUCLEO_F411RE/board.mk include $(CHIBIOS)/os/hal/ports/STM32/STM32F4xx/platform.mk +include $(CHIBIOS)/os/hal/boards/ST_NUCLEO_F411RE/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_stm32f4xx.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)/STM32F411xE.ld +LDSCRIPT= $(STARTUPLD)/STM32F411xE.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/demos/STM32/RT-STM32F429-DISCOVERY/.cproject b/demos/STM32/RT-STM32F429-DISCOVERY/.cproject index 4c0ec4132..c087bd223 100644 --- a/demos/STM32/RT-STM32F429-DISCOVERY/.cproject +++ b/demos/STM32/RT-STM32F429-DISCOVERY/.cproject @@ -1,7 +1,5 @@ - - - + @@ -39,7 +37,7 @@ - + @@ -48,5 +46,10 @@ - + + + + + + diff --git a/demos/STM32/RT-STM32F429-DISCOVERY/Makefile b/demos/STM32/RT-STM32F429-DISCOVERY/Makefile index f7f573db6..088c2370f 100644 --- a/demos/STM32/RT-STM32F429-DISCOVERY/Makefile +++ b/demos/STM32/RT-STM32F429-DISCOVERY/Makefile @@ -81,26 +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/boards/ST_STM32F429I_DISCOVERY/board.mk include $(CHIBIOS)/os/hal/ports/STM32/STM32F4xx/platform.mk +include $(CHIBIOS)/os/hal/boards/ST_STM32F429I_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_stm32f4xx.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)/STM32F429xI.ld +LDSCRIPT= $(STARTUPLD)/STM32F429xI.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/demos/various/NIL-ARMCM4-GENERIC/Makefile b/demos/various/NIL-ARMCM4-GENERIC/Makefile index 4a21e8cbc..7f1879aa5 100644 --- a/demos/various/NIL-ARMCM4-GENERIC/Makefile +++ b/demos/various/NIL-ARMCM4-GENERIC/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,16 +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/ports/STM32/STM32F4xx/platform.mk +#include $(CHIBIOS)/os/hal/boards/ST_STM32F4_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/nil/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk +# Other files (optional). +#include $(CHIBIOS)/test/nil/test.mk # Define linker script file here -LDSCRIPT = ch.ld +LDSCRIPT= $(STARTUPLD)/STM32F407xG.ld # C sources that can be compiled in ARM or THUMB mode depending on the global # setting. -CSRC = $(PORTSRC) \ +CSRC = $(STARTUPSRC) \ $(KERNSRC) \ + $(PORTSRC) \ + $(OSALSRC) \ + $(HALSRC) \ + $(PLATFORMSRC) \ + $(BOARDSRC) \ + $(TESTSRC) \ main.c # C++ sources that can be compiled in ARM or THUMB mode depending on the global @@ -118,13 +134,11 @@ TCSRC = TCPPSRC = # List ASM source files here -ASMSRC = $(PORTASM) +ASMSRC = $(STARTUPASM) $(PORTASM) $(OSALASM) -INCDIR = $(PORTINC) $(KERNINC) - -# Make this point to your CMSIS and chparams.h headers. -INCDIR += $(CHIBIOS)/os/ext/CMSIS/ST \ - $(CHIBIOS)/os/common/ports/ARMCMx/devices/STM32F4xx +INCDIR = $(STARTUPINC) $(KERNINC) $(PORTINC) $(OSALINC) \ + $(HALINC) $(PLATFORMINC) $(BOARDINC) $(TESTINC) \ + $(CHIBIOS)/os/various # # Project, sources and paths @@ -194,9 +208,3 @@ ULIBS = RULESPATH = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC include $(RULESPATH)/rules.mk - -############################################################################## -# MISRA check rule, requires PCLint and the setup files, not provided. -# -misra: - @lint-nt -v -w3 $(DEFS) pclint/co-gcc.lnt pclint/au-misra3.lnt pclint/waivers.lnt $(IINCDIR) $(CSRC) &> misra.txt diff --git a/demos/various/RT-ARMCM4-GENERIC/Makefile b/demos/various/RT-ARMCM4-GENERIC/Makefile index 719585ddc..cbfde6f61 100644 --- a/demos/various/RT-ARMCM4-GENERIC/Makefile +++ b/demos/various/RT-ARMCM4-GENERIC/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,16 +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/ports/STM32/STM32F4xx/platform.mk +#include $(CHIBIOS)/os/hal/boards/ST_STM32F4_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_generic_cm4.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= ch.ld +LDSCRIPT= $(STARTUPLD)/STM32F407xG.ld # C sources that can be compiled in ARM or THUMB mode depending on the global # setting. -CSRC = $(PORTSRC) \ +CSRC = $(STARTUPSRC) \ $(KERNSRC) \ + $(PORTSRC) \ + $(OSALSRC) \ + $(HALSRC) \ + $(PLATFORMSRC) \ + $(BOARDSRC) \ + $(TESTSRC) \ main.c # C++ sources that can be compiled in ARM or THUMB mode depending on the global @@ -118,14 +134,11 @@ TCSRC = TCPPSRC = # List ASM source files here -ASMSRC = $(PORTASM) +ASMSRC = $(STARTUPASM) $(PORTASM) $(OSALASM) -# List of the standard inclusion directories. -INCDIR = $(PORTINC) $(KERNINC) - -# Make this point to your CMSIS and chparams.h headers. -INCDIR += $(CHIBIOS)/os/ext/CMSIS/ST \ - $(CHIBIOS)/os/common/ports/ARMCMx/devices/STM32F4xx +INCDIR = $(STARTUPINC) $(KERNINC) $(PORTINC) $(OSALINC) \ + $(HALINC) $(PLATFORMINC) $(BOARDINC) $(TESTINC) \ + $(CHIBIOS)/os/various # # Project, sources and paths @@ -195,9 +208,3 @@ ULIBS = RULESPATH = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC include $(RULESPATH)/rules.mk - -############################################################################## -# MISRA check rule, requires PCLint and the setup files, not provided. -# -misra: - @lint-nt -v -w3 $(DEFS) pclint/co-gcc.lnt pclint/au-misra3.lnt pclint/waivers.lnt $(IINCDIR) $(CSRC) &> misra.txt diff --git a/demos/various/RT-ARMCM4-GENERIC/ch.ld b/demos/various/RT-ARMCM4-GENERIC/ch.ld deleted file mode 100644 index d04a6c4ed..000000000 --- a/demos/various/RT-ARMCM4-GENERIC/ch.ld +++ /dev/null @@ -1,47 +0,0 @@ -/* - ChibiOS - Copyright (C) 2006..2015 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. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -/* - * Generic device memory setup, customize it for your device. - */ -MEMORY -{ - flash : org = 0x08000000, len = 64k - ram0 : org = 0x20000000, len = 8k - ram1 : org = 0x00000000, len = 0 - ram2 : org = 0x00000000, len = 0 - ram3 : org = 0x00000000, len = 0 - ram4 : org = 0x00000000, len = 0 - ram5 : org = 0x00000000, len = 0 - ram6 : org = 0x00000000, len = 0 - ram7 : org = 0x00000000, len = 0 -} - -/* RAM region to be used for Main stack. This stack accommodates the processing - of all exceptions and interrupts*/ -REGION_ALIAS("MAIN_STACK_RAM", ram0); - -/* RAM region to be used for the process stack. This is the stack used by - the main() function.*/ -REGION_ALIAS("PROCESS_STACK_RAM", ram0); - -/* RAM region to be used for data segment.*/ -REGION_ALIAS("DATA_RAM", ram0); - -/* RAM region to be used for BSS segment.*/ -REGION_ALIAS("BSS_RAM", ram0); - -INCLUDE rules.ld diff --git a/os/nil/ports/ARMCMx/compilers/GCC/mk/port_generic_cm4.mk b/os/nil/ports/ARMCMx/compilers/GCC/mk/port_generic_cm4.mk deleted file mode 100644 index 4449d4c14..000000000 --- a/os/nil/ports/ARMCMx/compilers/GCC/mk/port_generic_cm4.mk +++ /dev/null @@ -1,12 +0,0 @@ -# List of the ChibiOS/NIL Cortex-M4 generic port files. -PORTSRC = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/crt0.c \ - $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/vectors.c \ - ${CHIBIOS}/os/nil/ports/ARMCMx/nilcore.c \ - ${CHIBIOS}/os/nil/ports/ARMCMx/nilcore_v7m.c - -PORTASM = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/crt0_v7m.s \ - $(CHIBIOS)/os/nil/ports/ARMCMx/compilers/GCC/nilcoreasm_v7m.s - -PORTINC = ${CHIBIOS}/os/ext/CMSIS/include \ - ${CHIBIOS}/os/nil/ports/ARMCMx \ - ${CHIBIOS}/os/nil/ports/ARMCMx/compilers/GCC diff --git a/os/nil/ports/ARMCMx/compilers/GCC/mk/port_stm32f4xx.mk b/os/nil/ports/ARMCMx/compilers/GCC/mk/port_stm32f4xx.mk deleted file mode 100644 index 9e484696c..000000000 --- a/os/nil/ports/ARMCMx/compilers/GCC/mk/port_stm32f4xx.mk +++ /dev/null @@ -1,15 +0,0 @@ -# List of the ChibiOS/NIL Cortex-M4 STM32F4xx port files. -include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/startup_stm32f4xx.mk - -PORTSRC = $(STARTUPSRC) \ - $(CHIBIOS)/os/nil/ports/ARMCMx/nilcore.c \ - $(CHIBIOS)/os/nil/ports/ARMCMx/nilcore_v7m.c - -PORTASM = $(STARTUPASM) \ - $(CHIBIOS)/os/nil/ports/ARMCMx/compilers/GCC/nilcoreasm_v7m.s - -PORTINC = $(STARTUPINC) \ - $(CHIBIOS)/os/nil/ports/ARMCMx \ - $(CHIBIOS)/os/nil/ports/ARMCMx/compilers/GCC - -PORTLD = $(STARTUPLD) diff --git a/os/nil/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk b/os/nil/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk new file mode 100644 index 000000000..3e9c30125 --- /dev/null +++ b/os/nil/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk @@ -0,0 +1,8 @@ +# List of the ChibiOS/NIL ARMv7M generic port files. +PORTSRC = $(CHIBIOS)/os/nil/ports/ARMCMx/nilcore.c \ + $(CHIBIOS)/os/nil/ports/ARMCMx/nilcore_v7m.c + +PORTASM = $(CHIBIOS)/os/nil/ports/ARMCMx/compilers/GCC/nilcoreasm_v7m.s + +PORTINC = $(CHIBIOS)/os/nil/ports/ARMCMx \ + $(CHIBIOS)/os/nil/ports/ARMCMx/compilers/GCC diff --git a/os/rt/ports/ARMCMx/compilers/GCC/mk/port_generic_cm4.mk b/os/rt/ports/ARMCMx/compilers/GCC/mk/port_generic_cm4.mk deleted file mode 100644 index fae6a9086..000000000 --- a/os/rt/ports/ARMCMx/compilers/GCC/mk/port_generic_cm4.mk +++ /dev/null @@ -1,12 +0,0 @@ -# List of the ChibiOS/RT Cortex-M4 generic port files. -PORTSRC = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/crt0.c \ - $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/vectors.c \ - $(CHIBIOS)/os/rt/ports/ARMCMx/chcore.c \ - $(CHIBIOS)/os/rt/ports/ARMCMx/chcore_v7m.c - -PORTASM = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/crt0_v7m.s \ - $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/chcoreasm_v7m.s - -PORTINC = $(CHIBIOS)/os/ext/CMSIS/include \ - $(CHIBIOS)/os/rt/ports/ARMCMx \ - $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC diff --git a/os/rt/ports/ARMCMx/compilers/GCC/mk/port_stm32f4xx.mk b/os/rt/ports/ARMCMx/compilers/GCC/mk/port_stm32f4xx.mk deleted file mode 100644 index 43d2f21b7..000000000 --- a/os/rt/ports/ARMCMx/compilers/GCC/mk/port_stm32f4xx.mk +++ /dev/null @@ -1,15 +0,0 @@ -# List of the ChibiOS/RT Cortex-M4 STM32F4xx port files. -include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/startup_stm32f4xx.mk - -PORTSRC = $(STARTUPSRC) \ - $(CHIBIOS)/os/rt/ports/ARMCMx/chcore.c \ - $(CHIBIOS)/os/rt/ports/ARMCMx/chcore_v7m.c - -PORTASM = $(STARTUPASM) \ - $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/chcoreasm_v7m.s - -PORTINC = $(STARTUPINC) \ - $(CHIBIOS)/os/rt/ports/ARMCMx \ - $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC - -PORTLD = $(STARTUPLD) diff --git a/os/rt/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk b/os/rt/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk new file mode 100644 index 000000000..6a8e97545 --- /dev/null +++ b/os/rt/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk @@ -0,0 +1,8 @@ +# List of the ChibiOS/RT ARMv7M generic port files. +PORTSRC = $(CHIBIOS)/os/rt/ports/ARMCMx/chcore.c \ + $(CHIBIOS)/os/rt/ports/ARMCMx/chcore_v7m.c + +PORTASM = $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/chcoreasm_v7m.s + +PORTINC = $(CHIBIOS)/os/rt/ports/ARMCMx \ + $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC diff --git a/testhal/STM32/STM32F0xx/ADC/.cproject b/testhal/STM32/STM32F0xx/ADC/.cproject index 6398488ab..fcdc3e128 100644 --- a/testhal/STM32/STM32F0xx/ADC/.cproject +++ b/testhal/STM32/STM32F0xx/ADC/.cproject @@ -1,7 +1,5 @@ - - - + @@ -48,5 +46,9 @@ - + + + + + diff --git a/testhal/STM32/STM32F4xx/ADC/Makefile b/testhal/STM32/STM32F4xx/ADC/Makefile index c3cf505dd..3fec9da36 100644 --- a/testhal/STM32/STM32F4xx/ADC/Makefile +++ b/testhal/STM32/STM32F4xx/ADC/Makefile @@ -81,26 +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/boards/ST_STM32F4_DISCOVERY/board.mk include $(CHIBIOS)/os/hal/ports/STM32/STM32F4xx/platform.mk +include $(CHIBIOS)/os/hal/boards/ST_STM32F4_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_stm32f4xx.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)/STM32F407xG.ld +LDSCRIPT= $(STARTUPLD)/STM32F407xG.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/STM32F4xx/CAN/Makefile b/testhal/STM32/STM32F4xx/CAN/Makefile index c3cf505dd..3fec9da36 100644 --- a/testhal/STM32/STM32F4xx/CAN/Makefile +++ b/testhal/STM32/STM32F4xx/CAN/Makefile @@ -81,26 +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/boards/ST_STM32F4_DISCOVERY/board.mk include $(CHIBIOS)/os/hal/ports/STM32/STM32F4xx/platform.mk +include $(CHIBIOS)/os/hal/boards/ST_STM32F4_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_stm32f4xx.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)/STM32F407xG.ld +LDSCRIPT= $(STARTUPLD)/STM32F407xG.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/STM32F4xx/DAC/Makefile b/testhal/STM32/STM32F4xx/DAC/Makefile index c3cf505dd..3fec9da36 100644 --- a/testhal/STM32/STM32F4xx/DAC/Makefile +++ b/testhal/STM32/STM32F4xx/DAC/Makefile @@ -81,26 +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/boards/ST_STM32F4_DISCOVERY/board.mk include $(CHIBIOS)/os/hal/ports/STM32/STM32F4xx/platform.mk +include $(CHIBIOS)/os/hal/boards/ST_STM32F4_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_stm32f4xx.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)/STM32F407xG.ld +LDSCRIPT= $(STARTUPLD)/STM32F407xG.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/STM32F4xx/DMA_STORM/Makefile b/testhal/STM32/STM32F4xx/DMA_STORM/Makefile index c3cf505dd..3fec9da36 100644 --- a/testhal/STM32/STM32F4xx/DMA_STORM/Makefile +++ b/testhal/STM32/STM32F4xx/DMA_STORM/Makefile @@ -81,26 +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/boards/ST_STM32F4_DISCOVERY/board.mk include $(CHIBIOS)/os/hal/ports/STM32/STM32F4xx/platform.mk +include $(CHIBIOS)/os/hal/boards/ST_STM32F4_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_stm32f4xx.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)/STM32F407xG.ld +LDSCRIPT= $(STARTUPLD)/STM32F407xG.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/STM32F4xx/EXT/Makefile b/testhal/STM32/STM32F4xx/EXT/Makefile index c3cf505dd..3fec9da36 100644 --- a/testhal/STM32/STM32F4xx/EXT/Makefile +++ b/testhal/STM32/STM32F4xx/EXT/Makefile @@ -81,26 +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/boards/ST_STM32F4_DISCOVERY/board.mk include $(CHIBIOS)/os/hal/ports/STM32/STM32F4xx/platform.mk +include $(CHIBIOS)/os/hal/boards/ST_STM32F4_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_stm32f4xx.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)/STM32F407xG.ld +LDSCRIPT= $(STARTUPLD)/STM32F407xG.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/STM32F4xx/GPT/Makefile b/testhal/STM32/STM32F4xx/GPT/Makefile index c3cf505dd..3fec9da36 100644 --- a/testhal/STM32/STM32F4xx/GPT/Makefile +++ b/testhal/STM32/STM32F4xx/GPT/Makefile @@ -81,26 +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/boards/ST_STM32F4_DISCOVERY/board.mk include $(CHIBIOS)/os/hal/ports/STM32/STM32F4xx/platform.mk +include $(CHIBIOS)/os/hal/boards/ST_STM32F4_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_stm32f4xx.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)/STM32F407xG.ld +LDSCRIPT= $(STARTUPLD)/STM32F407xG.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/STM32F4xx/I2C/Makefile b/testhal/STM32/STM32F4xx/I2C/Makefile index 57e5e434c..a7a21bc5e 100644 --- a/testhal/STM32/STM32F4xx/I2C/Makefile +++ b/testhal/STM32/STM32F4xx/I2C/Makefile @@ -81,26 +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/boards/NONSTANDARD_STM32F4_BARTHESS1/board.mk include $(CHIBIOS)/os/hal/ports/STM32/STM32F4xx/platform.mk +include $(CHIBIOS)/os/hal/boards/NONSTANDARD_STM32F4_BARTHESS1/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_stm32f4xx.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)/STM32F407xG.ld +LDSCRIPT= $(STARTUPLD)/STM32F407xG.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/STM32F4xx/I2S/Makefile b/testhal/STM32/STM32F4xx/I2S/Makefile index c3cf505dd..3fec9da36 100644 --- a/testhal/STM32/STM32F4xx/I2S/Makefile +++ b/testhal/STM32/STM32F4xx/I2S/Makefile @@ -81,26 +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/boards/ST_STM32F4_DISCOVERY/board.mk include $(CHIBIOS)/os/hal/ports/STM32/STM32F4xx/platform.mk +include $(CHIBIOS)/os/hal/boards/ST_STM32F4_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_stm32f4xx.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)/STM32F407xG.ld +LDSCRIPT= $(STARTUPLD)/STM32F407xG.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/STM32F4xx/IRQ_STORM/Makefile b/testhal/STM32/STM32F4xx/IRQ_STORM/Makefile index c3cf505dd..3fec9da36 100644 --- a/testhal/STM32/STM32F4xx/IRQ_STORM/Makefile +++ b/testhal/STM32/STM32F4xx/IRQ_STORM/Makefile @@ -81,26 +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/boards/ST_STM32F4_DISCOVERY/board.mk include $(CHIBIOS)/os/hal/ports/STM32/STM32F4xx/platform.mk +include $(CHIBIOS)/os/hal/boards/ST_STM32F4_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_stm32f4xx.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)/STM32F407xG.ld +LDSCRIPT= $(STARTUPLD)/STM32F407xG.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/STM32F4xx/IRQ_STORM_FPU/Makefile b/testhal/STM32/STM32F4xx/IRQ_STORM_FPU/Makefile index b5c632591..94c488700 100644 --- a/testhal/STM32/STM32F4xx/IRQ_STORM_FPU/Makefile +++ b/testhal/STM32/STM32F4xx/IRQ_STORM_FPU/Makefile @@ -81,26 +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/boards/ST_STM32F4_DISCOVERY/board.mk include $(CHIBIOS)/os/hal/ports/STM32/STM32F4xx/platform.mk +include $(CHIBIOS)/os/hal/boards/ST_STM32F4_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_stm32f4xx.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)/STM32F407xG.ld +LDSCRIPT= $(STARTUPLD)/STM32F407xG.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) \ extfunc.c 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/STM32F4xx/PWM-ICU/Makefile b/testhal/STM32/STM32F4xx/PWM-ICU/Makefile index c3cf505dd..3fec9da36 100644 --- a/testhal/STM32/STM32F4xx/PWM-ICU/Makefile +++ b/testhal/STM32/STM32F4xx/PWM-ICU/Makefile @@ -81,26 +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/boards/ST_STM32F4_DISCOVERY/board.mk include $(CHIBIOS)/os/hal/ports/STM32/STM32F4xx/platform.mk +include $(CHIBIOS)/os/hal/boards/ST_STM32F4_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_stm32f4xx.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)/STM32F407xG.ld +LDSCRIPT= $(STARTUPLD)/STM32F407xG.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/STM32F4xx/RTC/Makefile b/testhal/STM32/STM32F4xx/RTC/Makefile index 9eb7f4c8f..9c5034586 100644 --- a/testhal/STM32/STM32F4xx/RTC/Makefile +++ b/testhal/STM32/STM32F4xx/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. @@ -81,26 +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/boards/NONSTANDARD_STM32F4_BARTHESS1/board.mk include $(CHIBIOS)/os/hal/ports/STM32/STM32F4xx/platform.mk +include $(CHIBIOS)/os/hal/boards/NONSTANDARD_STM32F4_BARTHESS1/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_stm32f4xx.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)/STM32F407xG.ld +LDSCRIPT= $(STARTUPLD)/STM32F407xG.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/evtimer.c \ $(CHIBIOS)/os/various/syscalls.c \ $(CHIBIOS)/os/various/shell.c \ @@ -133,10 +139,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/STM32F4xx/RTC/main.c b/testhal/STM32/STM32F4xx/RTC/main.c index fff906a19..1c2b60082 100644 --- a/testhal/STM32/STM32F4xx/RTC/main.c +++ b/testhal/STM32/STM32F4xx/RTC/main.c @@ -144,7 +144,7 @@ static time_t GetTimeUnixSec(void) { struct tm tim; rtcGetTime(&RTCD1, ×pec); - rtcConvertDateTimeToStructTm(×pec, &tim); + rtcConvertDateTimeToStructTm(×pec, &tim, NULL); return mktime(&tim); } @@ -153,7 +153,7 @@ static time_t GetTimeUnixSec(void) { */ static void GetTimeTm(struct tm *timp) { rtcGetTime(&RTCD1, ×pec); - rtcConvertDateTimeToStructTm(×pec, timp); + rtcConvertDateTimeToStructTm(×pec, timp, NULL); } /* diff --git a/testhal/STM32/STM32F4xx/SDC/Makefile b/testhal/STM32/STM32F4xx/SDC/Makefile index 324ac357b..c60993d6e 100644 --- a/testhal/STM32/STM32F4xx/SDC/Makefile +++ b/testhal/STM32/STM32F4xx/SDC/Makefile @@ -81,26 +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/boards/OLIMEX_STM32_E407/board.mk include $(CHIBIOS)/os/hal/ports/STM32/STM32F4xx/platform.mk +include $(CHIBIOS)/os/hal/boards/OLIMEX_STM32_E407/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_stm32f4xx.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)/STM32F407xG.ld +LDSCRIPT= $(STARTUPLD)/STM32F407xG.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/hal/lib/streams/memstreams.c \ $(CHIBIOS)/os/hal/lib/streams/chprintf.c \ $(CHIBIOS)/os/various/shell.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/STM32F4xx/SPI/Makefile b/testhal/STM32/STM32F4xx/SPI/Makefile index c3cf505dd..3fec9da36 100644 --- a/testhal/STM32/STM32F4xx/SPI/Makefile +++ b/testhal/STM32/STM32F4xx/SPI/Makefile @@ -81,26 +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/boards/ST_STM32F4_DISCOVERY/board.mk include $(CHIBIOS)/os/hal/ports/STM32/STM32F4xx/platform.mk +include $(CHIBIOS)/os/hal/boards/ST_STM32F4_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_stm32f4xx.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)/STM32F407xG.ld +LDSCRIPT= $(STARTUPLD)/STM32F407xG.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/STM32F4xx/UART/Makefile b/testhal/STM32/STM32F4xx/UART/Makefile index c3cf505dd..3fec9da36 100644 --- a/testhal/STM32/STM32F4xx/UART/Makefile +++ b/testhal/STM32/STM32F4xx/UART/Makefile @@ -81,26 +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/boards/ST_STM32F4_DISCOVERY/board.mk include $(CHIBIOS)/os/hal/ports/STM32/STM32F4xx/platform.mk +include $(CHIBIOS)/os/hal/boards/ST_STM32F4_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_stm32f4xx.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)/STM32F407xG.ld +LDSCRIPT= $(STARTUPLD)/STM32F407xG.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/STM32F4xx/USB_CDC/Makefile b/testhal/STM32/STM32F4xx/USB_CDC/Makefile index b3791977f..f5134bbfc 100644 --- a/testhal/STM32/STM32F4xx/USB_CDC/Makefile +++ b/testhal/STM32/STM32F4xx/USB_CDC/Makefile @@ -81,26 +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/boards/OLIMEX_STM32_E407/board.mk include $(CHIBIOS)/os/hal/ports/STM32/STM32F4xx/platform.mk +include $(CHIBIOS)/os/hal/boards/OLIMEX_STM32_E407/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_stm32f4xx.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)/STM32F407xG.ld +LDSCRIPT= $(STARTUPLD)/STM32F407xG.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/STM32F4xx/USB_CDC_IAD/Makefile b/testhal/STM32/STM32F4xx/USB_CDC_IAD/Makefile index 94318a1d3..ac65405f0 100644 --- a/testhal/STM32/STM32F4xx/USB_CDC_IAD/Makefile +++ b/testhal/STM32/STM32F4xx/USB_CDC_IAD/Makefile @@ -81,26 +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/boards/OLIMEX_STM32_E407/board.mk include $(CHIBIOS)/os/hal/ports/STM32/STM32F4xx/platform.mk +include $(CHIBIOS)/os/hal/boards/OLIMEX_STM32_E407/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_stm32f4xx.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)/STM32F407xG.ld +LDSCRIPT= $(STARTUPLD)/STM32F407xG.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 #