ESP32-C3官方示例modbus-master,编译时提示找不到这两个头文件"modbus_params.h"和"mbcontroller.h"
E:/H3/mb_master/main/master.c:10:10: fatal error: mbcontroller.h: No such file or directory
10 | #include "mbcontroller.h"
| ^~~~~~~~~~~~~~~~
compilation terminated.
c_cpp_properties.json文件内容如下
{
"configurations": [
{
"name": "ESP-IDF",
"compilerPath": "E:\\esp\\.espressif\\tools\\xtensa-esp32-elf\\esp-12.2.0_20230208\\xtensa-esp32-elf\\bin\\xtensa-esp32-elf-gcc.exe",
"includePath": [
"${config:idf.espIdfPath}/components/**",
"${config:idf.espIdfPathWin}/components/**",
"${config:idf.espAdfPath}/components/**",
"${config:idf.espAdfPathWin}/components/**",
"${workspaceFolder}/**"
],
"browse": {
"path": [
"${config:idf.espIdfPath}/components",
"${config:idf.espIdfPathWin}/components",
"${config:idf.espAdfPath}/components/**",
"${config:idf.espAdfPathWin}/components/**",
"${workspaceFolder}"
],
"limitSymbolsToIncludedHeaders": false
}
}
],
"version": 4
}
CMakeLists.txt文件内容如下:
set(PROJECT_NAME "modbus_master")
idf_component_register(SRCS "master.c"
INCLUDE_DIRS ".")
target_compile_options(${COMPONENT_LIB} PRIVATE "-Wno-format")
ESP-IDF版本5.1.1
请问是哪里配置有问题?如何找到这两个头文件?谢谢
ESP-32 C3编译官方例程缺少头文件
-
- Posts: 211
- Joined: Fri Feb 01, 2019 4:02 pm
- Contact:
Re: ESP-32 C3编译官方例程缺少头文件
The answer is here: https://esp32.com/viewtopic.php?f=25&t=37255
Who is online
Users browsing this forum: No registered users and 192 guests