Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvements for Auto-Generated VSCode Files #2369

Open
Brandon-Hurst opened this issue Nov 18, 2024 · 1 comment
Open

Improvements for Auto-Generated VSCode Files #2369

Brandon-Hurst opened this issue Nov 18, 2024 · 1 comment

Comments

@Brandon-Hurst
Copy link

Brandon-Hurst commented Nov 18, 2024

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
@buha
Copy link
Contributor

buha commented Nov 25, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants