-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Description
Description
During the development of #21281 I noticed that the common board directories that have .c files, explicitly require that the common directory is added to the DIRS
variable in the board's Makefile
.
This is for example the case for the particle-*
boards, that include the boards/common/particle-mesh
folder:
RIOT/boards/particle-xenon/Makefile
Lines 1 to 5 in 685acb9
MODULE = board | |
DIRS = $(RIOTBOARD)/common/particle-mesh | |
include $(RIOTBASE)/Makefile.base |
Even though the boards_common_particle_mesh
module defined by the particle-mesh
common board is added in the Makefile.dep
, the boards/common/particle-mesh/Makefile
will never be called without the DIRS +=
definition.
RIOT/boards/particle-xenon/Makefile.dep
Lines 1 to 3 in 685acb9
USEMODULE += boards_common_particle_mesh | |
include $(RIOTBOARD)/common/particle-mesh/Makefile.dep |
Steps to reproduce the issue
Compile an application of your choice (for example tests/sys/shell
) for the particle-xenon
and observe the compile output. It should include boards/common/particle-mesh
:
~/RIOTstuff/riot-ada-bootloader/RIOT$ BOARD=particle-xenon make -C tests/sys/shell
make: Entering directory '/home/cbuec/RIOTstuff/riot-ada-bootloader/RIOT/tests/sys/shell'
Building application "tests_shell" for "particle-xenon" with CPU "nrf52".
"make" -C /home/cbuec/RIOTstuff/riot-ada-bootloader/RIOT/pkg/cmsis/
"make" -C /home/cbuec/RIOTstuff/riot-ada-bootloader/RIOT/boards/common/init
"make" -C /home/cbuec/RIOTstuff/riot-ada-bootloader/RIOT/boards/particle-xenon
"make" -C /home/cbuec/RIOTstuff/riot-ada-bootloader/RIOT/boards/common/particle-mesh
"make" -C /home/cbuec/RIOTstuff/riot-ada-bootloader/RIOT/core
"make" -C /home/cbuec/RIOTstuff/riot-ada-bootloader/RIOT/core/lib
...
"make" -C /home/cbuec/RIOTstuff/riot-ada-bootloader/RIOT/sys/usb/usbus
"make" -C /home/cbuec/RIOTstuff/riot-ada-bootloader/RIOT/sys/usb/usbus/cdc/acm
"make" -C /home/cbuec/RIOTstuff/riot-ada-bootloader/RIOT/sys/usb_board_reset
"make" -C /home/cbuec/RIOTstuff/riot-ada-bootloader/RIOT/sys/ztimer
text data bss dec hex filename
23816 128 4696 28640 6fe0 /home/cbuec/RIOTstuff/riot-ada-bootloader/RIOT/tests/sys/shell/bin/particle-xenon/tests_shell.elf
make: Leaving directory '/home/cbuec/RIOTstuff/riot-ada-bootloader/RIOT/tests/sys/shell'
Comment out line 3 of the boards/particle-xenon/Makefile
(the DIRS
line) and observe the output again:
~/RIOTstuff/riot-ada-bootloader/RIOT$ BOARD=particle-xenon make -C tests/sys/shell
make: Entering directory '/home/cbuec/RIOTstuff/riot-ada-bootloader/RIOT/tests/sys/shell'
Building application "tests_shell" for "particle-xenon" with CPU "nrf52".
"make" -C /home/cbuec/RIOTstuff/riot-ada-bootloader/RIOT/pkg/cmsis/
"make" -C /home/cbuec/RIOTstuff/riot-ada-bootloader/RIOT/boards/common/init
"make" -C /home/cbuec/RIOTstuff/riot-ada-bootloader/RIOT/boards/particle-xenon
"make" -C /home/cbuec/RIOTstuff/riot-ada-bootloader/RIOT/core
"make" -C /home/cbuec/RIOTstuff/riot-ada-bootloader/RIOT/core/lib
...
"make" -C /home/cbuec/RIOTstuff/riot-ada-bootloader/RIOT/sys/usb/usbus
"make" -C /home/cbuec/RIOTstuff/riot-ada-bootloader/RIOT/sys/usb/usbus/cdc/acm
"make" -C /home/cbuec/RIOTstuff/riot-ada-bootloader/RIOT/sys/usb_board_reset
"make" -C /home/cbuec/RIOTstuff/riot-ada-bootloader/RIOT/sys/ztimer
text data bss dec hex filename
23816 128 4696 28640 6fe0 /home/cbuec/RIOTstuff/riot-ada-bootloader/RIOT/tests/sys/shell/bin/particle-xenon/tests_shell.elf
make: Leaving directory '/home/cbuec/RIOTstuff/riot-ada-bootloader/RIOT/tests/sys/shell'
The boards/common/particle-mesh
folder is not included anymore and no error is generated.
Expected results
The build system should include the boards/common/particle-mesh
directory if the boards_common_particle-mesh
module is used.
The particle-*
boards are just an example here, the same is true for boards that use the samdx1-arduino-bootloader
: https://github.com/search?q=repo%3ARIOT-OS%2FRIOT+boards_common_samdx1-arduino-bootloader&type=code
I'm not sure where to look and what to possibly change in the build system, so hints would be very welcome.
Actual results
See above.
Versions
This happens with the latest RIOT master.