Path problem with mbed.h

VSC 1.42, PIO 4.2 Home 3.1 When opening a Mbed project i get always an include warning.
Can compile and upload, but the error persists. Index rebuild doesn’t help.
Also deleted .pio and .vscode folder and rebuild, does also not help.

So what problems are in the Problems (2) tab of VSCode?

Could you try to build a project? Do you see this warning after a build?

Yes, I created an project from scratch with PIO Home (STM32 Nucleo F429) but the error persists.

Here the errors

Interesting that it cannot find stdlib.h. Can you show post the contents of the .vscode/c_cpp_properties.json file in the project? (or via pastebin).

1 Like
{
    "configurations": [
        {
            "name": "!!! WARNING !!! AUTO-GENERATED FILE, PLEASE DO NOT MODIFY IT AND USE https://docs.platformio.org/page/projectconf/section_env_build.html#build-flags"
        },
        {
            "name": "Mac",
            "macFrameworkPath": [],
            "includePath": [
                "/Users/sstaub/Dateien/Development/#lighthack/STM32mbed/OSCWing/include",
                "/Users/sstaub/Dateien/Development/#lighthack/STM32mbed/OSCWing/src",
                "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/cmsis/TARGET_CORTEX_M",
                "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110",
                "/Users/sstaub/Dateien/Development/#lighthack/STM32mbed/OSCWing/.pio/build/nucleo_f429zi",
                "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/drivers",
                "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/drivers/internal",
                "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/events",
                "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/events/internal",
                "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/hal",
                "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/hal/storage_abstraction",
                "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/hal/usb",
                "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/platform",
                "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/platform/cxxsupport",
                "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/platform/internal",
                "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/platform/source",
                "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/platform/source/TARGET_CORTEX_M",
                "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/platform/source/minimal-printf",
                "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/targets/TARGET_STM",
                "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/targets/TARGET_STM/TARGET_STM32F4",
                "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F429xI",
                "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F429xI/TARGET_NUCLEO_F429ZI",
                "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F429xI/device",
                "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/targets/TARGET_STM/TARGET_STM32F4/device",
                "/Users/sstaub/Dateien/Development/#lighthack/STM32mbed/OSCWing/lib/DMX-ST",
                "/Users/sstaub/Dateien/Development/#lighthack/STM32mbed/OSCWing/lib/OSC",
                "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/features/unsupported/dsp",
                "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/features/unsupported/dsp/cmsis_dsp",
                "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/features/unsupported/dsp/dsp",
                "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/features/unsupported/rpc",
                "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/features/unsupported/USBDevice",
                "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/features/unsupported/USBDevice/USBAudio",
                "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/features/unsupported/USBDevice/USBDevice",
                "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/features/unsupported/USBDevice/USBHID",
                "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/features/unsupported/USBDevice/USBMIDI",
                "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/features/unsupported/USBDevice/USBMSD",
                "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/features/unsupported/USBDevice/USBSerial",
                "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/features/unsupported/USBDevice/targets/TARGET_STM",
                "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/features/unsupported/USBHost",
                "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/features/unsupported/USBHost/USBHost",
                "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/features/unsupported/USBHost/USBHost3GModule",
                "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/features/unsupported/USBHost/USBHostHID",
                "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/features/unsupported/USBHost/USBHostHub",
                "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/features/unsupported/USBHost/USBHostMIDI",
                "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/features/unsupported/USBHost/USBHostMSD",
                "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/features/unsupported/USBHost/USBHostSerial",
                "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/features/unsupported/USBHost/targets/TARGET_STM",
                "/Users/sstaub/.platformio/packages/tool-unity",
                ""
            ],
            "browse": {
                "limitSymbolsToIncludedHeaders": true,
                "path": [
                    "/Users/sstaub/Dateien/Development/#lighthack/STM32mbed/OSCWing/include",
                    "/Users/sstaub/Dateien/Development/#lighthack/STM32mbed/OSCWing/src",
                    "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/cmsis/TARGET_CORTEX_M",
                    "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110",
                    "/Users/sstaub/Dateien/Development/#lighthack/STM32mbed/OSCWing/.pio/build/nucleo_f429zi",
                    "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/drivers",
                    "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/drivers/internal",
                    "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/events",
                    "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/events/internal",
                    "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/hal",
                    "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/hal/storage_abstraction",
                    "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/hal/usb",
                    "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/platform",
                    "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/platform/cxxsupport",
                    "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/platform/internal",
                    "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/platform/source",
                    "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/platform/source/TARGET_CORTEX_M",
                    "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/platform/source/minimal-printf",
                    "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/targets/TARGET_STM",
                    "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/targets/TARGET_STM/TARGET_STM32F4",
                    "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F429xI",
                    "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F429xI/TARGET_NUCLEO_F429ZI",
                    "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F429xI/device",
                    "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/targets/TARGET_STM/TARGET_STM32F4/device",
                    "/Users/sstaub/Dateien/Development/#lighthack/STM32mbed/OSCWing/lib/DMX-ST",
                    "/Users/sstaub/Dateien/Development/#lighthack/STM32mbed/OSCWing/lib/OSC",
                    "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/features/unsupported/dsp",
                    "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/features/unsupported/dsp/cmsis_dsp",
                    "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/features/unsupported/dsp/dsp",
                    "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/features/unsupported/rpc",
                    "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/features/unsupported/USBDevice",
                    "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/features/unsupported/USBDevice/USBAudio",
                    "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/features/unsupported/USBDevice/USBDevice",
                    "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/features/unsupported/USBDevice/USBHID",
                    "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/features/unsupported/USBDevice/USBMIDI",
                    "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/features/unsupported/USBDevice/USBMSD",
                    "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/features/unsupported/USBDevice/USBSerial",
                    "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/features/unsupported/USBDevice/targets/TARGET_STM",
                    "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/features/unsupported/USBHost",
                    "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/features/unsupported/USBHost/USBHost",
                    "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/features/unsupported/USBHost/USBHost3GModule",
                    "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/features/unsupported/USBHost/USBHostHID",
                    "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/features/unsupported/USBHost/USBHostHub",
                    "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/features/unsupported/USBHost/USBHostMIDI",
                    "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/features/unsupported/USBHost/USBHostMSD",
                    "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/features/unsupported/USBHost/USBHostSerial",
                    "/Users/sstaub/.platformio/packages/framework-mbed@5.51401.200110/features/unsupported/USBHost/targets/TARGET_STM",
                    "/Users/sstaub/.platformio/packages/tool-unity",
                    ""
                ]
            },
            "defines": [
                "PLATFORMIO=40200",
                "STM32F429xx",
                "ARM_MATH_CM4",
                "COMPONENT_FLASHIAP=1",
                "COMPONENT_NSPE=1",
                "COMPONENT_PSA_SRV_EMUL=1",
                "COMPONENT_PSA_SRV_IMPL=1",
                "DEVICE_ANALOGIN=1",
                "DEVICE_ANALOGOUT=1",
                "DEVICE_CAN=1",
                "DEVICE_EMAC=1",
                "DEVICE_FLASH=1",
                "DEVICE_I2C=1",
                "DEVICE_I2CSLAVE=1",
                "DEVICE_I2C_ASYNCH=1",
                "DEVICE_INTERRUPTIN=1",
                "DEVICE_LPTICKER=1",
                "DEVICE_MPU=1",
                "DEVICE_PORTIN=1",
                "DEVICE_PORTINOUT=1",
                "DEVICE_PORTOUT=1",
                "DEVICE_PWMOUT=1",
                "DEVICE_RESET_REASON=1",
                "DEVICE_RTC=1",
                "DEVICE_SERIAL=1",
                "DEVICE_SERIAL_ASYNCH=1",
                "DEVICE_SERIAL_FC=1",
                "DEVICE_SLEEP=1",
                "DEVICE_SPI=1",
                "DEVICE_SPISLAVE=1",
                "DEVICE_SPI_ASYNCH=1",
                "DEVICE_STDIO_MESSAGES=1",
                "DEVICE_TRNG=1",
                "DEVICE_USBDEVICE=1",
                "DEVICE_USTICKER=1",
                "DEVICE_WATCHDOG=1",
                "TARGET_CORTEX",
                "TARGET_CORTEX_M",
                "TARGET_FAMILY_STM32",
                "TARGET_FF_ARDUINO",
                "TARGET_LIKE_CORTEX_M4",
                "TARGET_LIKE_MBED",
                "TARGET_M4",
                "TARGET_NAME=NUCLEO_F429ZI",
                "TARGET_NUCLEO_F429ZI",
                "TARGET_PSA",
                "TARGET_RELEASE",
                "TARGET_RTOS_M4_M7",
                "TARGET_STM",
                "TARGET_STM32F4",
                "TARGET_STM32F429",
                "TARGET_STM32F429ZI",
                "TARGET_STM32F429xI",
                "TARGET_STM32F429xx",
                "TARGET_STM_EMAC",
                "TOOLCHAIN_GCC",
                "TOOLCHAIN_GCC_ARM",
                "TRANSACTION_QUEUE_SIZE_SPI=2",
                "USBHOST_OTHER",
                "USB_STM_HAL",
                "USE_FULL_LL_DRIVER",
                "USE_HAL_DRIVER",
                "__CMSIS_RTOS",
                "__CORTEX_M4",
                "__FPU_PRESENT=1",
                "__MBED_CMSIS_RTOS_CM",
                "__MBED__=1",
                ""
            ],
            "intelliSenseMode": "clang-x64",
            "cppStandard": "c++14",
            "compilerPath": "/Users/sstaub/.platformio/packages/toolchain-gccarmnoneeabi/bin/arm-none-eabi-gcc",
            "compilerArgs": [
                "-mcpu=cortex-m4",
                "-mthumb",
                "-mfpu=fpv4-sp-d16",
                "-mfloat-abi=softfp",
                "-include",
                ""
            ]
        }
    ],
    "version": 4
}

