Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: build new SDK 4.0.x libraries on first run. #2100

Merged
merged 3 commits into from
Aug 12, 2020

Conversation

slaff
Copy link
Contributor

@slaff slaff commented Aug 12, 2020

Related to: #2097.

@slaff slaff added this to the 4.2.0 milestone Aug 12, 2020
@slaff slaff merged commit dbd9341 into SmingHub:develop Aug 12, 2020
@slaff
Copy link
Contributor Author

slaff commented Aug 12, 2020

@kmihaylov This change should allow you to use latest release/v4.0 ESP-IDF SDK without additional work. Just make sure to run in Sming: make dist-clean before running the compilation of the ESP-IDF libraries.

@kmihaylov
Copy link
Contributor

@slaff
It might originate from my system, however with the latest commit 77a054e5b8407e92d7af9e6547ce9c75d6ba2e50 my Esp32 Blink link failed.

Here are the commands I issued:

 2200  rm -rf esp-idf
 2201  clear
 2202  git clone -b release/v4.0 --recursive https://github.com/espressif/esp-idf.git
 2203  cd esp-
 2204  cd esp-idf/
 2205  ./install.sh 
 2206  rm -rf ~/.espressif
 2207  ./install.sh 
 2208  . ./export.sh 
 2209  cd /opt/Sming/samples/Basic_Blink/
 2210  make clean
 2211  make dist-clean 
 2212  make SMING_ARCH=Esp32 sdk-menuconfig
 2213  make sdk-build
 2214  make SMING_ARCH=Esp32

And the linker errors:

AR /opt/Sming/Sming/out/Esp32/debug/lib/clib-Sming-6a847979851cee5254fd8dd45a9000b6.a

