Skip to content

Instantly share code, notes, and snippets.

@copyrat90
Last active May 6, 2024 19:41
Show Gist options
  • Save copyrat90/eee49d92846ca3585a69d5bea001710d to your computer and use it in GitHub Desktop.
Save copyrat90/eee49d92846ca3585a69d5bea001710d to your computer and use it in GitHub Desktop.
Setup intellisense for Butano project with VSCode C/C++ extension

Setup intellisense for Butano project with VSCode C/C++ extension

  1. Install C/C++ extension for VSCode
  2. Copy the snippet below, and paste it as <yourProjectRoot>/.vscode/c_cpp_properties.json
  3. Change the line "<yourPathToButano>/butano/include", to your location of Butano
    • For example, if you installed Butano to the C:/butano, it should be "C:/butano/butano/include",

Note

  • This snippet assumes that you have installed devkitARM to the default location.
    If you installed it somewhere else, change the line "compilerPath": "..." to your location of devkitARM arm-none-eabi-gcc compiler.
  • If you get intellisense errors about "__FILE_NAME__ macro not found", update Butano to 17.0.0 or later.

Windows

{
    "configurations": [
        {
            "name": "Butano",
            "includePath": [
                "<yourPathToButano>/butano/include",
                "${workspaceFolder}/**"
            ],
            "cStandard": "gnu17",
            "cppStandard": "gnu++20",
            "defines": [],
            "compilerPath": "C:/devkitPro/devkitARM/bin/arm-none-eabi-gcc.exe",
            "intelliSenseMode": "windows-gcc-arm"
        }
    ],
    "version": 4
}

Linux

{
    "configurations": [
        {
            "name": "Butano",
            "includePath": [
                "<yourPathToButano>/butano/include",
                "${workspaceFolder}/**"
            ],
            "cStandard": "gnu17",
            "cppStandard": "gnu++20",
            "defines": [],
            "compilerPath": "/opt/devkitpro/devkitARM/bin/arm-none-eabi-gcc",
            "intelliSenseMode": "linux-gcc-arm"
        }
    ],
    "version": 4
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment