Skip to content

Conversation

@relzp
Copy link
Contributor

@relzp relzp commented Jan 30, 2026

adds files (compile_flags.txt, .clangd) to configure clangd so that the clangd extension can be used in vscode (or anywhere with clangd support) for code highlighting, code completion, etc.
the config also does the following:

  1. suppresses warnings about unused includes, since:
  • we use includes like module.c -> module.h, where module.h includes the symbols that both the header and source need
  • the stm32 library also uses includes like this, for example we define the modules we want and then include stm32h7xx_hal.h, instead of each individual module (e.g stm32h7xx_hal_spi.h)
  1. suppresses errors from the stm32 libraries (under Drivers/)

currently, it uses the default compiler installed on the user's machine, not the target architecture (arm) compiler, for simplicity and so that each user doesn't have to install the cross-compiler

Copy link
Contributor

@Claegtun Claegtun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do these files only affect vscode, not the actual compiling of the binary in CubeIDE?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this file affect or influence the parent .clang files, i.e. .clang-format and .clang-tidy?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants