From 27ae094413c6491acf722b7e2bb998f3272b23d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Kijewski?= Date: Fri, 23 May 2014 14:28:27 +0200 Subject: [PATCH 1/3] make: remove clutter Remove some outdated example code. --- Makefile.include | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/Makefile.include b/Makefile.include index c943b5d1f1..9dbdf9b942 100644 --- a/Makefile.include +++ b/Makefile.include @@ -60,7 +60,7 @@ endif # Feature test default CFLAGS and LINKFLAGS for the set compiled. include $(RIOTBASE)/Makefile.cflags -# your binaries to link +# the binaries to link BASELIBS += $(BINDIR)$(BOARD)_base.a BASELIBS += $(BINDIR)${PROJECT}.a BASELIBS += $(USEPKG:%=${BINDIR}%.a) @@ -70,7 +70,7 @@ BASELIBS += $(USEPKG:%=${BINDIR}%.a) export ELFFILE ?= $(BINDIR)$(PROJECT).elf export HEXFILE ?= $(ELFFILE:.elf=.hex) -## make script for your application. Build RIOT-base here! +## make script for the application all: $(BINDIR)$(PROJECT).a @echo "Building application $(PROJECT) for $(BOARD) w/ MCU $(MCU)." "$(MAKE)" -C $(RIOTBOARD)/$(BOARD) @@ -83,11 +83,6 @@ endif $(AD)$(SIZE) $(ELFFILE) $(AD)$(OBJCOPY) $(OFLAGS) $(ELFFILE) $(HEXFILE) -## your make rules -## Only basic example - modify it for larger applications!! -#$(BINDIR)/$(PROJECT).a: $(BINDIR)/$(PROJECT).o -# $(AR) -rc $(BINDIR)/project.a $(BINDIR)/$(PROJECT).o - # string array of all names of c files in dir SRC = $(wildcard *.c) From 4198b7518cde31c3e22cc5bfff949d4301f4632b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Kijewski?= Date: Tue, 22 Apr 2014 16:53:16 +0200 Subject: [PATCH 2/3] make: add `BOARD_INSUFFICIENT_RAM` blacklisting Currently most blacklistings for examples and tests are done because the board provides too little RAM or ROM. Besides of the actual linking all the compiling should nevertheless work just fine. This PR adds the variable `BOARD_INSUFFICIENT_RAM` to tell the `buildtest` to compile the code for a board, but omit the linking step. --- Makefile.buildtests | 6 +++++- Makefile.include | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Makefile.buildtests b/Makefile.buildtests index bc0f7e26e2..6a705b3900 100644 --- a/Makefile.buildtests +++ b/Makefile.buildtests @@ -42,7 +42,10 @@ buildtest: \ rm -rf "$$BINDIRBASE"; \ for BOARD in $${BOARDS}; do \ - $${ECHO} -n "Building for $${BOARD} .. "; \ + RIOTNOLINK=$$(case ' $(BOARD_INSUFFICIENT_RAM) ' in *" $${BOARD} "*) echo 1; esac); \ + $${ECHO} -n "Building for $${BOARD} "; \ + [ -n "$${RIOTNOLINK}" ] && $${ECHO} -n "(no linking) "; \ + $${ECHO} -n ".. "; \ LOG=$$(env -i \ HOME=$${HOME} \ PATH=$${PATH} \ @@ -51,6 +54,7 @@ buildtest: RIOTBOARD=$${RIOTBOARD} \ RIOTCPU=$${RIOTCPU} \ BINDIRBASE=$${BINDIRBASE} \ + RIOTNOLINK=$${RIOTNOLINK} \ $(MAKE) -j$(NPROC) 2>&1 >/dev/null) ; \ if [ "$${?}" = "0" ]; then \ $${ECHO} "$${GREEN}success$${RESET}"; \ diff --git a/Makefile.include b/Makefile.include index 9dbdf9b942..fc209e41fe 100644 --- a/Makefile.include +++ b/Makefile.include @@ -75,6 +75,7 @@ all: $(BINDIR)$(PROJECT).a @echo "Building application $(PROJECT) for $(BOARD) w/ MCU $(MCU)." "$(MAKE)" -C $(RIOTBOARD)/$(BOARD) "$(MAKE)" -C $(RIOTBASE) +ifeq (,$(RIOTNOLINK)) ifeq ($(BUILDOSXNATIVE),1) $(AD)$(LINK) $(UNDEF) -o $(ELFFILE) $(BASELIBS) $(LINKFLAGS) -Wl,-no_pie else @@ -82,6 +83,7 @@ else endif $(AD)$(SIZE) $(ELFFILE) $(AD)$(OBJCOPY) $(OFLAGS) $(ELFFILE) $(HEXFILE) +endif # string array of all names of c files in dir SRC = $(wildcard *.c) From 49778752b378f7a4c83decaf45daad14dc18e29a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Kijewski?= Date: Tue, 22 Apr 2014 16:53:43 +0200 Subject: [PATCH 3/3] Use `BOARD_INSUFFICIENT_RAM` in examples and tests --- examples/ccn-lite-client/Makefile | 9 ++------- examples/ccn-lite-relay/Makefile | 9 ++------- examples/rpl_udp/Makefile | 11 ++--------- tests/test_bloom/Makefile | 13 ++----------- tests/test_pnet/Makefile | 11 ++--------- tests/test_posix_semaphore/Makefile | 5 +---- tests/test_pthread_rwlock/Makefile | 6 +----- tests/test_thread_cooperation/Makefile | 7 +------ 8 files changed, 13 insertions(+), 58 deletions(-) diff --git a/examples/ccn-lite-client/Makefile b/examples/ccn-lite-client/Makefile index af7720508a..549b353e24 100644 --- a/examples/ccn-lite-client/Makefile +++ b/examples/ccn-lite-client/Makefile @@ -27,17 +27,12 @@ export RIOTBASE ?= $(CURDIR)/../.. # Change this to 0 show compiler invocation lines by default: export QUIET ?= 1 -BOARD_BLACKLIST := arduino-due chronos mbed_lpc1768 msb-430 msb-430h pttu \ - redbee-econotag telosb udoo wsn430-v1_3b wsn430-v1_4 z1 -# chronos: not enough RAM +BOARD_INSUFFICIENT_RAM := chronos msb-430h telosb wsn430-v1_3b wsn430-v1_4 +BOARD_BLACKLIST := arduino-due mbed_lpc1768 msb-430 pttu redbee-econotag udoo z1 # mbed_lpc1768: see https://github.com/RIOT-OS/RIOT/issues/675 # msb-430: see https://github.com/RIOT-OS/RIOT/issues/658 -# msb-430h: not enough RAM # pttu: see https://github.com/RIOT-OS/RIOT/issues/659 # redbee-econotag: see https://github.com/RIOT-OS/RIOT/issues/676 -# telosb: not enough RAM -# wsn430-v1_3b: not enough RAM -# wsn430-v1_4: not enough RAM # z1: lacks RTC features # Modules to include: diff --git a/examples/ccn-lite-relay/Makefile b/examples/ccn-lite-relay/Makefile index 2a26611304..cfe811eafa 100644 --- a/examples/ccn-lite-relay/Makefile +++ b/examples/ccn-lite-relay/Makefile @@ -27,17 +27,12 @@ export RIOTBASE ?= $(CURDIR)/../.. # Change this to 0 show compiler invocation lines by default: export QUIET ?= 1 -BOARD_BLACKLIST := arduino-due chronos mbed_lpc1768 msb-430 msb-430h \ - pttu redbee-econotag telosb udoo wsn430-v1_3b wsn430-v1_4 z1 -# chronos: not enough RAM +BOARD_INSUFFICIENT_RAM := chronos msb-430h telosb wsn430-v1_3b wsn430-v1_4 +BOARD_BLACKLIST := arduino-due mbed_lpc1768 msb-430 pttu redbee-econotag udoo z1 # mbed_lpc1768: see https://github.com/RIOT-OS/RIOT/issues/675 # msb-430: see https://github.com/RIOT-OS/RIOT/issues/658 -# msb-430h: not enough RAM # pttu: see https://github.com/RIOT-OS/RIOT/issues/659 # redbee-econotag: see https://github.com/RIOT-OS/RIOT/issues/676 -# telosb: not enough RAM -# wsn430-v1_3b: not enough RAM -# wsn430-v1_4: not enough RAM # z1: lacks RTC features # Modules to include: diff --git a/examples/rpl_udp/Makefile b/examples/rpl_udp/Makefile index 90ece78634..c56154bc21 100644 --- a/examples/rpl_udp/Makefile +++ b/examples/rpl_udp/Makefile @@ -34,18 +34,11 @@ ifeq ($(shell $(CC) -Wno-cpp -E - 2>/dev/null >/dev/null dev/null ; echo $$?),0) endif endif -BOARD_BLACKLIST := arduino-due chronos mbed_lpc1768 msb-430 msb-430h \ - pttu redbee-econotag telosb udoo wsn430-v1_3b wsn430-v1_4 z1 -# chronos: not enough RAM +BOARD_INSUFFICIENT_RAM := chronos msb-430h redbee-econotag telosb wsn430-v1_3b wsn430-v1_4 z1 +BOARD_BLACKLIST := arduino-due mbed_lpc1768 msb-430 pttu udoo # mbed_lpc1768: see https://github.com/RIOT-OS/RIOT/issues/675 # msb-430: see https://github.com/RIOT-OS/RIOT/issues/658 -# msb-430h: not enough RAM # pttu: see https://github.com/RIOT-OS/RIOT/issues/659 -# redbee-econotag: not enough RAM -# telosb: not enough RAM -# wsn430-v1_3b: not enough RAM -# wsn430-v1_4: not enough RAM -# z1: not enough RAM # Modules to include: diff --git a/tests/test_bloom/Makefile b/tests/test_bloom/Makefile index 3ee58e7e94..c119c007e8 100644 --- a/tests/test_bloom/Makefile +++ b/tests/test_bloom/Makefile @@ -1,17 +1,8 @@ export PROJECT = test_bloom include ../Makefile.tests_common -BOARD_BLACKLIST := chronos mbed_lpc1768 msb-430 msb-430h redbee-econotag \ - telosb wsn430-v1_3b wsn430-v1_4 z1 -# chronos: not enough RAM -# mbed_lpc1768: not enough RAM -# msb-430: not enough RAM -# msb-430h: not enough RAM -# redbee-econotag: not enough RAM -# telosb: not enough RAM -# wsn430-v1_3b: not enough RAM -# wsn430-v1_4: not enough RAM -# z1: not enough RAM +BOARD_INSUFFICIENT_RAM := chronos mbed_lpc1768 msb-430 msb-430h redbee-econotag \ + telosb wsn430-v1_3b wsn430-v1_4 z1 USEMODULE += hashes USEMODULE += bloom diff --git a/tests/test_pnet/Makefile b/tests/test_pnet/Makefile index d30e961db3..41a00176f0 100644 --- a/tests/test_pnet/Makefile +++ b/tests/test_pnet/Makefile @@ -1,17 +1,10 @@ export PROJECT = test_pnet include ../Makefile.tests_common -BOARD_BLACKLIST := arduino-due chronos mbed_lpc1768 msb-430 msb-430h \ - redbee-econotag telosb udoo wsn430-v1_3b wsn430-v1_4 z1 -# chronos: not enough RAM +BOARD_INSUFFICIENT_RAM := chronos msb-430h redbee-econotag telosb wsn430-v1_3b wsn430-v1_4 z1 +BOARD_BLACKLIST := arduino-due mbed_lpc1768 msb-430 udoo # mbed_lpc1768: see https://github.com/RIOT-OS/RIOT/issues/675 # msb-430: see https://github.com/RIOT-OS/RIOT/issues/658 -# msb-430h: not enough RAM -# redbee-econotag: not enough RAM -# telosb: not enough RAM -# wsn430-v1_3b: not enough RAM -# wsn430-v1_4: not enough RAM -# z1: not enough RAM USEMODULE += posix USEMODULE += pnet diff --git a/tests/test_posix_semaphore/Makefile b/tests/test_posix_semaphore/Makefile index 3940ad0eb9..b4c1f03f1b 100644 --- a/tests/test_posix_semaphore/Makefile +++ b/tests/test_posix_semaphore/Makefile @@ -1,10 +1,7 @@ export PROJECT = test_posix_semaphore include ../Makefile.tests_common -BOARD_BLACKLIST := mbed_lpc1768 redbee-econotag chronos -# mbed_lpc1768: not enough RAM -# redbee-econotag: not enough RAM -# chronos: not enough RAM +BOARD_INSUFFICIENT_RAM := mbed_lpc1768 redbee-econotag chronos USEMODULE += posix diff --git a/tests/test_pthread_rwlock/Makefile b/tests/test_pthread_rwlock/Makefile index 4cb40dfe58..bdd41fff3b 100644 --- a/tests/test_pthread_rwlock/Makefile +++ b/tests/test_pthread_rwlock/Makefile @@ -9,10 +9,6 @@ DISABLE_MODULE += auto_init CFLAGS += -DNATIVE_AUTO_EXIT -# these boards provide too little RAM for the example to run -BOARD_BLACKLIST += chronos -BOARD_BLACKLIST += mbed_lpc1768 -BOARD_BLACKLIST += msb-430 -BOARD_BLACKLIST += msb-430h +BOARD_INSUFFICIENT_RAM += chronos mbed_lpc1768 msb-430 msb-430h include $(RIOTBASE)/Makefile.include diff --git a/tests/test_thread_cooperation/Makefile b/tests/test_thread_cooperation/Makefile index 0ef7411c45..f7cc70779f 100644 --- a/tests/test_thread_cooperation/Makefile +++ b/tests/test_thread_cooperation/Makefile @@ -1,12 +1,7 @@ export PROJECT = test_thread_cooperation include ../Makefile.tests_common -BOARD_BLACKLIST := chronos msb-430 msb-430h mbed_lpc1768 redbee-econotag -# chronos: not enough RAM -# mbed_lpc1768: not enough RAM -# msb-430: not enough RAM -# msb-430h: not enough RAM -# redbee-econotag: not enough RAM +BOARD_INSUFFICIENT_RAM := chronos msb-430 msb-430h mbed_lpc1768 redbee-econotag DISABLE_MODULE += auto_init