microsoft / microsoft/vscode-cmake-tools
Multi-project configuration
- Dominant language
- TypeScript
- Stars
- 1.7k
- Forks
- 546
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 32
Description
I develop embedded software for Zephyr RTOS as well. The compile_commands.json works great for the project directory. However, it doesn't work so well for the underlying RTOS directory. I get errors such as:
```
"i2c_sam0.c" not found in "/Users/.../build/compile_commands.json". 'includePath' from c_cpp_properties.json will be used for this file instead.
```
This particular file (i2c_sam0.c) is a Zephyr driver and not part of the application. When working with your application, it is often helpful to view the drivers used by the application (and other components of the RTOS such as kernel, sub systems, etc) and to have intellisense properly parse these files when you open them. Moreover, I debug these drivers and it is essential to be able to properly parse them.
_Originally posted by @sslupsky in https://github.com/microsoft/vscode-cmake-tools/issues/915#issuecomment-599125576_
Contributor guide
Research direction
Start by reproducing the reported setup with an application and its Zephyr RTOS sources, then trace how compile_commands.json and c_cpp_properties.json are discovered and applied. The work is done when files outside the application, such as i2c_sam0.c, can be opened and parsed with the correct compilation settings for their project.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, cmake, cpp
- Domain
- developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100