Same error is given when compiling for nucleo board.
Works when the code below is commented out.
ifeq ($(filter $(BOARD),"nucleo arm science safety"),)
$(error BOARD is not set or is not supported. Set BOARD=board_name:${\n}${\n}safety${\n}arm${\n}science${\n}nucleo${\n}${\n}))
endif