Compile error with ESP8266 SDK in KAA 0.10.0

2019-03-04 01:26发布

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

标签: esp8266 kaa
1条回答
Rolldiameter
2楼-- · 2019-03-04 02:12

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.

查看更多
登录 后发表回答