esp-rs / esp-idf-template

A "Hello, world!" template of a Rust binary crate for the ESP-IDF framework.
372 stars 43 forks source link

Getting "linking with `ldproxy` failed" error when adding critical_section as dependency #191

Closed weiying-chen closed 1 week ago

weiying-chen commented 4 months ago

Description

Full log

.0 (/home/weiying-chen/rust/rust-esp32-hx711)
error: linking with `ldproxy` failed: exit status: 1
  |
  = note: LC_ALL="C" PATH="/home/weiying-chen/.rustup/toolchains/nightly-2023-12-31-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin:/home/weiying-chen/.local/bin:/home/weiying-chen/.rustup/toolchains/esp/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin:/home/weiying-chen/.dprint/bin:/home/weiying-chen/.deno/bin:/home/weiying-chen/.nvm/versions/node/v20.11.0/bin:/home/weiying-chen/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin" VSLANG="1033" "ldproxy" "/tmp/rustcBx3g4Q/symbols.o" "/home/weiying-chen/rust/rust-esp32-hx711/target/riscv32imc-esp-espidf/debug/deps/rust_esp32_bme280-d5ad83a966519a9d.143qodo32o4ipifw.rcgu.o" "/home/weiying-chen/rust/rust-esp32-hx711/target/riscv32imc-esp-espidf/debug/deps/rust_esp32_bme280-d5ad83a966519a9d.1cz1qgmjyop85z30.rcgu.o" "/home/weiying-chen/rust/rust-esp32-hx711/target/riscv32imc-esp-espidf/debug/deps/rust_esp32_bme280-d5ad83a966519a9d.3cwdvjljmqfstamc.rcgu.o" "/home/weiying-chen/rust/rust-esp32-hx711/target/riscv32imc-esp-espidf/debug/deps/rust_esp32_bme280-d5ad83a966519a9d.3g127sn1haxif48e.rcgu.o" "/home/weiying-chen/rust/rust-esp32-hx711/target/riscv32imc-esp-espidf/debug/deps/rust_esp32_bme280-d5ad83a966519a9d.3i5z952gm17e38jg.rcgu.o" "/home/weiying-chen/rust/rust-esp32-hx711/target/riscv32imc-esp-espidf/debug/deps/rust_esp32_bme280-d5ad83a966519a9d.3m8d9qhxkwe8tjc7.rcgu.o" "/home/weiying-chen/rust/rust-esp32-hx711/target/riscv32imc-esp-espidf/debug/deps/rust_esp32_bme280-d5ad83a966519a9d.48jqedstg9o7nsou.rcgu.o" "/home/weiying-chen/rust/rust-esp32-hx711/target/riscv32imc-esp-espidf/debug/deps/rust_esp32_bme280-d5ad83a966519a9d.4bf8f5shv1wmfirr.rcgu.o" "/home/weiying-chen/rust/rust-esp32-hx711/target/riscv32imc-esp-espidf/debug/deps/rust_esp32_bme280-d5ad83a966519a9d.4cvhi3kalhkj41y.rcgu.o" "/home/weiying-chen/rust/rust-esp32-hx711/target/riscv32imc-esp-espidf/debug/deps/rust_esp32_bme280-d5ad83a966519a9d.kaq7g09j5lh66pk.rcgu.o" "/home/weiying-chen/rust/rust-esp32-hx711/target/riscv32imc-esp-espidf/debug/deps/rust_esp32_bme280-d5ad83a966519a9d.4xn19tfpiyasq38m.rcgu.o" "-Wl,--as-needed" "-L" "/home/weiying-chen/rust/rust-esp32-hx711/target/riscv32imc-esp-espidf/debug/deps" "-L" "/home/weiying-chen/rust/rust-esp32-hx711/target/debug/deps" "-L" "/home/weiying-chen/.rustup/toolchains/nightly-2023-12-31-x86_64-unknown-linux-gnu/lib/rustlib/riscv32imc-esp-espidf/lib" "-Wl,-Bstatic" "/home/weiying-chen/rust/rust-esp32-hx711/target/riscv32imc-esp-espidf/debug/deps/libloadcell-df82d6be8a2aefdb.rlib" "/home/weiying-chen/rust/rust-esp32-hx711/target/riscv32imc-esp-espidf/debug/deps/libesp_idf_svc-748c400ca03bba04.rlib" "/home/weiying-chen/rust/rust-esp32-hx711/target/riscv32imc-esp-espidf/debug/deps/libembassy_futures-2a3b20290922f64b.rlib" "/home/weiying-chen/rust/rust-esp32-hx711/target/riscv32imc-esp-espidf/debug/deps/libembassy_time_driver-e803941fc37d87d5.rlib" "/home/weiying-chen/rust/rust-esp32-hx711/target/riscv32imc-esp-espidf/debug/deps/libuncased-348426b3565dcee3.rlib" "/home/weiying-chen/rust/rust-esp32-hx711/target/riscv32imc-esp-espidf/debug/deps/libesp_idf_hal-c194acd259816618.rlib" "/home/weiying-chen/rust/rust-esp32-hx711/target/riscv32imc-esp-espidf/debug/deps/libembedded_hal_async-990b425dcd975b58.rlib" "/home/weiying-chen/rust/rust-esp32-hx711/target/riscv32imc-esp-espidf/debug/deps/libembedded_can-68cc62e738679415.rlib" "/home/weiying-chen/rust/rust-esp32-hx711/target/riscv32imc-esp-espidf/debug/deps/libembedded_hal-2f83e3de458843f2.rlib" "/home/weiying-chen/rust/rust-esp32-hx711/target/riscv32imc-esp-espidf/debug/deps/libvoid-66b0c3ac72c5f3a4.rlib" "/home/weiying-chen/rust/rust-esp32-hx711/target/riscv32imc-esp-espidf/debug/deps/libnb-de2302eb41e3a1c2.rlib" "/home/weiying-chen/rust/rust-esp32-hx711/target/riscv32imc-esp-espidf/debug/deps/libembedded_hal_nb-033c880103688bd5.rlib" "/home/weiying-chen/rust/rust-esp32-hx711/target/riscv32imc-esp-espidf/debug/deps/libnb-5fc1e93a9b74cfdf.rlib" "/home/weiying-chen/rust/rust-esp32-hx711/target/riscv32imc-esp-espidf/debug/deps/libatomic_waker-796dcfd32ddc8e12.rlib" "/home/weiying-chen/rust/rust-esp32-hx711/target/riscv32imc-esp-espidf/debug/deps/libembassy_sync-e0462e269297cc11.rlib" "/home/weiying-chen/rust/rust-esp32-hx711/target/riscv32imc-esp-espidf/debug/deps/libfutures_util-d4f536f8ad3b9d9f.rlib" "/home/weiying-chen/rust/rust-esp32-hx711/target/riscv32imc-esp-espidf/debug/deps/libpin_project_lite-9d6e3d5817b79bca.rlib" "/home/weiying-chen/rust/rust-esp32-hx711/target/riscv32imc-esp-espidf/debug/deps/libfutures_task-7327d0a47d9f8d3d.rlib" "/home/weiying-chen/rust/rust-esp32-hx711/target/riscv32imc-esp-espidf/debug/deps/libpin_utils-6c163a2c65fcfcda.rlib" "/home/weiying-chen/rust/rust-esp32-hx711/target/riscv32imc-esp-espidf/debug/deps/libfutures_core-77b5757b4f48e70d.rlib" "/home/weiying-chen/rust/rust-esp32-hx711/target/riscv32imc-esp-espidf/debug/deps/libembedded_hal-30773fcb4939dd6a.rlib" "/home/weiying-chen/rust/rust-esp32-hx711/target/riscv32imc-esp-espidf/debug/deps/libnum_enum-b931bdd0e270537c.rlib" "/home/weiying-chen/rust/rust-esp32-hx711/target/riscv32imc-esp-espidf/debug/deps/libesp_idf_sys-16b129a3d6c39db8.rlib" "/home/weiying-chen/rust/rust-esp32-hx711/target/riscv32imc-esp-espidf/debug/deps/liblibc-1bbc04662ee8144c.rlib" "/home/weiying-chen/rust/rust-esp32-hx711/target/riscv32imc-esp-espidf/debug/deps/libconst_format-8a570286acabd1d1.rlib" "/home/weiying-chen/rust/rust-esp32-hx711/target/riscv32imc-esp-espidf/debug/deps/libembedded_svc-eef27203355a794c.rlib" "/home/weiying-chen/rust/rust-esp32-hx711/target/riscv32imc-esp-espidf/debug/deps/libheapless-86e1c0a31b5254e6.rlib" "/home/weiying-chen/rust/rust-esp32-hx711/target/riscv32imc-esp-espidf/debug/deps/libhash32-aae68cd8e05e8ef5.rlib" "/home/weiying-chen/rust/rust-esp32-hx711/target/riscv32imc-esp-espidf/debug/deps/libbyteorder-678d6e6855687e18.rlib" "/home/weiying-chen/rust/rust-esp32-hx711/target/riscv32imc-esp-espidf/debug/deps/libenumset-a3ae4935b97ea6c2.rlib" "/home/weiying-chen/rust/rust-esp32-hx711/target/riscv32imc-esp-espidf/debug/deps/libembedded_io_async-7a2782d7064e46e4.rlib" "/home/weiying-chen/rust/rust-esp32-hx711/target/riscv32imc-esp-espidf/debug/deps/libembedded_io-1e492848c473b250.rlib" "/home/weiying-chen/rust/rust-esp32-hx711/target/riscv32imc-esp-espidf/debug/deps/liblog-07c89a350b6405d4.rlib" "/home/weiying-chen/rust/rust-esp32-hx711/target/riscv32imc-esp-espidf/debug/deps/libcritical_section-ffd5c2adc5ee91e4.rlib" "/home/weiying-chen/rust/rust-esp32-hx711/target/riscv32imc-esp-espidf/debug/deps/libstd-eaa6fc9c885f9f6f.rlib" "/home/weiying-chen/rust/rust-esp32-hx711/target/riscv32imc-esp-espidf/debug/deps/libpanic_abort-820fcf897f5b9053.rlib" "/home/weiying-chen/rust/rust-esp32-hx711/target/riscv32imc-esp-espidf/debug/deps/libobject-4d33242222915a6b.rlib" "/home/weiying-chen/rust/rust-esp32-hx711/target/riscv32imc-esp-espidf/debug/deps/libmemchr-6cb9ca203221031f.rlib" "/home/weiying-chen/rust/rust-esp32-hx711/target/riscv32imc-esp-espidf/debug/deps/libaddr2line-0a17fd34de031fb8.rlib" "/home/weiying-chen/rust/rust-esp32-hx711/target/riscv32imc-esp-espidf/debug/deps/libgimli-762a68d57d52db6b.rlib" "/home/weiying-chen/rust/rust-esp32-hx711/target/riscv32imc-esp-espidf/debug/deps/librustc_demangle-9dbdac9d199dc45b.rlib" "/home/weiying-chen/rust/rust-esp32-hx711/target/riscv32imc-esp-espidf/debug/deps/libstd_detect-18947a51cdc4b619.rlib" "/home/weiying-chen/rust/rust-esp32-hx711/target/riscv32imc-esp-espidf/debug/deps/libhashbrown-9e6f277db7442af0.rlib" "/home/weiying-chen/rust/rust-esp32-hx711/target/riscv32imc-esp-espidf/debug/deps/librustc_std_workspace_alloc-5349249badd95bd9.rlib" "/home/weiying-chen/rust/rust-esp32-hx711/target/riscv32imc-esp-espidf/debug/deps/libminiz_oxide-0d9fa95785b2cf1f.rlib" "/home/weiying-chen/rust/rust-esp32-hx711/target/riscv32imc-esp-espidf/debug/deps/libadler-0e6ea38b8e430ba9.rlib" "/home/weiying-chen/rust/rust-esp32-hx711/target/riscv32imc-esp-espidf/debug/deps/libunwind-6385c2bcd8cb98da.rlib" "/home/weiying-chen/rust/rust-esp32-hx711/target/riscv32imc-esp-espidf/debug/deps/libcfg_if-d33361f7ab27bd8a.rlib" "/home/weiying-chen/rust/rust-esp32-hx711/target/riscv32imc-esp-espidf/debug/deps/liblibc-9e0a0c01868b986b.rlib" "/home/weiying-chen/rust/rust-esp32-hx711/target/riscv32imc-esp-espidf/debug/deps/liballoc-c08c5c58064c6eff.rlib" "/home/weiying-chen/rust/rust-esp32-hx711/target/riscv32imc-esp-espidf/debug/deps/librustc_std_workspace_core-3c8e3afa4cf0fc82.rlib" "/home/weiying-chen/rust/rust-esp32-hx711/target/riscv32imc-esp-espidf/debug/deps/libcore-f875409d1c8e5298.rlib" "/home/weiying-chen/rust/rust-esp32-hx711/target/riscv32imc-esp-espidf/debug/deps/libcompiler_builtins-dd24b59aad538ff0.rlib" "-Wl,-Bdynamic" "-Wl,-z,noexecstack" "-L" "/home/weiying-chen/.rustup/toolchains/nightly-2023-12-31-x86_64-unknown-linux-gnu/lib/rustlib/riscv32imc-esp-espidf/lib" "-o" "/home/weiying-chen/rust/rust-esp32-hx711/target/riscv32imc-esp-espidf/debug/deps/rust_esp32_bme280-d5ad83a966519a9d" "-Wl,--gc-sections" "-no-pie" "-nodefaultlibs" "--ldproxy-linker" "/home/weiying-chen/rust/rust-esp32-hx711/.embuild/espressif/tools/riscv32-esp-elf/esp-12.2.0_20230208/riscv32-esp-elf/bin/riscv32-esp-elf-gcc" "--ldproxy-cwd" "/home/weiying-chen/rust/rust-esp32-hx711/target/riscv32imc-esp-espidf/debug/build/esp-idf-sys-cf7219e93715c52f/out/build" "-march=rv32imc_zicsr_zifencei" "-ffunction-sections" "-fdata-sections" "-mabi=ilp32" "-nostartfiles" "-march=rv32imc_zicsr_zifencei" "--specs=nosys.specs" "-Wl,--cref" "-Wl,--defsym=IDF_TARGET_ESP32C3=0" "-Wl,--Map=/home/weiying-chen/rust/rust-esp32-hx711/target/riscv32imc-esp-espidf/debug/build/esp-idf-sys-cf7219e93715c52f/out/build/libespidf.map" "-Wl,--no-warn-rwx-segments" "-fno-rtti" "-fno-lto" "-Wl,--gc-sections" "-Wl,--warn-common" "-T" "esp32c3.peripherals.ld" "-T" "esp32c3.rom.ld" "-T" "esp32c3.rom.api.ld" "-T" "esp32c3.rom.libgcc.ld" "-T" "esp32c3.rom.newlib.ld" "-T" "esp32c3.rom.version.ld" "-T" "esp32c3.rom.eco3.ld" "-T" "memory.ld" "-T" "sections.ld" "-L/home/weiying-chen/rust/rust-esp32-hx711/.embuild/espressif/esp-idf/v5.1.2/components/soc/esp32c3/ld" "-L/home/weiying-chen/rust/rust-esp32-hx711/.embuild/espressif/esp-idf/v5.1.2/components/esp_rom/esp32c3/ld" "-L/home/weiying-chen/rust/rust-esp32-hx711/target/riscv32imc-esp-espidf/debug/build/esp-idf-sys-cf7219e93715c52f/out/build/esp-idf/esp_system/ld" "-L/home/weiying-chen/rust/rust-esp32-hx711/.embuild/espressif/esp-idf/v5.1.2/components/esp_phy/lib/esp32c3" "-L/home/weiying-chen/rust/rust-esp32-hx711/.embuild/espressif/esp-idf/v5.1.2/components/esp_wifi/lib/esp32c3" "esp-idf/riscv/libriscv.a" "esp-idf/esp_ringbuf/libesp_ringbuf.a" "esp-idf/efuse/libefuse.a" "esp-idf/driver/libdriver.a" "esp-idf/esp_pm/libesp_pm.a" "esp-idf/mbedtls/libmbedtls.a" "esp-idf/esp_app_format/libesp_app_format.a" "esp-idf/bootloader_support/libbootloader_support.a" "esp-idf/esp_partition/libesp_partition.a" "esp-idf/app_update/libapp_update.a" "esp-idf/esp_mm/libesp_mm.a" "esp-idf/spi_flash/libspi_flash.a" "esp-idf/pthread/libpthread.a" "esp-idf/esp_system/libesp_system.a" "esp-idf/esp_rom/libesp_rom.a" "esp-idf/hal/libhal.a" "esp-idf/log/liblog.a" "esp-idf/heap/libheap.a" "esp-idf/soc/libsoc.a" "esp-idf/esp_hw_support/libesp_hw_support.a" "esp-idf/freertos/libfreertos.a" "esp-idf/newlib/libnewlib.a" "esp-idf/cxx/libcxx.a" "esp-idf/esp_common/libesp_common.a" "esp-idf/esp_timer/libesp_timer.a" "esp-idf/app_trace/libapp_trace.a" "esp-idf/esp_event/libesp_event.a" "esp-idf/nvs_flash/libnvs_flash.a" "esp-idf/esp_phy/libesp_phy.a" "esp-idf/vfs/libvfs.a" "esp-idf/lwip/liblwip.a" "esp-idf/esp_netif/libesp_netif.a" "esp-idf/wpa_supplicant/libwpa_supplicant.a" "esp-idf/esp_coex/libesp_coex.a" "esp-idf/esp_wifi/libesp_wifi.a" "esp-idf/unity/libunity.a" "esp-idf/cmock/libcmock.a" "esp-idf/console/libconsole.a" "esp-idf/http_parser/libhttp_parser.a" "esp-idf/esp-tls/libesp-tls.a" "esp-idf/esp_adc/libesp_adc.a" "esp-idf/esp_eth/libesp_eth.a" "esp-idf/esp_gdbstub/libesp_gdbstub.a" "esp-idf/esp_hid/libesp_hid.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/esp_lcd/libesp_lcd.a" "esp-idf/protobuf-c/libprotobuf-c.a" "esp-idf/protocomm/libprotocomm.a" "esp-idf/esp_local_ctrl/libesp_local_ctrl.a" "esp-idf/espcoredump/libespcoredump.a" "esp-idf/wear_levelling/libwear_levelling.a" "esp-idf/sdmmc/libsdmmc.a" "esp-idf/fatfs/libfatfs.a" "esp-idf/json/libjson.a" "esp-idf/mqtt/libmqtt.a" "esp-idf/spiffs/libspiffs.a" "esp-idf/wifi_provisioning/libwifi_provisioning.a" "esp-idf/main/libmain.a" "esp-idf/app_trace/libapp_trace.a" "esp-idf/app_trace/libapp_trace.a" "esp-idf/cmock/libcmock.a" "esp-idf/unity/libunity.a" "esp-idf/esp_hid/libesp_hid.a" "esp-idf/esp_lcd/libesp_lcd.a" "esp-idf/esp_local_ctrl/libesp_local_ctrl.a" "esp-idf/espcoredump/libespcoredump.a" "esp-idf/fatfs/libfatfs.a" "esp-idf/wear_levelling/libwear_levelling.a" "esp-idf/sdmmc/libsdmmc.a" "esp-idf/mqtt/libmqtt.a" "esp-idf/spiffs/libspiffs.a" "esp-idf/wifi_provisioning/libwifi_provisioning.a" "esp-idf/protocomm/libprotocomm.a" "esp-idf/console/libconsole.a" "esp-idf/protobuf-c/libprotobuf-c.a" "esp-idf/json/libjson.a" "esp-idf/riscv/libriscv.a" "esp-idf/esp_ringbuf/libesp_ringbuf.a" "esp-idf/efuse/libefuse.a" "esp-idf/driver/libdriver.a" "esp-idf/esp_pm/libesp_pm.a" "esp-idf/mbedtls/libmbedtls.a" "esp-idf/esp_app_format/libesp_app_format.a" "esp-idf/bootloader_support/libbootloader_support.a" "esp-idf/esp_partition/libesp_partition.a" "esp-idf/app_update/libapp_update.a" "esp-idf/esp_mm/libesp_mm.a" "esp-idf/spi_flash/libspi_flash.a" "esp-idf/pthread/libpthread.a" "esp-idf/esp_system/libesp_system.a" "esp-idf/esp_rom/libesp_rom.a" "esp-idf/hal/libhal.a" "esp-idf/log/liblog.a" "esp-idf/heap/libheap.a" "esp-idf/soc/libsoc.a" "esp-idf/esp_hw_support/libesp_hw_support.a" "esp-idf/freertos/libfreertos.a" "esp-idf/newlib/libnewlib.a" "esp-idf/cxx/libcxx.a" "esp-idf/esp_common/libesp_common.a" "esp-idf/esp_timer/libesp_timer.a" "esp-idf/esp_event/libesp_event.a" "esp-idf/nvs_flash/libnvs_flash.a" "esp-idf/esp_phy/libesp_phy.a" "esp-idf/vfs/libvfs.a" "esp-idf/lwip/liblwip.a" "esp-idf/esp_netif/libesp_netif.a" "esp-idf/wpa_supplicant/libwpa_supplicant.a" "esp-idf/esp_coex/libesp_coex.a" "esp-idf/esp_wifi/libesp_wifi.a" "esp-idf/http_parser/libhttp_parser.a" "esp-idf/esp-tls/libesp-tls.a" "esp-idf/esp_adc/libesp_adc.a" "esp-idf/esp_eth/libesp_eth.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/mbedtls/mbedtls/library/libmbedtls.a" "esp-idf/mbedtls/mbedtls/library/libmbedcrypto.a" "esp-idf/mbedtls/mbedtls/library/libmbedx509.a" "esp-idf/mbedtls/mbedtls/3rdparty/everest/libeverest.a" "esp-idf/mbedtls/mbedtls/3rdparty/p256-m/libp256m.a" "/home/weiying-chen/rust/rust-esp32-hx711/.embuild/espressif/esp-idf/v5.1.2/components/esp_wifi/lib/esp32c3/libcore.a" "/home/weiying-chen/rust/rust-esp32-hx711/.embuild/espressif/esp-idf/v5.1.2/components/esp_wifi/lib/esp32c3/libespnow.a" "/home/weiying-chen/rust/rust-esp32-hx711/.embuild/espressif/esp-idf/v5.1.2/components/esp_wifi/lib/esp32c3/libmesh.a" "/home/weiying-chen/rust/rust-esp32-hx711/.embuild/espressif/esp-idf/v5.1.2/components/esp_wifi/lib/esp32c3/libnet80211.a" "/home/weiying-chen/rust/rust-esp32-hx711/.embuild/espressif/esp-idf/v5.1.2/components/esp_wifi/lib/esp32c3/libpp.a" "/home/weiying-chen/rust/rust-esp32-hx711/.embuild/espressif/esp-idf/v5.1.2/components/esp_wifi/lib/esp32c3/libsmartconfig.a" "/home/weiying-chen/rust/rust-esp32-hx711/.embuild/espressif/esp-idf/v5.1.2/components/esp_wifi/lib/esp32c3/libwapi.a" "esp-idf/riscv/libriscv.a" "esp-idf/esp_ringbuf/libesp_ringbuf.a" "esp-idf/efuse/libefuse.a" "esp-idf/driver/libdriver.a" "esp-idf/esp_pm/libesp_pm.a" "esp-idf/mbedtls/libmbedtls.a" "esp-idf/esp_app_format/libesp_app_format.a" "esp-idf/bootloader_support/libbootloader_support.a" "esp-idf/esp_partition/libesp_partition.a" "esp-idf/app_update/libapp_update.a" "esp-idf/esp_mm/libesp_mm.a" "esp-idf/spi_flash/libspi_flash.a" "esp-idf/pthread/libpthread.a" "esp-idf/esp_system/libesp_system.a" "esp-idf/esp_rom/libesp_rom.a" "esp-idf/hal/libhal.a" "esp-idf/log/liblog.a" "esp-idf/heap/libheap.a" "esp-idf/soc/libsoc.a" "esp-idf/esp_hw_support/libesp_hw_support.a" "esp-idf/freertos/libfreertos.a" "esp-idf/newlib/libnewlib.a" "esp-idf/cxx/libcxx.a" "esp-idf/esp_common/libesp_common.a" "esp-idf/esp_timer/libesp_timer.a" "esp-idf/esp_event/libesp_event.a" "esp-idf/nvs_flash/libnvs_flash.a" "esp-idf/esp_phy/libesp_phy.a" "esp-idf/vfs/libvfs.a" "esp-idf/lwip/liblwip.a" "esp-idf/esp_netif/libesp_netif.a" "esp-idf/wpa_supplicant/libwpa_supplicant.a" "esp-idf/esp_coex/libesp_coex.a" "esp-idf/esp_wifi/libesp_wifi.a" "esp-idf/http_parser/libhttp_parser.a" "esp-idf/esp-tls/libesp-tls.a" "esp-idf/esp_adc/libesp_adc.a" "esp-idf/esp_eth/libesp_eth.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/mbedtls/mbedtls/library/libmbedtls.a" "esp-idf/mbedtls/mbedtls/library/libmbedcrypto.a" "esp-idf/mbedtls/mbedtls/library/libmbedx509.a" "esp-idf/mbedtls/mbedtls/3rdparty/everest/libeverest.a" "esp-idf/mbedtls/mbedtls/3rdparty/p256-m/libp256m.a" "/home/weiying-chen/rust/rust-esp32-hx711/.embuild/espressif/esp-idf/v5.1.2/components/esp_wifi/lib/esp32c3/libcore.a" "/home/weiying-chen/rust/rust-esp32-hx711/.embuild/espressif/esp-idf/v5.1.2/components/esp_wifi/lib/esp32c3/libespnow.a" "/home/weiying-chen/rust/rust-esp32-hx711/.embuild/espressif/esp-idf/v5.1.2/components/esp_wifi/lib/esp32c3/libmesh.a" "/home/weiying-chen/rust/rust-esp32-hx711/.embuild/espressif/esp-idf/v5.1.2/components/esp_wifi/lib/esp32c3/libnet80211.a" "/home/weiying-chen/rust/rust-esp32-hx711/.embuild/espressif/esp-idf/v5.1.2/components/esp_wifi/lib/esp32c3/libpp.a" "/home/weiying-chen/rust/rust-esp32-hx711/.embuild/espressif/esp-idf/v5.1.2/components/esp_wifi/lib/esp32c3/libsmartconfig.a" "/home/weiying-chen/rust/rust-esp32-hx711/.embuild/espressif/esp-idf/v5.1.2/components/esp_wifi/lib/esp32c3/libwapi.a" "esp-idf/riscv/libriscv.a" "esp-idf/esp_ringbuf/libesp_ringbuf.a" "esp-idf/efuse/libefuse.a" "esp-idf/driver/libdriver.a" "esp-idf/esp_pm/libesp_pm.a" "esp-idf/mbedtls/libmbedtls.a" "esp-idf/esp_app_format/libesp_app_format.a" "esp-idf/bootloader_support/libbootloader_support.a" "esp-idf/esp_partition/libesp_partition.a" "esp-idf/app_update/libapp_update.a" "esp-idf/esp_mm/libesp_mm.a" "esp-idf/spi_flash/libspi_flash.a" "esp-idf/pthread/libpthread.a" "esp-idf/esp_system/libesp_system.a" "esp-idf/esp_rom/libesp_rom.a" "esp-idf/hal/libhal.a" "esp-idf/log/liblog.a" "esp-idf/heap/libheap.a" "esp-idf/soc/libsoc.a" "esp-idf/esp_hw_support/libesp_hw_support.a" "esp-idf/freertos/libfreertos.a" "esp-idf/newlib/libnewlib.a" "esp-idf/cxx/libcxx.a" "esp-idf/esp_common/libesp_common.a" "esp-idf/esp_timer/libesp_timer.a" "esp-idf/esp_event/libesp_event.a" "esp-idf/nvs_flash/libnvs_flash.a" "esp-idf/esp_phy/libesp_phy.a" "esp-idf/vfs/libvfs.a" "esp-idf/lwip/liblwip.a" "esp-idf/esp_netif/libesp_netif.a" "esp-idf/wpa_supplicant/libwpa_supplicant.a" "esp-idf/esp_coex/libesp_coex.a" "esp-idf/esp_wifi/libesp_wifi.a" "esp-idf/http_parser/libhttp_parser.a" "esp-idf/esp-tls/libesp-tls.a" "esp-idf/esp_adc/libesp_adc.a" "esp-idf/esp_eth/libesp_eth.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/mbedtls/mbedtls/library/libmbedtls.a" "esp-idf/mbedtls/mbedtls/library/libmbedcrypto.a" "esp-idf/mbedtls/mbedtls/library/libmbedx509.a" "esp-idf/mbedtls/mbedtls/3rdparty/everest/libeverest.a" "esp-idf/mbedtls/mbedtls/3rdparty/p256-m/libp256m.a" "/home/weiying-chen/rust/rust-esp32-hx711/.embuild/espressif/esp-idf/v5.1.2/components/esp_wifi/lib/esp32c3/libcore.a" "/home/weiying-chen/rust/rust-esp32-hx711/.embuild/espressif/esp-idf/v5.1.2/components/esp_wifi/lib/esp32c3/libespnow.a" "/home/weiying-chen/rust/rust-esp32-hx711/.embuild/espressif/esp-idf/v5.1.2/components/esp_wifi/lib/esp32c3/libmesh.a" "/home/weiying-chen/rust/rust-esp32-hx711/.embuild/espressif/esp-idf/v5.1.2/components/esp_wifi/lib/esp32c3/libnet80211.a" "/home/weiying-chen/rust/rust-esp32-hx711/.embuild/espressif/esp-idf/v5.1.2/components/esp_wifi/lib/esp32c3/libpp.a" "/home/weiying-chen/rust/rust-esp32-hx711/.embuild/espressif/esp-idf/v5.1.2/components/esp_wifi/lib/esp32c3/libsmartconfig.a" "/home/weiying-chen/rust/rust-esp32-hx711/.embuild/espressif/esp-idf/v5.1.2/components/esp_wifi/lib/esp32c3/libwapi.a" "esp-idf/riscv/libriscv.a" "esp-idf/esp_ringbuf/libesp_ringbuf.a" "esp-idf/efuse/libefuse.a" "esp-idf/driver/libdriver.a" "esp-idf/esp_pm/libesp_pm.a" "esp-idf/mbedtls/libmbedtls.a" "esp-idf/esp_app_format/libesp_app_format.a" "esp-idf/bootloader_support/libbootloader_support.a" "esp-idf/esp_partition/libesp_partition.a" "esp-idf/app_update/libapp_update.a" "esp-idf/esp_mm/libesp_mm.a" "esp-idf/spi_flash/libspi_flash.a" "esp-idf/pthread/libpthread.a" "esp-idf/esp_system/libesp_system.a" "esp-idf/esp_rom/libesp_rom.a" "esp-idf/hal/libhal.a" "esp-idf/log/liblog.a" "esp-idf/heap/libheap.a" "esp-idf/soc/libsoc.a" "esp-idf/esp_hw_support/libesp_hw_support.a" "esp-idf/freertos/libfreertos.a" "esp-idf/newlib/libnewlib.a" "esp-idf/cxx/libcxx.a" "esp-idf/esp_common/libesp_common.a" "esp-idf/esp_timer/libesp_timer.a" "esp-idf/esp_event/libesp_event.a" "esp-idf/nvs_flash/libnvs_flash.a" "esp-idf/esp_phy/libesp_phy.a" "esp-idf/vfs/libvfs.a" "esp-idf/lwip/liblwip.a" "esp-idf/esp_netif/libesp_netif.a" "esp-idf/wpa_supplicant/libwpa_supplicant.a" "esp-idf/esp_coex/libesp_coex.a" "esp-idf/esp_wifi/libesp_wifi.a" "esp-idf/http_parser/libhttp_parser.a" "esp-idf/esp-tls/libesp-tls.a" "esp-idf/esp_adc/libesp_adc.a" "esp-idf/esp_eth/libesp_eth.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/mbedtls/mbedtls/library/libmbedtls.a" "esp-idf/mbedtls/mbedtls/library/libmbedcrypto.a" "esp-idf/mbedtls/mbedtls/library/libmbedx509.a" "esp-idf/mbedtls/mbedtls/3rdparty/everest/libeverest.a" "esp-idf/mbedtls/mbedtls/3rdparty/p256-m/libp256m.a" "/home/weiying-chen/rust/rust-esp32-hx711/.embuild/espressif/esp-idf/v5.1.2/components/esp_wifi/lib/esp32c3/libcore.a" "/home/weiying-chen/rust/rust-esp32-hx711/.embuild/espressif/esp-idf/v5.1.2/components/esp_wifi/lib/esp32c3/libespnow.a" "/home/weiying-chen/rust/rust-esp32-hx711/.embuild/espressif/esp-idf/v5.1.2/components/esp_wifi/lib/esp32c3/libmesh.a" "/home/weiying-chen/rust/rust-esp32-hx711/.embuild/espressif/esp-idf/v5.1.2/components/esp_wifi/lib/esp32c3/libnet80211.a" "/home/weiying-chen/rust/rust-esp32-hx711/.embuild/espressif/esp-idf/v5.1.2/components/esp_wifi/lib/esp32c3/libpp.a" "/home/weiying-chen/rust/rust-esp32-hx711/.embuild/espressif/esp-idf/v5.1.2/components/esp_wifi/lib/esp32c3/libsmartconfig.a" "/home/weiying-chen/rust/rust-esp32-hx711/.embuild/espressif/esp-idf/v5.1.2/components/esp_wifi/lib/esp32c3/libwapi.a" "esp-idf/riscv/libriscv.a" "esp-idf/esp_ringbuf/libesp_ringbuf.a" "esp-idf/efuse/libefuse.a" "esp-idf/driver/libdriver.a" "esp-idf/esp_pm/libesp_pm.a" "esp-idf/mbedtls/libmbedtls.a" "esp-idf/esp_app_format/libesp_app_format.a" "esp-idf/bootloader_support/libbootloader_support.a" "esp-idf/esp_partition/libesp_partition.a" "esp-idf/app_update/libapp_update.a" "esp-idf/esp_mm/libesp_mm.a" "esp-idf/spi_flash/libspi_flash.a" "esp-idf/pthread/libpthread.a" "esp-idf/esp_system/libesp_system.a" "esp-idf/esp_rom/libesp_rom.a" "esp-idf/hal/libhal.a" "esp-idf/log/liblog.a" "esp-idf/heap/libheap.a" "esp-idf/soc/libsoc.a" "esp-idf/esp_hw_support/libesp_hw_support.a" "esp-idf/freertos/libfreertos.a" "esp-idf/newlib/libnewlib.a" "esp-idf/cxx/libcxx.a" "esp-idf/esp_common/libesp_common.a" "esp-idf/esp_timer/libesp_timer.a" "esp-idf/esp_event/libesp_event.a" "esp-idf/nvs_flash/libnvs_flash.a" "esp-idf/esp_phy/libesp_phy.a" "esp-idf/vfs/libvfs.a" "esp-idf/lwip/liblwip.a" "esp-idf/esp_netif/libesp_netif.a" "esp-idf/wpa_supplicant/libwpa_supplicant.a" "esp-idf/esp_coex/libesp_coex.a" "esp-idf/esp_wifi/libesp_wifi.a" "esp-idf/http_parser/libhttp_parser.a" "esp-idf/esp-tls/libesp-tls.a" "esp-idf/esp_adc/libesp_adc.a" "esp-idf/esp_eth/libesp_eth.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/mbedtls/mbedtls/library/libmbedtls.a" "esp-idf/mbedtls/mbedtls/library/libmbedcrypto.a" "esp-idf/mbedtls/mbedtls/library/libmbedx509.a" "esp-idf/mbedtls/mbedtls/3rdparty/everest/libeverest.a" "esp-idf/mbedtls/mbedtls/3rdparty/p256-m/libp256m.a" "/home/weiying-chen/rust/rust-esp32-hx711/.embuild/espressif/esp-idf/v5.1.2/components/esp_wifi/lib/esp32c3/libcore.a" "/home/weiying-chen/rust/rust-esp32-hx711/.embuild/espressif/esp-idf/v5.1.2/components/esp_wifi/lib/esp32c3/libespnow.a" "/home/weiying-chen/rust/rust-esp32-hx711/.embuild/espressif/esp-idf/v5.1.2/components/esp_wifi/lib/esp32c3/libmesh.a" "/home/weiying-chen/rust/rust-esp32-hx711/.embuild/espressif/esp-idf/v5.1.2/components/esp_wifi/lib/esp32c3/libnet80211.a" "/home/weiying-chen/rust/rust-esp32-hx711/.embuild/espressif/esp-idf/v5.1.2/components/esp_wifi/lib/esp32c3/libpp.a" "/home/weiying-chen/rust/rust-esp32-hx711/.embuild/espressif/esp-idf/v5.1.2/components/esp_wifi/lib/esp32c3/libsmartconfig.a" "/home/weiying-chen/rust/rust-esp32-hx711/.embuild/espressif/esp-idf/v5.1.2/components/esp_wifi/lib/esp32c3/libwapi.a" "esp-idf/riscv/libriscv.a" "esp-idf/esp_ringbuf/libesp_ringbuf.a" "esp-idf/efuse/libefuse.a" "esp-idf/driver/libdriver.a" "esp-idf/esp_pm/libesp_pm.a" "esp-idf/mbedtls/libmbedtls.a" "esp-idf/esp_app_format/libesp_app_format.a" "esp-idf/bootloader_support/libbootloader_support.a" "esp-idf/esp_partition/libesp_partition.a" "esp-idf/app_update/libapp_update.a" "esp-idf/esp_mm/libesp_mm.a" "esp-idf/spi_flash/libspi_flash.a" "esp-idf/pthread/libpthread.a" "esp-idf/esp_system/libesp_system.a" "esp-idf/esp_rom/libesp_rom.a" "esp-idf/hal/libhal.a" "esp-idf/log/liblog.a" "esp-idf/heap/libheap.a" "esp-idf/soc/libsoc.a" "esp-idf/esp_hw_support/libesp_hw_support.a" "esp-idf/freertos/libfreertos.a" "esp-idf/newlib/libnewlib.a" "esp-idf/cxx/libcxx.a" "esp-idf/esp_common/libesp_common.a" "esp-idf/esp_timer/libesp_timer.a" "esp-idf/esp_event/libesp_event.a" "esp-idf/nvs_flash/libnvs_flash.a" "esp-idf/esp_phy/libesp_phy.a" "esp-idf/vfs/libvfs.a" "esp-idf/lwip/liblwip.a" "esp-idf/esp_netif/libesp_netif.a" "esp-idf/wpa_supplicant/libwpa_supplicant.a" "esp-idf/esp_coex/libesp_coex.a" "esp-idf/esp_wifi/libesp_wifi.a" "esp-idf/http_parser/libhttp_parser.a" "esp-idf/esp-tls/libesp-tls.a" "esp-idf/esp_adc/libesp_adc.a" "esp-idf/esp_eth/libesp_eth.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/mbedtls/mbedtls/library/libmbedtls.a" "esp-idf/mbedtls/mbedtls/library/libmbedcrypto.a" "esp-idf/mbedtls/mbedtls/library/libmbedx509.a" "esp-idf/mbedtls/mbedtls/3rdparty/everest/libeverest.a" "esp-idf/mbedtls/mbedtls/3rdparty/p256-m/libp256m.a" "/home/weiying-chen/rust/rust-esp32-hx711/.embuild/espressif/esp-idf/v5.1.2/components/esp_wifi/lib/esp32c3/libcore.a" "/home/weiying-chen/rust/rust-esp32-hx711/.embuild/espressif/esp-idf/v5.1.2/components/esp_wifi/lib/esp32c3/libespnow.a" "/home/weiying-chen/rust/rust-esp32-hx711/.embuild/espressif/esp-idf/v5.1.2/components/esp_wifi/lib/esp32c3/libmesh.a" "/home/weiying-chen/rust/rust-esp32-hx711/.embuild/espressif/esp-idf/v5.1.2/components/esp_wifi/lib/esp32c3/libnet80211.a" "/home/weiying-chen/rust/rust-esp32-hx711/.embuild/espressif/esp-idf/v5.1.2/components/esp_wifi/lib/esp32c3/libpp.a" "/home/weiying-chen/rust/rust-esp32-hx711/.embuild/espressif/esp-idf/v5.1.2/components/esp_wifi/lib/esp32c3/libsmartconfig.a" "/home/weiying-chen/rust/rust-esp32-hx711/.embuild/espressif/esp-idf/v5.1.2/components/esp_wifi/lib/esp32c3/libwapi.a" "-u" "esp_app_desc" "-u" "pthread_include_pthread_impl" "-u" "pthread_include_pthread_cond_var_impl" "-u" "pthread_include_pthread_local_storage_impl" "-u" "pthread_include_pthread_rwlock_impl" "-u" "pthread_include_pthread_semaphore_impl" "-u" "start_app" "-u" "__ubsan_include" "-u" "__assert_func" "-Wl,--undefined=uxTopUsedPriority" "-Wl,--undefined=FreeRTOS_openocd_params" "-u" "app_main" "-lc" "-lm" "esp-idf/newlib/libnewlib.a" "-u" "newlib_include_heap_impl" "-u" "newlib_include_syscalls_impl" "-u" "newlib_include_pthread_impl" "-u" "newlib_include_assert_impl" "-Wl,--wrap=_Unwind_SetEnableExceptionFdeSorting" "-Wl,--wrap=__register_frame_info_bases" "-Wl,--wrap=__register_frame_info" "-Wl,--wrap=__register_frame" "-Wl,--wrap=__register_frame_info_table_bases" "-Wl,--wrap=__register_frame_info_table" "-Wl,--wrap=__register_frame_table" "-Wl,--wrap=__deregister_frame_info_bases" "-Wl,--wrap=__deregister_frame_info" "-Wl,--wrap=_Unwind_Find_FDE" "-Wl,--wrap=_Unwind_GetGR" "-Wl,--wrap=_Unwind_GetCFA" "-Wl,--wrap=_Unwind_GetIP" "-Wl,--wrap=_Unwind_GetIPInfo" "-Wl,--wrap=_Unwind_GetRegionStart" "-Wl,--wrap=_Unwind_GetDataRelBase" "-Wl,--wrap=_Unwind_GetTextRelBase" "-Wl,--wrap=_Unwind_SetIP" "-Wl,--wrap=_Unwind_SetGR" "-Wl,--wrap=_Unwind_GetLanguageSpecificData" "-Wl,--wrap=_Unwind_FindEnclosingFunction" "-Wl,--wrap=_Unwind_Resume" "-Wl,--wrap=_Unwind_RaiseException" "-Wl,--wrap=_Unwind_DeleteException" "-Wl,--wrap=_Unwind_ForcedUnwind" "-Wl,--wrap=_Unwind_Resume_or_Rethrow" "-Wl,--wrap=_Unwind_Backtrace" "-Wl,--wrap=__cxa_call_unexpected" "-Wl,--wrap=__gxx_personality_v0" "-u" "__cxa_guard_dummy" "-lstdc++" "esp-idf/pthread/libpthread.a" "-lgcc" "esp-idf/cxx/libcxx.a" "-u" "__cxx_fatal_exception" "-u" "include_esp_phy_override" "-lphy" "-lbtbb" "esp-idf/esp_phy/libesp_phy.a" "-lphy" "-lbtbb" "esp-idf/esp_phy/libesp_phy.a" "-lphy" "-lbtbb" "-u" "vfs_include_syscalls_impl"
  = note: [ldproxy] Running ldproxy
          Error: Linker /home/weiying-chen/rust/rust-esp32-hx711/.embuild/espressif/tools/riscv32-esp-elf/esp-12.2.0_20230208/riscv32-esp-elf/bin/riscv32-esp-elf-gcc failed: exit status: 1
          STDERR OUTPUT:
          /home/weiying-chen/rust/rust-esp32-hx711/.embuild/espressif/tools/riscv32-esp-elf/esp-12.2.0_20230208/riscv32-esp-elf/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: /home/weiying-chen/rust/rust-esp32-hx711/target/riscv32imc-esp-espidf/debug/deps/libesp_idf_hal-c194acd259816618.rlib(esp_idf_hal-c194acd259816618.esp_idf_hal.af47838674eadf49-cgu.05.rcgu.o): in function `_critical_section_1_0_acquire':
          /home/weiying-chen/.cargo/registry/src/index.crates.io-6f17d22bba15001f/critical-section-1.1.2/src/lib.rs:282: multiple definition of `_critical_section_1_0_acquire'; /home/weiying-chen/rust/rust-esp32-hx711/target/riscv32imc-esp-espidf/debug/deps/rust_esp32_bme280-d5ad83a966519a9d.1cz1qgmjyop85z30.rcgu.o:/home/weiying-chen/.cargo/registry/src/index.crates.io-6f17d22bba15001f/critical-section-1.1.2/src/lib.rs:281: first defined here
          /home/weiying-chen/rust/rust-esp32-hx711/.embuild/espressif/tools/riscv32-esp-elf/esp-12.2.0_20230208/riscv32-esp-elf/bin/../lib/gcc/riscv32-esp-elf/12.2.0/../../../../riscv32-esp-elf/bin/ld: /home/weiying-chen/rust/rust-esp32-hx711/target/riscv32imc-esp-espidf/debug/deps/libesp_idf_hal-c194acd259816618.rlib(esp_idf_hal-c194acd259816618.esp_idf_hal.af47838674eadf49-cgu.05.rcgu.o): in function `_critical_section_1_0_release':
          /home/weiying-chen/.cargo/registry/src/index.crates.io-6f17d22bba15001f/critical-section-1.1.2/src/lib.rs:286: multiple definition of `_critical_section_1_0_release'; /home/weiying-chen/rust/rust-esp32-hx711/target/riscv32imc-esp-espidf/debug/deps/rust_esp32_bme280-d5ad83a966519a9d.1cz1qgmjyop85z30.rcgu.o:/home/weiying-chen/.cargo/registry/src/index.crates.io-6f17d22bba15001f/critical-section-1.1.2/src/lib.rs:285: first defined here
          collect2: error: ld returned 1 exit status

          Stack backtrace:
             0: anyhow::error::<impl anyhow::Error>::msg
             1: ldproxy::main
             2: std::sys_common::backtrace::__rust_begin_short_backtrace
             3: std::rt::lang_start::{{closure}}
             4: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once
                       at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/ops/function.rs:284:13
             5: std::panicking::try::do_call
                       at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:552:40
             6: std::panicking::try
                       at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:516:19
             7: std::panic::catch_unwind
                       at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panic.rs:142:14
             8: std::rt::lang_start_internal::{{closure}}
                       at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/rt.rs:148:48
             9: std::panicking::try::do_call
                       at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:552:40
            10: std::panicking::try
                       at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:516:19
            11: std::panic::catch_unwind
                       at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panic.rs:142:14
            12: std::rt::lang_start_internal
                       at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/rt.rs:148:20
            13: std::rt::lang_start
            14: __libc_start_call_main
                       at ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16
            15: __libc_start_main_impl
                       at ./csu/../csu/libc-start.c:360:3
            16: _start

