Hello!
I've scoured many forums and haven't yet found an exact answer to my problem!
As a few other people, I have had trouble setting up devkitpro (nds) on VsCode, and using it to compile the template projects provided.
I have set up my settings.json as @Pk11 described it here:
And I use the command "make main" while in the terminal on Vscode to run the file, but it will just NOT find "nds.h", and it's driving me insane
I also tried creating a "tasks.json" file, and adding to the "args" section the same include paths as in the settings.json file but to no avail....
I just want to code a silly little DS game, but I am not good at bash/setting up environments/understanding C compilers.....
Could anyone please help? Thank you
I've scoured many forums and haven't yet found an exact answer to my problem!
As a few other people, I have had trouble setting up devkitpro (nds) on VsCode, and using it to compile the template projects provided.
I have set up my settings.json as @Pk11 described it here:
Make sure to install the C/C++ extension, then this is what I use for its config:
JSON:"C_Cpp.default.includePath": [ "${workspaceFolder}/**", "/opt/devkitpro/libnds/include/**", "/opt/devkitpro/libctru/include/**", "/opt/devkitpro/devkitARM/include/**", "/opt/devkitpro/devkitARM/arm-none-eabi/include/**" ], "C_Cpp.default.defines": [ "ARM9" ], "C_Cpp.default.compilerPath": "/opt/devkitpro/devkitARM/bin/arm-none-eabi-gcc", "C_Cpp.default.intelliSenseMode": "macos-gcc-x64",
On Windows you'll probably want something more like:
JSON:"C_Cpp.default.includePath": [ "${workspaceFolder}\\**", "C:\\devkitPro\\libnds\\include\\**", "C:\\devkitPro\\libctru\\include\\**", "C:\\devkitPro\\devkitARM\\include\\**", "C:\\devkitPro\\devkitARM\\arm-none-eabi\\include\\**" ], "C_Cpp.default.defines": [ "ARM9" ], "C_Cpp.default.compilerPath": "C:\\devkitPro\\devkitARM\\bin\\arm-none-eabi-gcc", "C_Cpp.default.intelliSenseMode": "windows-gcc-x64",
If you open VS Code settings (command/ctrl + comma) then click the View attachment 317212 button in the top right it'll open the settings as JSON and you can paste in what I put above, and edit as needed.
Notes:
- The libctru line isn't needed for DS development, it's for 3DS, but I do 3DS sometimes too and figure others might as well so I left it in
- The ARM9 define helps some libnds headers be recognized correctly as they lock their content between ARM9 and ARM7 defines. The vast majority of DS code is for ARM9 so I just leave it as that typically, but if you find yourself writing ARM7 code you may want to switch it to ARM7
- Honestly not sure what the C_Cpp.default.intelliSenseMode does, I just set it to the one that makes sense for my OS, might make more sense to use linux arm or so idk
And I use the command "make main" while in the terminal on Vscode to run the file, but it will just NOT find "nds.h", and it's driving me insane
I also tried creating a "tasks.json" file, and adding to the "args" section the same include paths as in the settings.json file but to no avail....
I just want to code a silly little DS game, but I am not good at bash/setting up environments/understanding C compilers.....
Could anyone please help? Thank you







