aboutsummaryrefslogtreecommitdiffstats
path: root/demos
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2018-10-22 12:07:22 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2018-10-22 12:07:22 +0000
commit59e3813152ee473431cc002fcf207abf96916661 (patch)
tree7d48679caa22017eb824e37676f5e69618447e19 /demos
parentbb5e0367ab1bfad9e054cdb803576c4fcab7f21a (diff)
downloadChibiOS-59e3813152ee473431cc002fcf207abf96916661.tar.gz
ChibiOS-59e3813152ee473431cc002fcf207abf96916661.tar.bz2
ChibiOS-59e3813152ee473431cc002fcf207abf96916661.zip
More demos updated.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@12387 110e8d01-0319-4d1e-a829-52ad28d1bb01
Diffstat (limited to 'demos')
-rw-r--r--demos/STM32/CMSIS-STM32F407-DISCOVERY/Makefile113
-rw-r--r--demos/STM32/CMSIS-STM32F407-DISCOVERY/cfg/chconf.h (renamed from demos/STM32/CMSIS-STM32F407-DISCOVERY/chconf.h)0
-rw-r--r--demos/STM32/CMSIS-STM32F407-DISCOVERY/cfg/halconf.h (renamed from demos/STM32/CMSIS-STM32F407-DISCOVERY/halconf.h)0
-rw-r--r--demos/STM32/CMSIS-STM32F407-DISCOVERY/cfg/mcuconf.h (renamed from demos/STM32/CMSIS-STM32F407-DISCOVERY/mcuconf.h)0
-rw-r--r--demos/STM32/HAL-STM32F407-DISCOVERY/Makefile113
-rw-r--r--demos/STM32/HAL-STM32F407-DISCOVERY/cfg/halconf.h (renamed from demos/STM32/HAL-STM32F407-DISCOVERY/halconf.h)0
-rw-r--r--demos/STM32/HAL-STM32F407-DISCOVERY/cfg/mcuconf.h (renamed from demos/STM32/HAL-STM32F407-DISCOVERY/mcuconf.h)0
-rw-r--r--demos/STM32/HAL-STM32F407-DISCOVERY/cfg/osalconf.h (renamed from demos/STM32/HAL-STM32F407-DISCOVERY/osalconf.h)0
-rw-r--r--demos/STM32/NASA-OSAL-STM32F407-DISCOVERY/Makefile113
-rw-r--r--demos/STM32/NASA-OSAL-STM32F407-DISCOVERY/cfg/chconf.h (renamed from demos/STM32/NASA-OSAL-STM32F407-DISCOVERY/chconf.h)0
-rw-r--r--demos/STM32/NASA-OSAL-STM32F407-DISCOVERY/cfg/halconf.h (renamed from demos/STM32/NASA-OSAL-STM32F407-DISCOVERY/halconf.h)0
-rw-r--r--demos/STM32/NASA-OSAL-STM32F407-DISCOVERY/cfg/mcuconf.h (renamed from demos/STM32/NASA-OSAL-STM32F407-DISCOVERY/mcuconf.h)0
-rw-r--r--demos/STM32/NASA-OSAL-STM32F407-DISCOVERY/cfg/osconfig.h (renamed from demos/STM32/NASA-OSAL-STM32F407-DISCOVERY/osconfig.h)0
-rw-r--r--demos/STM32/NASA-OSAL-STM32F746G-DISCOVERY/Makefile113
-rw-r--r--demos/STM32/NASA-OSAL-STM32F746G-DISCOVERY/cfg/chconf.h (renamed from demos/STM32/NASA-OSAL-STM32F746G-DISCOVERY/chconf.h)0
-rw-r--r--demos/STM32/NASA-OSAL-STM32F746G-DISCOVERY/cfg/halconf.h (renamed from demos/STM32/NASA-OSAL-STM32F746G-DISCOVERY/halconf.h)0
-rw-r--r--demos/STM32/NASA-OSAL-STM32F746G-DISCOVERY/cfg/mcuconf.h (renamed from demos/STM32/NASA-OSAL-STM32F746G-DISCOVERY/mcuconf.h)1
-rw-r--r--demos/STM32/NASA-OSAL-STM32F746G-DISCOVERY/cfg/osconfig.h (renamed from demos/STM32/NASA-OSAL-STM32F746G-DISCOVERY/osconfig.h)0
-rw-r--r--demos/various/NIL-ARMCM0-GENERIC/Makefile9
-rw-r--r--demos/various/NIL-ARMCM4-GENERIC/Makefile9
-rw-r--r--demos/various/NIL-ARMCM4-GENERIC/cfg/chconf.h (renamed from demos/various/NIL-ARMCM4-GENERIC/chconf.h)0
-rw-r--r--demos/various/RT-ARMCM0-GENERIC/Makefile100
-rw-r--r--demos/various/RT-ARMCM4-GENERIC/Makefile95
23 files changed, 251 insertions, 415 deletions
diff --git a/demos/STM32/CMSIS-STM32F407-DISCOVERY/Makefile b/demos/STM32/CMSIS-STM32F407-DISCOVERY/Makefile
index 9c7e819f8..54c7be8ea 100644
--- a/demos/STM32/CMSIS-STM32F407-DISCOVERY/Makefile
+++ b/demos/STM32/CMSIS-STM32F407-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/rt/osal.mk
# RTOS files (optional).
include $(CHIBIOS)/os/rt/rt.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/rt/rt_test.mk
@@ -119,73 +127,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
##############################################################################
##############################################################################
@@ -208,8 +166,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/CMSIS-STM32F407-DISCOVERY/chconf.h b/demos/STM32/CMSIS-STM32F407-DISCOVERY/cfg/chconf.h
index b31851f43..b31851f43 100644
--- a/demos/STM32/CMSIS-STM32F407-DISCOVERY/chconf.h
+++ b/demos/STM32/CMSIS-STM32F407-DISCOVERY/cfg/chconf.h
diff --git a/demos/STM32/CMSIS-STM32F407-DISCOVERY/halconf.h b/demos/STM32/CMSIS-STM32F407-DISCOVERY/cfg/halconf.h
index 89be0946a..89be0946a 100644
--- a/demos/STM32/CMSIS-STM32F407-DISCOVERY/halconf.h
+++ b/demos/STM32/CMSIS-STM32F407-DISCOVERY/cfg/halconf.h
diff --git a/demos/STM32/CMSIS-STM32F407-DISCOVERY/mcuconf.h b/demos/STM32/CMSIS-STM32F407-DISCOVERY/cfg/mcuconf.h
index d04cdfa77..d04cdfa77 100644
--- a/demos/STM32/CMSIS-STM32F407-DISCOVERY/mcuconf.h
+++ b/demos/STM32/CMSIS-STM32F407-DISCOVERY/cfg/mcuconf.h
diff --git a/demos/STM32/HAL-STM32F407-DISCOVERY/Makefile b/demos/STM32/HAL-STM32F407-DISCOVERY/Makefile
index 8836a2d84..c1c7e4db7 100644
--- a/demos/STM32/HAL-STM32F407-DISCOVERY/Makefile
+++ b/demos/STM32/HAL-STM32F407-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/os-less/ARMCMx/osal.mk
# RTOS files (optional).
#include $(CHIBIOS)/os/rt/rt.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/rt/rt_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/HAL-STM32F407-DISCOVERY/halconf.h b/demos/STM32/HAL-STM32F407-DISCOVERY/cfg/halconf.h
index 89be0946a..89be0946a 100644
--- a/demos/STM32/HAL-STM32F407-DISCOVERY/halconf.h
+++ b/demos/STM32/HAL-STM32F407-DISCOVERY/cfg/halconf.h
diff --git a/demos/STM32/HAL-STM32F407-DISCOVERY/mcuconf.h b/demos/STM32/HAL-STM32F407-DISCOVERY/cfg/mcuconf.h
index d04cdfa77..d04cdfa77 100644
--- a/demos/STM32/HAL-STM32F407-DISCOVERY/mcuconf.h
+++ b/demos/STM32/HAL-STM32F407-DISCOVERY/cfg/mcuconf.h
diff --git a/demos/STM32/HAL-STM32F407-DISCOVERY/osalconf.h b/demos/STM32/HAL-STM32F407-DISCOVERY/cfg/osalconf.h
index 532eefab7..532eefab7 100644
--- a/demos/STM32/HAL-STM32F407-DISCOVERY/osalconf.h
+++ b/demos/STM32/HAL-STM32F407-DISCOVERY/cfg/osalconf.h
diff --git a/demos/STM32/NASA-OSAL-STM32F407-DISCOVERY/Makefile b/demos/STM32/NASA-OSAL-STM32F407-DISCOVERY/Makefile
index 2ec1b96c0..264b0f95f 100644
--- a/demos/STM32/NASA-OSAL-STM32F407-DISCOVERY/Makefile
+++ b/demos/STM32/NASA-OSAL-STM32F407-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/rt/osal.mk
# RTOS files (optional).
include $(CHIBIOS)/os/rt/rt.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/nasa_osal/nasa_osal_test.mk
@@ -119,73 +127,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
##############################################################################
##############################################################################
@@ -208,8 +166,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/NASA-OSAL-STM32F407-DISCOVERY/chconf.h b/demos/STM32/NASA-OSAL-STM32F407-DISCOVERY/cfg/chconf.h
index a9b0ba426..a9b0ba426 100644
--- a/demos/STM32/NASA-OSAL-STM32F407-DISCOVERY/chconf.h
+++ b/demos/STM32/NASA-OSAL-STM32F407-DISCOVERY/cfg/chconf.h
diff --git a/demos/STM32/NASA-OSAL-STM32F407-DISCOVERY/halconf.h b/demos/STM32/NASA-OSAL-STM32F407-DISCOVERY/cfg/halconf.h
index 89be0946a..89be0946a 100644
--- a/demos/STM32/NASA-OSAL-STM32F407-DISCOVERY/halconf.h
+++ b/demos/STM32/NASA-OSAL-STM32F407-DISCOVERY/cfg/halconf.h
diff --git a/demos/STM32/NASA-OSAL-STM32F407-DISCOVERY/mcuconf.h b/demos/STM32/NASA-OSAL-STM32F407-DISCOVERY/cfg/mcuconf.h
index d04cdfa77..d04cdfa77 100644
--- a/demos/STM32/NASA-OSAL-STM32F407-DISCOVERY/mcuconf.h
+++ b/demos/STM32/NASA-OSAL-STM32F407-DISCOVERY/cfg/mcuconf.h
diff --git a/demos/STM32/NASA-OSAL-STM32F407-DISCOVERY/osconfig.h b/demos/STM32/NASA-OSAL-STM32F407-DISCOVERY/cfg/osconfig.h
index e435b46e0..e435b46e0 100644
--- a/demos/STM32/NASA-OSAL-STM32F407-DISCOVERY/osconfig.h
+++ b/demos/STM32/NASA-OSAL-STM32F407-DISCOVERY/cfg/osconfig.h
diff --git a/demos/STM32/NASA-OSAL-STM32F746G-DISCOVERY/Makefile b/demos/STM32/NASA-OSAL-STM32F746G-DISCOVERY/Makefile
index 7111ea4c3..46b223f32 100644
--- a/demos/STM32/NASA-OSAL-STM32F746G-DISCOVERY/Makefile
+++ b/demos/STM32/NASA-OSAL-STM32F746G-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-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/rt/osal.mk
# RTOS files (optional).
include $(CHIBIOS)/os/rt/rt.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/nasa_osal/nasa_osal_test.mk
@@ -119,73 +127,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
##############################################################################
##############################################################################
@@ -208,8 +166,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/NASA-OSAL-STM32F746G-DISCOVERY/chconf.h b/demos/STM32/NASA-OSAL-STM32F746G-DISCOVERY/cfg/chconf.h
index 4e2a63b87..4e2a63b87 100644
--- a/demos/STM32/NASA-OSAL-STM32F746G-DISCOVERY/chconf.h
+++ b/demos/STM32/NASA-OSAL-STM32F746G-DISCOVERY/cfg/chconf.h
diff --git a/demos/STM32/NASA-OSAL-STM32F746G-DISCOVERY/halconf.h b/demos/STM32/NASA-OSAL-STM32F746G-DISCOVERY/cfg/halconf.h
index 89be0946a..89be0946a 100644
--- a/demos/STM32/NASA-OSAL-STM32F746G-DISCOVERY/halconf.h
+++ b/demos/STM32/NASA-OSAL-STM32F746G-DISCOVERY/cfg/halconf.h
diff --git a/demos/STM32/NASA-OSAL-STM32F746G-DISCOVERY/mcuconf.h b/demos/STM32/NASA-OSAL-STM32F746G-DISCOVERY/cfg/mcuconf.h
index f937fe400..5ecb499dd 100644
--- a/demos/STM32/NASA-OSAL-STM32F746G-DISCOVERY/mcuconf.h
+++ b/demos/STM32/NASA-OSAL-STM32F746G-DISCOVERY/cfg/mcuconf.h
@@ -32,6 +32,7 @@
*/
#define STM32F7xx_MCUCONF
+#define STM32F746_MCUCONF
/*
* HAL driver system settings.
diff --git a/demos/STM32/NASA-OSAL-STM32F746G-DISCOVERY/osconfig.h b/demos/STM32/NASA-OSAL-STM32F746G-DISCOVERY/cfg/osconfig.h
index e435b46e0..e435b46e0 100644
--- a/demos/STM32/NASA-OSAL-STM32F746G-DISCOVERY/osconfig.h
+++ b/demos/STM32/NASA-OSAL-STM32F746G-DISCOVERY/cfg/osconfig.h
diff --git a/demos/various/NIL-ARMCM0-GENERIC/Makefile b/demos/various/NIL-ARMCM0-GENERIC/Makefile
index 95e984bdc..c69d8834a 100644
--- a/demos/various/NIL-ARMCM0-GENERIC/Makefile
+++ b/demos/various/NIL-ARMCM0-GENERIC/Makefile
@@ -69,6 +69,11 @@ 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
##############################################################################
@@ -84,8 +89,8 @@ PROJECT = ch
MCU = cortex-m0
# Imported source files and paths.
-CHIBIOS = ../../..
-CONFDIR := .
+CHIBIOS := ../../..
+CONFDIR := ./cfg
BUILDDIR := ./build
DEPDIR := ./.dep
diff --git a/demos/various/NIL-ARMCM4-GENERIC/Makefile b/demos/various/NIL-ARMCM4-GENERIC/Makefile
index 9f3052ebb..e76f12206 100644
--- a/demos/various/NIL-ARMCM4-GENERIC/Makefile
+++ b/demos/various/NIL-ARMCM4-GENERIC/Makefile
@@ -69,6 +69,11 @@ 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
##############################################################################
@@ -84,8 +89,8 @@ PROJECT = ch
MCU = cortex-m4
# Imported source files and paths.
-CHIBIOS = ../../..
-CONFDIR := .
+CHIBIOS := ../../..
+CONFDIR := ./cfg
BUILDDIR := ./build
DEPDIR := ./.dep
diff --git a/demos/various/NIL-ARMCM4-GENERIC/chconf.h b/demos/various/NIL-ARMCM4-GENERIC/cfg/chconf.h
index c6507a891..c6507a891 100644
--- a/demos/various/NIL-ARMCM4-GENERIC/chconf.h
+++ b/demos/various/NIL-ARMCM4-GENERIC/cfg/chconf.h
diff --git a/demos/various/RT-ARMCM0-GENERIC/Makefile b/demos/various/RT-ARMCM0-GENERIC/Makefile
index 4cfcf6c47..496e003c7 100644
--- a/demos/various/RT-ARMCM0-GENERIC/Makefile
+++ b/demos/various/RT-ARMCM0-GENERIC/Makefile
@@ -33,11 +33,6 @@ 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,27 @@ 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
@@ -103,6 +106,8 @@ include $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32f0xx.m
# RTOS files (optional).
include $(CHIBIOS)/os/rt/rt.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/rt/rt_test.mk
@@ -121,34 +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.
ASMSRC = $(ALLASMSRC)
+
+# List ASM with preprocessor source files here.
ASMXSRC = $(ALLXASMSRC)
+# Inclusion directories.
INCDIR = $(CONFDIR) $(ALLINC) $(TESTINC)
+# Define C warning options here.
+CWARN = -Wall -Wextra -Wundef -Wstrict-prototypes
+
+# Define C++ warning options here.
+CPPWARN = -Wall -Wextra -Wundef
+
#
-# Project, sources and paths
+# Project, target, sources and paths
##############################################################################
##############################################################################
@@ -175,49 +169,21 @@ ULIBS =
##############################################################################
##############################################################################
-# Compiler settings
+# Common rules
#
-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
-CWARN = -Wall -Wextra -Wundef -Wstrict-prototypes
-
-# Define C++ warning options here
-CPPWARN = -Wall -Wextra -Wundef
+RULESPATH = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/mk
+include $(RULESPATH)/arm-none-eabi.mk
+include $(RULESPATH)/rules.mk
#
-# Compiler settings
+# Common rules
##############################################################################
-RULESPATH = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/mk
-include $(RULESPATH)/rules.mk
-
##############################################################################
-# MISRA check rule, requires PCLint and the setup files, not provided.
+# Custom rules
#
-misra:
- @lint-nt -v -w3 $(DEFS) pclint/co-gcc.lnt pclint/au-misra3.lnt pclint/waivers.lnt $(IINCDIR) $(CSRC) &> misra.txt
+
+#
+# Custom rules
+##############################################################################
diff --git a/demos/various/RT-ARMCM4-GENERIC/Makefile b/demos/various/RT-ARMCM4-GENERIC/Makefile
index 82427f1c7..6d341b1e4 100644
--- a/demos/various/RT-ARMCM4-GENERIC/Makefile
+++ b/demos/various/RT-ARMCM4-GENERIC/Makefile
@@ -33,11 +33,6 @@ 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
@@ -76,7 +71,7 @@ endif
# FPU-related options.
ifeq ($(USE_FPU_OPT),)
- USE_FPU_OPT = -mfloat-abi=$(USE_FPU) -mfpu=fpv4-sp-d16 -fsingle-precision-constant
+ USE_FPU_OPT = -mfloat-abi=$(USE_FPU) -mfpu=fpv4-sp-d16
endif
#
@@ -84,14 +79,17 @@ endif
##############################################################################
##############################################################################
-# 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
@@ -128,34 +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.
ASMSRC = $(ALLASMSRC)
+
+# List ASM with preprocessor source files here.
ASMXSRC = $(ALLXASMSRC)
+# Inclusion directories.
INCDIR = $(CONFDIR) $(ALLINC) $(TESTINC)
+# Define C warning options here.
+CWARN = -Wall -Wextra -Wundef -Wstrict-prototypes
+
+# Define C++ warning options here.
+CPPWARN = -Wall -Wextra -Wundef
+
#
-# Project, sources and paths
+# Project, target, sources and paths
##############################################################################
##############################################################################
@@ -182,49 +169,21 @@ ULIBS =
##############################################################################
##############################################################################
-# Compiler settings
+# Common rules
#
-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
-CWARN = -Wall -Wextra -Wundef -Wstrict-prototypes
-
-# Define C++ warning options here
-CPPWARN = -Wall -Wextra -Wundef
+RULESPATH = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/mk
+include $(RULESPATH)/arm-none-eabi.mk
+include $(RULESPATH)/rules.mk
#
-# Compiler settings
+# Common rules
##############################################################################
-RULESPATH = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/mk
-include $(RULESPATH)/rules.mk
-
##############################################################################
-# MISRA check rule, requires PCLint and the setup files, not provided.
+# Custom rules
#
-misra:
- @lint-nt -v -w3 $(DEFS) pclint/co-gcc.lnt pclint/au-misra3.lnt pclint/waivers.lnt $(IINCDIR) $(CSRC) &> misra.txt
+
+#
+# Custom rules
+##############################################################################