硬件部分:esp32-s3 –wroom-1
软件部分: esp-idf-v4.4.2
开发环境:Wondows 7
IDE: Eclipse IDE for C/C++ Developers Version: 2022-06 (4.24.0)
问题描述:
原本在keil c mdk 用AT command开发蛮顺手的,但后来转到IDF确让我挫折满满,编译后出现一堆问题,在网上没有找当我想找的答案,虚心求教一下
出现问题描述:
undefined reference to `app_main'
undefined reference to `app_main'
Symbol 'NULL' could not be resolved
Symbol 'ESP_ERR_NVS_NO_FREE_PAGES' could not be resolved
Symbol 'ESP_ERR_NVS_NEW_VERSION_FOUND' could not be resolved
esp-idf/freertos/libfreertos.a(port_common.c.obj): in function `main_task':
设定步骤
1. 开启idf 专案
2. 挂载 https://github.com/espressif/esp-aws-iot 项目内容(\esp-aws-iot-master\examples\http)透过import -> file system 方式把*.c
*.h挂载进来
3. Cmakelist.txt不知道该如何修改
CMakeList.txt
1.
set(COMPONENT_SRCS
"app_main.c"
"http_demo_mutual_auth.c"
"http_demo_utils.c"
)
set(COMPONENT_ADD_INCLUDEDIRS
"."
"${CMAKE_CURRENT_LIST_DIR}"
)
idf_component_register(SRCS "${COMPONENT_SRCS}"
INCLUDE_DIRS ${COMPONENT_ADD_INCLUDEDIRS}
)
2.
# The following five lines of boilerplate have to be in your project's
# CMakeLists in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.5)
set(EXTRA_COMPONENT_DIRS "$ENV{IDF_PATH}/examples/common_components/protocol_examples_common"
"${CMAKE_CURRENT_LIST_DIR}/../../../libraries/coreHTTP"
"${CMAKE_CURRENT_LIST_DIR}/../../../libraries/backoffAlgorithm"
"${CMAKE_CURRENT_LIST_DIR}/../../../libraries/common/posix_compat"
)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(http_mutual_auth)
target_add_binary_data(${CMAKE_PROJECT_NAME}.elf "main/certs/root_cert_auth.pem" TEXT)
target_add_binary_data(${CMAKE_PROJECT_NAME}.elf "main/certs/client.crt" TEXT)
target_add_binary_data(${CMAKE_PROJECT_NAME}.elf "main/certs/client.key" TEXT)
3.
# The following lines of boilerplate have to be in your project's
# CMakeLists in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.5)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
get_filename_component(ProjectId ${CMAKE_CURRENT_LIST_DIR} NAME)
string(REPLACE " " "_" ProjectId ${ProjectId})
project(${ProjectId})
Eclipse 挂载aws 代码出现错误
Jump to
- English Forum
- Explore
- News
- General Discussion
- FAQ
- Documentation
- Documentation
- Sample Code
- Discussion Forum
- Hardware
- ESP-IDF
- ESP-BOX
- ESP-ADF
- ESP-MDF
- ESP-WHO
- ESP-SkaiNet
- ESP32 Arduino
- IDEs for ESP-IDF
- ESP-AT
- ESP IoT Solution
- ESP RainMaker
- Rust
- ESP8266
- Report Bugs
- Showcase
- Chinese Forum 中文社区
- 活动区
- 乐鑫活动专区
- 讨论区
- 全国大学生物联网设计竞赛乐鑫答疑专区
- ESP-IDF 中文讨论版
- 《ESP32-C3 物联网工程开发实战》书籍讨论版
- 中文文档讨论版
- ESP-AT 中文讨论版
- ESP-BOX 中文讨论版
- ESP IoT Solution 中文讨论版
- ESP-ADF 中文讨论版
- ESP Mesh 中文讨论版
- ESP Cloud 中文讨论版
- ESP-WHO 中文讨论版
- ESP-SkaiNet 中文讨论版
- ESP 生产支持讨论版
- 硬件问题讨论
- 项目展示
Who is online
Users browsing this forum: No registered users and 110 guests
- All times are UTC
- Top
- Delete cookies
About Us
Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. ESP8266EX and ESP32 are some of our products.