ambiot / ambd_matter

AmebaD public SDK to support Matter project
https://www.amebaiot.com/en/
10 stars 9 forks source link

Build unsuccessful with light_switch example #109

Closed lecontr2 closed 6 months ago

lecontr2 commented 6 months ago

Hi everyone, I'm currently working on the TE_24_01/rc1 release using the 0ff709f25f6a7af68314c1b0a147a76c30c234f6 SHA for connectedhome. I attempted to build the light_switch example as directed on the Matter.md resource page but I was unable to complete the final step to build project_hp during the linking step. Was something updated that needs to be addressed on the app side?

========= linker img2_ns start ========= /home/lecontr1/workspace/ambd_matter/project/realtek_amebaD_va0_example/GCC-RELEASE/project_hp/asdk/../toolchain/linux/asdk-10.3.0/linux/newlib/bin/arm-none-eabi-gcc -L/home/lecontr1/workspace/ambd_matter/project/realtek_amebaD_va0_example/GCC-RELEASE/project_hp/asdk/../toolchain/linux/asdk-10.3.0/linux/newlib/lib/ -L/home/lecontr1/workspace/ambd_matter/project/realtek_amebaD_va0_example/GCC-RELEASE/project_hp/asdk/lib/ -L/home/lecontr1/workspace/ambd_matter/project/realtek_amebaD_va0_example/GCC-RELEASE/project_hp/asdk/lib/application -T/home/lecontr1/workspace/ambd_matter/project/realtek_amebaD_va0_example/GCC-RELEASE/project_hp/asdk/build/rlx8721d.ld -Os -march=armv8-m.main+dsp -mthumb -mcmse -mfloat-abi=hard -mfpu=fpv5-sp-d16 -nostartfiles -specs nosys.specs -Wl,--gc-sections -Wl,--warn-section-align -Wl,-Map=text.map -Wl,--cref -Wl,--build-id=none -save-temps -Wl,--no-enum-size-warning -Wl,--warn-common -o target_img2.axf ./build/ram/*.o /home/lecontr1/workspace/ambd_matter/project/realtek_amebaD_va0_example/GCC-RELEASE/project_hp/asdk/../../../../../component/common/bluetooth/realtek/sdk/board/amebad/lib/btgap.a /home/lecontr1/workspace/ambd_matter/project/realtek_amebaD_va0_example/GCC-RELEASE/project_hp/asdk/lib/application/lib_cmsis_dsp.a /home/lecontr1/workspace/ambd_matter/project/realtek_amebaD_va0_example/GCC-RELEASE/project_hp/asdk/lib/application/lib_application_hp.a /home/lecontr1/workspace/ambd_matter/project/realtek_amebaD_va0_example/GCC-RELEASE/project_hp/asdk/lib/application/lib_httpc.a /home/lecontr1/workspace/ambd_matter/project/realtek_amebaD_va0_example/GCC-RELEASE/project_hp/asdk/lib/application/lib_httpd.a /home/lecontr1/workspace/ambd_matter/project/realtek_amebaD_va0_example/GCC-RELEASE/project_hp/asdk/lib/application/lib_mdns.a /home/lecontr1/workspace/ambd_matter/project/realtek_amebaD_va0_example/GCC-RELEASE/project_hp/asdk/lib/application/lib_websocket.a /home/lecontr1/workspace/ambd_matter/project/realtek_amebaD_va0_example/GCC-RELEASE/project_hp/asdk/lib/application/lib_tftp.a /home/lecontr1/workspace/ambd_matter/project/realtek_amebaD_va0_example/GCC-RELEASE/project_hp/asdk/lib/application/lib_dct.a /home/lecontr1/workspace/ambd_matter/project/realtek_amebaD_va0_example/GCC-RELEASE/project_hp/asdk/lib/application/lib_coap.a /home/lecontr1/workspace/ambd_matter/project/realtek_amebaD_va0_example/GCC-RELEASE/project_hp/asdk/lib/application/lib_eap.a /home/lecontr1/workspace/ambd_matter/project/realtek_amebaD_va0_example/GCC-RELEASE/project_hp/asdk/lib/application/lib_wlan.a /home/lecontr1/workspace/ambd_matter/project/realtek_amebaD_va0_example/GCC-RELEASE/project_hp/asdk/lib/application/lib_wps.a -Wl,--start-group -Wl,--whole-archive /home/lecontr1/workspace/ambd_matter/project/realtek_amebaD_va0_example/GCC-RELEASE/project_hp/asdk/lib/application/lib_main.a -Wl,--no-whole-archive /home/lecontr1/workspace/ambd_matter/project/realtek_amebaD_va0_example/GCC-RELEASE/project_hp/asdk/lib/application/libCHIP.a -Wl,--end-group -lm -lstdc++ /home/lecontr1/workspace/ambd_matter/project/realtek_amebaD_va0_example/GCC-RELEASE/project_hp/toolchain/linux/asdk-10.3.0/linux/newlib/bin/../lib/gcc/arm-none-eabi/10.3.0/../../../../arm-none-eabi/bin/ld: warning: start of section .glue_7 changed by 2 /home/lecontr1/workspace/ambd_matter/project/realtek_amebaD_va0_example/GCC-RELEASE/project_hp/toolchain/linux/asdk-10.3.0/linux/newlib/bin/../lib/gcc/arm-none-eabi/10.3.0/../../../../arm-none-eabi/bin/ld: warning: start of section .glue_7t changed by 2 /home/lecontr1/workspace/ambd_matter/project/realtek_amebaD_va0_example/GCC-RELEASE/project_hp/toolchain/linux/asdk-10.3.0/linux/newlib/bin/../lib/gcc/arm-none-eabi/10.3.0/../../../../arm-none-eabi/bin/ld: warning: start of section .vfp11_veneer changed by 2 /home/lecontr1/workspace/ambd_matter/project/realtek_amebaD_va0_example/GCC-RELEASE/project_hp/toolchain/linux/asdk-10.3.0/linux/newlib/bin/../lib/gcc/arm-none-eabi/10.3.0/../../../../arm-none-eabi/bin/ld: warning: start of section .v4_bx changed by 2 /home/lecontr1/workspace/ambd_matter/project/realtek_amebaD_va0_example/GCC-RELEASE/project_hp/toolchain/linux/asdk-10.3.0/linux/newlib/bin/../lib/gcc/arm-none-eabi/10.3.0/../../../../arm-none-eabi/bin/ld: warning: start of section .iplt changed by 2 /home/lecontr1/workspace/ambd_matter/project/realtek_amebaD_va0_example/GCC-RELEASE/project_hp/toolchain/linux/asdk-10.3.0/linux/newlib/bin/../lib/gcc/arm-none-eabi/10.3.0/../../../../arm-none-eabi/bin/ld: warning: start of section .image2.net.ram.image2.ram.text changed by 2 /home/lecontr1/workspace/ambd_matter/project/realtek_amebaD_va0_example/GCC-RELEASE/project_hp/toolchain/linux/asdk-10.3.0/linux/newlib/bin/../lib/gcc/arm-none-eabi/10.3.0/../../../../arm-none-eabi/bin/ld: warning: start of section .ram_image2.bss changed by 16 /home/lecontr1/workspace/ambd_matter/project/realtek_amebaD_va0_example/GCC-RELEASE/project_hp/toolchain/linux/asdk-10.3.0/linux/newlib/bin/../lib/gcc/arm-none-eabi/10.3.0/../../../../arm-none-eabi/bin/ld: warning: start of section .rel.dyn changed by 1 /home/lecontr1/workspace/ambd_matter/project/realtek_amebaD_va0_example/GCC-RELEASE/project_hp/toolchain/linux/asdk-10.3.0/linux/newlib/bin/../lib/gcc/arm-none-eabi/10.3.0/../../../../arm-none-eabi/bin/ld: /home/lecontr1/workspace/ambd_matter/project/realtek_amebaD_va0_example/GCC-RELEASE/project_hp/asdk/lib/application/lib_main.a(icd-management-server.o): in function(anonymous namespace)::IcdManagementFabricDelegate::OnFabricRemoved(chip::FabricTable const&, unsigned char)': /home/lecontr1/workspace/ambd_matter/project/realtek_amebaD_va0_example/GCC-RELEASE/project_hp/asdk/../../../../../third_party/connectedhomeip/src/app/clusters/icd-management-server/icd-management-server.cpp:179: undefined reference to chip::app::ICDNotifier::NotifyICDManagementEvent(chip::app::ICDListener::ICDManagementEvents)' /home/lecontr1/workspace/ambd_matter/project/realtek_amebaD_va0_example/GCC-RELEASE/project_hp/toolchain/linux/asdk-10.3.0/linux/newlib/bin/../lib/gcc/arm-none-eabi/10.3.0/../../../../arm-none-eabi/bin/ld: /home/lecontr1/workspace/ambd_matter/project/realtek_amebaD_va0_example/GCC-RELEASE/project_hp/asdk/../../../../../third_party/connectedhomeip/src/app/clusters/icd-management-server/icd-management-server.cpp:180: undefined reference tochip::app::ICDNotifier::sICDNotifier' /home/lecontr1/workspace/ambd_matter/project/realtek_amebaD_va0_example/GCC-RELEASE/project_hp/toolchain/linux/asdk-10.3.0/linux/newlib/bin/../lib/gcc/arm-none-eabi/10.3.0/../../../../arm-none-eabi/bin/ld: /home/lecontr1/workspace/ambd_matter/project/realtek_amebaD_va0_example/GCC-RELEASE/project_hp/asdk/lib/application/lib_main.a(icd-management-server.o): in function MatterIcdManagementPluginServerInitCallback()': /home/lecontr1/workspace/ambd_matter/project/realtek_amebaD_va0_example/GCC-RELEASE/project_hp/asdk/../../../../../third_party/connectedhomeip/src/app/clusters/icd-management-server/icd-management-server.cpp:430: undefined reference tochip::ICDConfigurationData::instance' collect2: error: ld returned 1 exit status make[1]: [Makefile:503: linker_image2_ns] Error 1 make[1]: Leaving directory '/home/lecontr1/workspace/ambd_matter/project/realtek_amebaD_va0_example/GCC-RELEASE/project_hp/asdk' make: [Makefile:17: all] Error 2`

xshuqun commented 6 months ago

Hi @lecontr2 , please use this branch TE_24_01/rc1_new for ambd_matter, while connectedhomeip remains in TE_24_01/rc1 tag. Apparently, we missed out several fixes which caused build issues in TE_24_01/rc1.

lecontr2 commented 6 months ago

Oh excellent! I'm able to make a build now. Do you know how to enable the Matter shell to activate the switch from console?

xshuqun commented 6 months ago

On default the matter shell must be enabled for light switch, it seems that the configuration wasn't added. Please pull the branch TE_24_01/rc1_new and use commit e95e7a38c8b5a7522c7cba23c679b32fbce56aee. After the device has been bootup, use AT command to use matter shell for switch control: ATMS=switch image

lecontr2 commented 6 months ago

Okay, that seemed to have worked! Thank you very much! 😄