0

我根据这个文档构建了 ESP8266 SDK 。

但编译报告显示以下错误。附件是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

问候鲍比

4

1 回答 1

0

要为 ESP8266 平台正确构建 C SDK 应用程序,请使用-DWITH_ENCRYPTION=OFFCMake 命令行参数禁用加密功能。

此外,禁用未使用的 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,以便对生成的可执行文件进行大小优化。

于 2016-12-29T16:01:10.677 回答