error: could not compile `rust-esp32-bme280` (bin "rust-esp32-bme280") due to 1 previous error

Cargo.toml:

[package]
name = "rust-esp32-bme280"
version = "0.1.0"
authors = ["Wei-ying Chen <weiying.alex.chen@gmail.com>"]
edition = "2021"
resolver = "2"
rust-version = "1.71"

[profile.release]
opt-level = "s"

[profile.dev]
debug = true # Symbols are nice, and they don't increase the size on Flash
opt-level = "z"

[features]
default = ["std", "embassy", "esp-idf-svc/native"]

pio = ["esp-idf-svc/pio"]
std = ["alloc", "esp-idf-svc/binstart", "esp-idf-svc/std"]
alloc = ["esp-idf-svc/alloc"]
nightly = ["esp-idf-svc/nightly"]
experimental = ["esp-idf-svc/experimental"]
embassy = ["esp-idf-svc/embassy-sync", "esp-idf-svc/critical-section", "esp-idf-svc/embassy-time-driver"]

[dependencies]
log = { version = "0.4", default-features = false }
esp-idf-svc = { version = "0.48", default-features = false }
loadcell = "0.2.0"
esp-idf-hal = "0.43.1"
critical-section = { version = "1.1.1" }

[build-dependencies]
embuild = "0.31.3"

To Reproduce

Steps to reproduce the behavior:

  1. Generate a project: cargo generate esp-rs/esp-idf-template cargo
  2. Add critical_section to your dependencies in Cargo.toml: critical-section = { version = "1.1.1" }

Expected behavior

Build project successfully

Environment

Vollbrecht commented 4 months ago

If you are writing a library and providing a critical-section implementation yourself you cant use our implementation. You are currently just blindly importing it via the enabled features. For more info read about the usage of the critical-section crate in there documentation. Also note this part where they explicitly inform you about your error