This is wrong - you should never need ../../<module>/include....
#include "../../hardware_i2c/include/hardware/i2c.h"
then eventually I got a build that completed.
Almost certainly you are missing hardware_i2c from the target_link_libraries() section of your CMakeLists.txt (or have otherwise fouled up that declaration so it isn't taking effect).
This is a maybe slightly surprising artifact of how the Pico SDK is built - when you leave out a library that you need, on other systems you usually get undefined symbols at link time; do the same thing with Pico SDK and you get errors at compile time because the headers aren't on the include path. The one entry in CMakeLists.txt supplies both the include path and the library at link time.
Statistics: Posted by arg001 — Thu Feb 01, 2024 9:28 am