我根据this document构建了ESP8266 SDK。
但编译报告显示以下错误。 Attachemnt是ld文件。你能帮我解决一下吗?非常感谢!
/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
此致 波比
答案 0 :(得分:0)
要为ESP8266平台正确构建C ++应用程序,请使用-DWITH_ENCRYPTION=OFF
CMake命令行参数禁用加密功能。
此外,禁用未使用的SDK扩展。例如,要禁用通知扩展,您应该将-DWITH_EXTENSION_NOTIFICATION=OFF
传递给CMake。有关C SDK构建配置的详细信息,请参阅此文件 - https://github.com/kaaproject/kaa/blob/master/client/client-multi/client-c/CMakeLists.txt
另外,不要忘记将-DCMAKE_BUILD_TYPE=MinSizeRel
传递给CMake,以便针对大小优化生成的可执行文件。