Closed miri64 closed 3 years ago
@miri64 I can also reproduce this issue with:
BOARD=stm32f4discovery USEMODULE=at86rf233 make -C examples/default/
and with
BOARD=stm32f4discovery USEMODULE=cc2440 make -C examples/default/
so this is not limited to the mrf24j40, but a valid issue nonetheless
Briefly looked at the 'default' Makefile and gnrc related modules are only loaded if the board is listed in the BOARD_PROVIDES_NETIF
variable.
So I would say that this is not a bug but a feature.
Could you try the same build command but with your board added to this list ? Maybe using BOARD_PROVIDES_NETIF=stm32f4discovery BOARD=stm32f4discovery USEMODULE= cc2420 make
would work ?
Maybe using BOARD_PROVIDES_NETIF=stm32f4discovery BOARD=stm32f4discovery USEMODULE= cc2420 make would work ?
It doesn't since BOARD_PROVIDES_NETIF is set using :=
in the Makefile. So one has to modify the Makefile to make it compile, or use ?=
instead of :=
I tested cc2420, mrf24j40 with stm32f4discovery and they all build when stm32f4discovery is added to the list of boards in BOARD_PROVIDES_NETIF
So I would say that this is not a bug but a feature.
I think there is still a dependency issue if you get a linking error due to this. Even if the board is not in BOARD_PROVIDES_NETIF
, the worst thing that should happen is that it isn't controllable, since GNRC is missing. So this is a bug.
But yes, besides that, we might either make the list configurable or, maybe much more convenient have it like PROVIDES_FEATURE with the periph
interfaces, that every network device driver just provides the feature.
AFAIU, the default
application mainly relies on the hardware provided by the boards. So if a device is not provided by default by a board (and also configured for this particular board), it's not guaranteed to work. Here, you are trying to build an external radio plugged on a board that doesn't provide/configure it.
Your PROVIDES_FEATURE
proposition sounds interesting though. But this won't solve the fact that a driver loaded at build time from command line will work. Is it worth doing this ?
Jut to confirm that this still is an issue and quite annoying btw... @miri64 any ideas so far? What it has been discussed here is still valid?
New ideas (apart from the one proposed in the discussion), no. I still think however that this is a configuration bug / flaw of the application and/or our dependency system.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you want me to ignore this issue, please mark it with the "State: don't stale" label. Thank you for your contributions.
I think this ~PR~ issue can be fixed by #11676.
This no longer fails for me:
BUILD_IN_DOCKER=1 BOARD=stm32f4discovery USEMODULE=mrf24j40 make -C examples/default/
Launching build container using image "riot/riotbuild:latest".
docker run --rm --tty --user $(id -u) -v '/usr/share/zoneinfo/Europe/Paris:/etc/localtime:ro' -v '/home/francisco/workspace/RIOT:/data/riotbuild/riotbase:delegated' -e 'RIOTBASE=/data/riotbuild/riotbase' -e 'CCACHE_BASEDIR=/data/riotbuild/riotbase' -e 'BUILD_DIR=/data/riotbuild/riotbase/build' -e 'RIOTPROJECT=/data/riotbuild/riotbase' -e 'RIOTCPU=/data/riotbuild/riotbase/cpu' -e 'RIOTBOARD=/data/riotbuild/riotbase/boards' -e 'RIOTMAKE=/data/riotbuild/riotbase/makefiles' -e 'BOARD=stm32f4discovery' -w '/data/riotbuild/riotbase/examples/default/' 'riot/riotbuild:latest' make
Building application "default" for "stm32f4discovery" with MCU "stm32".
"make" -C /data/riotbuild/riotbase/boards/stm32f4discovery
"make" -C /data/riotbuild/riotbase/core
"make" -C /data/riotbuild/riotbase/cpu/stm32
"make" -C /data/riotbuild/riotbase/cpu/cortexm_common
"make" -C /data/riotbuild/riotbase/cpu/cortexm_common/periph
"make" -C /data/riotbuild/riotbase/cpu/stm32/periph
"make" -C /data/riotbuild/riotbase/cpu/stm32/stmclk
"make" -C /data/riotbuild/riotbase/cpu/stm32/vectors
"make" -C /data/riotbuild/riotbase/drivers
"make" -C /data/riotbuild/riotbase/drivers/periph_common
"make" -C /data/riotbuild/riotbase/drivers/saul
"make" -C /data/riotbuild/riotbase/drivers/saul/init_devs
"make" -C /data/riotbuild/riotbase/sys
"make" -C /data/riotbuild/riotbase/sys/auto_init
"make" -C /data/riotbuild/riotbase/sys/fmt
"make" -C /data/riotbuild/riotbase/sys/isrpipe
"make" -C /data/riotbuild/riotbase/sys/malloc_thread_safe
"make" -C /data/riotbuild/riotbase/sys/newlib_syscalls_default
"make" -C /data/riotbuild/riotbase/sys/phydat
"make" -C /data/riotbuild/riotbase/sys/pm_layered
"make" -C /data/riotbuild/riotbase/sys/ps
"make" -C /data/riotbuild/riotbase/sys/saul_reg
"make" -C /data/riotbuild/riotbase/sys/shell
"make" -C /data/riotbuild/riotbase/sys/shell/commands
"make" -C /data/riotbuild/riotbase/sys/stdio_uart
"make" -C /data/riotbuild/riotbase/sys/tsrb
text data bss dec hex filename
20880 132 2484 23496 5bc8 /data/riotbuild/riotbase/examples/default/bin/stm32f4discovery/default.elf
@miri64 can you confirm and this can be closed?
@miri64 can you confirm and this can be closed?
Confirmed
Description
When using this driver with a board that does not provide an on-board network device (e.g.
stm32f4discovery
ornucleo-f302
) withexamples/default
, the application will fail to link due to the GNRC module missing. I think this is some dependency issue.Steps to reproduce the issue
Build the
default
example with a board in question andmrf24j40
:Expected results
Linking step should succeed.
Actual results
Linking fails:
Versions
Operating system: Ubuntu 17.10 Build environment: