Is it possible to develop linux kernel module in CLion?

The approach I use to spelunk the linux kernel via clion is:

  • create a compile_commands.json for the kernel using an intercepted build
  • use a ruby script to convert compile_commands.json into an clion friendly CMakeLists.txt

This allows for both code navigation and also a reasonable editing experience.

See for more details https://github.com/habemus-papadum/kernel-grok


Yes, It is. But you will need to write make file for building kernel module.

Update 1: I recommend QtCreator for writing linux kernel module. See my manual

Update 2: I also recommend eclipse cdt. See eclipse manual about how to prepare it for linux kernel.