Compile error with ESP8266 SDK in KAA 0.10.0

三世轮回 提交于 2019-12-20 05:59:05

问题


I have built the ESP8266 SDK according to this document.

But the compile report shows the error below. Attachemnt is the ld file. Would you please help me to resolve it? Thanks a lot!

/opt/Espressif/crosstool-NG/builds/xtensa-lx106-elf/lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld: esp8266_app section `.text' will not fit in region `iram1_0_seg'

/opt/Espressif/crosstool-NG/builds/xtensa-lx106-elf/lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld: region `iram1_0_seg' overflowed by 43955 bytes

kaa/tools/kaa_encryption/rsa_key_gen/mbedtls/libmbedtls.a(entropy_poll.c.obj):(.text.mbedtls_platform_entropy_poll+0x8): undefined reference to `fopen'

kaa/tools/kaa_encryption/rsa_key_gen/mbedtls/libmbedtls.a(entropy_poll.c.obj):(.text.mbedtls_platform_entropy_poll+0xc): undefined reference to `fread'

kaa/tools/kaa_encryption/rsa_key_gen/mbedtls/libmbedtls.a(entropy_poll.c.obj):(.text.mbedtls_platform_entropy_poll+0x10): undefined reference to `fclose'

kaa/tools/kaa_encryption/rsa_key_gen/mbedtls/libmbedtls.a(entropy_poll.c.obj): In function `mbedtls_platform_entropy_poll':

entropy_poll.c:(.text.mbedtls_platform_entropy_poll+0x33): undefined reference to `fopen'

entropy_poll.c:(.text.mbedtls_platform_entropy_poll+0x48): undefined reference to `fread'

entropy_poll.c:(.text.mbedtls_platform_entropy_poll+0x56): undefined reference to `fclose'

entropy_poll.c:(.text.mbedtls_platform_entropy_poll+0x62): undefined reference to `fclose'

collect2: error: ld returned 1 exit status

make[2]: *** [esp8266_app] Error 1

make[1]: *** [CMakeFiles/esp8266_app.dir/all] Error 2

make: *** [all] Error 2

Regards Bobby


回答1:


To build the C SDK application correctly for the ESP8266 platform, disable the Encryption feature with -DWITH_ENCRYPTION=OFF CMake command line argument.

Furthermore, disable unused SDK extensions. For example, to disable the notification extension, you should pass the -DWITH_EXTENSION_NOTIFICATION=OFF to CMake. For more information about C SDK build configuration, see this file -- https://github.com/kaaproject/kaa/blob/master/client/client-multi/client-c/CMakeLists.txt

Also, don't forget to pass the -DCMAKE_BUILD_TYPE=MinSizeRel to CMake so that the resulting executable will be optimized for size.



来源:https://stackoverflow.com/questions/41327054/compile-error-with-esp8266-sdk-in-kaa-0-10-0

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!