Ardupilot codebase in CLion?

Is anyone other than me using (attempting to use) CLion as an IDE for the Ardupilot codebase? Actually for now I don’t so much need a full featured IDE as simply something that has something of a code model so that I can jump around and understand the code a bit better.

Importing the entire directory tree has been somewhat helpful–I can usually find things using the “Search Everywhere” function (space space) and CLion seems to have some knowledge of what symbols are functions, etc. But, for example, I can’t jump to declarations, etc.

I’m pretty sure I can start to tweak the CMakeLists.txt that the importing process produced–basically just a giant set(SOURCE_FILES ...) block listing every single file in the project–but before I go do that I thought I’d check if someone else has already done any work in this direction.

Hi Patrick,

I never heard of CLion. (I use Code::Blocks myself) If you manage to get things working It would be certainly interesting to hear about it.

I’ll try to circle back and relate what I learn. Meantime, CLion is relatively newer but you may be more familiar with some of the other products from the same family: PyCharm, IntelliJ, …

Did you manage to get up and running Ardupilot in CLion?


You can use this to have code completion and parsing with Clion. Still need to use waf from a term for compilation.

1 Like

Thank you. Great job. This saves me :slight_smile:
Are you also using CLion to edit code regarding Ardupilot?
I’ve been testing also VS Code but since I’m very good at using IntelliJ Idea, CLions elder brother I can’t convert to use VSCode. So my choice is CLion (same keymap and GUI) but I’m a bit new to CPP ecosysytem thus my problems with using it with Ardupilot codebase.

Best regards,

Found a better way for current ardupilot code and Clion:

  1. make a normal waf build as ardupilot docs say
  2. open ardupilot/build/BOARD/compile_commands.json as a project in Clion
  3. click Tools - Compilation Database - Change Project Root and choose ardupilot directory
1 Like