no-OS icon indicating copy to clipboard operation
no-OS copied to clipboard

Improvements for Auto-Generated VSCode Files

Open Brandon-Hurst opened this issue 1 year ago • 1 comments

The auto-generated VSCode files (*.json) for the example builds are a bit hard to work with on Windows in the current state. In particular, I noticed the following...

Baremetal ARM GCC Profile

The "intelliSense Mode" parameter in this same file appears to be set for linux-gcc-arm rather than just gcc-arm. This is a subtle, but important distinction: gcc-arm targets baremetal, while linux-gcc-arm targets an ARM core that is meant to be running Linux. This is by definition not the case for a "no-OS" type platform.

"intelliSenseMode": "linux-gcc-arm"

should be changed to...

"intelliSenseMode": "gcc-arm"

Cross-Platform Support

Currently the output files only have support for a Linux profile.

From tools/scripts/platform/template_c_cpp_properties.json:

{
    "configurations": [
        {
            "name": "Linux",
            "includePath": [
                VSCODE_INCLUDEPATH_INTELLI
            ],
            "defines": [
                VSCODE_DEFINES_INTELLI
            ],
            "compilerPath": COMPILER_INTELLISENSE_PATH,
            "cStandard": "gnu11",
            "cppStandard": "gnu++11",
            "intelliSenseMode": "linux-gcc-arm"
        }
    ],
    "version": 4
}

For a number of reasons, many embedded developers are locked into a Windows development platform. Some developers have the option of choosing macOS as well and prefer to keep that as their home environment. Unfortunately, many developers can't use a Linux profile for VS Code out of the box.

Fwd/Back Slashes

Windows VS Code can struggle with the direction of slashes in path names. This can be seen in the below call to GNU Make... image

To reproduce this:

  1. Build the project on command-line with Windows in Git Bash or MSYS2.
  2. Open the project in VS Code
  3. Attempt to debug with Run-->Start Debugging

Brandon-Hurst avatar Nov 18 '24 18:11 Brandon-Hurst

Thanks @Brandon-Hurst , we'll have a look into this and come back to you.

buha avatar Nov 25 '24 14:11 buha