Building /home/opt/Sming/samples/Basic_Blink/out/Esp32/debug/lib/clib-App-4abbcd6f34d1ca874d70907054e2b46e.a
C+ /home/opt/Sming/samples/Basic_Blink/app/application.cpp
CC /opt/Sming/Sming/Arch/Esp32/Components/esp_spiffs/appcode/spiffs_config.c
AR /home/opt/Sming/samples/Basic_Blink/out/Esp32/debug/lib/clib-App-4abbcd6f34d1ca874d70907054e2b46e.a
(!) Spiffs support disabled. Remove 'DISABLE_SPIFFS' make argument to enable spiffs.
SSL support disabled
Basic_Blink: Linking out/Esp32/debug/build/app.out
/home/kul/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /opt/Sming/Sming/out/Esp32/debug/build/sdk/lib/libesp32.a(cpu_start.o):(.iram1.26.literal+0x20): undefined reference to `g_flash_guard_default_ops'
/home/kul/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /opt/Sming/Sming/out/Esp32/debug/build/sdk/lib/libesp32.a(cpu_start.o):(.iram1.26.literal+0x94): undefined reference to `spi_flash_init'
/home/kul/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /opt/Sming/Sming/out/Esp32/debug/build/sdk/lib/libesp32.a(cpu_start.o):(.iram1.26.literal+0x98): undefined reference to `spi_flash_guard_set'
/home/kul/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /opt/Sming/Sming/out/Esp32/debug/build/sdk/lib/libesp32.a(cpu_start.o):(.iram1.26.literal+0x9c): undefined reference to `esp_flash_app_init'
/home/kul/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /opt/Sming/Sming/out/Esp32/debug/build/sdk/lib/libesp32.a(cpu_start.o):(.iram1.26.literal+0xa0): undefined reference to `esp_flash_init_default_chip'
/home/kul/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /opt/Sming/Sming/out/Esp32/debug/build/sdk/lib/libesp32.a(cpu_start.o):(.iram1.26.literal+0xb4): undefined reference to `esp_log_write'
/home/kul/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /opt/Sming/Sming/out/Esp32/debug/build/sdk/lib/libesp32.a(cpu_start.o): in function `start_cpu0_default':
/home/opt/esp-idf/components/esp32/cpu_start.c:397: undefined reference to `spi_flash_init'
/home/kul/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /home/opt/esp-idf/components/esp32/cpu_start.c:399: undefined reference to `spi_flash_guard_set'
/home/kul/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /home/opt/esp-idf/components/esp32/cpu_start.c:401: undefined reference to `esp_flash_app_init'
/home/kul/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /home/opt/esp-idf/components/esp32/cpu_start.c:403: undefined reference to `esp_flash_init_default_chip'
/home/kul/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /home/opt/esp-idf/components/esp32/cpu_start.c:451: undefined reference to `esp_log_write'
/home/kul/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /opt/Sming/Sming/out/Esp32/debug/build/sdk/lib/libesp32.a(system_api.o):(.literal.esp_base_mac_addr_get+0x10): undefined reference to `esp_log_write'
/home/kul/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /opt/Sming/Sming/out/Esp32/debug/build/sdk/lib/libesp32.a(system_api.o): in function `esp_base_mac_addr_get':
/home/opt/esp-idf/components/esp32/system_api.c:66: undefined reference to `esp_log_write'
/home/kul/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /opt/Sming/Sming/out/Esp32/debug/build/sdk/lib/libesp32.a(system_api.o): in function `esp_efuse_mac_get_default':
/home/opt/esp-idf/components/esp32/system_api.c:113: undefined reference to `esp_log_write'
/home/kul/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /opt/Sming/Sming/out/Esp32/debug/build/sdk/lib/libesp32.a(system_api.o): in function `esp_read_mac':
/home/opt/esp-idf/components/esp32/system_api.c:147: undefined reference to `esp_log_write'
/home/kul/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /opt/Sming/Sming/out/Esp32/debug/build/sdk/lib/libesp32.a(system_api.o):/home/opt/esp-idf/components/esp32/system_api.c:152: more undefined references to `esp_log_write' follow
/home/kul/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /opt/Sming/Sming/out/Esp32/debug/build/sdk/lib/libesp32.a(esp_adapter.o):(.data.g_wifi_osi_funcs+0x12c): undefined reference to `esp_log_writev'
/home/kul/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /opt/Sming/Sming/out/Esp32/debug/build/sdk/lib/libesp_wifi.a(phy_init.o): in function `load_cal_data_from_nvs_handle':
/home/opt/esp-idf/components/esp_wifi/src/phy_init.c:553: undefined reference to `esp_log_write'
/home/kul/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /home/opt/esp-idf/components/esp_wifi/src/phy_init.c:560: undefined reference to `esp_log_write'
/home/kul/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /opt/Sming/Sming/out/Esp32/debug/build/sdk/lib/libesp_wifi.a(phy_init.o): in function `store_cal_data_to_nvs_handle':
/home/opt/esp-idf/components/esp_wifi/src/phy_init.c:578: undefined reference to `esp_log_write'
/home/kul/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /home/opt/esp-idf/components/esp_wifi/src/phy_init.c:586: undefined reference to `esp_log_write'
/home/kul/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /home/opt/esp-idf/components/esp_wifi/src/phy_init.c:594: undefined reference to `esp_log_write'
/home/kul/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /opt/Sming/Sming/out/Esp32/debug/build/sdk/lib/libesp_wifi.a(phy_init.o):/home/opt/esp-idf/components/esp_wifi/src/phy_init.c:598: more undefined references to `esp_log_write' follow
/home/kul/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /opt/Sming/Sming/out/Esp32/debug/build/sdk/lib/libesp32.a(panic.o):(.literal.esp_error_check_failed_print+0x18): undefined reference to `spi_flash_cache_enabled'
/home/kul/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /opt/Sming/Sming/out/Esp32/debug/build/sdk/lib/libesp32.a(panic.o): in function `esp_error_check_failed_print':
/home/opt/esp-idf/components/esp32/panic.c:714: undefined reference to `spi_flash_cache_enabled'
/home/kul/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /opt/Sming/Sming/out/Esp32/debug/build/sdk/lib/libdriver.a(uart.o): in function `uart_pattern_queue_update':
/home/opt/esp-idf/components/driver/uart.c:424: undefined reference to `esp_log_write'
/home/kul/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /opt/Sming/Sming/out/Esp32/debug/build/sdk/lib/libdriver.a(uart.o): in function `uart_reset_rx_fifo':
/home/opt/esp-idf/components/driver/uart.c:310: undefined reference to `esp_log_write'
/home/kul/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /opt/Sming/Sming/out/Esp32/debug/build/sdk/lib/libdriver.a(uart.o): in function `uart_set_word_length':
/home/opt/esp-idf/components/driver/uart.c:136: undefined reference to `esp_log_write'
/home/kul/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /home/opt/esp-idf/components/driver/uart.c:137: undefined reference to `esp_log_write'
/home/kul/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /opt/Sming/Sming/out/Esp32/debug/build/sdk/lib/libdriver.a(uart.o): in function `uart_get_word_length':
/home/opt/esp-idf/components/driver/uart.c:146: undefined reference to `esp_log_write'
/home/kul/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /opt/Sming/Sming/out/Esp32/debug/build/sdk/lib/libdriver.a(uart.o):/home/opt/esp-idf/components/driver/uart.c:153: more undefined references to `esp_log_write' follow
/home/kul/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /opt/Sming/Sming/out/Esp32/debug/build/sdk/lib/libesp_wifi.a(wifi_init.o):(.literal.s_set_default_wifi_log_level+0x8): undefined reference to `esp_log_level_set'
/home/kul/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /opt/Sming/Sming/out/Esp32/debug/build/sdk/lib/libesp_wifi.a(wifi_init.o): in function `s_set_default_wifi_log_level':
/home/opt/esp-idf/components/esp_wifi/src/wifi_init.c:55: undefined reference to `esp_log_level_set'
/home/kul/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /home/opt/esp-idf/components/esp_wifi/src/wifi_init.c:56: undefined reference to `esp_log_level_set'
/home/kul/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /opt/Sming/Sming/out/Esp32/debug/build/sdk/lib/libesp_wifi.a(wifi_init.o): in function `esp_wifi_deinit':
/home/opt/esp-idf/components/esp_wifi/src/wifi_init.c:113: undefined reference to `esp_log_write'
/home/kul/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /opt/Sming/Sming/out/Esp32/debug/build/sdk/lib/libesp_wifi.a(wifi_init.o): in function `esp_wifi_init':
/home/opt/esp-idf/components/esp_wifi/src/wifi_init.c:135: undefined reference to `esp_log_write'
/home/kul/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /home/opt/esp-idf/components/esp_wifi/src/wifi_init.c:144: undefined reference to `esp_log_write'
/home/kul/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /home/opt/esp-idf/components/esp_wifi/src/wifi_init.c:145: undefined reference to `esp_log_write'
/home/kul/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /opt/Sming/Sming/out/Esp32/debug/build/sdk/lib/libtcpip_adapter.a(tcpip_adapter_lwip.o):(.literal.tcpip_adapter_dhcps_cb+0x8): undefined reference to `esp_log_write'
/home/kul/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /opt/Sming/Sming/out/Esp32/debug/build/sdk/lib/libtcpip_adapter.a(tcpip_adapter_lwip.o):/home/opt/esp-idf/components/tcpip_adapter/tcpip_adapter_lwip.c:95: more undefined references to `esp_log_write' follow
/home/kul/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /opt/Sming/Sming/out/Esp32/debug/build/sdk/lib/libheap.a(heap_caps_init.o):(.literal.heap_caps_init+0x10): undefined reference to `soc_memory_types'
/home/kul/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /opt/Sming/Sming/out/Esp32/debug/build/sdk/lib/libsoc.a(memory_layout_utils.o):(.literal.soc_get_available_memory_region_max_count+0x0): undefined reference to `soc_memory_region_count'
/home/kul/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /opt/Sming/Sming/out/Esp32/debug/build/sdk/lib/libsoc.a(memory_layout_utils.o):(.literal.soc_get_available_memory_regions+0x0): undefined reference to `soc_memory_regions'
/home/kul/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /opt/Sming/Sming/out/Esp32/debug/build/sdk/lib/libesp_event.a(default_event_loop.o): in function `esp_system_event_debug':
/home/opt/esp-idf/components/esp_event/event_send_compat.inc:310: undefined reference to `esp_log_write'
/home/kul/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /opt/Sming/Sming/out/Esp32/debug/build/sdk/lib/libnvs_flash.a(nvs_page.o):(.literal._ZN3nvs4Page10initializeEv+0x8): undefined reference to `spi_flash_write'
/home/kul/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /opt/Sming/Sming/out/Esp32/debug/build/sdk/lib/libnvs_flash.a(nvs_page.o):(.literal._ZN3nvs4Page15mLoadEntryTableEv+0x8): undefined reference to `spi_flash_read'
/home/kul/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /opt/Sming/Sming/out/Esp32/debug/build/sdk/lib/libnvs_flash.a(nvs_page.o):(.literal._ZN3nvs4Page5eraseEv+0x0): undefined reference to `spi_flash_erase_sector'
/home/kul/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /opt/Sming/Sming/out/Esp32/debug/build/sdk/lib/libnvs_flash.a(nvs_page.o): in function `nvs::Page::initialize()':
/home/opt/esp-idf/components/nvs_flash/src/nvs_page.cpp:725: undefined reference to `spi_flash_write'
/home/kul/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /opt/Sming/Sming/out/Esp32/debug/build/sdk/lib/libnvs_flash.a(nvs_page.o): in function `nvs::Page::alterEntryState(unsigned int, nvs::Page::EntryState)':
/home/opt/esp-idf/components/nvs_flash/src/nvs_page.cpp:742: undefined reference to `spi_flash_write'
/home/kul/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /opt/Sming/Sming/out/Esp32/debug/build/sdk/lib/libnvs_flash.a(nvs_page.o): in function `nvs::Page::alterEntryRangeState(unsigned int, unsigned int, nvs::Page::EntryState)':
/home/opt/esp-idf/components/nvs_flash/src/nvs_page.cpp:766: undefined reference to `spi_flash_write'
/home/kul/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /opt/Sming/Sming/out/Esp32/debug/build/sdk/lib/libnvs_flash.a(nvs_page.o): in function `nvs::Page::alterPageState(nvs::Page::PageState)':
/home/opt/esp-idf/components/nvs_flash/src/nvs_page.cpp:215: undefined reference to `spi_flash_write'
/home/kul/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /opt/Sming/Sming/out/Esp32/debug/build/sdk/lib/libnvs_flash.a(nvs_page.o): in function `nvs::Page::mLoadEntryTable()':
/home/opt/esp-idf/components/nvs_flash/src/nvs_page.cpp:521: undefined reference to `spi_flash_read'
/home/kul/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /home/opt/esp-idf/components/nvs_flash/src/nvs_page.cpp:560: undefined reference to `spi_flash_read'
/home/kul/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /opt/Sming/Sming/out/Esp32/debug/build/sdk/lib/libnvs_flash.a(nvs_page.o): in function `nvs::Page::load(unsigned int)':
/home/opt/esp-idf/components/nvs_flash/src/nvs_page.cpp:667: undefined reference to `spi_flash_read'
/home/kul/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /home/opt/esp-idf/components/nvs_flash/src/nvs_page.cpp:57: undefined reference to `spi_flash_read'
/home/kul/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /opt/Sming/Sming/out/Esp32/debug/build/sdk/lib/libnvs_flash.a(nvs_page.o): in function `nvs::Page::erase()':
/home/opt/esp-idf/components/nvs_flash/src/nvs_page.cpp:929: undefined reference to `spi_flash_erase_sector'
/home/kul/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /opt/Sming/Sming/out/Esp32/debug/build/sdk/lib/libtcpip_adapter.a(event_handlers.o): in function `handle_sta_got_ip':
/home/opt/esp-idf/components/tcpip_adapter/event_handlers.c:102: undefined reference to `esp_log_write'
/home/kul/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /home/opt/esp-idf/components/tcpip_adapter/event_handlers.c:105: undefined reference to `esp_log_write'
/home/kul/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /opt/Sming/Sming/out/Esp32/debug/build/sdk/lib/libtcpip_adapter.a(event_handlers.o): in function `handle_ap_stop':
/home/opt/esp-idf/components/tcpip_adapter/event_handlers.c:134: undefined reference to `esp_log_write'
/home/kul/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /opt/Sming/Sming/out/Esp32/debug/build/sdk/lib/libtcpip_adapter.a(event_handlers.o): in function `handle_ap_start':
/home/opt/esp-idf/components/tcpip_adapter/event_handlers.c:125: undefined reference to `esp_log_write'
/home/kul/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /home/opt/esp-idf/components/tcpip_adapter/event_handlers.c:126: undefined reference to `esp_log_write'
/home/kul/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /opt/Sming/Sming/out/Esp32/debug/build/sdk/lib/libtcpip_adapter.a(event_handlers.o):/home/opt/esp-idf/components/tcpip_adapter/event_handlers.c:197: more undefined references to `esp_log_write' follow
/home/kul/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /opt/Sming/Sming/out/Esp32/debug/build/sdk/lib/libnvs_flash.a(nvs_api.o):(.literal.nvs_flash_init_partition+0x4): undefined reference to `esp_partition_find_first'
/home/kul/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /opt/Sming/Sming/out/Esp32/debug/build/sdk/lib/libnvs_flash.a(nvs_api.o):(.literal.nvs_flash_erase_partition+0x0): undefined reference to `esp_partition_erase_range'
/home/kul/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /opt/Sming/Sming/out/Esp32/debug/build/sdk/lib/libnvs_flash.a(nvs_api.o): in function `nvs_flash_init_partition':
/home/opt/esp-idf/components/nvs_flash/src/nvs_api.cpp:159: undefined reference to `esp_partition_find_first'
/home/kul/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /opt/Sming/Sming/out/Esp32/debug/build/sdk/lib/libnvs_flash.a(nvs_api.o): in function `nvs_flash_erase_partition':
/home/opt/esp-idf/components/nvs_flash/src/nvs_api.cpp:204: undefined reference to `esp_partition_find_first'
/home/kul/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /home/opt/esp-idf/components/nvs_flash/src/nvs_api.cpp:210: undefined reference to `esp_partition_erase_range'
/home/kul/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /opt/Sming/Sming/out/Esp32/debug/build/sdk/lib/libnvs_flash.a(nvs_ops.o): in function `nvs::nvs_flash_write(unsigned int, void const*, unsigned int)':
/home/opt/esp-idf/components/nvs_flash/src/nvs_ops.cpp:72: undefined reference to `spi_flash_write'
/home/kul/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: /opt/Sming/Sming/out/Esp32/debug/build/sdk/lib/libnvs_flash.a(nvs_ops.o): in function `nvs::nvs_flash_read(unsigned int, void*, unsigned int)':
/home/opt/esp-idf/components/nvs_flash/src/nvs_ops.cpp:76: undefined reference to `spi_flash_read'
collect2: error: ld returned 1 exit status
/opt/Sming/Sming/Arch/Esp32/app.mk:23: recipe for target 'out/Esp32/debug/build/app.out' failed
make: *** [out/Esp32/debug/build/app.out] Error 1

