Closed manonfgoo closed 2 months ago
Hello,
my projekt compiles with board: "esp32dev" but the linker fails with board: seeed_xiao_esp32c3 Would you have any hint what to look at ?
board: seeed_xiao_esp32c3
[...] Compiling /home/manon/obj/esphome/test/.pioenvs/test/FrameworkArduino/wiring_shift.c.o Archiving /home/manon/obj/esphome/test/.pioenvs/test/libFrameworkArduino.a Indexing /home/manon/obj/esphome/test/.pioenvs/test/libFrameworkArduino.a Linking /home/manon/obj/esphome/test/.pioenvs/test/firmware.elf /home/manon/.platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld: /home/manon/obj/esphome/test/.pioenvs/test/src/esphome/components/nuki_lock/nuki_lock.cpp.o: in function `void esphome::api::UserServiceBase<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int>::execute_<0, 1>(std::vector<esphome::api::ExecuteServiceArgument, std::allocator<esphome::api::ExecuteServiceArgument> >, esphome::seq<0, 1>)': /opt/esphome/manon/test/src/esphome/components/api/user_services.h:57: undefined reference to `int esphome::api::get_execute_arg_value<int>(esphome::api::ExecuteServiceArgument const&)' /home/manon/.platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld: /home/manon/obj/esphome/test/.pioenvs/test/src/esphome/components/nuki_lock/nuki_lock.cpp.o: in function `void esphome::api::UserServiceBase<int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, bool>::execute_<0, 1, 2, 3>(std::vector<esphome::api::ExecuteServiceArgument, std::allocator<esphome::api::ExecuteServiceArgument> >, esphome::seq<0, 1, 2, 3>)': /opt/esphome/manon/test/src/esphome/components/api/user_services.h:57: undefined reference to `int esphome::api::get_execute_arg_value<int>(esphome::api::ExecuteServiceArgument const&)' /home/manon/.platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld: /opt/esphome/manon/test/src/esphome/components/api/user_services.h:57: undefined reference to `int esphome::api::get_execute_arg_value<int>(esphome::api::ExecuteServiceArgument const&)' /home/manon/.platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld: /home/manon/obj/esphome/test/.pioenvs/test/src/esphome/components/nuki_lock/nuki_lock.cpp.o: in function `void esphome::api::UserServiceBase<int>::execute_<0>(std::vector<esphome::api::ExecuteServiceArgument, std::allocator<esphome::api::ExecuteServiceArgument> >, esphome::seq<0>)': /opt/esphome/manon/test/src/esphome/components/api/user_services.h:57: undefined reference to `int esphome::api::get_execute_arg_value<int>(esphome::api::ExecuteServiceArgument const&)' /home/manon/.platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld: /home/manon/obj/esphome/test/.pioenvs/test/src/esphome/components/nuki_lock/nuki_lock.cpp.o: in function `esphome::api::UserServiceBase<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int>::encode_list_service_response()': /opt/esphome/manon/test/src/esphome/components/api/user_services.h:35: undefined reference to `esphome::api::enums::ServiceArgType esphome::api::to_service_arg_type<int>()' /home/manon/.platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld: /home/manon/obj/esphome/test/.pioenvs/test/src/esphome/components/nuki_lock/nuki_lock.cpp.o: in function `esphome::api::ListEntitiesServicesArgument::ListEntitiesServicesArgument()': /opt/esphome/manon/test/src/esphome/components/api/api_pb2.h:869: undefined reference to `esphome::api::enums::ServiceArgType esphome::api::to_service_arg_type<int>()' /home/manon/.platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld: /home/manon/obj/esphome/test/.pioenvs/test/src/esphome/components/nuki_lock/nuki_lock.cpp.o: in function `esphome::api::UserServiceBase<int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, bool>::encode_list_service_response()': /opt/esphome/manon/test/src/esphome/components/api/user_services.h:35: undefined reference to `esphome::api::enums::ServiceArgType esphome::api::to_service_arg_type<int>()' /home/manon/.platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld: /home/manon/obj/esphome/test/.pioenvs/test/src/esphome/components/nuki_lock/nuki_lock.cpp.o: in function `esphome::api::ListEntitiesServicesArgument::ListEntitiesServicesArgument()': /opt/esphome/manon/test/src/esphome/components/api/api_pb2.h:869: undefined reference to `esphome::api::enums::ServiceArgType esphome::api::to_service_arg_type<int>()' collect2: error: ld returned 1 exit status *** [/home/manon/obj/esphome/test/.pioenvs/test/firmware.elf] Error 1 ====================================================================================== [FAILED] Took 89.27 seconds ======================================================================================
board: "esp32dev"
[...] Archiving /home/manon/obj/esphome/test/.pioenvs/test/libFrameworkArduino.a Indexing /home/manon/obj/esphome/test/.pioenvs/test/libFrameworkArduino.a Linking /home/manon/obj/esphome/test/.pioenvs/test/firmware.elf RAM: [== ] 17.5% (used 57344 bytes from 327680 bytes) Flash: [======= ] 65.6% (used 1204665 bytes from 1835008 bytes) Building /home/manon/obj/esphome/test/.pioenvs/test/firmware.bin Creating esp32 image... Successfully created esp32 image. esp32_create_combined_bin(["/home/manon/obj/esphome/test/.pioenvs/test/firmware.bin"], ["/home/manon/obj/esphome/test/.pioenvs/test/firmware.elf"]) Wrote 0x137b70 bytes to file /home/manon/obj/esphome/test/.pioenvs/test/firmware-factory.bin, ready to flash to offset 0x0 ====================================================================================== [SUCCESS] Took 95.07 seconds ====================================================================================== INFO Successfully compiled program. manon@pimatic:~/git/esphome-import$
Code:
substitutions: name: "test" friendly_name: "Nuki Lock" enc_key: 'yVa5jVblrFEE7xllOuyFSEj3zDOjJ+m+rsrvE47Q3mo=' esphome: name: "test" build_path: ${HOME}/obj/esphome/${name} libraries: - Preferences - https://github.com/h2zero/NimBLE-Arduino - Crc16 - https://github.com/uriyacovy/NukiBleEsp32 external_components: - source: github://uriyacovy/ESPHome_nuki_lock wifi: ssid: "11111111111111111111111111111111" password: "11111111111111111111111111111111" api: encryption: key: ${enc_key} ota: password: "11111111111111111111111111111111" logger: logs: component: ERROR esp32: board: seeed_xiao_esp32c3 #board: "esp32dev" framework: type: arduino version: 2.0.16 platform_version: 6.7.0 lock: # Required: - platform: nuki_lock id: nukilock name: Nuki Lock unpair: false is_connected: id: nukilock_connected name: "Nuki Connected" is_paired: id: nukilock_paired name: "Nuki Paired" # Optional: battery_critical: name: "Nuki Battery Critical" battery_level: id: nukilock_bat name: "Nuki Battery Level" door_sensor: name: "Nuki Door Sensor" door_sensor_state: name: "Nuki Door Sensor State"
See here: https://github.com/uriyacovy/ESPHome_nuki_lock/issues/51#issuecomment-2273675395
Hello,
my projekt compiles with board: "esp32dev" but the linker fails with board: seeed_xiao_esp32c3 Would you have any hint what to look at ?
board: seeed_xiao_esp32c3
board: "esp32dev"
Code: