GBA开发-01:搭建开发环境
其中需要手动添加.vscode文件夹并在.vscode文件下添加以下4个文件c_cpp_properties.json123456789101112131415161718192021{“version”: 4,“configurations”: [{“name”: “GBA”,“compilerPath”: “C:/devkitPro/devkitARM/bin/arm-none-eabi-gcc.exe”,“intelliSenseMode”: “gcc-arm”,“cStandard”: “gnu11”,“includePath”: [“workspaceFolder/source,{workspaceFolder}/source, workspaceFolder/source,{workspaceFolder}”,“C:/devkitPro/libgba/include”,“C:/devkitPro/devkitARM/arm-none-eabi/include”],“defines”: [“GBA”,“ARM7”]}]}launch.json 注意这里配置的gba模拟器的路径用于直接启动mGBA模拟器测试我们开发的程序123456789101112131415{“version”: “0.2.0”,“configurations”: [{“name”: “Run mGBA”,“type”: “cppvsdbg”,“request”: “launch”,“program”: “C:/dev/Emulator/mGBA-0.10.5-win32/mGBA.exe”,“args”: [“workspaceFolder/template.gba],cwd:{workspaceFolder}/template.gba ], cwd: workspaceFolder/template.gba],cwd:{workspaceFolder}”}]}settings.json12345678{“files.associations”: {“*.h”: “c”},“editor.tabSize”: 4,“editor.insertSpaces”: true,“C_Cpp.default.configurationProvider”: “ms-vscode.makefile-tools”}tasks.json1234567891011121314151617181920212223242526{“version”: “2.0.0”,“tasks”: [{“label”: “Build GBA”,“type”: “shell”,“command”: “make”,“args”: [],“group”: {“kind”: “build”,“isDefault”: true},“problemMatcher”: [“$gcc”]},{“label”: “Clean”,“type”: “shell”,“command”: “make”,“args”: [“clean”]}]}最后 Makefile要复制到 C:\devkitPro\examples\gba\template 否则编译时报错在source文件下有一个template.c 按ctrlshiftb 来编译程序控制台会输出以下内容