Skip to content

Instantly share code, notes, and snippets.

@ShortArrow
Last active February 13, 2024 02:07
Show Gist options
  • Save ShortArrow/61f608eb36dfe0b1e7c8031d37acb022 to your computer and use it in GitHub Desktop.
Save ShortArrow/61f608eb36dfe0b1e7c8031d37acb022 to your computer and use it in GitHub Desktop.
WindowsでSHマイコンのプログラムを書くためのclangd設定

WindowsでSHマイコンのプログラムを書くためのclangd設定

TODO

#include <...>のパスが正しく認識されず、pp_file_not_foundになるので、プロジェクトフォルダ直下の.clangdファイルに下記を記述。

CompileFlags:
  Add:
    - "-IC:/Program Files (x86)/Renesas/Hew/Tools/Renesas/Sh/9_4_3/include"

こうすれば、VS Code でも Neovimでも共通してclangdによりインクルードパスが効く。

正しく設定が出来ているか確認する

You can build your project but clangd is complaining about missing headersを参考にして、clangd --check=./target_file.cで出たログをGPTに投げればよさげ。人力で読むのめんどい。

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