undefined reference to `esp_aes_init'
Posted: Fri Aug 16, 2019 6:55 pm
I'm following the "rename main" component instructions in the documentation, but have gotten stuck on the following errors:
What am I missing that causes the linker to emit these errors? I have included idf::mbedtls as per below component registration.
Code: Select all
: && /home/permal/.espressif/tools/xtensa-esp32-elf/esp32-2019r1-8.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++ -mlongcalls -Wno-frame-address -nostdlib CMakeFiles/smooth_test.elf.dir/project_elf_src.c.obj -o smooth_test.elf esp-idf/esp_ringbuf/libesp_ringbuf.a esp-idf/driver/libdriver.a esp-idf/wpa_supplicant/libwpa_supplicant.a esp-idf/efuse/libefuse.a esp-idf/bootloader_support/libbootloader_support.a esp-idf/app_update/libapp_update.a esp-idf/spi_flash/libspi_flash.a esp-idf/nvs_flash/libnvs_flash.a esp-idf/smartconfig_ack/libsmartconfig_ack.a esp-idf/esp_wifi/libesp_wifi.a esp-idf/esp_eth/libesp_eth.a esp-idf/lwip/liblwip.a esp-idf/tcpip_adapter/libtcpip_adapter.a esp-idf/esp_event/libesp_event.a esp-idf/pthread/libpthread.a esp-idf/espcoredump/libespcoredump.a esp-idf/esp32/libesp32.a esp-idf/xtensa/libxtensa.a esp-idf/esp_common/libesp_common.a esp-idf/esp_rom/libesp_rom.a esp-idf/soc/libsoc.a esp-idf/log/liblog.a esp-idf/heap/libheap.a esp-idf/freertos/libfreertos.a esp-idf/vfs/libvfs.a esp-idf/newlib/libnewlib.a esp-idf/cxx/libcxx.a esp-idf/app_trace/libapp_trace.a esp-idf/asio/libasio.a esp-idf/coap/libcoap.a esp-idf/console/libconsole.a esp-idf/nghttp/libnghttp.a esp-idf/esp-tls/libesp-tls.a esp-idf/esp_adc_cal/libesp_adc_cal.a esp-idf/esp_gdbstub/libesp_gdbstub.a esp-idf/tcp_transport/libtcp_transport.a esp-idf/esp_http_client/libesp_http_client.a esp-idf/esp_http_server/libesp_http_server.a esp-idf/esp_https_ota/libesp_https_ota.a esp-idf/protobuf-c/libprotobuf-c.a esp-idf/protocomm/libprotocomm.a esp-idf/mdns/libmdns.a esp-idf/esp_local_ctrl/libesp_local_ctrl.a esp-idf/esp_websocket_client/libesp_websocket_client.a esp-idf/expat/libexpat.a esp-idf/wear_levelling/libwear_levelling.a esp-idf/sdmmc/libsdmmc.a esp-idf/fatfs/libfatfs.a esp-idf/freemodbus/libfreemodbus.a esp-idf/jsmn/libjsmn.a esp-idf/json/libjson.a esp-idf/libsodium/liblibsodium.a esp-idf/mqtt/libmqtt.a esp-idf/openssl/libopenssl.a esp-idf/spiffs/libspiffs.a esp-idf/ulp/libulp.a esp-idf/unity/libunity.a esp-idf/wifi_provisioning/libwifi_provisioning.a esp-idf/smooth_component/libsmooth_component.a esp-idf/destructing_event_queues/libdestructing_event_queues.a -Wl,--cref -Wl,--Map=/home/permal/electronics/IO-Card-G3/software/externals/smooth/build/smooth_test.map esp-idf/esp_http_client/libesp_http_client.a esp-idf/tcp_transport/libtcp_transport.a esp-idf/esp-tls/libesp-tls.a esp-idf/protocomm/libprotocomm.a esp-idf/esp_http_server/libesp_http_server.a esp-idf/nghttp/libnghttp.a esp-idf/protobuf-c/libprotobuf-c.a esp-idf/mdns/libmdns.a esp-idf/console/libconsole.a esp-idf/smooth_component/libsmooth_component.a esp-idf/json/libjson.a esp-idf/fatfs/libfatfs.a esp-idf/wear_levelling/libwear_levelling.a esp-idf/sdmmc/libsdmmc.a esp-idf/libsodium/liblibsodium.a esp-idf/cxx/libcxx.a esp-idf/newlib/libnewlib.a esp-idf/freertos/libfreertos.a esp-idf/heap/libheap.a esp-idf/log/liblog.a esp-idf/soc/libsoc.a esp-idf/esp_rom/libesp_rom.a esp-idf/esp_common/libesp_common.a esp-idf/xtensa/libxtensa.a esp-idf/esp32/libesp32.a esp-idf/esp_ringbuf/libesp_ringbuf.a esp-idf/lwip/liblwip.a esp-idf/mbedtls/mbedtls/library/libmbedtls.a esp-idf/mbedtls/mbedtls/library/libmbedcrypto.a esp-idf/mbedtls/mbedtls/library/libmbedx509.a esp-idf/bootloader_support/libbootloader_support.a esp-idf/spi_flash/libspi_flash.a esp-idf/efuse/libefuse.a esp-idf/app_update/libapp_update.a esp-idf/tcpip_adapter/libtcpip_adapter.a esp-idf/wpa_supplicant/libwpa_supplicant.a esp-idf/nvs_flash/libnvs_flash.a esp-idf/smartconfig_ack/libsmartconfig_ack.a /home/permal/esp/esp-idf/components/esp_wifi/lib_esp32/libcoexist.a /home/permal/esp/esp-idf/components/esp_wifi/lib_esp32/libcore.a /home/permal/esp/esp-idf/components/esp_wifi/lib_esp32/libespnow.a /home/permal/esp/esp-idf/components/esp_wifi/lib_esp32/libmesh.a /home/permal/esp/esp-idf/components/esp_wifi/lib_esp32/libnet80211.a /home/permal/esp/esp-idf/components/esp_wifi/lib_esp32/libphy.a /home/permal/esp/esp-idf/components/esp_wifi/lib_esp32/libpp.a /home/permal/esp/esp-idf/components/esp_wifi/lib_esp32/librtc.a /home/permal/esp/esp-idf/components/esp_wifi/lib_esp32/libsmartconfig.a esp-idf/esp_event/libesp_event.a esp-idf/driver/libdriver.a esp-idf/vfs/libvfs.a esp-idf/esp_wifi/libesp_wifi.a esp-idf/esp_eth/libesp_eth.a esp-idf/app_trace/libapp_trace.a esp-idf/pthread/libpthread.a esp-idf/espcoredump/libespcoredump.a esp-idf/cxx/libcxx.a esp-idf/newlib/libnewlib.a esp-idf/freertos/libfreertos.a esp-idf/heap/libheap.a esp-idf/log/liblog.a esp-idf/soc/libsoc.a esp-idf/esp_rom/libesp_rom.a esp-idf/esp_common/libesp_common.a esp-idf/xtensa/libxtensa.a esp-idf/esp32/libesp32.a esp-idf/esp_ringbuf/libesp_ringbuf.a esp-idf/lwip/liblwip.a esp-idf/mbedtls/mbedtls/library/libmbedtls.a esp-idf/mbedtls/mbedtls/library/libmbedcrypto.a esp-idf/mbedtls/mbedtls/library/libmbedx509.a esp-idf/bootloader_support/libbootloader_support.a esp-idf/spi_flash/libspi_flash.a esp-idf/efuse/libefuse.a esp-idf/app_update/libapp_update.a esp-idf/tcpip_adapter/libtcpip_adapter.a esp-idf/wpa_supplicant/libwpa_supplicant.a esp-idf/nvs_flash/libnvs_flash.a esp-idf/smartconfig_ack/libsmartconfig_ack.a /home/permal/esp/esp-idf/components/esp_wifi/lib_esp32/libcoexist.a /home/permal/esp/esp-idf/components/esp_wifi/lib_esp32/libcore.a /home/permal/esp/esp-idf/components/esp_wifi/lib_esp32/libespnow.a /home/permal/esp/esp-idf/components/esp_wifi/lib_esp32/libmesh.a /home/permal/esp/esp-idf/components/esp_wifi/lib_esp32/libnet80211.a /home/permal/esp/esp-idf/components/esp_wifi/lib_esp32/libphy.a /home/permal/esp/esp-idf/components/esp_wifi/lib_esp32/libpp.a /home/permal/esp/esp-idf/components/esp_wifi/lib_esp32/librtc.a /home/permal/esp/esp-idf/components/esp_wifi/lib_esp32/libsmartconfig.a esp-idf/esp_event/libesp_event.a esp-idf/driver/libdriver.a esp-idf/vfs/libvfs.a esp-idf/esp_wifi/libesp_wifi.a esp-idf/esp_eth/libesp_eth.a esp-idf/app_trace/libapp_trace.a esp-idf/pthread/libpthread.a esp-idf/espcoredump/libespcoredump.a -lstdc++ -u __cxa_guard_dummy esp-idf/newlib/libnewlib.a -u newlib_include_locks_impl -u newlib_include_heap_impl -u newlib_include_syscalls_impl -u newlib_include_pthread_impl -Wl,--undefined=uxTopUsedPriority -L /home/permal/esp/esp-idf/components/esp_rom/esp32/ld -T esp32.rom.ld -T esp32.rom.libgcc.ld -T esp32.rom.syscalls.ld -T esp32.rom.newlib-data.ld -Wl,--gc-sections /home/permal/esp/esp-idf/components/xtensa/esp32/libhal.a -L /home/permal/electronics/IO-Card-G3/software/externals/smooth/build/esp-idf/esp32 -T esp32_out.ld -u app_main -L /home/permal/electronics/IO-Card-G3/software/externals/smooth/build/esp-idf/esp32/ld -T esp32.project.ld -L /home/permal/esp/esp-idf/components/esp32/ld -T esp32.peripherals.ld -u call_user_start_cpu0 -u ld_include_panic_highint_hdl -mfix-esp32-psram-cache-issue -u esp_app_desc -u vfs_include_syscalls_impl -L /home/permal/esp/esp-idf/components/esp_wifi/lib_esp32 -lgcov -lc -lm -lgcc && :
/home/permal/.espressif/tools/xtensa-esp32-elf/esp32-2019r1-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/wpa_supplicant/libwpa_supplicant.a(aes-unwrap.c.obj):(.literal.aes_unwrap+0x0): undefined reference to `esp_aes_init'
/home/permal/.espressif/tools/xtensa-esp32-elf/esp32-2019r1-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/wpa_supplicant/libwpa_supplicant.a(aes-unwrap.c.obj):(.literal.aes_unwrap+0x4): undefined reference to `esp_aes_setkey'
/home/permal/.espressif/tools/xtensa-esp32-elf/esp32-2019r1-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/wpa_supplicant/libwpa_supplicant.a(aes-unwrap.c.obj):(.literal.aes_unwrap+0x8): undefined reference to `esp_aes_free'
/home/permal/.espressif/tools/xtensa-esp32-elf/esp32-2019r1-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/wpa_supplicant/libwpa_supplicant.a(aes-unwrap.c.obj):(.literal.aes_unwrap+0xc): undefined reference to `esp_internal_aes_decrypt'
/home/permal/.espressif/tools/xtensa-esp32-elf/esp32-2019r1-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/wpa_supplicant/libwpa_supplicant.a(aes-unwrap.c.obj): in function `aes_unwrap':
/home/permal/esp/esp-idf/components/wpa_supplicant/src/crypto/aes-unwrap.c:68: undefined reference to `esp_aes_init'
/home/permal/.espressif/tools/xtensa-esp32-elf/esp32-2019r1-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /home/permal/esp/esp-idf/components/wpa_supplicant/src/crypto/aes-unwrap.c:69: undefined reference to `esp_aes_setkey'
/home/permal/.espressif/tools/xtensa-esp32-elf/esp32-2019r1-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /home/permal/esp/esp-idf/components/wpa_supplicant/src/crypto/aes-unwrap.c:71: undefined reference to `esp_aes_free'
/home/permal/.espressif/tools/xtensa-esp32-elf/esp32-2019r1-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /home/permal/esp/esp-idf/components/wpa_supplicant/src/crypto/aes-unwrap.c:95: undefined reference to `esp_internal_aes_decrypt'
/home/permal/.espressif/tools/xtensa-esp32-elf/esp32-2019r1-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /home/permal/esp/esp-idf/components/wpa_supplicant/src/crypto/aes-unwrap.c:105: undefined reference to `esp_aes_free'
/home/permal/.espressif/tools/xtensa-esp32-elf/esp32-2019r1-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/wpa_supplicant/libwpa_supplicant.a(aes-wrap.c.obj):(.literal.aes_wrap+0x0): undefined reference to `esp_internal_aes_encrypt'
/home/permal/.espressif/tools/xtensa-esp32-elf/esp32-2019r1-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/wpa_supplicant/libwpa_supplicant.a(aes-wrap.c.obj): in function `aes_wrap':
/home/permal/esp/esp-idf/components/wpa_supplicant/src/crypto/aes-wrap.c:62: undefined reference to `esp_aes_init'
/home/permal/.espressif/tools/xtensa-esp32-elf/esp32-2019r1-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /home/permal/esp/esp-idf/components/wpa_supplicant/src/crypto/aes-wrap.c:63: undefined reference to `esp_aes_setkey'
/home/permal/.espressif/tools/xtensa-esp32-elf/esp32-2019r1-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /home/permal/esp/esp-idf/components/wpa_supplicant/src/crypto/aes-wrap.c:65: undefined reference to `esp_aes_free'
/home/permal/.espressif/tools/xtensa-esp32-elf/esp32-2019r1-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /home/permal/esp/esp-idf/components/wpa_supplicant/src/crypto/aes-wrap.c:87: undefined reference to `esp_internal_aes_encrypt'
/home/permal/.espressif/tools/xtensa-esp32-elf/esp32-2019r1-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /home/permal/esp/esp-idf/components/wpa_supplicant/src/crypto/aes-wrap.c:100: undefined reference to `esp_aes_free'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
Code: Select all
idf_component_register(SRCS ${SOURCES}
INCLUDE_DIRS ${SMOOTH_LIB_ROOT}/smooth/include
$ENV{IDF_PATH}/components
${CMAKE_CURRENT_LIST_DIR}/../lib/smooth/include
REQUIRES
idf::mbedtls
idf::cxx
idf::newlib
idf::freertos
idf::esp_wifi
idf::esp32
idf::freertos
idf::esptool_py
idf::fatfs
idf::sdmmc
idf::spi_flash
idf::nvs_flash
idf::wear_levelling
idf::lwip
idf::json
idf::xtensa
idf::pthread
idf::libsodium
idf::json
)