Hello,
I am trying to learn how to change, build and debug ardupilot. Following ardupilot dev site.
I use WSL2 ubuntu in VSCODE. Ardupilot cloned to WSL not windows. I set up all the enviroment like git, python, vscode extensions.
Continued with the example sketches some of them worked.
Now I am trying to change the code and observe if it works.
I followed https://www.youtube.com/watch?v=5nQiY_q_ZVA video. I can build the code with this changes, run STIL, control vehicle with commands however, I can’t see rangefinder data on OSD or print data on console like in the video. Tried other kind of changes on the code but they didn’t make any difference. I don’t get any build error if the code I added is correct.
I get “#include errors detected. Consider updating your compile_commands.json or includePath. Squiggles are disabled for this translation unit” errors in VSCODE.
I updated c_cpp_properties.json file like this
Is it possible I set up the build enviroment incorrect way ?
{
“configurations”: [
{
“name”: “Linux”,
“includePath”: [
“/home/bukre/Ardupilot_workspace/ardupilot**”,
“/home/bukre/Ardupilot_workspace/ardupilot/modules/",
"/home/bukre/Ardupilot_workspace/ardupilot/libraries/”,
“/home/bukre/Ardupilot_workspace/ardupilot/libraries/AP_HAL**”,
“/usr/lib/gcc/x86_64-linux-gnu/11/include”,
“/usr/include/linux”,
“/usr/include/x86_64-linux-gnu”
],
“defines”: [
“ARDUPILOT=1”
],
“compilerPath”: “/usr/lib/ccache/gcc”,
“cStandard”: “c17”,
“cppStandard”: “gnu++17”,
“intelliSenseMode”: “linux-gcc-x64”,
“compileCommands”: “${workspaceFolder}/build/Pixhawk1/compile_commands.json”
}
],
“version”: 4
}