Issues with off-line development

Hello all.

I’ve been having problems getting VScode to find the the include files, and / or classes in hFramework not being recognized. I have similar failures with both Mac and Linux. If anyone can send a working contents of c_cpp_properties.json that I could compare too that would be very much appreciated, preferably one that works even with the most simple servo example.

In the meantime I plan to try to work with IntelliJ rather than VScode. I work in IntelliJ all day long - not in c++ - so I’m more familiar there. What I don’t understand is that assuming I can get thing to compile there, how do I download it into the core2 board? With vscode, the Husarion plug-in provides this service.

All suggestions appreciated.

Hi thealy,

All information about running Husarion Extension on VSC you can find here. If you still will have some problem let me know.

I’ve never try to work with CORE2 and IntelliJ but this is the file you ask for:

{
    "_comment": "Autogenerated by Husarion plugin",
    "configurations": [
        {
            "name": "Husarion",
            "includePath": [
                "/home/hubert/.vscode/extensions/husarion.husarion-1.5.9/sdk/ports/stm32/include",
                "/home/hubert/.vscode/extensions/husarion.husarion-1.5.9/sdk/ports/stm32/src",
                "/home/hubert/.vscode/extensions/husarion.husarion-1.5.9/sdk/ports/stm32/src/hPeriph",
                "/home/hubert/.vscode/extensions/husarion.husarion-1.5.9/sdk/ports/stm32/src/hUSB/usb",
                "/home/hubert/.vscode/extensions/husarion.husarion-1.5.9/sdk/ports/stm32/src/hUSB",
                "/home/hubert/.vscode/extensions/husarion.husarion-1.5.9/sdk/include",
                "/usr/include"
            ],
            "browse": {
                "limitSymbolsToIncludedHeaders": true,
                "databaseFilename": ""
            },
            "intelliSenseMode": "clang-x64",
            "compilerPath": "/usr/bin/gcc",
            "cStandard": "c11",
            "cppStandard": "c++17"
        }
    ],
    "version": 4
}

Don’t forget to change the path :wink:

Regards,
Hubert

Hello Hubert

I found that including the following paths (obviously working with Windows):

"C:/Users/MichaelT/.vscode/extensions/husarion.husarion-1.5.9/sdk/ports/stm32/include",
"C:/Users/MichaelT/.vscode/extensions/husarion.husarion-1.5.9/sdk/ports/stm32/src",
"C:/Users/MichaelT/.vscode/extensions/husarion.husarion-1.5.9/sdk/ports/stm32/src/hPeriph",
"C:/Users/MichaelT/.vscode/extensions/husarion.husarion-1.5.9/sdk/ports/stm32/src/hUSB/usb",
"C:/Users/MichaelT/.vscode/extensions/husarion.husarion-1.5.9/sdk/ports/stm32/src/hUSB",
"C:/Users/MichaelT/.vscode/extensions/husarion.husarion-1.5.9/sdk/include",
"C:/Users/MichaelT/.vscode/HusarionTools/lib/gcc/arm-none-eabi/5.4.1/include/**",
"C:/Users/MichaelT/.vscode/HusarionTools/arm-none-eabi/include/**",
"C:/Users/MichaelT/.vscode/extensions/husarion.husarion-1.5.9/sdk/include/hROS/**"

removed some additional green squiggles because now math.h, stdib.h and some others can be found also.
Unfortunately the changes will be overwritten by a new start of VSCode (1.24.1).
Also the variables:

"cStandard": "c11",
"cppStandard": "c++17"

are not set in Windows.
Perhaps you can check and adjust the Husarion defaults.

Michael

This exact behavior is happening to me also. c_cpp_properties.json (where I set the necessary includes) is overwritten during VSCode start up, so I lose the values set in the previous session.

Any updates on this? thanks