I get a build failure on my project which uses Server, SPI, NVS features when moving from 4.0.1 to v4.2 (HEAD).
Specifically there seems to be an issue in including features not needed. What I get is:
=========================================================================================
In file included from ../../components/mbedtls/mbedtls/include/mbedtls/ecp.h:45,
from C:/Users/sbonomi/Desktop/esp-idf43/components/mbedtls/mbedtls/library/ecp.c:81:
C:/Users/sbonomi/Desktop/esp-idf43/components/mbedtls/mbedtls/library/ecp.c: In function 'mbedtls_ecp_muladd_restartable':
C:/Users/sbonomi/Desktop/esp-idf43/components/mbedtls/mbedtls/library/ecp.c:2552:22: error: implicit declaration of function 'ecp_add_mixed' [-Werror=implicit-function-declaration]
MBEDTLS_MPI_CHK( ecp_add_mixed( grp, pR, pmP, pR ) );
^~~~~~~~~~~~~
../../components/mbedtls/mbedtls/include/mbedtls/bignum.h:52:22: note: in definition of macro 'MBEDTLS_MPI_CHK'
if( ( ret = (f) ) != 0 ) \
^
C:/Users/sbonomi/Desktop/esp-idf43/components/mbedtls/mbedtls/library/ecp.c:2560:22: error: implicit declaration of function 'ecp_normalize_jac' [-Werror=implicit-function-declaration]
MBEDTLS_MPI_CHK( ecp_normalize_jac( grp, pR ) );
^~~~~~~~~~~~~~~~~
../../components/mbedtls/mbedtls/include/mbedtls/bignum.h:52:22: note: in definition of macro 'MBEDTLS_MPI_CHK'
if( ( ret = (f) ) != 0 ) \
^
C:/Users/sbonomi/Desktop/esp-idf43/components/mbedtls/mbedtls/library/ecp.c: In function 'mbedtls_ecp_gen_privkey':
C:/Users/sbonomi/Desktop/esp-idf43/components/mbedtls/mbedtls/library/ecp.c:2763:1: error: label 'cleanup' defined but not used [-Werror=unused-label]
cleanup:
^~~~~~~
C:/Users/sbonomi/Desktop/esp-idf43/components/mbedtls/mbedtls/library/ecp.c:2686:12: warning: variable 'n_size' set but not used [-Wunused-but-set-variable]
size_t n_size;
^~~~~~
At top level:
C:/Users/sbonomi/Desktop/esp-idf43/components/mbedtls/mbedtls/library/ecp.c:1002:12: warning: 'ecp_modp' defined but not used [-Wunused-function]
static int ecp_modp( mbedtls_mpi *N, const mbedtls_ecp_group *grp )
^~~~~~~~
cc1.exe: some warnings being treated as errors
[53/941] Performing build step for 'bootloader'
[0/1] Re-running CMake...
================================================================================================================
In order to avoid this, I have had to set the following menuconfig flags:
CONFIG_MBEDTLS_ECP_DP_SECP192R1_ENABLED=y
CONFIG_MBEDTLS_ECP_DP_SECP224R1_ENABLED=y
CONFIG_MBEDTLS_ECP_DP_SECP256R1_ENABLED=y
CONFIG_MBEDTLS_ECP_DP_SECP384R1_ENABLED=y
CONFIG_MBEDTLS_ECP_DP_SECP521R1_ENABLED=y
CONFIG_MBEDTLS_ECP_DP_SECP192K1_ENABLED=y
CONFIG_MBEDTLS_ECP_DP_SECP224K1_ENABLED=y
CONFIG_MBEDTLS_ECP_DP_SECP256K1_ENABLED=y
CONFIG_MBEDTLS_ECP_DP_BP256R1_ENABLED=y
CONFIG_MBEDTLS_ECP_DP_BP384R1_ENABLED=y
CONFIG_MBEDTLS_ECP_DP_BP512R1_ENABLED=y
CONFIG_MBEDTLS_ECP_DP_CURVE25519_ENABLED=y
all enabled. With them disabled, I get the error shown above.
I got to this point by comparing the sdkconfig files between an example with builds (softAP) and my existing project which is fine in 4.0.1. There are enough changes in the 4.2 version for wifi initiation, that it could be part of my wifi issues. I am still not getting good communication on my custom U4WDH Boards, but at least the idf.py and compiler patches have been ruled out as being the cause.
I do not know if it is any one of the above will be successful or if all are required. My assumption is that enabling one of these brings in a definition needed by the ecp.c either as an #ifdef or a conditional include. It would help to know more about the cause. as I would prefer to have a smaller image in the long run so I can work on OTA updates.
v4.2 Build Failure when migrating from v4.0.1
-
- Posts: 73
- Joined: Mon Mar 09, 2020 7:36 pm
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: uC_Jon and 72 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.