The problem i'm having is to upgrade a project that i used on IDF v3.3 to v4.0. I adapted some differences on bluetooth lib and etc, i did a CMake.txt inside main folder describing my ".c" files, but i get an error of "ESP_LOGX" (i will show on the end of the post) and "cc1: some warnings being treated as errors". I had this errors once when i had IDF V3.3 and i solved by including "CFLAGS += -Wno-format" at component.mk . I tested my idf 4.0 right now and a hello-world example is compiled without any problems.
My CMakeLists.txt (inside main folder) is:
idf_component_register(SRCS "main_project.c" "timer.c" "bal_id.c" "bluetooth.c" "bovineid_ops.c" "conversions.c" "httpJson.c"
"leds.c" "nvs_handler.c" "ota_handler.c" "packageringbuffer.c" "personalbov_packages.c" "rfid_5f.c"
"rfid_antennachafon.c" "rfid_chafonmu904.c" "rfid_model_abstract.c" "spiffshandler.c" "wifi.c" "wifi_vars.c"
INCLUDE_DIRS "")
component.mk is:
#
# Main component makefile.
#
# This Makefile can be left empty. By default, it will take the sources in the
# src/ directory, compile them and link them into lib(subdirectory_name).a
# in the build directory. This behaviour is entirely configurable,
# please read the ESP-IDF documents if you need to do this.
#
CFLAGS += -Wno-format
CMakeLists.txt (project folder) is:
# 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)
project(bt_spp_acceptor_demo)
Here is part of the error codes i'm receiving when idf.py build. Most of errors are LOGX related. I get some warnings from some lwip libs, but i think this warnings are not being treated as errors.
/home/matheus/esp/esp-idf/components/log/include/esp_log.h:255:27: error: format '%u' expects argument of type 'unsigned int', but argument 6 has type 'long int' [-Werror=format=]
#define LOG_COLOR(COLOR) "\033[0;" COLOR "m"
^~~~~~~~~
/home/matheus/esp/esp-idf/components/log/include/esp_log.h:258:27: note: in expansion of macro 'LOG_COLOR'
#define LOG_COLOR_E LOG_COLOR(LOG_COLOR_RED)
^~~~~~~~~
/home/matheus/esp/esp-idf/components/log/include/esp_log.h:272:37: note: in expansion of macro 'LOG_COLOR_E'
#define LOG_FORMAT(letter, format) LOG_COLOR_ ## letter #letter " (%d) %s: " format LOG_RESET_COLOR "\n"
^~~~~~~~~~
/home/matheus/esp/esp-idf/components/log/include/esp_log.h:329:86: note: in expansion of macro 'LOG_FORMAT'
if (level==ESP_LOG_ERROR ) { esp_log_write(ESP_LOG_ERROR, tag, LOG_FORMAT(E, format), esp_log_timestamp(), tag, ##__VA_ARGS__); } \
^~~~~~~~~~
/home/matheus/esp/esp-idf/components/log/include/esp_log.h:350:41: note: in expansion of macro 'ESP_LOG_LEVEL'
if ( LOG_LOCAL_LEVEL >= level ) ESP_LOG_LEVEL(level, tag, format, ##__VA_ARGS__); \
^~~~~~~~~~~~~
/home/matheus/esp/esp-idf/components/log/include/esp_log.h:296:38: note: in expansion of macro 'ESP_LOG_LEVEL_LOCAL'
#define ESP_LOGI( tag, format, ... ) ESP_LOG_LEVEL_LOCAL(ESP_LOG_INFO, tag, format, ##__VA_ARGS__)
^~~~~~~~~~~~~~~~~~~
../main/personalbov_packages.c:341:8: note: in expansion of macro 'ESP_LOGI'
ESP_LOGI("TaskSendServer", "MPRcv: %u MZRcv: %u Peso Rcv: %d", mpRcv, mzRcv, pesoCalibRcv);
^~~~~~~~
/home/matheus/esp/esp-idf/components/log/include/esp_log.h:255:27: error: format '%u' expects argument of type 'unsigned int', but argument 7 has type 'long int' [-Werror=format=]
#define LOG_COLOR(COLOR) "\033[0;" COLOR "m"
^~~~~~~~~
/home/matheus/esp/esp-idf/components/log/include/esp_log.h:258:27: note: in expansion of macro 'LOG_COLOR'
#define LOG_COLOR_E LOG_COLOR(LOG_COLOR_RED)
^~~~~~~~~
/home/matheus/esp/esp-idf/components/log/include/esp_log.h:272:37: note: in expansion of macro 'LOG_COLOR_E'
#define LOG_FORMAT(letter, format) LOG_COLOR_ ## letter #letter " (%d) %s: " format LOG_RESET_COLOR "\n"
^~~~~~~~~~
/home/matheus/esp/esp-idf/components/log/include/esp_log.h:329:86: note: in expansion of macro 'LOG_FORMAT'
if (level==ESP_LOG_ERROR ) { esp_log_write(ESP_LOG_ERROR, tag, LOG_FORMAT(E, format), esp_log_timestamp(), tag, ##__VA_ARGS__); } \
^~~~~~~~~~
/home/matheus/esp/esp-idf/components/log/include/esp_log.h:350:41: note: in expansion of macro 'ESP_LOG_LEVEL'
if ( LOG_LOCAL_LEVEL >= level ) ESP_LOG_LEVEL(level, tag, format, ##__VA_ARGS__); \
^~~~~~~~~~~~~
/home/matheus/esp/esp-idf/components/log/include/esp_log.h:296:38: note: in expansion of macro 'ESP_LOG_LEVEL_LOCAL'
#define ESP_LOGI( tag, format, ... ) ESP_LOG_LEVEL_LOCAL(ESP_LOG_INFO, tag, format, ##__VA_ARGS__)
^~~~~~~~~~~~~~~~~~~
../main/personalbov_packages.c:341:8: note: in expansion of macro 'ESP_LOGI'
ESP_LOGI("TaskSendServer", "MPRcv: %u MZRcv: %u Peso Rcv: %d", mpRcv, mzRcv, pesoCalibRcv);
^~~~~~~~
/home/matheus/esp/esp-idf/components/log/include/esp_log.h:255:27: error: format '%u' expects argument of type 'unsigned int', but argument 6 has type 'long int' [-Werror=format=]
#define LOG_COLOR(COLOR) "\033[0;" COLOR "m"
^~~~~~~~~
/home/matheus/esp/esp-idf/components/log/include/esp_log.h:259:27: note: in expansion of macro 'LOG_COLOR'
#define LOG_COLOR_W LOG_COLOR(LOG_COLOR_BROWN)
^~~~~~~~~
/home/matheus/esp/esp-idf/components/log/include/esp_log.h:272:37: note: in expansion of macro 'LOG_COLOR_W'
#define LOG_FORMAT(letter, format) LOG_COLOR_ ## letter #letter " (%d) %s: " format LOG_RESET_COLOR "\n"
^~~~~~~~~~
/home/matheus/esp/esp-idf/components/log/include/esp_log.h:330:86: note: in expansion of macro 'LOG_FORMAT'
else if (level==ESP_LOG_WARN ) { esp_log_write(ESP_LOG_WARN, tag, LOG_FORMAT(W, format), esp_log_timestamp(), tag, ##__VA_ARGS__); } \
Upgrade a project from IDF 3.3 to 4.2
-
- Posts: 10
- Joined: Thu Feb 20, 2020 2:44 pm
Return to “General Discussion”
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: kaxx1975 and 92 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.