1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/examples/gnrc_border_router/Makefile
Marian Buschsieweke 7c6eb619e1
examples: Updated BOARD_INSUFFICIENT_MEMORY
Added new boards bluepill-128kib and blackpill-128kib where needed.
2019-09-29 16:52:29 +02:00

120 lines
4.0 KiB
Makefile

# name of your application
APPLICATION = gnrc_border_router
# If no BOARD is found in the environment, use this default:
BOARD ?= samr21-xpro
# This has to be the absolute path to the RIOT base directory:
RIOTBASE ?= $(CURDIR)/../..
BOARD_INSUFFICIENT_MEMORY := airfy-beacon arduino-duemilanove arduino-leonardo \
arduino-mega2560 arduino-nano arduino-uno \
b-l072z-lrwan1 blackpill blackpill-128kib bluepill \
bluepill-128kib calliope-mini cc2650-launchpad cc2650stk \
hifive1 hifive1b i-nucleo-lrwan1 lsn50 maple-mini mega-xplained microbit msb-430 \
msb-430h nrf51dk nrf51dongle nrf6310 \
nucleo-f031k6 nucleo-f042k6 \
nucleo-f303k8 nucleo-l031k6 nucleo-f030r8 \
nucleo-f070rb nucleo-f072rb nucleo-f103rb \
nucleo-f302r8 nucleo-f334r8 nucleo-l053r8 \
nucleo-l073rz opencm904 saml10-xpro saml11-xpro \
spark-core stm32f0discovery stm32l0538-disco \
telosb waspmote-pro \
weio wsn430-v1_3b wsn430-v1_4 yunjia-nrf51822 z1
# The following boards do not have an available UART
BOARD_BLACKLIST += pic32-wifire pic32-clicker ruuvitag thingy52
# use ethos (ethernet over serial) for network communication and stdio over
# UART, but not on native, as native has a tap interface towards the host.
ifeq (,$(filter native,$(BOARD)))
GNRC_NETIF_NUMOF := 2
USEMODULE += stdio_ethos
# ethos baudrate can be configured from make command
ETHOS_BAUDRATE ?= 115200
CFLAGS += -DETHOS_BAUDRATE=$(ETHOS_BAUDRATE)
else
GNRC_NETIF_NUMOF := 2
TERMFLAGS += -z [::1]:17754
USEMODULE += socket_zep
endif
# SLIP legacy compatibility
# Uncomment the lines below if you want to use SLIP with this example and don't
# forget to comment the lines above for ethos.
#ifeq (,$(SLIP_UART))
# set default (last available UART)
#SLIP_UART="UART_DEV(UART_NUMOF-1)"
#endif
#ifeq (,$(SLIP_BAUDRATE))
# set default
#SLIP_BAUDRATE=115200
#endif
#GNRC_NETIF_NUMOF := 2
#INCLUDES += -I$(CURDIR)
#CFLAGS += -DSLIP_UART=$(SLIP_UART)
#CFLAGS += -DSLIP_BAUDRATE=$(SLIP_BAUDRATE)
# Include SLIP package for IP over Serial communication
#USEMODULE += slipdev
# Include packages that pull up and auto-init the link layer.
# NOTE: 6LoWPAN will be included if IEEE802.15.4 devices are present
USEMODULE += gnrc_netdev_default
USEMODULE += auto_init_gnrc_netif
# Specify the mandatory networking modules for 6LoWPAN border router
USEMODULE += gnrc_sixlowpan_border_router_default
# Add forwarding table
USEMODULE += fib
# Additional networking modules that can be dropped if not needed
USEMODULE += gnrc_icmpv6_echo
# Add also the shell, some shell commands
USEMODULE += shell
USEMODULE += shell_commands
USEMODULE += ps
# include UHCP client
USEMODULE += gnrc_uhcpc
# Optionally include RPL as a routing protocol. When includede gnrc_uhcpc will
# configure the node as a RPL DODAG root when receiving a prefix.
#USEMODULE += gnrc_rpl
# Comment this out to disable code in RIOT that does safety checking
# which is not needed in a production environment but helps in the
# development process:
DEVELHELP ?= 1
# Change this to 0 show compiler invocation lines by default:
QUIET ?= 1
TAP ?= tap0
IPV6_PREFIX ?= 2001:db8::/64
ifeq (native,$(BOARD))
TERMDEPS += uhcpd-daemon
.PHONY: uhcpd-daemon
uhcpd-daemon: host-tools
$(RIOTTOOLS)/uhcpd/bin/uhcpd $(TAP) $(IPV6_PREFIX) &
else
# We override the `make term` command to use ethos
TERMPROG ?= sudo sh $(RIOTTOOLS)/ethos/start_network.sh
TERMFLAGS ?= $(PORT) $(TAP) $(IPV6_PREFIX)
# We depend on the ethos host tools to run the border router, we build them
# if necessary
TERMDEPS += host-tools
endif
include $(RIOTBASE)/Makefile.include
.PHONY: host-tools
host-tools:
$(Q)env -u CC -u CFLAGS make -C $(RIOTTOOLS)
# Set a custom channel if needed
include $(RIOTMAKE)/default-channel.inc.mk