aboutsummaryrefslogtreecommitdiffstats
path: root/demos
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2018-10-21 16:04:31 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2018-10-21 16:04:31 +0000
commitbe07b2e96c470ee552a27d1ffffa5672a3b47ba0 (patch)
treee48a12769ad432d59f2459ac6e27025fd389f098 /demos
parent76e8100226209876dbb3c0a68c5110491ebf45e7 (diff)
downloadChibiOS-be07b2e96c470ee552a27d1ffffa5672a3b47ba0.tar.gz
ChibiOS-be07b2e96c470ee552a27d1ffffa5672a3b47ba0.tar.bz2
ChibiOS-be07b2e96c470ee552a27d1ffffa5672a3b47ba0.zip
Updated NIL demos with new makefiles.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@12379 110e8d01-0319-4d1e-a829-52ad28d1bb01
Diffstat (limited to 'demos')
-rw-r--r--demos/STM32/NIL-STM32F051-DISCOVERY/Makefile113
-rw-r--r--demos/STM32/NIL-STM32F051-DISCOVERY/cfg/chconf.h (renamed from demos/STM32/NIL-STM32F051-DISCOVERY/chconf.h)0
-rw-r--r--demos/STM32/NIL-STM32F051-DISCOVERY/cfg/halconf.h (renamed from demos/STM32/NIL-STM32F051-DISCOVERY/halconf.h)0
-rw-r--r--demos/STM32/NIL-STM32F051-DISCOVERY/cfg/mcuconf.h (renamed from demos/STM32/NIL-STM32F051-DISCOVERY/mcuconf.h)0
-rw-r--r--demos/STM32/NIL-STM32F100-DISCOVERY/Makefile115
-rw-r--r--demos/STM32/NIL-STM32F100-DISCOVERY/cfg/chconf.h (renamed from demos/STM32/NIL-STM32F100-DISCOVERY/chconf.h)0
-rw-r--r--demos/STM32/NIL-STM32F100-DISCOVERY/cfg/halconf.h (renamed from demos/STM32/NIL-STM32F100-DISCOVERY/halconf.h)0
-rw-r--r--demos/STM32/NIL-STM32F100-DISCOVERY/cfg/mcuconf.h (renamed from demos/STM32/NIL-STM32F100-DISCOVERY/mcuconf.h)0
-rw-r--r--demos/STM32/NIL-STM32F303-DISCOVERY/Makefile113
-rw-r--r--demos/STM32/NIL-STM32F303-DISCOVERY/cfg/chconf.h (renamed from demos/STM32/NIL-STM32F303-DISCOVERY/chconf.h)0
-rw-r--r--demos/STM32/NIL-STM32F303-DISCOVERY/cfg/halconf.h (renamed from demos/STM32/NIL-STM32F303-DISCOVERY/halconf.h)0
-rw-r--r--demos/STM32/NIL-STM32F303-DISCOVERY/cfg/mcuconf.h (renamed from demos/STM32/NIL-STM32F303-DISCOVERY/mcuconf.h)0
-rw-r--r--demos/STM32/NIL-STM32F373-STM32373C_EVAL/Makefile113
-rw-r--r--demos/STM32/NIL-STM32F373-STM32373C_EVAL/cfg/chconf.h (renamed from demos/STM32/NIL-STM32F373-STM32373C_EVAL/chconf.h)0
-rw-r--r--demos/STM32/NIL-STM32F373-STM32373C_EVAL/cfg/halconf.h (renamed from demos/STM32/NIL-STM32F373-STM32373C_EVAL/halconf.h)0
-rw-r--r--demos/STM32/NIL-STM32F373-STM32373C_EVAL/cfg/mcuconf.h (renamed from demos/STM32/NIL-STM32F373-STM32373C_EVAL/mcuconf.h)0
-rw-r--r--demos/STM32/NIL-STM32F746G-DISCOVERY/Makefile117
-rw-r--r--demos/STM32/NIL-STM32F746G-DISCOVERY/cfg/chconf.h (renamed from demos/STM32/NIL-STM32F746G-DISCOVERY/chconf.h)0
-rw-r--r--demos/STM32/NIL-STM32F746G-DISCOVERY/cfg/halconf.h (renamed from demos/STM32/NIL-STM32F746G-DISCOVERY/halconf.h)0
-rw-r--r--demos/STM32/NIL-STM32F746G-DISCOVERY/cfg/mcuconf.h (renamed from demos/STM32/NIL-STM32F746G-DISCOVERY/mcuconf.h)0
-rw-r--r--demos/STM32/NIL-STM32L011K4-NUCLEO32/Makefile115
-rw-r--r--demos/STM32/NIL-STM32L011K4-NUCLEO32/cfg/chconf.h (renamed from demos/STM32/NIL-STM32L011K4-NUCLEO32/chconf.h)0
-rw-r--r--demos/STM32/NIL-STM32L011K4-NUCLEO32/cfg/halconf.h (renamed from demos/STM32/NIL-STM32L011K4-NUCLEO32/halconf.h)0
-rw-r--r--demos/STM32/NIL-STM32L011K4-NUCLEO32/cfg/mcuconf.h (renamed from demos/STM32/NIL-STM32L011K4-NUCLEO32/mcuconf.h)0
-rw-r--r--demos/STM32/NIL-STM32L152-DISCOVERY/Makefile113
-rw-r--r--demos/STM32/NIL-STM32L152-DISCOVERY/cfg/chconf.h (renamed from demos/STM32/NIL-STM32L152-DISCOVERY/chconf.h)0
-rw-r--r--demos/STM32/NIL-STM32L152-DISCOVERY/cfg/halconf.h (renamed from demos/STM32/NIL-STM32L152-DISCOVERY/halconf.h)0
-rw-r--r--demos/STM32/NIL-STM32L152-DISCOVERY/cfg/mcuconf.h (renamed from demos/STM32/NIL-STM32L152-DISCOVERY/mcuconf.h)0
28 files changed, 312 insertions, 487 deletions
diff --git a/demos/STM32/NIL-STM32F051-DISCOVERY/Makefile b/demos/STM32/NIL-STM32F051-DISCOVERY/Makefile
index 70c064b1b..e1e9a58d3 100644
--- a/demos/STM32/NIL-STM32F051-DISCOVERY/Makefile
+++ b/demos/STM32/NIL-STM32F051-DISCOVERY/Makefile
@@ -18,7 +18,7 @@ ifeq ($(USE_CPPOPT),)
USE_CPPOPT = -fno-rtti
endif
-# Enable this if you want the linker to remove unused code and data
+# Enable this if you want the linker to remove unused code and data.
ifeq ($(USE_LINK_GC),)
USE_LINK_GC = yes
endif
@@ -28,16 +28,11 @@ ifeq ($(USE_LDOPT),)
USE_LDOPT =
endif
-# Enable this if you want link time optimizations (LTO)
+# 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
-endif
-
# Enable this if you want to see the full log while compiling.
ifeq ($(USE_VERBOSE_COMPILE),)
USE_VERBOSE_COMPILE = no
@@ -74,19 +69,30 @@ ifeq ($(USE_FPU),)
USE_FPU = no
endif
+# FPU-related options.
+ifeq ($(USE_FPU_OPT),)
+ USE_FPU_OPT = -mfloat-abi=$(USE_FPU) -mfpu=fpv4-sp-d16
+endif
+
#
# Architecture or project specific options
##############################################################################
##############################################################################
-# Project, sources and paths
+# Project, target, sources and paths
#
# Define project name here
PROJECT = ch
-# Imported source files and paths
-CHIBIOS = ../../..
+# Target settings.
+MCU = cortex-m0
+
+# Imported source files and paths.
+CHIBIOS := ../../..
+CONFDIR := ./cfg
+BUILDDIR := ./build
+DEPDIR := ./.dep
# Licensing files.
include $(CHIBIOS)/os/license/license.mk
@@ -100,6 +106,8 @@ include $(CHIBIOS)/os/hal/osal/nil/osal.mk
# RTOS files (optional).
include $(CHIBIOS)/os/nil/nil.mk
include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/port_v6m.mk
+# Auto-build files in ./source recursively.
+include $(CHIBIOS)/tools/mk/autobuild.mk
# Other files (optional).
include $(CHIBIOS)/test/lib/test.mk
include $(CHIBIOS)/test/nil/nil_test.mk
@@ -118,73 +126,23 @@ CSRC = $(ALLCSRC) \
# setting.
CPPSRC = $(ALLCPPSRC)
-# C sources to be compiled in ARM mode regardless of the global setting.
-# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
-# option that results in lower performance and larger code size.
-ACSRC =
-
-# C++ sources to be compiled in ARM mode regardless of the global setting.
-# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
-# option that results in lower performance and larger code size.
-ACPPSRC =
-
-# C sources to be compiled in THUMB mode regardless of the global setting.
-# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
-# option that results in lower performance and larger code size.
-TCSRC =
-
-# C sources to be compiled in THUMB mode regardless of the global setting.
-# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
-# option that results in lower performance and larger code size.
-TCPPSRC =
-
-# List ASM source files here
+# List ASM source files here.
ASMSRC = $(ALLASMSRC)
-ASMXSRC = $(ALLXASMSRC)
-
-INCDIR = $(ALLINC) $(TESTINC)
-#
-# Project, sources and paths
-##############################################################################
-
-##############################################################################
-# Compiler settings
-#
+# List ASM with preprocessor source files here.
+ASMXSRC = $(ALLXASMSRC)
-MCU = cortex-m0
+# Inclusion directories.
+INCDIR = $(CONFDIR) $(ALLINC) $(TESTINC)
-#TRGT = arm-elf-
-TRGT = arm-none-eabi-
-CC = $(TRGT)gcc
-CPPC = $(TRGT)g++
-# Enable loading with g++ only if you need C++ runtime support.
-# NOTE: You can use C++ even without C++ support if you are careful. C++
-# runtime support makes code size explode.
-LD = $(TRGT)gcc
-#LD = $(TRGT)g++
-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
-
-# ARM-specific options here
-AOPT =
-
-# THUMB-specific options here
-TOPT = -mthumb -DTHUMB
-
-# Define C warning options here
+# Define C warning options here.
CWARN = -Wall -Wextra -Wundef -Wstrict-prototypes
-# Define C++ warning options here
+# Define C++ warning options here.
CPPWARN = -Wall -Wextra -Wundef
#
-# Compiler settings
+# Project, target, sources and paths
##############################################################################
##############################################################################
@@ -207,8 +165,25 @@ ULIBDIR =
ULIBS =
#
-# End of user defines
+# End of user section
+##############################################################################
+
##############################################################################
+# Common rules
+#
RULESPATH = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/mk
+include $(RULESPATH)/arm-none-eabi.mk
include $(RULESPATH)/rules.mk
+
+#
+# Common rules
+##############################################################################
+
+##############################################################################
+# Custom rules
+#
+
+#
+# Custom rules
+##############################################################################
diff --git a/demos/STM32/NIL-STM32F051-DISCOVERY/chconf.h b/demos/STM32/NIL-STM32F051-DISCOVERY/cfg/chconf.h
index 7d71078aa..7d71078aa 100644
--- a/demos/STM32/NIL-STM32F051-DISCOVERY/chconf.h
+++ b/demos/STM32/NIL-STM32F051-DISCOVERY/cfg/chconf.h
diff --git a/demos/STM32/NIL-STM32F051-DISCOVERY/halconf.h b/demos/STM32/NIL-STM32F051-DISCOVERY/cfg/halconf.h
index 89be0946a..89be0946a 100644
--- a/demos/STM32/NIL-STM32F051-DISCOVERY/halconf.h
+++ b/demos/STM32/NIL-STM32F051-DISCOVERY/cfg/halconf.h
diff --git a/demos/STM32/NIL-STM32F051-DISCOVERY/mcuconf.h b/demos/STM32/NIL-STM32F051-DISCOVERY/cfg/mcuconf.h
index b4ef0a775..b4ef0a775 100644
--- a/demos/STM32/NIL-STM32F051-DISCOVERY/mcuconf.h
+++ b/demos/STM32/NIL-STM32F051-DISCOVERY/cfg/mcuconf.h
diff --git a/demos/STM32/NIL-STM32F100-DISCOVERY/Makefile b/demos/STM32/NIL-STM32F100-DISCOVERY/Makefile
index 6dab48790..104b153ed 100644
--- a/demos/STM32/NIL-STM32F100-DISCOVERY/Makefile
+++ b/demos/STM32/NIL-STM32F100-DISCOVERY/Makefile
@@ -5,7 +5,7 @@
# Compiler options here.
ifeq ($(USE_OPT),)
- USE_OPT = -O2 -ggdb -fomit-frame-pointer
+ USE_OPT = -O2 -ggdb -fomit-frame-pointer -falign-functions=16
endif
# C specific options here (added to USE_OPT).
@@ -18,7 +18,7 @@ ifeq ($(USE_CPPOPT),)
USE_CPPOPT = -fno-rtti
endif
-# Enable this if you want the linker to remove unused code and data
+# Enable this if you want the linker to remove unused code and data.
ifeq ($(USE_LINK_GC),)
USE_LINK_GC = yes
endif
@@ -28,16 +28,11 @@ ifeq ($(USE_LDOPT),)
USE_LDOPT =
endif
-# Enable this if you want link time optimizations (LTO)
+# 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
-endif
-
# Enable this if you want to see the full log while compiling.
ifeq ($(USE_VERBOSE_COMPILE),)
USE_VERBOSE_COMPILE = no
@@ -74,19 +69,30 @@ ifeq ($(USE_FPU),)
USE_FPU = no
endif
+# FPU-related options.
+ifeq ($(USE_FPU_OPT),)
+ USE_FPU_OPT = -mfloat-abi=$(USE_FPU) -mfpu=fpv4-sp-d16
+endif
+
#
# Architecture or project specific options
##############################################################################
##############################################################################
-# Project, sources and paths
+# Project, target, sources and paths
#
# Define project name here
PROJECT = ch
-# Imported source files and paths
-CHIBIOS = ../../..
+# Target settings.
+MCU = cortex-m3
+
+# Imported source files and paths.
+CHIBIOS := ../../..
+CONFDIR := ./cfg
+BUILDDIR := ./build
+DEPDIR := ./.dep
# Licensing files.
include $(CHIBIOS)/os/license/license.mk
@@ -100,6 +106,8 @@ include $(CHIBIOS)/os/hal/osal/nil/osal.mk
# RTOS files (optional).
include $(CHIBIOS)/os/nil/nil.mk
include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk
+# Auto-build files in ./source recursively.
+include $(CHIBIOS)/tools/mk/autobuild.mk
# Other files (optional).
include $(CHIBIOS)/test/lib/test.mk
include $(CHIBIOS)/test/nil/nil_test.mk
@@ -118,73 +126,23 @@ CSRC = $(ALLCSRC) \
# setting.
CPPSRC = $(ALLCPPSRC)
-# C sources to be compiled in ARM mode regardless of the global setting.
-# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
-# option that results in lower performance and larger code size.
-ACSRC =
-
-# C++ sources to be compiled in ARM mode regardless of the global setting.
-# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
-# option that results in lower performance and larger code size.
-ACPPSRC =
-
-# C sources to be compiled in THUMB mode regardless of the global setting.
-# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
-# option that results in lower performance and larger code size.
-TCSRC =
-
-# C sources to be compiled in THUMB mode regardless of the global setting.
-# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
-# option that results in lower performance and larger code size.
-TCPPSRC =
-
-# List ASM source files here
+# List ASM source files here.
ASMSRC = $(ALLASMSRC)
-ASMXSRC = $(ALLXASMSRC)
-
-INCDIR = $(ALLINC) $(TESTINC)
-#
-# Project, sources and paths
-##############################################################################
-
-##############################################################################
-# Compiler settings
-#
+# List ASM with preprocessor source files here.
+ASMXSRC = $(ALLXASMSRC)
-MCU = cortex-m3
+# Inclusion directories.
+INCDIR = $(CONFDIR) $(ALLINC) $(TESTINC)
-#TRGT = arm-elf-
-TRGT = arm-none-eabi-
-CC = $(TRGT)gcc
-CPPC = $(TRGT)g++
-# Enable loading with g++ only if you need C++ runtime support.
-# NOTE: You can use C++ even without C++ support if you are careful. C++
-# runtime support makes code size explode.
-LD = $(TRGT)gcc
-#LD = $(TRGT)g++
-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
-
-# ARM-specific options here
-AOPT =
-
-# THUMB-specific options here
-TOPT = -mthumb -DTHUMB
-
-# Define C warning options here
+# Define C warning options here.
CWARN = -Wall -Wextra -Wundef -Wstrict-prototypes
-# Define C++ warning options here
+# Define C++ warning options here.
CPPWARN = -Wall -Wextra -Wundef
#
-# Compiler settings
+# Project, target, sources and paths
##############################################################################
##############################################################################
@@ -207,8 +165,25 @@ ULIBDIR =
ULIBS =
#
-# End of user defines
+# End of user section
+##############################################################################
+
##############################################################################
+# Common rules
+#
RULESPATH = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/mk
+include $(RULESPATH)/arm-none-eabi.mk
include $(RULESPATH)/rules.mk
+
+#
+# Common rules
+##############################################################################
+
+##############################################################################
+# Custom rules
+#
+
+#
+# Custom rules
+##############################################################################
diff --git a/demos/STM32/NIL-STM32F100-DISCOVERY/chconf.h b/demos/STM32/NIL-STM32F100-DISCOVERY/cfg/chconf.h
index 9ee4d7f16..9ee4d7f16 100644
--- a/demos/STM32/NIL-STM32F100-DISCOVERY/chconf.h
+++ b/demos/STM32/NIL-STM32F100-DISCOVERY/cfg/chconf.h
diff --git a/demos/STM32/NIL-STM32F100-DISCOVERY/halconf.h b/demos/STM32/NIL-STM32F100-DISCOVERY/cfg/halconf.h
index 89be0946a..89be0946a 100644
--- a/demos/STM32/NIL-STM32F100-DISCOVERY/halconf.h
+++ b/demos/STM32/NIL-STM32F100-DISCOVERY/cfg/halconf.h
diff --git a/demos/STM32/NIL-STM32F100-DISCOVERY/mcuconf.h b/demos/STM32/NIL-STM32F100-DISCOVERY/cfg/mcuconf.h
index 6b6c1323b..6b6c1323b 100644
--- a/demos/STM32/NIL-STM32F100-DISCOVERY/mcuconf.h
+++ b/demos/STM32/NIL-STM32F100-DISCOVERY/cfg/mcuconf.h
diff --git a/demos/STM32/NIL-STM32F303-DISCOVERY/Makefile b/demos/STM32/NIL-STM32F303-DISCOVERY/Makefile
index 10446e85b..bca2377d7 100644
--- a/demos/STM32/NIL-STM32F303-DISCOVERY/Makefile
+++ b/demos/STM32/NIL-STM32F303-DISCOVERY/Makefile
@@ -18,7 +18,7 @@ ifeq ($(USE_CPPOPT),)
USE_CPPOPT = -fno-rtti
endif
-# Enable this if you want the linker to remove unused code and data
+# Enable this if you want the linker to remove unused code and data.
ifeq ($(USE_LINK_GC),)
USE_LINK_GC = yes
endif
@@ -28,16 +28,11 @@ ifeq ($(USE_LDOPT),)
USE_LDOPT =
endif
-# Enable this if you want link time optimizations (LTO)
+# 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
-endif
-
# Enable this if you want to see the full log while compiling.
ifeq ($(USE_VERBOSE_COMPILE),)
USE_VERBOSE_COMPILE = no
@@ -74,19 +69,30 @@ ifeq ($(USE_FPU),)
USE_FPU = no
endif
+# FPU-related options.
+ifeq ($(USE_FPU_OPT),)
+ USE_FPU_OPT = -mfloat-abi=$(USE_FPU) -mfpu=fpv4-sp-d16
+endif
+
#
# Architecture or project specific options
##############################################################################
##############################################################################
-# Project, sources and paths
+# Project, target, sources and paths
#
# Define project name here
PROJECT = ch
-# Imported source files and paths
-CHIBIOS = ../../..
+# Target settings.
+MCU = cortex-m4
+
+# Imported source files and paths.
+CHIBIOS := ../../..
+CONFDIR := ./cfg
+BUILDDIR := ./build
+DEPDIR := ./.dep
# Licensing files.
include $(CHIBIOS)/os/license/license.mk
@@ -100,6 +106,8 @@ include $(CHIBIOS)/os/hal/osal/nil/osal.mk
# RTOS files (optional).
include $(CHIBIOS)/os/nil/nil.mk
include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk
+# Auto-build files in ./source recursively.
+include $(CHIBIOS)/tools/mk/autobuild.mk
# Other files (optional).
include $(CHIBIOS)/test/lib/test.mk
include $(CHIBIOS)/test/nil/nil_test.mk
@@ -118,73 +126,23 @@ CSRC = $(ALLCSRC) \
# setting.
CPPSRC = $(ALLCPPSRC)
-# C sources to be compiled in ARM mode regardless of the global setting.
-# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
-# option that results in lower performance and larger code size.
-ACSRC =
-
-# C++ sources to be compiled in ARM mode regardless of the global setting.
-# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
-# option that results in lower performance and larger code size.
-ACPPSRC =
-
-# C sources to be compiled in THUMB mode regardless of the global setting.
-# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
-# option that results in lower performance and larger code size.
-TCSRC =
-
-# C sources to be compiled in THUMB mode regardless of the global setting.
-# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
-# option that results in lower performance and larger code size.
-TCPPSRC =
-
-# List ASM source files here
+# List ASM source files here.
ASMSRC = $(ALLASMSRC)
-ASMXSRC = $(ALLXASMSRC)
-
-INCDIR = $(ALLINC) $(TESTINC)
-#
-# Project, sources and paths
-##############################################################################
-
-##############################################################################
-# Compiler settings
-#
+# List ASM with preprocessor source files here.
+ASMXSRC = $(ALLXASMSRC)
-MCU = cortex-m4
+# Inclusion directories.
+INCDIR = $(CONFDIR) $(ALLINC) $(TESTINC)
-#TRGT = arm-elf-
-TRGT = arm-none-eabi-
-CC = $(TRGT)gcc
-CPPC = $(TRGT)g++
-# Enable loading with g++ only if you need C++ runtime support.
-# NOTE: You can use C++ even without C++ support if you are careful. C++
-# runtime support makes code size explode.
-LD = $(TRGT)gcc
-#LD = $(TRGT)g++
-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
-
-# ARM-specific options here
-AOPT =
-
-# THUMB-specific options here
-TOPT = -mthumb -DTHUMB
-
-# Define C warning options here
+# Define C warning options here.
CWARN = -Wall -Wextra -Wundef -Wstrict-prototypes
-# Define C++ warning options here
+# Define C++ warning options here.
CPPWARN = -Wall -Wextra -Wundef
#
-# Compiler settings
+# Project, target, sources and paths
##############################################################################
##############################################################################
@@ -207,8 +165,25 @@ ULIBDIR =
ULIBS =
#
-# End of user defines
+# End of user section
+##############################################################################
+
##############################################################################
+# Common rules
+#
RULESPATH = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/mk
+include $(RULESPATH)/arm-none-eabi.mk
include $(RULESPATH)/rules.mk
+
+#
+# Common rules
+##############################################################################
+
+##############################################################################
+# Custom rules
+#
+
+#
+# Custom rules
+##############################################################################
diff --git a/demos/STM32/NIL-STM32F303-DISCOVERY/chconf.h b/demos/STM32/NIL-STM32F303-DISCOVERY/cfg/chconf.h
index cb42137c1..cb42137c1 100644
--- a/demos/STM32/NIL-STM32F303-DISCOVERY/chconf.h
+++ b/demos/STM32/NIL-STM32F303-DISCOVERY/cfg/chconf.h
diff --git a/demos/STM32/NIL-STM32F303-DISCOVERY/halconf.h b/demos/STM32/NIL-STM32F303-DISCOVERY/cfg/halconf.h
index 89be0946a..89be0946a 100644
--- a/demos/STM32/NIL-STM32F303-DISCOVERY/halconf.h
+++ b/demos/STM32/NIL-STM32F303-DISCOVERY/cfg/halconf.h
diff --git a/demos/STM32/NIL-STM32F303-DISCOVERY/mcuconf.h b/demos/STM32/NIL-STM32F303-DISCOVERY/cfg/mcuconf.h
index 6c9c3ffe0..6c9c3ffe0 100644
--- a/demos/STM32/NIL-STM32F303-DISCOVERY/mcuconf.h
+++ b/demos/STM32/NIL-STM32F303-DISCOVERY/cfg/mcuconf.h
diff --git a/demos/STM32/NIL-STM32F373-STM32373C_EVAL/Makefile b/demos/STM32/NIL-STM32F373-STM32373C_EVAL/Makefile
index ae6a9aa4e..58cf1162f 100644
--- a/demos/STM32/NIL-STM32F373-STM32373C_EVAL/Makefile
+++ b/demos/STM32/NIL-STM32F373-STM32373C_EVAL/Makefile
@@ -18,7 +18,7 @@ ifeq ($(USE_CPPOPT),)
USE_CPPOPT = -fno-rtti
endif
-# Enable this if you want the linker to remove unused code and data
+# Enable this if you want the linker to remove unused code and data.
ifeq ($(USE_LINK_GC),)
USE_LINK_GC = yes
endif
@@ -28,16 +28,11 @@ ifeq ($(USE_LDOPT),)
USE_LDOPT =
endif
-# Enable this if you want link time optimizations (LTO)
+# 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
-endif
-
# Enable this if you want to see the full log while compiling.
ifeq ($(USE_VERBOSE_COMPILE),)
USE_VERBOSE_COMPILE = no
@@ -74,19 +69,30 @@ ifeq ($(USE_FPU),)
USE_FPU = no
endif
+# FPU-related options.
+ifeq ($(USE_FPU_OPT),)
+ USE_FPU_OPT = -mfloat-abi=$(USE_FPU) -mfpu=fpv4-sp-d16
+endif
+
#
# Architecture or project specific options
##############################################################################
##############################################################################
-# Project, sources and paths
+# Project, target, sources and paths
#
# Define project name here
PROJECT = ch
-# Imported source files and paths
-CHIBIOS = ../../..
+# Target settings.
+MCU = cortex-m4
+
+# Imported source files and paths.
+CHIBIOS := ../../..
+CONFDIR := ./cfg
+BUILDDIR := ./build
+DEPDIR := ./.dep
# Licensing files.
include $(CHIBIOS)/os/license/license.mk
@@ -100,6 +106,8 @@ include $(CHIBIOS)/os/hal/osal/nil/osal.mk
# RTOS files (optional).
include $(CHIBIOS)/os/nil/nil.mk
include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk
+# Auto-build files in ./source recursively.
+include $(CHIBIOS)/tools/mk/autobuild.mk
# Other files (optional).
include $(CHIBIOS)/test/lib/test.mk
include $(CHIBIOS)/test/nil/nil_test.mk
@@ -118,73 +126,23 @@ CSRC = $(ALLCSRC) \
# setting.
CPPSRC = $(ALLCPPSRC)
-# C sources to be compiled in ARM mode regardless of the global setting.
-# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
-# option that results in lower performance and larger code size.
-ACSRC =
-
-# C++ sources to be compiled in ARM mode regardless of the global setting.
-# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
-# option that results in lower performance and larger code size.
-ACPPSRC =
-
-# C sources to be compiled in THUMB mode regardless of the global setting.
-# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
-# option that results in lower performance and larger code size.
-TCSRC =
-
-# C sources to be compiled in THUMB mode regardless of the global setting.
-# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
-# option that results in lower performance and larger code size.
-TCPPSRC =
-
-# List ASM source files here
+# List ASM source files here.
ASMSRC = $(ALLASMSRC)
-ASMXSRC = $(ALLXASMSRC)
-
-INCDIR = $(ALLINC) $(TESTINC)
-#
-# Project, sources and paths
-##############################################################################
-
-##############################################################################
-# Compiler settings
-#
+# List ASM with preprocessor source files here.
+ASMXSRC = $(ALLXASMSRC)
-MCU = cortex-m4
+# Inclusion directories.
+INCDIR = $(CONFDIR) $(ALLINC) $(TESTINC)
-#TRGT = arm-elf-
-TRGT = arm-none-eabi-
-CC = $(TRGT)gcc
-CPPC = $(TRGT)g++
-# Enable loading with g++ only if you need C++ runtime support.
-# NOTE: You can use C++ even without C++ support if you are careful. C++
-# runtime support makes code size explode.
-LD = $(TRGT)gcc
-#LD = $(TRGT)g++
-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
-
-# ARM-specific options here
-AOPT =
-
-# THUMB-specific options here
-TOPT = -mthumb -DTHUMB
-
-# Define C warning options here
+# Define C warning options here.
CWARN = -Wall -Wextra -Wundef -Wstrict-prototypes
-# Define C++ warning options here
+# Define C++ warning options here.
CPPWARN = -Wall -Wextra -Wundef
#
-# Compiler settings
+# Project, target, sources and paths
##############################################################################
##############################################################################
@@ -207,8 +165,25 @@ ULIBDIR =
ULIBS =
#
-# End of user defines
+# End of user section
+##############################################################################
+
##############################################################################
+# Common rules
+#
RULESPATH = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/mk
+include $(RULESPATH)/arm-none-eabi.mk
include $(RULESPATH)/rules.mk
+
+#
+# Common rules
+##############################################################################
+
+##############################################################################
+# Custom rules
+#
+
+#
+# Custom rules
+##############################################################################
diff --git a/demos/STM32/NIL-STM32F373-STM32373C_EVAL/chconf.h b/demos/STM32/NIL-STM32F373-STM32373C_EVAL/cfg/chconf.h
index 4504b8fbd..4504b8fbd 100644
--- a/demos/STM32/NIL-STM32F373-STM32373C_EVAL/chconf.h
+++ b/demos/STM32/NIL-STM32F373-STM32373C_EVAL/cfg/chconf.h
diff --git a/demos/STM32/NIL-STM32F373-STM32373C_EVAL/halconf.h b/demos/STM32/NIL-STM32F373-STM32373C_EVAL/cfg/halconf.h
index 89be0946a..89be0946a 100644
--- a/demos/STM32/NIL-STM32F373-STM32373C_EVAL/halconf.h
+++ b/demos/STM32/NIL-STM32F373-STM32373C_EVAL/cfg/halconf.h
diff --git a/demos/STM32/NIL-STM32F373-STM32373C_EVAL/mcuconf.h b/demos/STM32/NIL-STM32F373-STM32373C_EVAL/cfg/mcuconf.h
index 415e66efb..415e66efb 100644
--- a/demos/STM32/NIL-STM32F373-STM32373C_EVAL/mcuconf.h
+++ b/demos/STM32/NIL-STM32F373-STM32373C_EVAL/cfg/mcuconf.h
diff --git a/demos/STM32/NIL-STM32F746G-DISCOVERY/Makefile b/demos/STM32/NIL-STM32F746G-DISCOVERY/Makefile
index 52f1b0ced..466955991 100644
--- a/demos/STM32/NIL-STM32F746G-DISCOVERY/Makefile
+++ b/demos/STM32/NIL-STM32F746G-DISCOVERY/Makefile
@@ -5,7 +5,7 @@
# Compiler options here.
ifeq ($(USE_OPT),)
- USE_OPT = -O0 -ggdb -fomit-frame-pointer -falign-functions=16
+ USE_OPT = -O2 -ggdb -fomit-frame-pointer -falign-functions=16
endif
# C specific options here (added to USE_OPT).
@@ -18,7 +18,7 @@ ifeq ($(USE_CPPOPT),)
USE_CPPOPT = -fno-rtti
endif
-# Enable this if you want the linker to remove unused code and data
+# Enable this if you want the linker to remove unused code and data.
ifeq ($(USE_LINK_GC),)
USE_LINK_GC = yes
endif
@@ -28,16 +28,11 @@ ifeq ($(USE_LDOPT),)
USE_LDOPT =
endif
-# Enable this if you want link time optimizations (LTO)
+# 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
-endif
-
# Enable this if you want to see the full log while compiling.
ifeq ($(USE_VERBOSE_COMPILE),)
USE_VERBOSE_COMPILE = no
@@ -60,7 +55,7 @@ endif
# 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
+ USE_PROCESS_STACKSIZE = 0x100
endif
# Stack size to the allocated to the Cortex-M main/exceptions stack. This
@@ -74,19 +69,30 @@ ifeq ($(USE_FPU),)
USE_FPU = no
endif
+# FPU-related options.
+ifeq ($(USE_FPU_OPT),)
+ USE_FPU_OPT = -mfloat-abi=$(USE_FPU) -mfpu=fpv4-sp-d16
+endif
+
#
# Architecture or project specific options
##############################################################################
##############################################################################
-# Project, sources and paths
+# Project, target, sources and paths
#
# Define project name here
PROJECT = ch
-# Imported source files and paths
-CHIBIOS = ../../..
+# Target settings.
+MCU = cortex-m7
+
+# Imported source files and paths.
+CHIBIOS := ../../..
+CONFDIR := ./cfg
+BUILDDIR := ./build
+DEPDIR := ./.dep
# Licensing files.
include $(CHIBIOS)/os/license/license.mk
@@ -100,6 +106,8 @@ include $(CHIBIOS)/os/hal/osal/nil/osal.mk
# RTOS files (optional).
include $(CHIBIOS)/os/nil/nil.mk
include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk
+# Auto-build files in ./source recursively.
+include $(CHIBIOS)/tools/mk/autobuild.mk
# Other files (optional).
include $(CHIBIOS)/test/lib/test.mk
include $(CHIBIOS)/test/nil/nil_test.mk
@@ -118,73 +126,23 @@ CSRC = $(ALLCSRC) \
# setting.
CPPSRC = $(ALLCPPSRC)
-# C sources to be compiled in ARM mode regardless of the global setting.
-# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
-# option that results in lower performance and larger code size.
-ACSRC =
-
-# C++ sources to be compiled in ARM mode regardless of the global setting.
-# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
-# option that results in lower performance and larger code size.
-ACPPSRC =
-
-# C sources to be compiled in THUMB mode regardless of the global setting.
-# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
-# option that results in lower performance and larger code size.
-TCSRC =
-
-# C sources to be compiled in THUMB mode regardless of the global setting.
-# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
-# option that results in lower performance and larger code size.
-TCPPSRC =
-
-# List ASM source files here
+# List ASM source files here.
ASMSRC = $(ALLASMSRC)
-ASMXSRC = $(ALLXASMSRC)
-
-INCDIR = $(ALLINC) $(TESTINC)
-#
-# Project, sources and paths
-##############################################################################
+# List ASM with preprocessor source files here.
+ASMXSRC = $(ALLXASMSRC)
-##############################################################################
-# Compiler settings
-#
+# Inclusion directories.
+INCDIR = $(CONFDIR) $(ALLINC) $(TESTINC)
-MCU = cortex-m4
-
-#TRGT = arm-elf-
-TRGT = arm-none-eabi-
-CC = $(TRGT)gcc
-CPPC = $(TRGT)g++
-# Enable loading with g++ only if you need C++ runtime support.
-# NOTE: You can use C++ even without C++ support if you are careful. C++
-# runtime support makes code size explode.
-LD = $(TRGT)gcc
-#LD = $(TRGT)g++
-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
-
-# ARM-specific options here
-AOPT =
-
-# THUMB-specific options here
-TOPT = -mthumb -DTHUMB
-
-# Define C warning options here
+# Define C warning options here.
CWARN = -Wall -Wextra -Wundef -Wstrict-prototypes
-# Define C++ warning options here
+# Define C++ warning options here.
CPPWARN = -Wall -Wextra -Wundef
#
-# Compiler settings
+# Project, target, sources and paths
##############################################################################
##############################################################################
@@ -207,8 +165,25 @@ ULIBDIR =
ULIBS =
#
-# End of user defines
+# End of user section
##############################################################################
+##############################################################################
+# Common rules
+#
+
RULESPATH = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/mk
+include $(RULESPATH)/arm-none-eabi.mk
include $(RULESPATH)/rules.mk
+
+#
+# Common rules
+##############################################################################
+
+##############################################################################
+# Custom rules
+#
+
+#
+# Custom rules
+##############################################################################
diff --git a/demos/STM32/NIL-STM32F746G-DISCOVERY/chconf.h b/demos/STM32/NIL-STM32F746G-DISCOVERY/cfg/chconf.h
index b0a850237..b0a850237 100644
--- a/demos/STM32/NIL-STM32F746G-DISCOVERY/chconf.h
+++ b/demos/STM32/NIL-STM32F746G-DISCOVERY/cfg/chconf.h
diff --git a/demos/STM32/NIL-STM32F746G-DISCOVERY/halconf.h b/demos/STM32/NIL-STM32F746G-DISCOVERY/cfg/halconf.h
index 89be0946a..89be0946a 100644
--- a/demos/STM32/NIL-STM32F746G-DISCOVERY/halconf.h
+++ b/demos/STM32/NIL-STM32F746G-DISCOVERY/cfg/halconf.h
diff --git a/demos/STM32/NIL-STM32F746G-DISCOVERY/mcuconf.h b/demos/STM32/NIL-STM32F746G-DISCOVERY/cfg/mcuconf.h
index 7e0ef3828..7e0ef3828 100644
--- a/demos/STM32/NIL-STM32F746G-DISCOVERY/mcuconf.h
+++ b/demos/STM32/NIL-STM32F746G-DISCOVERY/cfg/mcuconf.h
diff --git a/demos/STM32/NIL-STM32L011K4-NUCLEO32/Makefile b/demos/STM32/NIL-STM32L011K4-NUCLEO32/Makefile
index 622106894..acd9462fb 100644
--- a/demos/STM32/NIL-STM32L011K4-NUCLEO32/Makefile
+++ b/demos/STM32/NIL-STM32L011K4-NUCLEO32/Makefile
@@ -5,7 +5,7 @@
# Compiler options here.
ifeq ($(USE_OPT),)
- USE_OPT = -Os -ggdb -fomit-frame-pointer -falign-functions=16
+ USE_OPT = -O2 -ggdb -fomit-frame-pointer -falign-functions=16
endif
# C specific options here (added to USE_OPT).
@@ -18,7 +18,7 @@ ifeq ($(USE_CPPOPT),)
USE_CPPOPT = -fno-rtti
endif
-# Enable this if you want the linker to remove unused code and data
+# Enable this if you want the linker to remove unused code and data.
ifeq ($(USE_LINK_GC),)
USE_LINK_GC = yes
endif
@@ -28,16 +28,11 @@ ifeq ($(USE_LDOPT),)
USE_LDOPT =
endif
-# Enable this if you want link time optimizations (LTO)
+# 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
-endif
-
# Enable this if you want to see the full log while compiling.
ifeq ($(USE_VERBOSE_COMPILE),)
USE_VERBOSE_COMPILE = no
@@ -74,19 +69,30 @@ ifeq ($(USE_FPU),)
USE_FPU = no
endif
+# FPU-related options.
+ifeq ($(USE_FPU_OPT),)
+ USE_FPU_OPT = -mfloat-abi=$(USE_FPU) -mfpu=fpv4-sp-d16
+endif
+
#
# Architecture or project specific options
##############################################################################
##############################################################################
-# Project, sources and paths
+# Project, target, sources and paths
#
# Define project name here
PROJECT = ch
-# Imported source files and paths
-CHIBIOS = ../../..
+# Target settings.
+MCU = cortex-m0
+
+# Imported source files and paths.
+CHIBIOS := ../../..
+CONFDIR := ./cfg
+BUILDDIR := ./build
+DEPDIR := ./.dep
# Licensing files.
include $(CHIBIOS)/os/license/license.mk
@@ -100,6 +106,8 @@ include $(CHIBIOS)/os/hal/osal/nil/osal.mk
# RTOS files (optional).
include $(CHIBIOS)/os/nil/nil.mk
include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/port_v6m.mk
+# Auto-build files in ./source recursively.
+include $(CHIBIOS)/tools/mk/autobuild.mk
# Other files (optional).
#include $(CHIBIOS)/test/lib/test.mk
#include $(CHIBIOS)/test/nil/nil_test.mk
@@ -118,73 +126,23 @@ CSRC = $(ALLCSRC) \
# setting.
CPPSRC = $(ALLCPPSRC)
-# C sources to be compiled in ARM mode regardless of the global setting.
-# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
-# option that results in lower performance and larger code size.
-ACSRC =
-
-# C++ sources to be compiled in ARM mode regardless of the global setting.
-# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
-# option that results in lower performance and larger code size.
-ACPPSRC =
-
-# C sources to be compiled in THUMB mode regardless of the global setting.
-# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
-# option that results in lower performance and larger code size.
-TCSRC =
-
-# C sources to be compiled in THUMB mode regardless of the global setting.
-# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
-# option that results in lower performance and larger code size.
-TCPPSRC =
-
-# List ASM source files here
+# List ASM source files here.
ASMSRC = $(ALLASMSRC)
-ASMXSRC = $(ALLXASMSRC)
-
-INCDIR = $(ALLINC) $(TESTINC)
-#
-# Project, sources and paths
-##############################################################################
-
-##############################################################################
-# Compiler settings
-#
+# List ASM with preprocessor source files here.
+ASMXSRC = $(ALLXASMSRC)
-MCU = cortex-m0
+# Inclusion directories.
+INCDIR = $(CONFDIR) $(ALLINC) $(TESTINC)
-#TRGT = arm-elf-
-TRGT = arm-none-eabi-
-CC = $(TRGT)gcc
-CPPC = $(TRGT)g++
-# Enable loading with g++ only if you need C++ runtime support.
-# NOTE: You can use C++ even without C++ support if you are careful. C++
-# runtime support makes code size explode.
-LD = $(TRGT)gcc
-#LD = $(TRGT)g++
-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
-
-# ARM-specific options here
-AOPT =
-
-# THUMB-specific options here
-TOPT = -mthumb -DTHUMB
-
-# Define C warning options here
+# Define C warning options here.
CWARN = -Wall -Wextra -Wundef -Wstrict-prototypes
-# Define C++ warning options here
+# Define C++ warning options here.
CPPWARN = -Wall -Wextra -Wundef
#
-# Compiler settings
+# Project, target, sources and paths
##############################################################################
##############################################################################
@@ -207,8 +165,25 @@ ULIBDIR =
ULIBS =
#
-# End of user defines
+# End of user section
+##############################################################################
+
##############################################################################
+# Common rules
+#
RULESPATH = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/mk
+include $(RULESPATH)/arm-none-eabi.mk
include $(RULESPATH)/rules.mk
+
+#
+# Common rules
+##############################################################################
+
+##############################################################################
+# Custom rules
+#
+
+#
+# Custom rules
+##############################################################################
diff --git a/demos/STM32/NIL-STM32L011K4-NUCLEO32/chconf.h b/demos/STM32/NIL-STM32L011K4-NUCLEO32/cfg/chconf.h
index b5c88b4ef..b5c88b4ef 100644
--- a/demos/STM32/NIL-STM32L011K4-NUCLEO32/chconf.h
+++ b/demos/STM32/NIL-STM32L011K4-NUCLEO32/cfg/chconf.h
diff --git a/demos/STM32/NIL-STM32L011K4-NUCLEO32/halconf.h b/demos/STM32/NIL-STM32L011K4-NUCLEO32/cfg/halconf.h
index 89be0946a..89be0946a 100644
--- a/demos/STM32/NIL-STM32L011K4-NUCLEO32/halconf.h
+++ b/demos/STM32/NIL-STM32L011K4-NUCLEO32/cfg/halconf.h
diff --git a/demos/STM32/NIL-STM32L011K4-NUCLEO32/mcuconf.h b/demos/STM32/NIL-STM32L011K4-NUCLEO32/cfg/mcuconf.h
index a795250a6..a795250a6 100644
--- a/demos/STM32/NIL-STM32L011K4-NUCLEO32/mcuconf.h
+++ b/demos/STM32/NIL-STM32L011K4-NUCLEO32/cfg/mcuconf.h
diff --git a/demos/STM32/NIL-STM32L152-DISCOVERY/Makefile b/demos/STM32/NIL-STM32L152-DISCOVERY/Makefile
index 6367d5fad..dab8ef632 100644
--- a/demos/STM32/NIL-STM32L152-DISCOVERY/Makefile
+++ b/demos/STM32/NIL-STM32L152-DISCOVERY/Makefile
@@ -18,7 +18,7 @@ ifeq ($(USE_CPPOPT),)
USE_CPPOPT = -fno-rtti
endif
-# Enable this if you want the linker to remove unused code and data
+# Enable this if you want the linker to remove unused code and data.
ifeq ($(USE_LINK_GC),)
USE_LINK_GC = yes
endif
@@ -28,16 +28,11 @@ ifeq ($(USE_LDOPT),)
USE_LDOPT =
endif
-# Enable this if you want link time optimizations (LTO)
+# 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
-endif
-
# Enable this if you want to see the full log while compiling.
ifeq ($(USE_VERBOSE_COMPILE),)
USE_VERBOSE_COMPILE = no
@@ -74,19 +69,30 @@ ifeq ($(USE_FPU),)
USE_FPU = no
endif
+# FPU-related options.
+ifeq ($(USE_FPU_OPT),)
+ USE_FPU_OPT = -mfloat-abi=$(USE_FPU) -mfpu=fpv4-sp-d16
+endif
+
#
# Architecture or project specific options
##############################################################################
##############################################################################
-# Project, sources and paths
+# Project, target, sources and paths
#
# Define project name here
PROJECT = ch
-# Imported source files and paths
-CHIBIOS = ../../..
+# Target settings.
+MCU = cortex-m3
+
+# Imported source files and paths.
+CHIBIOS := ../../..
+CONFDIR := ./cfg
+BUILDDIR := ./build
+DEPDIR := ./.dep
# Licensing files.
include $(CHIBIOS)/os/license/license.mk
@@ -100,6 +106,8 @@ include $(CHIBIOS)/os/hal/osal/nil/osal.mk
# RTOS files (optional).
include $(CHIBIOS)/os/nil/nil.mk
include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk
+# Auto-build files in ./source recursively.
+include $(CHIBIOS)/tools/mk/autobuild.mk
# Other files (optional).
#include $(CHIBIOS)/test/lib/test.mk
#include $(CHIBIOS)/test/nil/nil_test.mk
@@ -118,73 +126,23 @@ CSRC = $(ALLCSRC) \
# setting.
CPPSRC = $(ALLCPPSRC)
-# C sources to be compiled in ARM mode regardless of the global setting.
-# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
-# option that results in lower performance and larger code size.
-ACSRC =
-
-# C++ sources to be compiled in ARM mode regardless of the global setting.
-# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
-# option that results in lower performance and larger code size.
-ACPPSRC =
-
-# C sources to be compiled in THUMB mode regardless of the global setting.
-# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
-# option that results in lower performance and larger code size.
-TCSRC =
-
-# C sources to be compiled in THUMB mode regardless of the global setting.
-# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
-# option that results in lower performance and larger code size.
-TCPPSRC =
-
-# List ASM source files here
+# List ASM source files here.
ASMSRC = $(ALLASMSRC)
-ASMXSRC = $(ALLXASMSRC)
-
-INCDIR = $(ALLINC) $(TESTINC)
-#
-# Project, sources and paths
-##############################################################################
-
-##############################################################################
-# Compiler settings
-#
+# List ASM with preprocessor source files here.
+ASMXSRC = $(ALLXASMSRC)
-MCU = cortex-m3
+# Inclusion directories.
+INCDIR = $(CONFDIR) $(ALLINC) $(TESTINC)
-#TRGT = arm-elf-
-TRGT = arm-none-eabi-
-CC = $(TRGT)gcc
-CPPC = $(TRGT)g++
-# Enable loading with g++ only if you need C++ runtime support.
-# NOTE: You can use C++ even without C++ support if you are careful. C++
-# runtime support makes code size explode.
-LD = $(TRGT)gcc
-#LD = $(TRGT)g++
-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
-
-# ARM-specific options here
-AOPT =
-
-# THUMB-specific options here
-TOPT = -mthumb -DTHUMB
-
-# Define C warning options here
+# Define C warning options here.
CWARN = -Wall -Wextra -Wundef -Wstrict-prototypes
-# Define C++ warning options here
+# Define C++ warning options here.
CPPWARN = -Wall -Wextra -Wundef
#
-# Compiler settings
+# Project, target, sources and paths
##############################################################################
##############################################################################
@@ -207,8 +165,25 @@ ULIBDIR =
ULIBS =
#
-# End of user defines
+# End of user section
+##############################################################################
+
##############################################################################
+# Common rules
+#
RULESPATH = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/mk
+include $(RULESPATH)/arm-none-eabi.mk
include $(RULESPATH)/rules.mk
+
+#
+# Common rules
+##############################################################################
+
+##############################################################################
+# Custom rules
+#
+
+#
+# Custom rules
+##############################################################################
diff --git a/demos/STM32/NIL-STM32L152-DISCOVERY/chconf.h b/demos/STM32/NIL-STM32L152-DISCOVERY/cfg/chconf.h
index 9ee4d7f16..9ee4d7f16 100644
--- a/demos/STM32/NIL-STM32L152-DISCOVERY/chconf.h
+++ b/demos/STM32/NIL-STM32L152-DISCOVERY/cfg/chconf.h
diff --git a/demos/STM32/NIL-STM32L152-DISCOVERY/halconf.h b/demos/STM32/NIL-STM32L152-DISCOVERY/cfg/halconf.h
index 89be0946a..89be0946a 100644
--- a/demos/STM32/NIL-STM32L152-DISCOVERY/halconf.h
+++ b/demos/STM32/NIL-STM32L152-DISCOVERY/cfg/halconf.h
diff --git a/demos/STM32/NIL-STM32L152-DISCOVERY/mcuconf.h b/demos/STM32/NIL-STM32L152-DISCOVERY/cfg/mcuconf.h
index 12ac88d3f..12ac88d3f 100644
--- a/demos/STM32/NIL-STM32L152-DISCOVERY/mcuconf.h
+++ b/demos/STM32/NIL-STM32L152-DISCOVERY/cfg/mcuconf.h