PlatformIO Community

Help me please. Connection to server got closed.


#1

Hello. I have Windows 7. Motherboard Nucleo f767. Errors in the screenshot. Code search does not work (f12)


As well as strange paths in the settings file.


#2

I have the same error on Windows 10!
A couple of updates happened recently both to Visual Studio Code and to Windows itself. Maybe they were the cause?


#3

It looks like https://github.com/Microsoft/vscode-cpptools/issues/2453 and https://github.com/Microsoft/vscode-cpptools/issues/3104
The extension crashes when it is passed 8.3 filenames. The question is, why PlatformIO passes 8.3 filenames to this extension instead of full ones?

Here’s my c_cpp_properties.json from the project:

{
    "!!! WARNING !!!": "PLEASE DO NOT MODIFY THIS FILE! USE https://docs.platformio.org/page/projectconf/section_env_build.html#build-flags",
    "configurations": [
        {
            "name": "Win32",
            "includePath": [
                "C:/.platformio/packages/framework-mbed",
                "c:/Temp/Platformio Projects/readermbed/.pioenvs/genericSTM32F103C8",
                "c:/Temp/Platformio Projects/readermbed/src",
                "C:/PLATFO~1/packages/FRAMEW~3/cmsis",
                "C:/PLATFO~1/packages/FRAMEW~3/cmsis/TARGET~1",
                "C:/PLATFO~1/packages/FRAMEW~3/drivers",
                "C:/PLATFO~1/packages/FRAMEW~3/events",
                "C:/PLATFO~1/packages/FRAMEW~3/events/equeue",
                "C:/PLATFO~1/packages/FRAMEW~3/hal",
                "C:/PLATFO~1/packages/FRAMEW~3/hal/STORAG~1",
                "C:/PLATFO~1/packages/FRAMEW~3/platform",
                "C:/PLATFO~1/packages/FRAMEW~3/targets/TAE5D3~1",
                "C:/PLATFO~1/packages/FRAMEW~3/targets/TAE5D3~1/TA6EE1~1",
                "C:/PLATFO~1/packages/FRAMEW~3/targets/TAE5D3~1/TA6EE1~1/TARGET~3",
                "C:/PLATFO~1/packages/FRAMEW~3/targets/TAE5D3~1/TA6EE1~1/TARGET~3/device",
                "C:/PLATFO~1/packages/FRAMEW~3/targets/TAE5D3~1/TA6EE1~1/device",
                "c:/Temp/Platformio Projects/readermbed/.piolibdeps/USBDevice_STM32F103",
                "c:/Temp/Platformio Projects/readermbed/.piolibdeps/USBDevice_STM32F103/USBAudio",
                "c:/Temp/Platformio Projects/readermbed/.piolibdeps/USBDevice_STM32F103/USBDevice",
                "c:/Temp/Platformio Projects/readermbed/.piolibdeps/USBDevice_STM32F103/USBHID",
                "c:/Temp/Platformio Projects/readermbed/.piolibdeps/USBDevice_STM32F103/USBMIDI",
                "c:/Temp/Platformio Projects/readermbed/.piolibdeps/USBDevice_STM32F103/USBMSD",
                "c:/Temp/Platformio Projects/readermbed/.piolibdeps/USBDevice_STM32F103/USBSerial",
                "C:/.platformio/packages/framework-mbed/features/unsupported/dsp",
                "c:/Temp/Platformio Projects/readermbed/features/unsupported/dsp",
                "C:/.platformio/packages/framework-mbed/features/unsupported/dsp/cmsis_dsp",
                "C:/.platformio/packages/framework-mbed/features/unsupported/dsp/dsp",
                "C:/.platformio/packages/framework-mbed/features/unsupported/rpc",
                "c:/Temp/Platformio Projects/readermbed/features/unsupported/rpc",
                "C:/.platformio/packages/framework-mbed/features/unsupported/USBHost",
                "c:/Temp/Platformio Projects/readermbed/features/unsupported/USBHost",
                "C:/.platformio/packages/framework-mbed/features/unsupported/USBHost/USBHost",
                "C:/.platformio/packages/framework-mbed/features/unsupported/USBHost/USBHost3GModule",
                "C:/.platformio/packages/framework-mbed/features/unsupported/USBHost/USBHostHID",
                "C:/.platformio/packages/framework-mbed/features/unsupported/USBHost/USBHostHub",
                "C:/.platformio/packages/framework-mbed/features/unsupported/USBHost/USBHostMIDI",
                "C:/.platformio/packages/framework-mbed/features/unsupported/USBHost/USBHostMSD",
                "C:/.platformio/packages/framework-mbed/features/unsupported/USBHost/USBHostSerial",
                "C:/.platformio/packages/framework-mbed/features/unsupported/USBHost/targets/TARGET_STM",
                "C:/.platformio/packages/tool-unity",
                "c:/Temp/Platformio Projects/readermbed/include",
                ""
            ],
            "browse": {
                "limitSymbolsToIncludedHeaders": true,
                "databaseFilename": "${workspaceRoot}/.vscode/.browse.c_cpp.db",
                "path": [
                    "C:/.platformio/packages/framework-mbed",
                    "c:/Temp/Platformio Projects/readermbed/.pioenvs/genericSTM32F103C8",
                    "c:/Temp/Platformio Projects/readermbed/src",
                    "C:/PLATFO~1/packages/FRAMEW~3/cmsis",
                    "C:/PLATFO~1/packages/FRAMEW~3/cmsis/TARGET~1",
                    "C:/PLATFO~1/packages/FRAMEW~3/drivers",
                    "C:/PLATFO~1/packages/FRAMEW~3/events",
                    "C:/PLATFO~1/packages/FRAMEW~3/events/equeue",
                    "C:/PLATFO~1/packages/FRAMEW~3/hal",
                    "C:/PLATFO~1/packages/FRAMEW~3/hal/STORAG~1",
                    "C:/PLATFO~1/packages/FRAMEW~3/platform",
                    "C:/PLATFO~1/packages/FRAMEW~3/targets/TAE5D3~1",
                    "C:/PLATFO~1/packages/FRAMEW~3/targets/TAE5D3~1/TA6EE1~1",
                    "C:/PLATFO~1/packages/FRAMEW~3/targets/TAE5D3~1/TA6EE1~1/TARGET~3",
                    "C:/PLATFO~1/packages/FRAMEW~3/targets/TAE5D3~1/TA6EE1~1/TARGET~3/device",
                    "C:/PLATFO~1/packages/FRAMEW~3/targets/TAE5D3~1/TA6EE1~1/device",
                    "c:/Temp/Platformio Projects/readermbed/.piolibdeps/USBDevice_STM32F103",
                    "c:/Temp/Platformio Projects/readermbed/.piolibdeps/USBDevice_STM32F103/USBAudio",
                    "c:/Temp/Platformio Projects/readermbed/.piolibdeps/USBDevice_STM32F103/USBDevice",
                    "c:/Temp/Platformio Projects/readermbed/.piolibdeps/USBDevice_STM32F103/USBHID",
                    "c:/Temp/Platformio Projects/readermbed/.piolibdeps/USBDevice_STM32F103/USBMIDI",
                    "c:/Temp/Platformio Projects/readermbed/.piolibdeps/USBDevice_STM32F103/USBMSD",
                    "c:/Temp/Platformio Projects/readermbed/.piolibdeps/USBDevice_STM32F103/USBSerial",
                    "C:/.platformio/packages/framework-mbed/features/unsupported/dsp",
                    "c:/Temp/Platformio Projects/readermbed/features/unsupported/dsp",
                    "C:/.platformio/packages/framework-mbed/features/unsupported/dsp/cmsis_dsp",
                    "C:/.platformio/packages/framework-mbed/features/unsupported/dsp/dsp",
                    "C:/.platformio/packages/framework-mbed/features/unsupported/rpc",
                    "c:/Temp/Platformio Projects/readermbed/features/unsupported/rpc",
                    "C:/.platformio/packages/framework-mbed/features/unsupported/USBHost",
                    "c:/Temp/Platformio Projects/readermbed/features/unsupported/USBHost",
                    "C:/.platformio/packages/framework-mbed/features/unsupported/USBHost/USBHost",
                    "C:/.platformio/packages/framework-mbed/features/unsupported/USBHost/USBHost3GModule",
                    "C:/.platformio/packages/framework-mbed/features/unsupported/USBHost/USBHostHID",
                    "C:/.platformio/packages/framework-mbed/features/unsupported/USBHost/USBHostHub",
                    "C:/.platformio/packages/framework-mbed/features/unsupported/USBHost/USBHostMIDI",
                    "C:/.platformio/packages/framework-mbed/features/unsupported/USBHost/USBHostMSD",
                    "C:/.platformio/packages/framework-mbed/features/unsupported/USBHost/USBHostSerial",
                    "C:/.platformio/packages/framework-mbed/features/unsupported/USBHost/targets/TARGET_STM",
                    "C:/.platformio/packages/tool-unity",
                    "c:/Temp/Platformio Projects/readermbed/include",
                    ""
                ]
            },
            "defines": [
                "PLATFORMIO=30604",
                "STM32F103xB",
                "HSE_VALUE=12000000U",
                "ARM_MATH_CM3",
                "COMPONENT_NSPE=1",
                "COMPONENT_PSA_SRV_EMUL=1",
                "COMPONENT_PSA_SRV_IMPL=1",
                "DEVICE_ANALOGIN=1",
                "DEVICE_CAN=1",
                "DEVICE_FLASH=1",
                "DEVICE_I2C=1",
                "DEVICE_I2CSLAVE=1",
                "DEVICE_I2C_ASYNCH=1",
                "DEVICE_INTERRUPTIN=1",
                "DEVICE_PORTIN=1",
                "DEVICE_PORTINOUT=1",
                "DEVICE_PORTOUT=1",
                "DEVICE_PWMOUT=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_USTICKER=1",
                "TARGET_BLUEPILL_F103C8",
                "TARGET_CORTEX",
                "TARGET_CORTEX_M",
                "TARGET_FAMILY_STM32",
                "TARGET_LIKE_CORTEX_M3",
                "TARGET_LIKE_MBED",
                "TARGET_M3",
                "TARGET_RELEASE",
                "TARGET_STM",
                "TARGET_STM32F1",
                "TARGET_STM32F103C8",
                "TOOLCHAIN_GCC",
                "TOOLCHAIN_GCC_ARM",
                "TRANSACTION_QUEUE_SIZE_SPI=2",
                "__CMSIS_RTOS",
                "__CORTEX_M3",
                "__MBED_CMSIS_RTOS_CM",
                "__MBED__=1",
                ""
            ],
            "intelliSenseMode": "clang-x64",
            "cppStandard": "c++14",
            "compilerPath": "C:/.platformio/packages/toolchain-gccarmnoneeabi/bin/arm-none-eabi-gcc.exe -mcpu=cortex-m3 -mthumb",
            "cStandard": "c11"
        }
    ],
    "version": 4
}

Setting the extension update channel (c_cpp.UpdateChannel) to insiders and updating the extension fixed the error for me.
Alternatively, rolling back to a previous version might help (but I didn’t test this).


#4

Maybe this sheds some light on why 8.3 filenames are generated: https://github.com/Microsoft/vscode-cpptools/issues/3104#issuecomment-459119917


#5

I’m having this same problem and it’s maddening.

What do you mean by " Setting the extension update channel ( c_cpp.UpdateChannel ) to insiders and updating the extension"

How do you do this? I have no idea where C_cpp.UpdateChannel is located. Can you further detail how you did this? Thanks!


#6

Open Visual Studio Code parameters and enter parameter name into search field.