Is it possible that some old files are left inside the Sming repo? Something to delete inside /opt/Sming/Sming/Arch/Esp32/Components/esp_idf/?

@slaff
Copy link
Contributor Author

slaff commented Sep 8, 2020

The recommended way to update your ESP-IDF is:

cd $IDF_PATH
git pull
git submodule update

And after that you have to recompile the sdk and your application using:

cd $SMING_HOME/../samples/Basic_Blink
make dist-clean #this should be done once per SDK update
make SMING_ARCH=Esp32

@kmihaylov
Copy link
Contributor

@slaff, I just did a fresh clone of Sming, followed exactly your instructions and I'm still getting the linker errors exactly as in my previous comment.

@frankdownunder
Copy link
Contributor

frankdownunder commented Sep 9, 2020

@slaff I get the same problem.
make SMING_ARCH=Esp32 >>>>>> fails
make SMING_ARCH=Host >>>>>>> ok
make SMING_ARCH=Esp8266 >>>> ok

@slaff
Copy link
Contributor Author

slaff commented Sep 9, 2020

I should probably set a katacoda tutorial that demonstrates the needed steps....

@slaff
Copy link
Contributor Author

slaff commented Sep 14, 2020

@slaff @frankdownunder Can you try the following Dockerfile that should build the proper environment for you? The sample Dockerfile given below will download all needed requirements and compile Basic_Blink for you.

