freeRTOS-0.2.0版本的例程编译出错-Arduino中文社区 - Powered by Discuz!

Arduino中文社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 1217|回复: 5

freeRTOS-0.2.0版本的例程编译出错

[复制链接]
发表于 2021-7-26 19:13 | 显示全部楼层 |阅读模式
Generated E:/MCU1111111111111111/esp8266/ESP32/IDF-V4.3/examples/kzyyProject/Button_WiFi/build/bootloader/bootloader.bin
[916/1004] Building C object esp-idf/blinker/CMakeFiles/__idf_blinker.dir/src/api/blinker_api.c.obj
../components/blinker/src/api/blinker_api.c: In function 'blinker_va_print':
../components/blinker/src/api/blinker_api.c:840:33: warning: passing argument 1 of 'cJSON_AddStringToObject' from incompatible pointer type [-Wincompatible-pointer-types]
         cJSON_AddStringToObject(param, BLINKER_CMD_MESSAGE_ID, from_param->message_id);
                                 ^~~~~
In file included from ../components/blinker/include/blinker_api.h:10,
                 from ../components/blinker/src/api/blinker_api.c:13:
../../../../components/json/cJSON/cJSON.h:269:22: note: expected 'cJSON * const' {aka 'struct cJSON * const'} but argument is of type 'const char *'
CJSON_PUBLIC(cJSON*) cJSON_AddStringToObject(cJSON * const object, const char * const name, const char * const string);
                      ^~~~~~~~~~~~~~~~~~~~~~~
../components/blinker/src/api/blinker_api.c:844:55: warning: passing argument 3 of 'cJSON_AddItemToObject' from incompatible pointer type [-Wincompatible-pointer-types]
         cJSON_AddItemToObject(root, BLINKER_CMD_DATA, param);
                                                       ^~~~~
In file included from ../components/blinker/include/blinker_api.h:10,
                 from ../components/blinker/src/api/blinker_api.c:13:
../../../../components/json/cJSON/cJSON.h:223:90: note: expected 'cJSON *' {aka 'struct cJSON *'} but argument is of type 'const char *'
CJSON_PUBLIC(cJSON_bool) cJSON_AddItemToObject(cJSON *object, const char *string, cJSON *item);
                                                                                   ~~~~~~~^~~~
At top level:
../components/blinker/src/api/blinker_api.c:876:13: warning: 'blinker_va_param_add' defined but not used [-Wunused-function]
static void blinker_va_param_add(blinker_va_data_t *va, const char *param, const blinker_va_param_type_t param_type, const blinker_va_param_val_type_t val_type)
             ^~~~~~~~~~~~~~~~~~~~
[988/1004] Building C object esp-idf/blinker/CMakeFiles/__...linker.dir/src/provisioning/blinker_prov_smartconfig.c.obj
FAILED: esp-idf/blinker/CMakeFiles/__idf_blinker.dir/src/provisioning/blinker_prov_smartconfig.c.obj
ccache E:\MCU1111111111111111\esp8266\ESP32\ESP32-idf-tool\.espressif\tools\xtensa-esp32-elf\esp-2020r3-8.4.0\xtensa-esp32-elf\bin\xtensa-esp32-elf-gcc.exe -DHAVE_CONFIG_H -DMBEDTLS_CONFIG_FILE=\"mbedtls/esp_config.h\" -Iconfig -I../components/blinker/include -I../../../../components/newlib/platform_include -I../../../../components/freertos/include -I../../../../components/freertos/port/xtensa/include -I../../../../components/esp_hw_support/include -I../../../../components/esp_hw_support/port/esp32/. -I../../../../components/heap/include -I../../../../components/log/include -I../../../../components/lwip/include/apps -I../../../../components/lwip/include/apps/sntp -I../../../../components/lwip/lwip/src/include -I../../../../components/lwip/port/esp32/include -I../../../../components/lwip/port/esp32/include/arch -I../../../../components/soc/include -I../../../../components/soc/esp32/. -I../../../../components/soc/esp32/include -I../../../../components/hal/esp32/include -I../../../../components/hal/include -I../../../../components/esp_rom/include -I../../../../components/esp_rom/esp32 -I../../../../components/esp_common/include -I../../../../components/esp_system/include -I../../../../components/esp32/include -I../../../../components/driver/include -I../../../../components/driver/esp32/include -I../../../../components/esp_ringbuf/include -I../../../../components/efuse/include -I../../../../components/efuse/esp32/include -I../../../../components/xtensa/include -I../../../../components/xtensa/esp32/include -I../../../../components/espcoredump/include -I../../../../components/esp_timer/include -I../../../../components/esp_ipc/include -I../../../../components/esp_pm/include -I../../../../components/vfs/include -I../../../../components/esp_wifi/include -I../../../../components/esp_wifi/esp32/include -I../../../../components/esp_event/include -I../../../../components/esp_netif/include -I../../../../components/esp_eth/include -I../../../../components/tcpip_adapter/include -I../../../../components/app_trace/include -I../../../../components/mdns/include -I../../../../components/console -I../../../../components/json/cJSON -I../../../../components/mqtt/esp-mqtt/include -I../../../../components/nghttp/port/include -I../../../../components/nghttp/nghttp2/lib/includes -I../../../../components/mbedtls/port/include -I../../../../components/mbedtls/mbedtls/include -I../../../../components/mbedtls/esp_crt_bundle/include -I../../../../components/tcp_transport/include -I../../../../components/esp-tls -I../../../../components/esp-tls/esp-tls-crypto -I../../../../components/nvs_flash/include -I../../../../components/spi_flash/include -I../../../../components/esp_http_client/include -I../components/esp_http_server/include -I../../../../components/app_update/include -I../../../../components/bootloader_support/include -mlongcalls -Wno-frame-address   -ffunction-sections -fdata-sections -Wall -Werror=all -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wextra -Wno-unused-parameter -Wno-sign-compare -ggdb -Og -fstrict-volatile-bitfields -Wno-error=unused-but-set-variable -std=gnu99 -Wno-old-style-declaration -D_GNU_SOURCE -DIDF_VER=\"v4.3\" -DESP_PLATFORM -MD -MT esp-idf/blinker/CMakeFiles/__idf_blinker.dir/src/provisioning/blinker_prov_smartconfig.c.obj -MF esp-idf\blinker\CMakeFiles\__idf_blinker.dir\src\provisioning\blinker_prov_smartconfig.c.obj.d -o esp-idf/blinker/CMakeFiles/__idf_blinker.dir/src/provisioning/blinker_prov_smartconfig.c.obj   -c ../components/blinker/src/provisioning/blinker_prov_smartconfig.c
In file included from ../../../../components/esp_timer/include/esp_timer.h:45,
                 from ../../../../components/freertos/port/xtensa/include/freertos/portmacro.h:46,
                 from ../../../../components/freertos/include/freertos/portable.h:52,
                 from ../../../../components/freertos/include/freertos/FreeRTOS.h:64,
                 from ../components/blinker/src/provisioning/blinker_prov_smartconfig.c:3:
../components/blinker/src/provisioning/blinker_prov_smartconfig.c: In function 'blinker_prov_smartconfig_start':
../components/blinker/src/provisioning/blinker_prov_smartconfig.c:117:46: error: 'CONFIG_BLINKER_PROV_SMARTCONFIG_TYPE' undeclared (first use in this function); did you mean 'CONFIG_BLINKER_ALIGENIE_TYPE'?
     ESP_ERROR_CHECK(esp_smartconfig_set_type(CONFIG_BLINKER_PROV_SMARTCONFIG_TYPE));
                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../components/esp_common/include/esp_err.h:119:31: note: in definition of macro 'ESP_ERROR_CHECK'
         esp_err_t __err_rc = (x);                                       \
                               ^
../components/blinker/src/provisioning/blinker_prov_smartconfig.c:117:46: note: each undeclared identifier is reported only once for each function it appears in
     ESP_ERROR_CHECK(esp_smartconfig_set_type(CONFIG_BLINKER_PROV_SMARTCONFIG_TYPE));
                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../components/esp_common/include/esp_err.h:119:31: note: in definition of macro 'ESP_ERROR_CHECK'
         esp_err_t __err_rc = (x);                                       \
                               ^
[993/1004] Building C object esp-idf/blinker/CMakeFiles/__idf_blinker.dir/src/utils/blinker_mdns.c.obj
ninja: build stopped: subcommand failed.
ninja failed with exit code 1

    以上是编译Button_WiFi例程的报错信息,ESP-IDF使用的是4.3版本,esp-idf-tools使用的是2.9版本。希望有大佬来解答一下。

发表于 2021-7-26 19:57 | 显示全部楼层
本帖最后由 三水 于 2021-7-26 20:03 编辑

从报错看是报的smartconfig配置的宏定义未定义,但是我这边测试是没问题的。然后安装官方git看3.4对应的编译链对应版本应该是8.4.0版本。建议更新最新编译链之后测试下,然后menuconfig配置可以截图看下。
如例程默认是smartconfig配网,你是改成常规填写ssid配网后报错还是未修改已报错。
 楼主| 发表于 2021-7-26 20:07 | 显示全部楼层
三水 发表于 2021-7-26 19:57
从报错看是报的smartconfig配置的宏定义未定义,但是我这边测试是没问题的。然后安装官方git看3.4对应的编 ...

看报错信息应该是缺少 CONFIG_BLINKER_PROV_SMARTCONFIG_TYPE 这个宏定义,我自己在程序中定义了一下解决了。不太清楚为什么会缺少这个定义。
发表于 2021-7-26 21:20 | 显示全部楼层
pyclwy50 发表于 2021-7-26 20:07
看报错信息应该是缺少 CONFIG_BLINKER_PROV_SMARTCONFIG_TYPE 这个宏定义,我自己在程序中定义了一下解决 ...

你是不是没用smartconfig配网?有可能是我kconfig里面给这个配置加了depends on的原因,选择别的配网方式之后这个参数就没生效。
 楼主| 发表于 2021-7-26 21:37 | 显示全部楼层
三水 发表于 2021-7-26 21:20
你是不是没用smartconfig配网?有可能是我kconfig里面给这个配置加了depends on的原因,选择别的配网方式 ...

主要是测试一下,所以我直接就配置了wifi名和密码,是这个原因吗
发表于 2021-7-26 22:03 | 显示全部楼层
pyclwy50 发表于 2021-7-26 21:37
主要是测试一下,所以我直接就配置了wifi名和密码,是这个原因吗

有可能 我一会儿改下kconfig配置把depend取消掉 主要是smartconfig和apconfig我最后写的的 加上后没测试默认配网 可能会有这个问题。
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|Archiver|手机版|Arduino中文社区

GMT+8, 2024-11-28 12:44 , Processed in 0.098899 second(s), 16 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表