Skip to content

boards: boards/common directory as separate variable #11155

@bergzand

Description

@bergzand

Description

TLDR: I propose to add a $(RIOTBOARD_COMMON) ?= $(RIOTBOARD)/common

I rather often have the case where I use a board that is a simple variation of a supported board. For example where a module was added to the board or where peripheral pinouts are modified compared to the original. My workflow here consists of creating an out of tree directory containing all board files and pointing $(RIOTBOARD) to the parent directory.

The issue here is that when I want to use this board for a longer time out of tree, I have to flatten the full makefile includes from $(RIOTBOARD)/$(BOARD) and from $(RIOTBOARD)/common.
my current example for this is a board based on the nrf52840 chip. Most of the makefiles in $(RIOTBOARD)/common still apply (boards/common/nrf52/Makefile.include as example), but I can't simply include those files into my board because they reference $(RIOTBOARD)/common which doesn't resolve as I've modified $(RIOTBOARD).

Having a separate value for the common directory inside boards would solve my issue here as I can override it to point to the original boards/common directory.

I don't mind writing the changes required for this myself as it should be an additional variable to the makefiles and a simple regexp replace. But before I do the work I'd like to hear some opinions on this and whether I'm missing something obvious in my workflow.

Metadata

Metadata

Labels

Area: build systemArea: Build systemType: questionThe issue poses a question regarding usage of RIOT

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions