commit 4c72a54cb0b2745713595adaecfc1bad548c03e0
Author: Thomas Schöpping <tschoepp@cit-ec.uni-bielefeld.de>
Date:   Mon Jul 15 13:21:06 2019 +0200

    Massive overhaul:
    - updated to a new version of AMiRo-LLD
    - tests (formerly unit tests) are now split onto multiple parts:
      - there are "global" tests for each driver etc.
      - there is an individual part for each module, e.g. if there are multiple instances of the same periphery
    - a lot of minor enhancements

diff --git a/modules/NUCLEO-F767ZI/Makefile b/modules/NUCLEO-F767ZI/Makefile
index 3d95361..381e77f 100644
--- a/modules/NUCLEO-F767ZI/Makefile
+++ b/modules/NUCLEO-F767ZI/Makefile
@@ -112,100 +112,51 @@ endif
 # Project, target, sources and paths                                           #
 #                                                                              #
 
-# Absolute path to the project
-PROJECT_PATH := $(abspath $(dir $(abspath $(lastword $(MAKEFILE_LIST)))))
+# Absolute path to the project.
+PROJECT_PATH := $(abspath $(dir $(lastword $(MAKEFILE_LIST))))
 
-# Define project name here
-PROJECT := $(patsubst $(abspath $(dir $(abspath $(lastword $(MAKEFILE_LIST))))..)/%,%,$(PROJECT_PATH))
+# Project name.
+PROJECT := $(notdir $(PROJECT_PATH))
 
 # Target settings.
 MCU = cortex-m4
 
-# Imported source files and paths.
-include ../../kernel/kernel.mk
-CHIBIOS    := $(AMIROOS_KERNEL)
-CONFDIR    := .
+# Module specific paths and directories.
+MODULEDIR := .
+CONFDIR := $(MODULEDIR)
 ifeq ($(BUILDDIR),)
   BUILDDIR := $(PROJECT_PATH)/build
 endif
-DEPDIR     := $(dir $(BUILDDIR)).dep
-AMIROOS    := ../..
-# Licensing files.
-include $(CHIBIOS)/os/license/license.mk
-# Startup files.
+DEPDIR := $(dir $(BUILDDIR)).dep
+
+# Linker script.
+LDSCRIPT= STM32F76xxI.ld
+
+# General AMiRo-OS files.
+include ../../amiroos.mk
+
+# Module specific ChibiOS files.
 include $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32f7xx.mk
-# HAL-OSAL files (optional).
-include $(CHIBIOS)/os/hal/hal.mk
 include $(CHIBIOS)/os/hal/ports/STM32/STM32F7xx/platform.mk
-include $(CHIBIOS)/os/hal/osal/rt/osal.mk
-include $(CHIBIOS)/os/hal/lib/streams/streams.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
-include $(CHIBIOS)/test/oslib/oslib_test.mk
-# AMiRo-BLT files
-include ../../bootloader/bootloader.mk
-# AMiRo-LLD files
-include ../../periphery-lld/periphery-lld.mk
-# AMiRo-OS files
-include ../modules.mk
-include $(AMIROOS)/core/core.mk
-include $(AMIROOS)/unittests/unittests.mk
-
-# Define linker script file here
-LDSCRIPT= STM32F76xxI.ld
 
-# C sources that can be compiled in ARM or THUMB mode depending on the global
-# setting.
-CSRC = $(ALLCSRC) \
-       $(CHIBIOS)/os/various/syscalls.c \
-       $(CHIBIOS)/os/various/evtimer.c \
-       $(TESTSRC) \
-       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 = $(ALLCPPSRC) \
-         $(CHIBIOS)/os/various/cpp_wrappers/syscalls_cpp.cpp \
-         $(AMIROOSCORECPPSRC) \
-         $(APPSCPPSRC)
-
-# List ASM source files here.
-ASMSRC = $(ALLASMSRC) \
-         $(APPSASMSRC)
-
-# List ASM with preprocessor source files here.
-ASMXSRC = $(ALLXASMSRC) \
-          $(APPSASMXSRC)
-
-# Inclusion directories.
-INCDIR = $(CONFDIR) \
-         $(ALLINC) \
-         $(TESTINC) \
-         $(CHIBIOS)/os/hal/lib/streams \
-         $(BOOTLOADERINC) \
-         $(PERIPHERYLLDINC) \
-         $(AMIROOS) \
-         $(UNITTESTSINC) \
-         $(AMIROOSCOREINC) \
-         $(MODULESINC) \
-         $(APPSINC)
-
-# Define C warning options here.
+# Periphery LLDs.
+AMIROOS_PERIPHERYLLD_INC += $(AMIROLLD)/drivers/LED/v1 \
+                            $(AMIROLLD)/drivers/button/v1
+# Tests.
+AMIROOS_TEST_INC += $(AMIROOS_TEST_DIR)periphery-lld/LED_v1
+
+# Module specific inclusion directories
+MODULE_INC = $(MODULEDIR) \
+             $(wildcard $(MODULEDIR)/test/*)
+
+# Module specific C source files.
+MODULE_CSRC = $(wildcard $(MODULE_INC:%=%/*.[Cc]))
+
+# C warning options.
 CWARN = -Wall -Wextra -Wundef -Wstrict-prototypes
 
-# Define C++ warning options here.
+# C++ warning options.
 CPPWARN = -Wall -Wextra -Wundef
 
 #                                                                              #
