6
Configure vscode for linux kernel source code
source link: https://gist.github.com/itewqq/4b4ee89ba420d585efb472116879b1ee
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Configure vscode for linux kernel source code · GitHub
Instantly share code, notes, and snippets.
Configure vscode for linux kernel source code
- Disable or uninstall the official
C/C++ plugin
. - Install the
clangd
plugin. - Build the kernel with
clang
:
/path/to/kernel_source$ make CC=clang defconfig
/path/to/kernel_source$ make CC=clang -j16
- Generate the
compile_commands.json
:
/path/to/kernel_source$ python ./scripts/clang-tools/gen_compile_commands.py
If no error occures, you will find compile_commands.json
in /path/to/kernel_source/
.
- Configure the
clangd
plugin with the following parameters:
- Open any
C
file in kernel source and enjoy it :)
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK