Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 5276

SDK • hardware/spi.h: No such file or directory (again)

$
0
0
Hi,

Code:

DEFINES.h:35:16: fatal error: hardware/i2c.h: No such file or directory   35 |       #include "hardware/i2c.h"        |                ^~~~~~~~~~~~~~~~compilation terminated.make[2]: *** [CMakeFiles/hello_serial.dir/build.make:76: CMakeFiles/hello_serial.dir/hello.cpp.obj] Error 1make[1]: *** [CMakeFiles/Makefile2:1745: CMakeFiles/hello_serial.dir/all] Error 2make: *** [Makefile:91: all] Error 2
The file is present in the sdk path:

Code:

 find $PICO_SDK_PATH/src/rp2_common/hardware_i2c/include/  -iname "i2c.h"/backup/pico-sdk/src/rp2_common/hardware_i2c/include/hardware/i2c.h
And , yes I did add it to CMakeLists.txt:

Code:

target_link_libraries(dRehmFlight_pico                         pico_stdlib pico_malloc pico_printf pico_divider                        pico_multicore                        hardware_irq hardware_timer                        hardware_i2c hardware_uart hardware_pwm                         hardware_flash                                            )
Searching the problem indicates it's the last bit which is usually missing but I had that already.

What else am I missing?

TIA.

Statistics: Posted by pie_face — Fri Nov 29, 2024 10:05 am



Viewing all articles
Browse latest Browse all 5276

Trending Articles