commit 732a4657e2ba4a3bd5b4244e06cfbae9bb2a3e56
Author: Thomas Schöpping <tschoepp@cit-ec.uni-bielefeld.de>
Date:   Mon Feb 25 13:42:39 2019 +0100

    ChibiOS updated to version stable_19.1.x.
    NOTE: ChibiOS 19.1.x seems to contain some issues as of now.

diff --git a/modules/LightRing_1-0/Makefile b/modules/LightRing_1-0/Makefile
index daaecbb..a8f03fd 100644
--- a/modules/LightRing_1-0/Makefile
+++ b/modules/LightRing_1-0/Makefile
@@ -43,7 +43,7 @@ ifeq ($(USE_CPPOPT),)
   USE_CPPOPT = -fno-rtti -std=c++17
 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
@@ -53,16 +53,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
@@ -94,7 +89,7 @@ ifeq ($(USE_EXCEPTIONS_STACKSIZE),)
   USE_EXCEPTIONS_STACKSIZE = 0x400
 endif
 
-# Enables the use of FPU on Cortex-M4.
+# Enables the use of FPU.
 # Possible selections are:
 #   no     - no FPU is used (probably equals 'soft')
 #   soft   - does not use the FPU, thus all floating point operations are emulated
@@ -104,32 +99,47 @@ 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 := $(patsubst $(abspath $(dir $(abspath $(lastword $(MAKEFILE_LIST))))..)/%,%,$(abspath $(dir $(abspath $(lastword $(MAKEFILE_LIST))))))
 
-# Imported source files and paths
+# Target settings.
+MCU = cortex-m3
+
+# Imported source files and paths.
 include ../../kernel/kernel.mk
-CHIBIOS := $(AMIROOS_KERNEL)
-AMIROOS = ../..
-# Licensing files
+CHIBIOS    := $(AMIROOS_KERNEL)
+CONFDIR    := .
+ifeq ($(BUILDDIR),)
+  BUILDDIR := ./build
+endif
+DEPDIR     := $(dir $(BUILDDIR)).dep
+AMIROOS    := ../..
+# Licensing files.
 include $(CHIBIOS)/os/license/license.mk
-# Startup files
+# Startup files.
 include $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32f1xx.mk
-# HAL-OSAL files
+# HAL-OSAL files (optional).
 include $(CHIBIOS)/os/hal/hal.mk
 include $(CHIBIOS)/os/hal/ports/STM32/STM32F1xx/platform.mk
 include $(CHIBIOS)/os/hal/osal/rt/osal.mk
-# RTOS files
+# 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
@@ -148,126 +158,58 @@ LDSCRIPT= STM32F103xE.ld
 
 # C sources that can be compiled in ARM or THUMB mode depending on the global
 # setting.
-CSRC = $(LICSRC) \
-       $(STARTUPSRC) \
-       $(KERNSRC) \
-       $(PORTSRC) \
-       $(OSALSRC) \
-       $(HALSRC) \
-       $(PLATFORMSRC) \
-       $(MODULESCSRC) \
+CSRC = $(ALLCSRC) \
        $(TESTSRC) \
-       $(PERIPHERYLLDCSRC) \
-       $(AMIROOSCORECSRC) \
-       $(UNITTESTSCSRC) \
        $(CHIBIOS)/os/various/evtimer.c \
        $(CHIBIOS)/os/various/syscalls.c \
        $(CHIBIOS)/os/hal/lib/streams/chprintf.c \
        board.c \
+       $(PERIPHERYLLDCSRC) \
+       $(UNITTESTSCSRC) \
+       $(AMIROOSCORECSRC) \
+       $(MODULESCSRC) \
        module.c \
        $(APPSCSRC)
 
 # C++ sources that can be compiled in ARM or THUMB mode depending on the global
 # setting.
-CPPSRC = $(AMIROOSCORECPPSRC) \
+CPPSRC = $(ALLCPPSRC) \
          $(CHIBIOS)/os/various/cpp_wrappers/syscalls_cpp.cpp \
+         $(AMIROOSCORECPPSRC) \
          $(APPSCPPSRC)
 
