aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--demos/ARM7-AT91SAM7X-GCC/Makefile29
-rw-r--r--demos/ARM7-AT91SAM7X-WEB-GCC/Makefile49
-rw-r--r--demos/ARM7-LPC214x-G++/Makefile33
-rw-r--r--demos/ARM7-LPC214x-GCC-minimal/Makefile25
-rw-r--r--demos/ARM7-LPC214x-GCC/Makefile33
-rw-r--r--demos/ARMCM3-STM32F103-GCC/Makefile27
-rw-r--r--demos/AVR-AT90CANx-GCC/Makefile19
-rw-r--r--demos/AVR-ATmega128-GCC/Makefile19
-rw-r--r--demos/GNU-Linux-GCC/Makefile7
-rw-r--r--demos/MSP430-MSP430x1611-GCC/Makefile25
-rw-r--r--demos/Win32-MinGW/Makefile13
-rw-r--r--os/kernel/kernel.mk25
-rw-r--r--os/ports/GCC/ARM7/port.mk10
-rw-r--r--os/ports/GCC/ARMCM3/port.mk12
-rw-r--r--os/ports/GCC/AVR/port.mk6
-rw-r--r--os/ports/GCC/MSP430/port.mk6
-rw-r--r--readme.txt3
-rw-r--r--test/coverage/Makefile9
-rw-r--r--test/test.mk20
19 files changed, 199 insertions, 171 deletions
diff --git a/demos/ARM7-AT91SAM7X-GCC/Makefile b/demos/ARM7-AT91SAM7X-GCC/Makefile
index 5a9a7a94a..fa6f56c8c 100644
--- a/demos/ARM7-AT91SAM7X-GCC/Makefile
+++ b/demos/ARM7-AT91SAM7X-GCC/Makefile
@@ -43,20 +43,21 @@ PROJECT = ch
LDSCRIPT= ch.ld
# Imported source files
-include ../../os/ports/GCC/ARM7/port.mk
-include ../../os/kernel/kernel.mk
-include ../../test/test.mk
+CHIBIOS = ../..
+include ${CHIBIOS}/os/ports/GCC/ARM7/port.mk
+include ${CHIBIOS}/os/kernel/kernel.mk
+include ${CHIBIOS}/test/test.mk
# C sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
CSRC = ${PORTSRC} \
${KERNSRC} \
${TESTSRC} \
- ../../os/io/pal.c \
- ../../os/io/serial.c \
- ../../os/io/platforms/AT91SAM7X/pal_lld.c \
- ../../os/io/platforms/AT91SAM7X/serial_lld.c \
- ../../os/io/platforms/AT91SAM7X/at91lib/aic.c \
+ ${CHIBIOS}/os/io/pal.c \
+ ${CHIBIOS}/os/io/serial.c \
+ ${CHIBIOS}/os/io/platforms/AT91SAM7X/pal_lld.c \
+ ${CHIBIOS}/os/io/platforms/AT91SAM7X/serial_lld.c \
+ ${CHIBIOS}/os/io/platforms/AT91SAM7X/at91lib/aic.c \
board.c main.c
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
@@ -85,13 +86,13 @@ TCPPSRC =
# List ASM source files here
ASMSRC = $(PORTASM) \
- ../../os/ports/GCC/ARM7/AT91SAM7X/vectors.s
+ ${CHIBIOS}/os/ports/GCC/ARM7/AT91SAM7X/vectors.s
INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \
- ../../os/io \
- ../../os/io/platforms/AT91SAM7X \
- ../../os/various \
- ../../os/ports/GCC/ARM7/AT91SAM7X
+ ${CHIBIOS}/os/io \
+ ${CHIBIOS}/os/io/platforms/AT91SAM7X \
+ ${CHIBIOS}/os/various \
+ ${CHIBIOS}/os/ports/GCC/ARM7/AT91SAM7X
#
# Project, sources and paths
@@ -179,4 +180,4 @@ ULIBS =
# End of user defines
##############################################################################
-include ../../os/ports/GCC/ARM/rules.mk
+include ${CHIBIOS}/os/ports/GCC/ARM/rules.mk
diff --git a/demos/ARM7-AT91SAM7X-WEB-GCC/Makefile b/demos/ARM7-AT91SAM7X-WEB-GCC/Makefile
index 1484fefb2..9538d20d5 100644
--- a/demos/ARM7-AT91SAM7X-WEB-GCC/Makefile
+++ b/demos/ARM7-AT91SAM7X-WEB-GCC/Makefile
@@ -43,18 +43,19 @@ PROJECT = ch
LDSCRIPT= ch.ld
# Imported source files
-include ../../os/ports/GCC/ARM7/port.mk
-include ../../os/kernel/kernel.mk
-include ../../test/test.mk
+CHIBIOS = ../..
+include ${CHIBIOS}/os/ports/GCC/ARM7/port.mk
+include ${CHIBIOS}/os/kernel/kernel.mk
+include ${CHIBIOS}/test/test.mk
# List of the required uIP source files.
-USRC = ../../ext/uip-1.0/uip/uip_arp.c \
- ../../ext/uip-1.0/uip/psock.c \
- ../../ext/uip-1.0/uip/uip.c \
- ../../ext/uip-1.0/apps/webserver/httpd.c \
- ../../ext/uip-1.0/apps/webserver/http-strings.c \
- ../../ext/uip-1.0/apps/webserver/httpd-fs.c \
- ../../ext/uip-1.0/apps/webserver/httpd-cgi.c
+USRC = ${CHIBIOS}/ext/uip-1.0/uip/uip_arp.c \
+ ${CHIBIOS}/ext/uip-1.0/uip/psock.c \
+ ${CHIBIOS}/ext/uip-1.0/uip/uip.c \
+ ${CHIBIOS}/ext/uip-1.0/apps/webserver/httpd.c \
+ ${CHIBIOS}/ext/uip-1.0/apps/webserver/http-strings.c \
+ ${CHIBIOS}/ext/uip-1.0/apps/webserver/httpd-fs.c \
+ ${CHIBIOS}/ext/uip-1.0/apps/webserver/httpd-cgi.c
# C sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
@@ -62,13 +63,13 @@ CSRC = ${PORTSRC} \
${KERNSRC} \
${TESTSRC} \
${USRC} \
- ../../os/io/pal.c \
- ../../os/io/serial.c \
- ../../os/io/platforms/AT91SAM7X/pal_lld.c \
- ../../os/io/platforms/AT91SAM7X/serial_lld.c \
- ../../os/io/platforms/AT91SAM7X/sam7x_emac.c \
- ../../os/io/platforms/AT91SAM7X/at91lib/aic.c \
- ../../os/various/evtimer.c \
+ ${CHIBIOS}/os/io/pal.c \
+ ${CHIBIOS}/os/io/serial.c \
+ ${CHIBIOS}/os/io/platforms/AT91SAM7X/pal_lld.c \
+ ${CHIBIOS}/os/io/platforms/AT91SAM7X/serial_lld.c \
+ ${CHIBIOS}/os/io/platforms/AT91SAM7X/sam7x_emac.c \
+ ${CHIBIOS}/os/io/platforms/AT91SAM7X/at91lib/aic.c \
+ ${CHIBIOS}/os/various/evtimer.c \
web/webthread.c \
board.c main.c
@@ -98,14 +99,14 @@ TCPPSRC =
# List ASM source files here
ASMSRC = $(PORTASM) \
- ../../os/ports/GCC/ARM7/AT91SAM7X/vectors.s
+ ${CHIBIOS}/os/ports/GCC/ARM7/AT91SAM7X/vectors.s
INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \
- ../../os/io \
- ../../os/io/platforms/AT91SAM7X \
- ../../os/various \
- ../../os/ports/GCC/ARM7/AT91SAM7X \
- ./web ../../ext/uip-1.0/uip ../../ext/uip-1.0/apps/webserver
+ ${CHIBIOS}/os/io \
+ ${CHIBIOS}/os/io/platforms/AT91SAM7X \
+ ${CHIBIOS}/os/various \
+ ${CHIBIOS}/os/ports/GCC/ARM7/AT91SAM7X \
+ ./web ${CHIBIOS}/ext/uip-1.0/uip ${CHIBIOS}/ext/uip-1.0/apps/webserver
#
# Project, sources and paths
@@ -193,4 +194,4 @@ ULIBS =
# End of user defines
##############################################################################
-include ../../os/ports/GCC/ARM/rules.mk
+include ${CHIBIOS}/os/ports/GCC/ARM/rules.mk
diff --git a/demos/ARM7-LPC214x-G++/Makefile b/demos/ARM7-LPC214x-G++/Makefile
index 1940c8509..3b0a8bee3 100644
--- a/demos/ARM7-LPC214x-G++/Makefile
+++ b/demos/ARM7-LPC214x-G++/Makefile
@@ -43,26 +43,27 @@ PROJECT = ch
LDSCRIPT = ch.ld
# Imported source files
-include ../../os/ports/GCC/ARM7/port.mk
-include ../../os/kernel/kernel.mk
-include ../../test/test.mk
+CHIBIOS = ../..
+include ${CHIBIOS}/os/ports/GCC/ARM7/port.mk
+include ${CHIBIOS}/os/kernel/kernel.mk
+include ${CHIBIOS}/test/test.mk
# C sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
CSRC = ${PORTSRC} \
${KERNSRC} \
${TESTSRC} \
- ../../os/io/pal.c \
- ../../os/io/serial.c \
- ../../os/io/platforms/LPC214x/pal_lld.c \
- ../../os/io/platforms/LPC214x/serial_lld.c \
- ../../os/io/platforms/LPC214x/vic.c \
- ../../os/various/evtimer.c \
+ ${CHIBIOS}/os/io/pal.c \
+ ${CHIBIOS}/os/io/serial.c \
+ ${CHIBIOS}/os/io/platforms/LPC214x/pal_lld.c \
+ ${CHIBIOS}/os/io/platforms/LPC214x/serial_lld.c \
+ ${CHIBIOS}/os/io/platforms/LPC214x/vic.c \
+ ${CHIBIOS}/os/various/evtimer.c \
board.c
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
-CPPSRC = ../../os/various/ch.cpp main.cpp
+CPPSRC = ${CHIBIOS}/os/various/ch.cpp main.cpp
# C sources to be compiled in ARM mode regardless of the global setting.
# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
@@ -86,13 +87,13 @@ TCPPSRC =
# List ASM source files here
ASMSRC = $(PORTASM) \
- ../../os/ports/GCC/ARM7/LPC214x/vectors.s
+ ${CHIBIOS}/os/ports/GCC/ARM7/LPC214x/vectors.s
INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \
- ../../os/io \
- ../../os/io/platforms/LPC214x \
- ../../os/various \
- ../../os/ports/GCC/ARM7/LPC214x
+ ${CHIBIOS}/os/io \
+ ${CHIBIOS}/os/io/platforms/LPC214x \
+ ${CHIBIOS}/os/various \
+ ${CHIBIOS}/os/ports/GCC/ARM7/LPC214x
#
# Project, sources and paths
@@ -180,4 +181,4 @@ ULIBS =
# End of user defines
##############################################################################
-include ../../os/ports/GCC/ARM/rules.mk
+include ${CHIBIOS}/os/ports/GCC/ARM/rules.mk
diff --git a/demos/ARM7-LPC214x-GCC-minimal/Makefile b/demos/ARM7-LPC214x-GCC-minimal/Makefile
index 23b74db74..5315948af 100644
--- a/demos/ARM7-LPC214x-GCC-minimal/Makefile
+++ b/demos/ARM7-LPC214x-GCC-minimal/Makefile
@@ -43,18 +43,19 @@ PROJECT = ch
LDSCRIPT = ch.ld
# Imported source files
-include ../../os/ports/GCC/ARM7/port.mk
-include ../../os/kernel/kernel.mk
-#include ../../test/test.mk
+CHIBIOS = ../..
+include ${CHIBIOS}/os/ports/GCC/ARM7/port.mk
+include ${CHIBIOS}/os/kernel/kernel.mk
+#include ${CHIBIOS}/test/test.mk
# C sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
CSRC = ${PORTSRC} \
${KERNSRC} \
${TESTSRC} \
- ../../os/io/pal.c \
- ../../os/io/platforms/LPC214x/pal_lld.c \
- ../../os/io/platforms/LPC214x/vic.c \
+ ${CHIBIOS}/os/io/pal.c \
+ ${CHIBIOS}/os/io/platforms/LPC214x/pal_lld.c \
+ ${CHIBIOS}/os/io/platforms/LPC214x/vic.c \
board.c main.c
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
@@ -83,13 +84,13 @@ TCPPSRC =
# List ASM source files here
ASMSRC = $(PORTASM) \
- ../../os/ports/GCC/ARM7/LPC214x/vectors.s
+ ${CHIBIOS}/os/ports/GCC/ARM7/LPC214x/vectors.s
INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \
- ../../os/io \
- ../../os/io/platforms/LPC214x \
- ../../os/various \
- ../../os/ports/GCC/ARM7/LPC214x
+ ${CHIBIOS}/os/io \
+ ${CHIBIOS}/os/io/platforms/LPC214x \
+ ${CHIBIOS}/os/various \
+ ${CHIBIOS}/os/ports/GCC/ARM7/LPC214x
#
# Project, sources and paths
@@ -177,4 +178,4 @@ ULIBS =
# End of user defines
##############################################################################
-include ../../os/ports/GCC/ARM/rules.mk
+include ${CHIBIOS}/os/ports/GCC/ARM/rules.mk
diff --git a/demos/ARM7-LPC214x-GCC/Makefile b/demos/ARM7-LPC214x-GCC/Makefile
index 67b082af3..54b1e0ffd 100644
--- a/demos/ARM7-LPC214x-GCC/Makefile
+++ b/demos/ARM7-LPC214x-GCC/Makefile
@@ -43,22 +43,23 @@ PROJECT = ch
LDSCRIPT = ch.ld
# Imported source files
-include ../../os/ports/GCC/ARM7/port.mk
-include ../../os/kernel/kernel.mk
-include ../../test/test.mk
+CHIBIOS = ../..
+include ${CHIBIOS}/os/ports/GCC/ARM7/port.mk
+include ${CHIBIOS}/os/kernel/kernel.mk
+include ${CHIBIOS}/test/test.mk
# C sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
CSRC = ${PORTSRC} \
${KERNSRC} \
${TESTSRC} \
- ../../os/io/pal.c \
- ../../os/io/serial.c \
- ../../os/io/platforms/LPC214x/pal_lld.c \
- ../../os/io/platforms/LPC214x/serial_lld.c \
- ../../os/io/platforms/LPC214x/vic.c \
- ../../os/io/platforms/LPC214x/lpc214x_ssp.c \
- ../../os/various/evtimer.c \
+ ${CHIBIOS}/os/io/pal.c \
+ ${CHIBIOS}/os/io/serial.c \
+ ${CHIBIOS}/os/io/platforms/LPC214x/pal_lld.c \
+ ${CHIBIOS}/os/io/platforms/LPC214x/serial_lld.c \
+ ${CHIBIOS}/os/io/platforms/LPC214x/vic.c \
+ ${CHIBIOS}/os/io/platforms/LPC214x/lpc214x_ssp.c \
+ ${CHIBIOS}/os/various/evtimer.c \
board.c buzzer.c mmcsd.c main.c
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
@@ -87,13 +88,13 @@ TCPPSRC =
# List ASM source files here
ASMSRC = $(PORTASM) \
- ../../os/ports/GCC/ARM7/LPC214x/vectors.s
+ ${CHIBIOS}/os/ports/GCC/ARM7/LPC214x/vectors.s
INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \
- ../../os/io \
- ../../os/io/platforms/LPC214x \
- ../../os/various \
- ../../os/ports/GCC/ARM7/LPC214x
+ ${CHIBIOS}/os/io \
+ ${CHIBIOS}/os/io/platforms/LPC214x \
+ ${CHIBIOS}/os/various \
+ ${CHIBIOS}/os/ports/GCC/ARM7/LPC214x
#
# Project, sources and paths
@@ -181,4 +182,4 @@ ULIBS =
# End of user defines
##############################################################################
-include ../../os/ports/GCC/ARM/rules.mk
+include ${CHIBIOS}/os/ports/GCC/ARM/rules.mk
diff --git a/demos/ARMCM3-STM32F103-GCC/Makefile b/demos/ARMCM3-STM32F103-GCC/Makefile
index 99d5b065d..ca12fd05d 100644
--- a/demos/ARMCM3-STM32F103-GCC/Makefile
+++ b/demos/ARMCM3-STM32F103-GCC/Makefile
@@ -56,20 +56,21 @@ PROJECT = ch
LDSCRIPT= ch.ld
# Imported source files
-include ../../os/ports/GCC/ARMCM3/port.mk
-include ../../os/kernel/kernel.mk
-include ../../test/test.mk
+CHIBIOS = ../..
+include ${CHIBIOS}/os/ports/GCC/ARMCM3/port.mk
+include ${CHIBIOS}/os/kernel/kernel.mk
+include ${CHIBIOS}/test/test.mk
# C sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
CSRC = ${PORTSRC} \
${KERNSRC} \
${TESTSRC} \
- ../../os/io/pal.c \
- ../../os/io/serial.c \
- ../../os/io/platforms/STM32/pal_lld.c \
- ../../os/io/platforms/STM32/serial_lld.c \
- ../../os/various/evtimer.c \
+ ${CHIBIOS}/os/io/pal.c \
+ ${CHIBIOS}/os/io/serial.c \
+ ${CHIBIOS}/os/io/platforms/STM32/pal_lld.c \
+ ${CHIBIOS}/os/io/platforms/STM32/serial_lld.c \
+ ${CHIBIOS}/os/various/evtimer.c \
board.c main.c
@@ -99,12 +100,12 @@ TCPPSRC =
# List ASM source files here
ASMSRC = $(PORTASM) \
- ../../os/ports/GCC/ARMCM3/STM32F103/vectors.s
+ ${CHIBIOS}/os/ports/GCC/ARMCM3/STM32F103/vectors.s
INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \
- ../../os/io \
- ../../os/io/platforms/STM32 \
- ../../os/various \
+ ${CHIBIOS}/os/io \
+ ${CHIBIOS}/os/io/platforms/STM32 \
+ ${CHIBIOS}/os/various \
./stm32lib/inc
#
@@ -199,4 +200,4 @@ ifeq ($(USE_FWLIB),yes)
USE_OPT += -DUSE_STDPERIPH_DRIVER
endif
-include ../../os/ports/GCC/ARM/rules.mk
+include ${CHIBIOS}/os/ports/GCC/ARM/rules.mk
diff --git a/demos/AVR-AT90CANx-GCC/Makefile b/demos/AVR-AT90CANx-GCC/Makefile
index 30ae2aad0..5754a6371 100644
--- a/demos/AVR-AT90CANx-GCC/Makefile
+++ b/demos/AVR-AT90CANx-GCC/Makefile
@@ -80,18 +80,19 @@ OBJDIR = .
# Imported source files
-include ../../os/ports/GCC/AVR/port.mk
-include ../../os/kernel/kernel.mk
-include ../../test/test.mk
+CHIBIOS = ../..
+include ${CHIBIOS}/os/ports/GCC/AVR/port.mk
+include ${CHIBIOS}/os/kernel/kernel.mk
+include ${CHIBIOS}/test/test.mk
# List C source files here. (C dependencies are automatically generated.)
SRC = ${PORTSRC} \
${KERNSRC} \
${TESTSRC} \
- ../../os/io/serial.c \
- ../../os/io/platforms/AVR/serial_lld.c \
- ../../os/various/evtimer.c \
+ ${CHIBIOS}/os/io/serial.c \
+ ${CHIBIOS}/os/io/platforms/AVR/serial_lld.c \
+ ${CHIBIOS}/os/various/evtimer.c \
board.c main.c
@@ -127,9 +128,9 @@ DEBUG = dwarf-2
# Use forward slashes for directory separators.
# For a directory that has spaces, enclose it in quotes.
EXTRAINCDIRS = $(PORTINC) $(KERNINC) $(TESTINC) \
- ../../os/io \
- ../../os/io/platforms/AVR \
- ../../os/various
+ ${CHIBIOS}/os/io \
+ ${CHIBIOS}/os/io/platforms/AVR \
+ ${CHIBIOS}/os/various
# Compiler flag to set the C Standard level.
diff --git a/demos/AVR-ATmega128-GCC/Makefile b/demos/AVR-ATmega128-GCC/Makefile
index c56520b08..dcc7f7beb 100644
--- a/demos/AVR-ATmega128-GCC/Makefile
+++ b/demos/AVR-ATmega128-GCC/Makefile
@@ -80,18 +80,19 @@ OBJDIR = .
# Imported source files
-include ../../os/ports/GCC/AVR/port.mk
-include ../../os/kernel/kernel.mk
-include ../../test/test.mk
+CHIBIOS = ../..
+include ${CHIBIOS}/os/ports/GCC/AVR/port.mk
+include ${CHIBIOS}/os/kernel/kernel.mk
+include ${CHIBIOS}/test/test.mk
# List C source files here. (C dependencies are automatically generated.)
SRC = ${PORTSRC} \
${KERNSRC} \
${TESTSRC} \
- ../../os/io/serial.c \
- ../../os/io/platforms/AVR/serial_lld.c \
- ../../os/various/evtimer.c \
+ ${CHIBIOS}/os/io/serial.c \
+ ${CHIBIOS}/os/io/platforms/AVR/serial_lld.c \
+ ${CHIBIOS}/os/various/evtimer.c \
lcd.c board.c main.c
@@ -127,9 +128,9 @@ DEBUG = dwarf-2
# Use forward slashes for directory separators.
# For a directory that has spaces, enclose it in quotes.
EXTRAINCDIRS = $(PORTINC) $(KERNINC) $(TESTINC) \
- ../../os/io \
- ../../os/io/platforms/AVR \
- ../../os/various
+ ${CHIBIOS}/os/io \
+ ${CHIBIOS}/os/io/platforms/AVR \
+ ${CHIBIOS}/os/various
# Compiler flag to set the C Standard level.
diff --git a/demos/GNU-Linux-GCC/Makefile b/demos/GNU-Linux-GCC/Makefile
index 5483d4448..51a8b25db 100644
--- a/demos/GNU-Linux-GCC/Makefile
+++ b/demos/GNU-Linux-GCC/Makefile
@@ -56,8 +56,9 @@ UDEFS =
UADEFS =
# Imported source files
-include ../../src/kernel.mk
-include ../../test/test.mk
+CHIBIOS = ../..
+include ${CHIBIOS}/src/kernel.mk
+include ${CHIBIOS}/test/test.mk
# List C source files here
SRC = chcore.c main.c \
@@ -68,7 +69,7 @@ SRC = chcore.c main.c \
ASRC =
# List all user directories here
-UINCDIR = ../../src/include
+UINCDIR = ${CHIBIOS}/src/include
# List the user directory to look for the libraries here
ULIBDIR =
diff --git a/demos/MSP430-MSP430x1611-GCC/Makefile b/demos/MSP430-MSP430x1611-GCC/Makefile
index 98265abf8..dc3747875 100644
--- a/demos/MSP430-MSP430x1611-GCC/Makefile
+++ b/demos/MSP430-MSP430x1611-GCC/Makefile
@@ -39,19 +39,20 @@ PROJECT = ch
LDSCRIPT = mspgcc/msp430x1611.x
# Imported source files
-include ../../os/ports/GCC/MSP430/port.mk
-include ../../os/kernel/kernel.mk
-include ../../test/test.mk
+CHIBIOS = ../..
+include ${CHIBIOS}/os/ports/GCC/MSP430/port.mk
+include ${CHIBIOS}/os/kernel/kernel.mk
+include ${CHIBIOS}/test/test.mk
# C sources here.
CSRC = ${PORTSRC} \
${KERNSRC} \
${TESTSRC} \
- ../../os/io/pal.c \
- ../../os/io/serial.c \
- ../../os/io/platforms/MSP430/pal_lld.c \
- ../../os/io/platforms/MSP430/serial_lld.c \
- ../../os/various/evtimer.c \
+ ${CHIBIOS}/os/io/pal.c \
+ ${CHIBIOS}/os/io/serial.c \
+ ${CHIBIOS}/os/io/platforms/MSP430/pal_lld.c \
+ ${CHIBIOS}/os/io/platforms/MSP430/serial_lld.c \
+ ${CHIBIOS}/os/various/evtimer.c \
board.c main.c
# C++ sources here.
@@ -61,9 +62,9 @@ CPPSRC =
ASMSRC = $(PORTASM)
INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \
- ../../os/io \
- ../../os/io/platforms/MSP430 \
- ../../os/various
+ ${CHIBIOS}/os/io \
+ ${CHIBIOS}/os/io/platforms/MSP430 \
+ ${CHIBIOS}/os/various
#
# Project, sources and paths
@@ -145,4 +146,4 @@ ULIBS =
# End of user defines
##############################################################################
-include ../../os/ports/GCC/MSP430/rules.mk
+include ${CHIBIOS}/os/ports/GCC/MSP430/rules.mk
diff --git a/demos/Win32-MinGW/Makefile b/demos/Win32-MinGW/Makefile
index 50b2a0af2..f700ce159 100644
--- a/demos/Win32-MinGW/Makefile
+++ b/demos/Win32-MinGW/Makefile
@@ -56,15 +56,16 @@ UDEFS =
UADEFS =
# Imported source files
-include ../../os/kernel/kernel.mk
-include ../../test/test.mk
+CHIBIOS = ../..
+include ${CHIBIOS}/os/kernel/kernel.mk
+include ${CHIBIOS}/test/test.mk
# List C source files here
SRC = ${KERNSRC} \
${TESTSRC} \
chcore.c \
- ../../os/io/serial.c \
- ../../os/io/platforms/Win32/serial_lld.c \
+ ${CHIBIOS}/os/io/serial.c \
+ ${CHIBIOS}/os/io/platforms/Win32/serial_lld.c \
main.c
# List ASM source files here
@@ -72,8 +73,8 @@ ASRC =
# List all user directories here
UINCDIR = $(KERNINC) $(TESTINC) \
- ../../os/io \
- ../../os/io/platforms/Win32
+ ${CHIBIOS}/os/io \
+ ${CHIBIOS}/os/io/platforms/Win32
# List the user directory to look for the libraries here
ULIBDIR =
diff --git a/os/kernel/kernel.mk b/os/kernel/kernel.mk
index 85d6a00e8..adbe0af9c 100644
--- a/os/kernel/kernel.mk
+++ b/os/kernel/kernel.mk
@@ -1,13 +1,20 @@
# List of all the ChibiOS/RT kernel files, there is no need to remove the files
# from this list, you can disable parts of the kernel by editing chconf.h.
-KERNSRC = ../../os/kernel/src/chsys.c ../../os/kernel/src/chdebug.c \
- ../../os/kernel/src/chlists.c ../../os/kernel/src/chvt.c \
- ../../os/kernel/src/chschd.c ../../os/kernel/src/chthreads.c \
- ../../os/kernel/src/chsem.c ../../os/kernel/src/chmtx.c \
- ../../os/kernel/src/chcond.c ../../os/kernel/src/chevents.c \
- ../../os/kernel/src/chmsg.c ../../os/kernel/src/chmboxes.c \
- ../../os/kernel/src/chqueues.c ../../os/kernel/src/chheap.c \
- ../../os/kernel/src/chmempools.c
+KERNSRC = ${CHIBIOS}/os/kernel/src/chsys.c \
+ ${CHIBIOS}/os/kernel/src/chdebug.c \
+ ${CHIBIOS}/os/kernel/src/chlists.c \
+ ${CHIBIOS}/os/kernel/src/chvt.c \
+ ${CHIBIOS}/os/kernel/src/chschd.c \
+ ${CHIBIOS}/os/kernel/src/chthreads.c \
+ ${CHIBIOS}/os/kernel/src/chsem.c \
+ ${CHIBIOS}/os/kernel/src/chmtx.c \
+ ${CHIBIOS}/os/kernel/src/chcond.c \
+ ${CHIBIOS}/os/kernel/src/chevents.c \
+ ${CHIBIOS}/os/kernel/src/chmsg.c \
+ ${CHIBIOS}/os/kernel/src/chmboxes.c \
+ ${CHIBIOS}/os/kernel/src/chqueues.c \
+ ${CHIBIOS}/os/kernel/src/chheap.c \
+ ${CHIBIOS}/os/kernel/src/chmempools.c
# Required include directories
-KERNINC = ../../os/kernel/include
+KERNINC = ${CHIBIOS}/os/kernel/include
diff --git a/os/ports/GCC/ARM7/port.mk b/os/ports/GCC/ARM7/port.mk
index d81135981..7ed810a9a 100644
--- a/os/ports/GCC/ARM7/port.mk
+++ b/os/ports/GCC/ARM7/port.mk
@@ -1,7 +1,7 @@
-# List of the ChibiOS/RT Cortex-M3 port files.
-PORTSRC = ../../os/ports/GCC/ARM7/chcore.c
+# List of the ChibiOS/RT ARM7 port files.
+PORTSRC = ${CHIBIOS}/os/ports/GCC/ARM7/chcore.c
-PORTASM = ../../os/ports/GCC/ARM7/crt0.s \
- ../../os/ports/GCC/ARM7/chcoreasm.s
+PORTASM = ${CHIBIOS}/os/ports/GCC/ARM7/crt0.s \
+ ${CHIBIOS}/os/ports/GCC/ARM7/chcoreasm.s
-PORTINC = ../../os/ports/GCC/ARM7
+PORTINC = ${CHIBIOS}/os/ports/GCC/ARM7
diff --git a/os/ports/GCC/ARMCM3/port.mk b/os/ports/GCC/ARMCM3/port.mk
index 8afb815ef..ccb5ea62e 100644
--- a/os/ports/GCC/ARMCM3/port.mk
+++ b/os/ports/GCC/ARMCM3/port.mk
@@ -1,9 +1,9 @@
# List of the ChibiOS/RT Cortex-M3 port files.
-PORTSRC = ../../os/ports/GCC/ARMCM3/chcore.c \
- ../../os/ports/GCC/ARMCM3/nvic.c \
- ../../os/ports/GCC/ARMCM3/cmsis/core_cm3.c
+PORTSRC = ${CHIBIOS}/os/ports/GCC/ARMCM3/chcore.c \
+ ${CHIBIOS}/os/ports/GCC/ARMCM3/nvic.c \
+ ${CHIBIOS}/os/ports/GCC/ARMCM3/cmsis/core_cm3.c
-PORTASM = ../../os/ports/GCC/ARMCM3/crt0.s
+PORTASM = ${CHIBIOS}/os/ports/GCC/ARMCM3/crt0.s
-PORTINC = ../../os/ports/GCC/ARMCM3 \
- ../../os/ports/GCC/ARMCM3/cmsis
+PORTINC = ${CHIBIOS}/os/ports/GCC/ARMCM3 \
+ ${CHIBIOS}/os/ports/GCC/ARMCM3/cmsis
diff --git a/os/ports/GCC/AVR/port.mk b/os/ports/GCC/AVR/port.mk
index 63f6fa1a5..7cafb56b2 100644
--- a/os/ports/GCC/AVR/port.mk
+++ b/os/ports/GCC/AVR/port.mk
@@ -1,6 +1,6 @@
-# List of the ChibiOS/RT Cortex-M3 port files.
-PORTSRC = ../../os/ports/GCC/AVR/chcore.c
+# List of the ChibiOS/RT AVR port files.
+PORTSRC = ${CHIBIOS}/os/ports/GCC/AVR/chcore.c
PORTASM =
-PORTINC = ../../os/ports/GCC/AVR
+PORTINC = ${CHIBIOS}/os/ports/GCC/AVR
diff --git a/os/ports/GCC/MSP430/port.mk b/os/ports/GCC/MSP430/port.mk
index 14fe0d646..60b3f8add 100644
--- a/os/ports/GCC/MSP430/port.mk
+++ b/os/ports/GCC/MSP430/port.mk
@@ -1,6 +1,6 @@
-# List of the ChibiOS/RT Cortex-M3 port files.
-PORTSRC = ../../os/ports/GCC/MSP430/chcore.c
+# List of the ChibiOS/RT MSP430 port files.
+PORTSRC = ${CHIBIOS}/os/ports/GCC/MSP430/chcore.c
PORTASM =
-PORTINC = ../../os/ports/GCC/MSP430
+PORTINC = ${CHIBIOS}/os/ports/GCC/MSP430
diff --git a/readme.txt b/readme.txt
index ecbf68907..923f92c19 100644
--- a/readme.txt
+++ b/readme.txt
@@ -31,6 +31,9 @@
- NEW: Updated the STM32 port to use the newest ST firmware library files
(version 3.1.0). Note that now the ST drivers are included in the STM32
demo directory.
+- NEW: Improved makefiles and makefile fragments, now the paths are not fixed,
+ the fragments can be included also from projects outside the ChibiOS/RT files
+ structure by simply defining the variable ${CHIBIOS}.
- CHANGE: Removed the CH_USE_SERIAL_FULLDUPLEX configuration option because
the serial driver is no more part of the kernel.
- CHANGE: Reorganized the PAL and Serial identifiers now IOPORT1..N and
diff --git a/test/coverage/Makefile b/test/coverage/Makefile
index 69f55884e..fb069123c 100644
--- a/test/coverage/Makefile
+++ b/test/coverage/Makefile
@@ -57,20 +57,21 @@ UDEFS =
UADEFS =
# Imported source files
-include ../../os/kernel/kernel.mk
-include ../../test/test.mk
+CHIBIOS = ../..
+include ${CHIBIOS}/os/kernel/kernel.mk
+include ${CHIBIOS}/test/test.mk
# List C source files here
SRC = ${KERNSRC} \
${TESTSRC} \
- ../../os/io/serial.c \
+ ${CHIBIOS}/os/io/serial.c \
chcore.c serial_lld.c main.c
# List ASM source files here
ASRC =
# List all user directories here
-UINCDIR = $(KERNINC) $(TESTINC) ../../os/io
+UINCDIR = $(KERNINC) $(TESTINC) ${CHIBIOS}/os/io
# List the user directory to look for the libraries here
ULIBDIR =
diff --git a/test/test.mk b/test/test.mk
index 2a3e1a4f9..3f740288c 100644
--- a/test/test.mk
+++ b/test/test.mk
@@ -1,10 +1,16 @@
# List of all the ChibiOS/RT test files.
-TESTSRC = ../../test/test.c ../../test/testthd.c \
- ../../test/testsem.c ../../test/testmtx.c \
- ../../test/testmsg.c ../../test/testmbox.c \
- ../../test/testevt.c ../../test/testheap.c \
- ../../test/testpools.c ../../test/testdyn.c \
- ../../test/testqueues.c ../../test/testbmk.c
+TESTSRC = ${CHIBIOS}/test/test.c \
+ ${CHIBIOS}/test/testthd.c \
+ ${CHIBIOS}/test/testsem.c \
+ ${CHIBIOS}/test/testmtx.c \
+ ${CHIBIOS}/test/testmsg.c \
+ ${CHIBIOS}/test/testmbox.c \
+ ${CHIBIOS}/test/testevt.c \
+ ${CHIBIOS}/test/testheap.c \
+ ${CHIBIOS}/test/testpools.c \
+ ${CHIBIOS}/test/testdyn.c \
+ ${CHIBIOS}/test/testqueues.c \
+ ${CHIBIOS}/test/testbmk.c
# Required include directories
-TESTINC = ../../test
+TESTINC = ${CHIBIOS}/test