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

105 lines
3.0 KiB
Makefile
Raw Normal View History

# 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)/../..
# The following boards do not have an available UART
boards/mips-malta: remove board. The mips-malta board is a maintainance burden, has no working UART input and is unobtainable and thus must be removed. 1. Unobtainable board ===================== The mips-malta board is not an off-the-shelf part. A quick web search only show the MIPS website where one is told to "contact sales". I could find it on ebay, used, at €155 and from single seller. Not having access to the board means: a. We cannot maintain it. In fact it could be broken right now. b. Potential RIOT uses have not access to the board either. In other words, it is pointless to run on hardware nobody has. 2. No working UART input ======================== Not all applications need UART input, but that is no excuse for not supporting it: a. Makes development & debugging way harder. b. It is impossible to run interactive tests. b.1. Constrains the rest of the platforms by providing an incentive to not make tests interactive. c. The lack of UART is a witness to the poor quality of the port. I want to stress point (c). If something as basic as a serial port cannot work, how can we expect more complex fucntionality to work. The answer is impossible to know, because of point (1). 3. Maintainance burden ====================== The RIOT project has limited time and human resources which can be better spent. a. Compiling for mips-malta wastes CPU time. b. Blacklisting the board in the test wastes contributor's time. c. Adapting the board's makefile during build system rework takes time and makes the reworks harder. c.1. Add to that that the changes are most of the time not even tested on the board because of (1). Look at the github issues/PRs and you will see it. d. Developers usually stick to the lowest common denominator. Issue (2) sets this denominator unacceptably low. MIPS platform in general ======================== In commits I will address general issues in the MIPS platform and why it should all be removed.
2019-07-03 13:19:39 +02:00
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)
2017-05-30 20:39:21 +02:00
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
2017-07-18 14:39:03 +02:00
#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:
2017-11-19 14:12:25 +01:00
DEVELHELP ?= 1
# Change this to 0 show compiler invocation lines by default:
QUIET ?= 1
TAP ?= tap0
IPV6_PREFIX ?= 2001:db8::/64
2017-05-30 20:39:21 +02:00
ifeq (native,$(BOARD))
TERMDEPS += uhcpd-daemon
.PHONY: uhcpd-daemon
uhcpd-daemon: host-tools
$(RIOTTOOLS)/uhcpd/bin/uhcpd $(TAP) $(IPV6_PREFIX) &
2017-05-30 20:39:21 +02:00
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
2017-05-30 20:39:21 +02:00
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-radio-settings.inc.mk