espidf5.4版本 vscode使用clangd插件代码提示

1.依赖插件
在这里插入图片描述
2.launch.json配置

{
  "version": "0.2.0",
  "configurations": [
    {
      "type": "gdbtarget",
      "request": "attach",
      "name": "Eclipse CDT GDB Adapter"
    },
    {
      "type": "espidf",
      "name": "Launch",
      "request": "launch"
    }
  ]
}

3.settings.json配置

{
  "clangd.path": "C:\\Espressif_5_4\\Espressif\\tools\\esp-clang\\esp-18.1.2_20240912\\esp-clang\\bin\\clangd.exe",

  "clangd.arguments": [
    "--compile-commands-dir=build",                        // 指定 compile_commands.json 所在目录
    "--header-insertion=never",                           // 防止自动插入 include
    "--background-index",                                 // 开启后台索引,提升跳转能力
    "--query-driver=C:/Espressif_5_4/Espressif/tools/**/xtensa-esp32s3-elf-gcc.exe"  // 允许使用 ESP 的交叉编译器
  ],

  "clangd.onConfigChanged": "restart",
  "clangd.checkUpdates": true,
  "clangd.restartAfterCrash": true,

  "idf.espIdfPathWin": "C:/Espressif_5_4/Espressif/frameworks/esp-idf-v5.4/",
  "idf.pythonInstallPath": "C:\\Espressif_5_4\\Espressif\\tools\\idf-python\\3.11.2\\python.exe",
  "idf.espAdfPathWin": "C:\\Espressif_5_4\\esp-adf\\",
  "idf.openOcdConfigs": [
    "board/esp32s3-builtin.cfg"
  ],
  "idf.portWin": "COM6",
  "idf.toolsPathWin": "C:\\Espressif_5_4\\Espressif",
  "idf.flashType": "UART",
  "idf.customExtraVars": {
    "IDF_TARGET": "esp32s3"
  },

  "files.associations": {
    "*.h": "c",
    "*.c": "c",
    "*.cpp": "cpp"
  }
}
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值