Yacubane / esp32-arduino-matter

Matter IoT protocol library for ESP32 working on Arduino framework
Apache License 2.0
314 stars 31 forks source link

compilation error #22

Closed phil31 closed 1 year ago

phil31 commented 1 year ago

Dear all, i try to compile the "light" example .

plateformio.ini is :

[env:adafruit_qtpy_esp32c3]
platform = espressif32@6.1.0
board = adafruit_qtpy_esp32c3
framework = arduino
build_unflags = -std=gnu++11
build_flags = -std=gnu++17
board_build.partitions = min_spiffs.csv
imported lib matter in the directory lib/matter
compilation is working but not linking :

c:/users/phil/.platformio/packages/toolchain-riscv32-esp@8.4.0+2021r2-patch5/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld.exe: D:\WIFIPOWER\Matter\Matter/src/main.cpp:93: undefined reference to esp_matter::attribute::get_val(unsigned int*, esp_matter_attr_val_t*)' c:/users/phil/.platformio/packages/toolchain-riscv32-esp@8.4.0+2021r2-patch5/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld.exe: .pio\build\adafruit_qtpy_esp32c3\src\main.cpp.o: in function set_onoff_attribute_value(esp_matter_attr_val_t*)':
D:\WIFIPOWER\Matter\Matter/src/main.cpp:99: undefined reference to `esp_matter::attribute::update(unsigned short, unsigned long, unsigned long, esp_matter_attr_val_t*)'
collect2.exe: error: ld returned 1 exit status
[.pio\build\adafruit_qtpy_esp32c3\firmware.elf] Error 1

any advice please ? thanks

Yacubane commented 1 year ago

Hi, I tested it today and can confirm same problem. I'm looking at this. Edit: it looks like v1.0.0-beta.1 works fine, but beta.2 not

Yacubane commented 1 year ago

Actually, I did not look at this error correctly and I had different but quite similar error. I fixed this in 1.0.0-beta.3-branch, could you confirm if that works?

phil31 commented 1 year ago

Not realy better :

Regards

Phil

De : Jakub Dybczak @.> Envoyé : lundi 20 mars 2023 22:27 À : jakubdybczak/esp32-arduino-matter @.> Cc : phil31 @.>; Author @.> Objet : Re: [jakubdybczak/esp32-arduino-matter] compilation error (Issue #22)

Actually, I did not look at this error correctly and I had different but quite similar error. I fixed this in 1.0.0-beta.3-branch https://github.com/jakubdybczak/esp32-arduino-matter/tree/1.0.0-beta.3-branch , could you confirm if that works?

— Reply to this email directly, view it on GitHub https://github.com/jakubdybczak/esp32-arduino-matter/issues/22#issuecomment-1476957376 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ACJOE2RRGVBR4IKZGJ7CSITW5DDQ5ANCNFSM6AAAAAAWAIS7JI . You are receiving this because you authored the thread. https://github.com/notifications/beacon/ACJOE2QN2HPHTAE3S5ZN7D3W5DDQ5A5CNFSM6AAAAAAWAIS7JKWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTSYBCKMA.gif Message ID: @. @.> >

Yacubane commented 1 year ago

I just tried and compiled successfully light example with this config:

[env:esp32dev]
platform = espressif32@6.1.0
board = adafruit_qtpy_esp32c3
board_build.mcu = esp32c3
framework = arduino
build_unflags = -std=gnu++11
build_flags = -std=gnu++17
board_build.partitions = min_spiffs.csv
lib_deps = https://github.com/jakubdybczak/esp32-arduino-matter.git#1.0.0-beta.3-branch
monitor_speed = 115200

Could you send your project so I can debug it?

phil31 commented 1 year ago

Not working on my side, the only difference is that i import the matter lib directly in lib directory because i don’t have GIT on my PC.

You can download the project here : https://transfert.free.fr/thDsAIY

Thanks, regards

De : Jakub Dybczak @.> Envoyé : mardi 21 mars 2023 08:57 À : jakubdybczak/esp32-arduino-matter @.> Cc : phil31 @.>; Author @.> Objet : Re: [jakubdybczak/esp32-arduino-matter] compilation error (Issue #22)

I just tried and compiled successfully light example with this config:

[env:esp32dev] platform = @. @.> board = adafruit_qtpy_esp32c3 board_build.mcu = esp32c3 framework = arduino build_unflags = -std=gnu++11 build_flags = -std=gnu++17 board_build.partitions = min_spiffs.csv lib_deps = https://github.com/jakubdybczak/esp32-arduino-matter.git#1.0.0-beta.3-branch monitor_speed = 115200

Could you send your project so I can debug it?

— Reply to this email directly, view it on GitHub https://github.com/jakubdybczak/esp32-arduino-matter/issues/22#issuecomment-1477406094 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ACJOE2XA5IOZCTZZRS63EGLW5FNOHANCNFSM6AAAAAAWAIS7JI . You are receiving this because you authored the thread. https://github.com/notifications/beacon/ACJOE2RXR7ATZCU3AADP6SDW5FNOHA5CNFSM6AAAAAAWAIS7JKWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTSYB5WY4.gif Message ID: @. @.> >

phil31 commented 1 year ago

Hello Jakub,

Did you do a test with my project ?

Working on your side ?

Thanks, regards

De : Jakub Dybczak @.> Envoyé : mardi 21 mars 2023 08:57 À : jakubdybczak/esp32-arduino-matter @.> Cc : phil31 @.>; Author @.> Objet : Re: [jakubdybczak/esp32-arduino-matter] compilation error (Issue #22)

I just tried and compiled successfully light example with this config:

[env:esp32dev] platform = @. @.> board = adafruit_qtpy_esp32c3 board_build.mcu = esp32c3 framework = arduino build_unflags = -std=gnu++11 build_flags = -std=gnu++17 board_build.partitions = min_spiffs.csv lib_deps = https://github.com/jakubdybczak/esp32-arduino-matter.git#1.0.0-beta.3-branch monitor_speed = 115200

Could you send your project so I can debug it?

— Reply to this email directly, view it on GitHub https://github.com/jakubdybczak/esp32-arduino-matter/issues/22#issuecomment-1477406094 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ACJOE2XA5IOZCTZZRS63EGLW5FNOHANCNFSM6AAAAAAWAIS7JI . You are receiving this because you authored the thread. https://github.com/notifications/beacon/ACJOE2RXR7ATZCU3AADP6SDW5FNOHA5CNFSM6AAAAAAWAIS7JKWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTSYB5WY4.gif Message ID: @. @.> >

Yacubane commented 1 year ago

I will look at this on weekend

Yacubane commented 1 year ago

The problem is with your project structure, you copied src folder from this library to lib/matter folder. Proper structure is image.

Tip: you can go to lib folder, clear the stuff here and type git clone --depth 1 --branch 1.0.0-beta.3-branch https://github.com/jakubdybczak/esp32-arduino-matter and that will be enough ;)

phil31 commented 1 year ago

Thanks Jakub, regards

De : Jakub Dybczak @.> Envoyé : samedi 25 mars 2023 12:02 À : jakubdybczak/esp32-arduino-matter @.> Cc : phil31 @.>; Author @.> Objet : Re: [jakubdybczak/esp32-arduino-matter] compilation error (Issue #22)

The problem is with your project structure, you copied src folder from this library to lib/matter folder. Proper structure is https://user-images.githubusercontent.com/37028087/227713272-a77c71f3-fa60-429b-9b99-94efa5833834.png .

Tip: you can go to lib folder, clear the stuff here and type git clone --depth 1 --branch 1.0.0-beta.3-branch https://github.com/jakubdybczak/esp32-arduino-matter and that will be enough ;)

— Reply to this email directly, view it on GitHub https://github.com/jakubdybczak/esp32-arduino-matter/issues/22#issuecomment-1483795404 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ACJOE2WETGRCLVW6FRNCUZTW53GEDANCNFSM6AAAAAAWAIS7JI . You are receiving this because you authored the thread. https://github.com/notifications/beacon/ACJOE2Q3PUJ4OFQQCAIHN4DW53GEDA5CNFSM6AAAAAAWAIS7JKWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTSYODV4Y.gif Message ID: @. @.> >