Hi,
I am setting-up a Raspberry Pi Pico project on PlatformIO with the Arduino-MBED framework and I notice a number of #include errors relating to dependencies of “Arduino.h”.
Chasing down the unresolvable files, I can make Intellisense happy by adding the following paths to the includePath setting of c_cpp_properties.json - yes, I know those changes won’t persist when the project is reloaded etc.
The paths I need to add are:
/var/home/neil/.platformio/packages/framework-arduino-mbed/cores/arduino/mbed/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include
/var/home/neil/.platformio/packages/framework-arduino-mbed/cores/arduino/mbed/hal/include
/var/home/neil/.platformio/packages/framework-arduino-mbed/cores/arduino/mbed/platform/cxxsupport
/var/home/neil/.platformio/packages/framework-arduino-mbed/cores/arduino/mbed/platform/include
/var/home/neil/.platformio/packages/framework-arduino-mbed/cores/arduino/mbed/targets/TARGET_RASPBERRYPI/TARGET_RP2040
/var/home/neil/.platformio/packages/framework-arduino-mbed/cores/arduino/mbed/targets/TARGET_RASPBERRYPI/TARGET_RP2040/pico-sdk/boards/include
/var/home/neil/.platformio/packages/framework-arduino-mbed/cores/arduino/mbed/targets/TARGET_RASPBERRYPI/TARGET_RP2040/pico-sdk/common/pico_base/include
/var/home/neil/.platformio/packages/framework-arduino-mbed/cores/arduino/mbed/targets/TARGET_RASPBERRYPI/TARGET_RP2040/pico-sdk/common/pico_time/include
/var/home/neil/.platformio/packages/framework-arduino-mbed/cores/arduino/mbed/targets/TARGET_RASPBERRYPI/TARGET_RP2040/pico-sdk/generated
/var/home/neil/.platformio/packages/framework-arduino-mbed/cores/arduino/mbed/targets/TARGET_RASPBERRYPI/TARGET_RP2040/pico-sdk/rp2040/hardware_regs/include
/var/home/neil/.platformio/packages/framework-arduino-mbed/cores/arduino/mbed/targets/TARGET_RASPBERRYPI/TARGET_RP2040/pico-sdk/rp2040/hardware_structs/include
/var/home/neil/.platformio/packages/framework-arduino-mbed/cores/arduino/mbed/targets/TARGET_RASPBERRYPI/TARGET_RP2040/pico-sdk/rp2_common/hardware_adc/include
/var/home/neil/.platformio/packages/framework-arduino-mbed/cores/arduino/mbed/targets/TARGET_RASPBERRYPI/TARGET_RP2040/pico-sdk/rp2_common/hardware_base/include
/var/home/neil/.platformio/packages/framework-arduino-mbed/cores/arduino/mbed/targets/TARGET_RASPBERRYPI/TARGET_RP2040/pico-sdk/rp2_common/hardware_gpio/include
/var/home/neil/.platformio/packages/framework-arduino-mbed/cores/arduino/mbed/targets/TARGET_RASPBERRYPI/TARGET_RP2040/pico-sdk/rp2_common/hardware_i2c/include
/var/home/neil/.platformio/packages/framework-arduino-mbed/cores/arduino/mbed/targets/TARGET_RASPBERRYPI/TARGET_RP2040/pico-sdk/rp2_common/hardware_irq/include
/var/home/neil/.platformio/packages/framework-arduino-mbed/cores/arduino/mbed/targets/TARGET_RASPBERRYPI/TARGET_RP2040/pico-sdk/rp2_common/hardware_pwm/include
/var/home/neil/.platformio/packages/framework-arduino-mbed/cores/arduino/mbed/targets/TARGET_RASPBERRYPI/TARGET_RP2040/pico-sdk/rp2_common/hardware_resets/include
/var/home/neil/.platformio/packages/framework-arduino-mbed/cores/arduino/mbed/targets/TARGET_RASPBERRYPI/TARGET_RP2040/pico-sdk/rp2_common/hardware_spi/include
/var/home/neil/.platformio/packages/framework-arduino-mbed/cores/arduino/mbed/targets/TARGET_RASPBERRYPI/TARGET_RP2040/pico-sdk/rp2_common/hardware_timer/include
/var/home/neil/.platformio/packages/framework-arduino-mbed/cores/arduino/mbed/targets/TARGET_RASPBERRYPI/TARGET_RP2040/pico-sdk/rp2_common/hardware_uart/include
/var/home/neil/.platformio/packages/framework-arduino-mbed/cores/arduino/mbed/targets/TARGET_RASPBERRYPI/TARGET_RP2040/pico-sdk/rp2_common/pico_platform/include
/var/home/neil/.platformio/packages/framework-arduino-mbed/cores/arduino/mbed/targets/TARGET_RASPBERRYPI/TARGET_RP2040/TARGET_RASPBERRY_PI_PICO
I have two questions relating to implementing a solution to resolving these #include errors.
- Is there a standardised way to add those paths persistently to the Intellisense logic?
- The C/C++ Tools extension has a setting to enable the “Tag Parser” as a fallback for Intellisense parsing. Is this a suitable alternative to the above includePath additions?
The basic project builds OK so I’m only looking for a way to get effective use of Intellisense with this framework. Using the Tag Parser fallback, the Red Squiggly under Arduino.h is replaced by a Blue one and the main.cpp tab filename changes from Red to Green.
Thanks in advance for any help.
Neil