I cannot reproduce this problem on Windows + VSCode 1.42.1 and PIO 4.2 .

platformio.ini

[env:nucel_f429zi]
platform = ststm32
board = nucleo_f429zi 
framework = mbed

Does this problem also appear in projects which do not have # in their path?

What other extension are installed in VSCode (screenshot)?

I’m on macOS Catalina, I’m using projects with # in the path for Arduino without a problem. This happens only with mbed.

Meaning that it works when you delete the #?

No, it has nothing to do with # in the path, tried it. It is a problem only with mbed.

This is a strange bug and I reproduced it on macOS. Please report to Issues · platformio/platformio-core · GitHub.

Don’t you just love IntelliSense… not working, that is! Tried to reproduce this on Linux, and I get a completely different error with the simple while(1) program and configuration shown above. btw, IntelliSense is working just fine on the same system with some ESP8266 & ESP32 Arduino projects I’m working on right now w/ VSCode 1.42.1 & PIO 4.2.0.

I get #include errors detected. Please update your includePath. Squiggles are disabled for this translation unit (/media/2TB_upper/Projects/PlatformIO/mbed/hello-world/src/main.cpp). as the main error and when I mouse over the red squiggle under mbed.h since I have debug logging turned on, I get a

textDocument/hover: 51
Quick info operation failed: FE: 'Compiler exited with error - No IL available'

error from the C++ IntelliSense engine…

Progress is here

1 Like