https://github.com/slaff/katacoda-scenarios/blob/master/sming-on-esp32/Dockerfile

@kmihaylov
Copy link
Contributor

@slaff I just tried docker and again the same linker errors.

# docker build -t "sming:Dockerfile" .

Here is the output:

Building /opt/Sming/samples/Basic_Blink/out/Esp32/debug/lib/clib-App-77aa1da7274e3f02732da6626f980209.a
C+ /opt/Sming/samples/Basic_Blink/app/application.cpp
CC /opt/Sming/Sming/Arch/Esp32/Components/esp_spiffs/appcode/spiffs_config.c
AR /opt/Sming/samples/Basic_Blink/out/Esp32/debug/lib/clib-App-77aa1da7274e3f02732da6626f980209.a
(!) Spiffs support disabled. Remove 'DISABLE_SPIFFS' make argument to enable spiffs.
SSL support disabled
Basic_Blink: Linking out/Esp32/debug/build/app.out
/root/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /opt/Sming/Sming/out/Esp32/debug/build/sdk/lib/libesp32.a(cpu_start.o):(.iram1.26.literal+0xb0): undefined reference to `esp_log_write'
/root/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /opt/Sming/Sming/out/Esp32/debug/build/sdk/lib/libesp32.a(cpu_start.o): in function `start_cpu0_default':
/opt/esp-idf/components/esp32/cpu_start.c:451: undefined reference to `esp_log_write'
/root/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /opt/Sming/Sming/out/Esp32/debug/build/sdk/lib/libesp32.a(system_api.o):(.literal.esp_base_mac_addr_get+0x10): undefined reference to `esp_log_write'
/root/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /opt/Sming/Sming/out/Esp32/debug/build/sdk/lib/libesp32.a(system_api.o): in function `esp_base_mac_addr_get':
/opt/esp-idf/components/esp32/system_api.c:66: undefined reference to `esp_log_write'
/root/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /opt/Sming/Sming/out/Esp32/debug/build/sdk/lib/libesp32.a(system_api.o): in function `esp_efuse_mac_get_default':
/opt/esp-idf/components/esp32/system_api.c:113: undefined reference to `esp_log_write'
/root/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /opt/Sming/Sming/out/Esp32/debug/build/sdk/lib/libesp32.a(system_api.o):/opt/esp-idf/components/esp32/system_api.c:147: more undefined references to `esp_log_write' follow
/root/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /opt/Sming/Sming/out/Esp32/debug/build/sdk/lib/libesp32.a(esp_adapter.o):(.data.g_wifi_osi_funcs+0x12c): undefined reference to `esp_log_writev'
/root/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /opt/Sming/Sming/out/Esp32/debug/build/sdk/lib/libesp_wifi.a(phy_init.o): in function `load_cal_data_from_nvs_handle':
/opt/esp-idf/components/esp_wifi/src/phy_init.c:553: undefined reference to `esp_log_write'
/root/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /opt/esp-idf/components/esp_wifi/src/phy_init.c:560: undefined reference to `esp_log_write'
/root/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /opt/Sming/Sming/out/Esp32/debug/build/sdk/lib/libesp_wifi.a(phy_init.o): in function `store_cal_data_to_nvs_handle':
/opt/esp-idf/components/esp_wifi/src/phy_init.c:578: undefined reference to `esp_log_write'
/root/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /opt/esp-idf/components/esp_wifi/src/phy_init.c:586: undefined reference to `esp_log_write'
/root/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /opt/esp-idf/components/esp_wifi/src/phy_init.c:594: undefined reference to `esp_log_write'
/root/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /opt/Sming/Sming/out/Esp32/debug/build/sdk/lib/libesp_wifi.a(phy_init.o):/opt/esp-idf/components/esp_wifi/src/phy_init.c:598: more undefined references to `esp_log_write' follow
/root/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /opt/Sming/Sming/out/Esp32/debug/build/sdk/lib/libesp_wifi.a(wifi_init.o):(.literal.s_set_default_wifi_log_level+0x8): undefined reference to `esp_log_level_set'
/root/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /opt/Sming/Sming/out/Esp32/debug/build/sdk/lib/libesp_wifi.a(wifi_init.o): in function `s_set_default_wifi_log_level':
/opt/esp-idf/components/esp_wifi/src/wifi_init.c:56: undefined reference to `esp_log_level_set'
/root/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /opt/esp-idf/components/esp_wifi/src/wifi_init.c:57: undefined reference to `esp_log_level_set'
/root/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /opt/Sming/Sming/out/Esp32/debug/build/sdk/lib/libesp_wifi.a(wifi_init.o): in function `esp_wifi_deinit':
/opt/esp-idf/components/esp_wifi/src/wifi_init.c:112: undefined reference to `esp_log_write'
/root/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /opt/esp-idf/components/esp_wifi/src/wifi_init.c:119: undefined reference to `esp_log_write'
/root/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /opt/Sming/Sming/out/Esp32/debug/build/sdk/lib/libesp_wifi.a(wifi_init.o): in function `esp_wifi_init':
/opt/esp-idf/components/esp_wifi/src/wifi_init.c:141: undefined reference to `esp_log_write'
/root/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /opt/esp-idf/components/esp_wifi/src/wifi_init.c:150: undefined reference to `esp_log_write'
/root/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /opt/esp-idf/components/esp_wifi/src/wifi_init.c:151: undefined reference to `esp_log_write'
/root/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /opt/Sming/Sming/out/Esp32/debug/build/sdk/lib/libtcpip_adapter.a(tcpip_adapter_lwip.o):(.literal.tcpip_adapter_dhcps_cb+0x8): more undefined references to `esp_log_write' follow
/root/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /opt/Sming/Sming/out/Esp32/debug/build/sdk/lib/libheap.a(heap_caps_init.o):(.literal.heap_caps_init+0x10): undefined reference to `soc_memory_types'
/root/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /opt/Sming/Sming/out/Esp32/debug/build/sdk/lib/libsoc.a(memory_layout_utils.o):(.literal.soc_get_available_memory_region_max_count+0x0): undefined reference to `soc_memory_region_count'
/root/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /opt/Sming/Sming/out/Esp32/debug/build/sdk/lib/libsoc.a(memory_layout_utils.o):(.literal.soc_get_available_memory_regions+0x0): undefined reference to `soc_memory_regions'
/root/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /opt/Sming/Sming/out/Esp32/debug/build/sdk/lib/libspi_flash.a(partition.o): in function `ensure_partitions_loaded':
/opt/esp-idf/components/spi_flash/partition.c:77: undefined reference to `esp_log_write'
/root/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /opt/Sming/Sming/out/Esp32/debug/build/sdk/lib/libesp_event.a(default_event_loop.o): in function `esp_system_event_debug':
/opt/esp-idf/components/esp_event/event_send_compat.inc:310: undefined reference to `esp_log_write'
/root/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /opt/Sming/Sming/out/Esp32/debug/build/sdk/lib/libtcpip_adapter.a(event_handlers.o): in function `handle_sta_got_ip':
/opt/esp-idf/components/tcpip_adapter/event_handlers.c:102: undefined reference to `esp_log_write'
/root/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /opt/esp-idf/components/tcpip_adapter/event_handlers.c:105: undefined reference to `esp_log_write'
/root/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /opt/Sming/Sming/out/Esp32/debug/build/sdk/lib/libtcpip_adapter.a(event_handlers.o): in function `handle_ap_stop':
/opt/esp-idf/components/tcpip_adapter/event_handlers.c:134: undefined reference to `esp_log_write'
/root/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /opt/Sming/Sming/out/Esp32/debug/build/sdk/lib/libtcpip_adapter.a(event_handlers.o):/opt/esp-idf/components/tcpip_adapter/event_handlers.c:125: more undefined references to `esp_log_write' follow
collect2: error: ld returned 1 exit status
/opt/Sming/Sming/Arch/Esp32/app.mk:23: recipe for target 'out/Esp32/debug/build/app.out' failed
make: *** [out/Esp32/debug/build/app.out] Error 1
The command '/bin/sh -c . $IDF_PATH/export.sh && cd $SMING_HOME/../samples/Basic_Blink/ && make SMING_ARCH=Esp32' returned a non-zero code: 2

@frankdownunder
Copy link
Contributor

Hi Slaff
I too get the same problem
my full docker log file is attached
FWIW, I suspect sdkconfig

log.txt

@frankdownunder
Copy link
Contributor

@slaff Any thoughts on this?

@slaff
Copy link
Contributor Author

slaff commented Oct 1, 2020

I was thinking that the Docker container generation should demonstrate any problem or working solution. But in my case not only the local installation works as expected but also the docker container. Which is bizarre...

My wild guess is that there is a problem with accessing the correct linker scripts. I am looking at the code and have found some stale pre-generated ld files that should not be used.

I should probably build a brand new VM and see if I can reproduce the problem there and then compare slowly and patiently the differences....

@slaff
Copy link
Contributor Author

slaff commented Nov 13, 2020

@kmihaylov @frankdownunder Mike is working on multiple improvements for the Esp32 architecture. If you want you can take a sneak peek at this PR: #2151 (Warning: Still work-in-progress)

@mikee47 mikee47 mentioned this pull request Nov 29, 2020
8 tasks
@slaff
Copy link
Contributor Author

slaff commented Dec 1, 2020

@kmihaylov @frankdownunder Please download ESP-IDF v4.1 and try the latest develop code. @mikee47 did a great job on improving the code, build process, compilation and so on. You can also test, if you have the patience, a katacoda tutorial that will guide you through the required steps: https://www.katacoda.com/slaff/scenarios/sming-on-esp32

@frankdownunder
Copy link
Contributor

@slaff i tried it and got

$ make -j3 SMING_ARCH=Esp32
Basic_Blink: Invoking 'all' for Esp32 (debug) architecture
Using configuration 'standard'
Traceback (most recent call last):
File "/root/Sming/Sming/Components/Storage/Tools/hwconfig/hwconfig.py", line 8, in
from config import Config
File "/root/Sming/Sming/Components/Storage/Tools/hwconfig/config.py", line 8, in
from rjsmin import jsmin
ImportError: No module named 'rjsmin'
/root/Sming/Sming/Components/Storage/component.mk:42: /root/Sming/samples/Basic_Blink/out/Esp32/debug/hwconfig.mk: No such file or directory
/root/Sming/Sming/Components/Storage/component.mk:44: *** Hardware configuration error. Stop.

does it need updating?

@slaff
Copy link
Contributor Author

slaff commented Feb 19, 2021

@frankdownunder The rjsmin python package is now required and unfortunately if it not present everything breaks. Even the make help command. We should change the python code to check if the rjsmin module is present and if not to advice how to install it. @mikee47 can you try a PR for this issue? I can also suggest some changes starting next week.

@slaff
Copy link
Contributor Author

slaff commented Feb 19, 2021

i tried it and got

@frankdownunder By the way all changes should be already in the develop branch so you don't have to deal with PR branches.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants