RIOT-OS / RIOT

RIOT - The friendly OS for IoT
https://riot-os.org
GNU Lesser General Public License v2.1
4.94k stars 1.99k forks source link

unsatisfied feature requirements: periph_gpio_irq periph_spi EXPECT ERRORS #10733

Closed Sunnyone1234 closed 5 years ago

Sunnyone1234 commented 5 years ago

Description

Example: Cannot build gnrc_networking application for native.

Steps to reproduce the issue

Before i can complie gnrc_networking very easy by type "make". But today when i do it again there are some error messages like:

There are unsatisfied feature requirements: periph_gpio_irq periph_spi

EXPECT ERRORS!

Building application "gnrc_networking" for "native" with MCU "native".
"make" -C /Path/RIOT/boards/native
"make" -C /Path/RIOT/boards/native/drivers
"make" -C /Path/RIOT/core
"make" -C /Path/RIOT/cpu/native
"make" -C /Path/RIOT/cpu/native/netdev_tap
"make" -C /Path/RIOT/cpu/native/periph
"make" -C /Path/RIOT/cpu/native/vfs
"make" -C /Path/RIOT/drivers
"make" -C /Path/RIOT/drivers/at86rf2xx
"make" -C /Path/RIOT/drivers/netdev_eth
"make" -C /Path/RIOT/drivers/netdev_ieee802154
"make" -C /Path/RIOT/drivers/periph_common
/Path/RIOT/drivers/periph_common/init.c: In function ‘periph_init’:
/Path/RIOT/drivers/periph_common/init.c:50:30: error: ‘SPI_NUMOF’ undeclared (first use in this function)
     for (unsigned i = 0; i < SPI_NUMOF; i++) {
                              ^
/Path/RIOT/drivers/periph_common/init.c:50:30: note: each undeclared identifier is reported only once for each function it appears in
/Path/RIOT/Makefile.base:83: recipe for target '/Path/RIOT/examples/gnrc_networking/bin/native/periph_common/init.o' failed
make[3]: *** [/Path/RIOT/examples/gnrc_networking/bin/native/periph_common/init.o] Error 1
/Path/RIOT/Makefile.base:20: recipe for target 'ALL--/Path/RIOT/drivers/periph_common' failed
make[2]: *** [ALL--/Path/RIOT/drivers/periph_common] Error 2
/Path/RIOT/Makefile.base:20: recipe for target 'ALL--/Path/RIOT/drivers' failed
make[1]: *** [ALL--/Path/RIOT/drivers] Error 2
/Path/RIOT/examples/gnrc_networking/../../Makefile.include:455: recipe for target '/Path/RIOT/examples/gnrc_networking/bin/native/application_gnrc_networking.a' failed
make: *** [/Path/RIOT/examples/gnrc_networking/bin/native/application_gnrc_networking.a] Error 2

Then I try to solve this error and have added

FEATURES_PROVIDED += periph_spi
FEATURES_PROVIDED += periph_gpio periph_gpio_irq

in Makefile. The error message still here but without the feature requirements

user:Path/RIOT/examples/gnrc_networking$ make
Building application "gnrc_networking" for "native" with MCU "native".

"make" -C /Path/RIOT/boards/native
"make" -C /Path/RIOT/boards/native/drivers
"make" -C /Path/RIOT/core
"make" -C /Path/RIOT/cpu/native
"make" -C /Path/RIOT/cpu/native/netdev_tap
"make" -C /Path/RIOT/cpu/native/periph
"make" -C /Path/RIOT/cpu/native/vfs
"make" -C /Path/RIOT/drivers
"make" -C /Path/RIOT/drivers/at86rf2xx
"make" -C /Path/RIOT/drivers/netdev_eth
"make" -C /Path/RIOT/drivers/netdev_ieee802154
"make" -C /Path/RIOT/drivers/periph_common
/Path/RIOT/drivers/periph_common/init.c: In function ‘periph_init’:
/Path/RIOT/drivers/periph_common/init.c:50:30: error: ‘SPI_NUMOF’ undeclared (first use in this function)
     for (unsigned i = 0; i < SPI_NUMOF; i++) {
                              ^
/Path/RIOT/drivers/periph_common/init.c:50:30: note: each undeclared identifier is reported only once for each function it appears in
/Path/RIOT/Makefile.base:83: recipe for target '/Path/RIOT/examples/gnrc_networking/bin/native/periph_common/init.o' failed
make[3]: *** [/Path/RIOT/examples/gnrc_networking/bin/native/periph_common/init.o] Error 1
/Path/RIOT/Makefile.base:20: recipe for target 'ALL--/Path/RIOT/drivers/periph_common' failed
make[2]: *** [ALL--/Path/RIOT/drivers/periph_common] Error 2
/Path/RIOT/Makefile.base:20: recipe for target 'ALL--/Path/RIOT/drivers' failed
make[1]: *** [ALL--/Path/RIOT/drivers] Error 2
/Path/RIOT/examples/gnrc_networking/../../Makefile.include:455: recipe for target '/Path/RIOT/examples/gnrc_networking/bin/native/application_gnrc_networking.a' failed
make: *** [/Path/RIOT/examples/gnrc_networking/bin/native/application_gnrc_networking.a] Error 2

I have never changed the code in /drivers/periph_common/init.c and spi.h, i mean everythings under /periph_common/ are the same as in master. So i really dont know what's wrong with it. If someone has the same issue and has already solved. Please tell me, it helps me a lot. Thanks:)

Expected results

Please help me to solve this problem. Thanks a lot.

Actual results

I have added USEMODULE += at85rf233 in Makefile under gnrc_networking and therefore i can not make it for native. When i comment this line then i can compile just by type "make".

Versions

Operating System Environment
-----------------------------
       Operating System: "Ubuntu" "16.04.5 LTS (Xenial Xerus)"
                 Kernel: Linux 4.15.0-43-generic x86_64 x86_64

Installed compiler toolchains
-----------------------------
             native gcc: gcc (Ubuntu 5.4.0-6ubuntu1~16.04.11) 5.4.0 20160609
      arm-none-eabi-gcc: arm-none-eabi-gcc (GNU Tools for Arm Embedded Processors 8-2018-q4-major) 8.2.1 20181213 (release) [gcc-8-branch revision 267074]
                avr-gcc: missing
       mips-mti-elf-gcc: missing
             msp430-gcc: missing
   riscv-none-embed-gcc: missing
                  clang: missing

Installed compiler libs
-----------------------
   arm-none-eabi-newlib: "3.0.0"
    mips-mti-elf-newlib: missing
riscv-none-embed-newlib: missing
               avr-libc: missing (missing)

Installed development tools
---------------------------
                  cmake: missing
               cppcheck: missing
                doxygen: missing
                 flake8: missing
                    git: git version 2.20.1
                openocd: Open On-Chip Debugger 0.10.0+dev-00567-gcea40152 (2018-11-04-11:04)
                 python: Python 3.7.0
                python2: Python 2.7.12
                python3: Python 3.7.0
             coccinelle: missing

Thanks again

aabadie commented 5 years ago

Note: I updated your initial comment to make it more readable. In Markdown, the syntax to highlight outputs is to use put triple back quotes around them not --------- (this is for titles).

Concerning your problem, it works for me with latest master.

What version of RIOT you using ? (you can paste the output of git log -1)

Sunnyone1234 commented 5 years ago

Note: I updated your initial comment to make it more readable. In Markdown, the syntax to highlight outputs is to use put triple back quotes around them not --------- (this is for titles).

Concerning your problem, it works for me with latest master.

What version of RIOT you using ? (you can paste the output of git log -1)

Thanks i have used

    commit 1d95da01fa9b37837b99a6e450c093a84a59f0e9 (HEAD -> master)
    Merge: ce5cd0591 672368954
    Author: Kevin "Bear Puncher" Weiss <weiss.kevin604@gmail.com>
    Date:   Fri Nov 2 15:31:26 2018 +0100

    Merge pull request #9211 from Josar/pr/xtimer_target_overflow

    xtimer: timer & target overflow, hang resolved.
PeterKietzmann commented 5 years ago

Works for me with gcc version 7.3.1 20180622 (release) [ARM/embedded-7-branch revision 261907] as well as in Docker. When building for native, netdev_ieee802154 should not be a dependency and thus, periph_spi and periph_gpio* shouldn't. However, your build seems to incorporate these modules.

Sunnyone1234 commented 5 years ago

Works for me with gcc version 7.3.1 20180622 (release) [ARM/embedded-7-branch revision 261907] as well as in Docker. When building for native, netdev_ieee802154 should not be a dependency and thus, periph_spi and periph_gpio* shouldn't. However, your build seems to incorporate these modules.

* You sure there are no unstaged changes in your local repository?

* Could you try in a new terminal to avoid any accidental environmental parameters?

Thanks Peter, i konw why. I habe added USEMODULE += at86rf233 in Makefile under gnrc_networking. So i can not make it without my board. so stupid. Thanks a lot~

Sunnyone1234 commented 5 years ago

Works for me with gcc version 7.3.1 20180622 (release) [ARM/embedded-7-branch revision 261907] as well as in Docker. When building for native, netdev_ieee802154 should not be a dependency and thus, periph_spi and periph_gpio* shouldn't. However, your build seems to incorporate these modules.

* You sure there are no unstaged changes in your local repository?

* Could you try in a new terminal to avoid any accidental environmental parameters?

Thanks Peter, i konw why. I habe added USEMODULE += at86rf233 in Makefile under gnrc_networking. So i can not make it without my board. so stupid. Thanks a lot~

So should i close this issue or it will be closed by others. Actually i'm very fresh here by git...

PeterKietzmann commented 5 years ago

@Sunnyone1234 no worries :-). And I'm closing the issue for you know.