-# 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 = $(APPSACSRC)
-
-# 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 = $(APPSACPPSRC)
-
-# 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 = $(APPSTCSRC)
-
-# 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 = $(APPSTCPPSRC)
-
-# List ASM source files here
-ASMSRC = $(APPSASMSRC)
-ASMXSRC = $(STARTUPASM) \
-          $(PORTASM) \
-          $(OSALASM) \
+# List ASM source files here.
+ASMSRC = $(ALLASMSRC) \
+         $(APPSASMSRC)
+
+# List ASM with preprocessor source files here.
+ASMXSRC = $(ALLXASMSRC) \
           $(APPSASMXSRC)
 
-INCDIR = $(LICINC) \
-         $(STARTUPINC) \
-         $(KERNINC) \
-         $(PORTINC) \
-         $(OSALINC) \
-         $(HALINC) \
-         $(PLATFORMINC) \
-         $(MODULESINC) \
+# Inclusion directories.
+INCDIR = $(CONFDIR) \
+         $(ALLINC) \
          $(TESTINC) \
-         $(BOOTLOADERINC) \
          $(CHIBIOS)/os/hal/lib/streams \
+         $(BOOTLOADERINC) \
          $(PERIPHERYLLDINC) \
          $(AMIROOS) \
-         $(AMIROOSCOREINC) \
          $(UNITTESTSINC) \
+         $(AMIROOSCOREINC) \
+         $(MODULESINC) \
          $(APPSINC)
 
-#                                                                              #
-# Project, sources and paths                                                   #
-################################################################################
+# Define C warning options here.
+CWARN = -Wall -Wextra -Wundef -Wstrict-prototypes
 
-################################################################################
-# Compiler settings                                                            #
-# NOTE: Some can be overridden externally.                                     #
-#                                                                              #
+# Define C++ warning options here.
+CPPWARN = -Wall -Wextra -Wundef
 
-MCU  = cortex-m3
-
-#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
+# Create an additional .srec image file.
 SREC = $(CP) -O srec --srec-len=248
 
-# ARM-specific options here
-ifeq ($(AOPT),)
-  AOPT =
-endif
-
-# THUMB-specific options here
-ifeq ($(TOPT),)
-  TOPT = -mthumb -DTHUMB
-endif
-
-# Define C warning options here
-ifeq ($(CWARN),)
-  CWARN = -Wall -Wextra -Wundef -Wstrict-prototypes
-endif
-
-# Define C++ warning options here
-ifeq ($(CPPWARN),)
-  CPPWARN = -Wall -Wextra -Wundef
-endif
-
 #                                                                              #
-# Compiler settings                                                            #
+# Project, target, sources and paths                                           #
 ################################################################################
 
 ################################################################################
@@ -290,35 +232,38 @@ ULIBDIR +=
 ULIBS +=
 
 #                                                                              #
-# End of user defines                                                          #
+# End of user section                                                          #
 ################################################################################
 
 ################################################################################
-# Start of targets section                                                     #
+# Common rules                                                                 #
 #                                                                              #
 
-# all and its dependencies
-ifeq ($(BUILDDIR),)
-	BUILDDIR = ./build
-endif
-RULESPATH = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC
+RULESPATH = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/mk
+include $(RULESPATH)/arm-none-eabi.mk
 include $(RULESPATH)/rules.mk
 
-# flash
-include $(AMIROOS)/bootloader/bootloader.mk
+#                                                                              #
+# Common rules                                                                 #
+################################################################################
+
+################################################################################
+# Custom rules                                                                 #
+#                                                                              #
+
 FLASH_MODULES = $(PROJECT)
 FLASH_FILES = $(BUILDDIR)/$(PROJECT).$(FLASHTOOL_EXT)
 
 flash: $(FLASH_FILES)
 	$(info )
-ifeq ($(FLASHTOOL),SerialBoot)
-	$(info Flashing ($(FLASHTOOL)):)
-	$(FLASHTOOL_CMD) $(FLASHTOOL_ARGS)
-else
-	$(info ERROR: unable to flash the module (SerialBoot unavailable))
-endif
+	ifeq ($(FLASHTOOL),SerialBoot)
+		$(info Flashing ($(FLASHTOOL)):)
+		$(FLASHTOOL_CMD) $(FLASHTOOL_ARGS)
+	else
+		$(info ERROR: unable to flash the module (SerialBoot unavailable))
+	endif
 
 #                                                                              #
-# End of targets section                                                       #
+# Custom rules                                                                 #
 ################################################################################
 
