platformio / platform-espressif32

Espressif 32: development platform for PlatformIO
https://registry.platformio.org/platforms/platformio/espressif32
Apache License 2.0
938 stars 636 forks source link

ESPIDF provided zigbee example can't find zboss_* components #1240

Open asward opened 1 year ago

asward commented 1 year ago

I created an espidf project through the espidf tooling. Demonstrated to myself that this example project would build through a container. Since the container is a bit finicky about USB I wanted to explore using platformio w/ espidf framework directly.

I created an espidf project for my board through the platformio ui in vscode, then copied in the simple project files from the espidf generated example. Ran menuconfig and ensured zigbee component was enabled. Built the project and I get the following error:

Linking .pio\build\esp32-c6-devkitm-1\firmware.elf
XXX/riscv32-esp-elf/bin/ld.exe: cannot find -lzboss_stack.zczr: No such file or directory
XXX/riscv32-esp-elf/bin/ld.exe: cannot find -lzboss_port: No such file or directory
collect2.exe: error: ld returned 1 exit status
*** [.pio\build\esp32-c6-devkitm-1\firmware.elf] Error 1

A little research shows this is an espressif provided component. The platformio documentation says to drop the component code in the a 'components' folder in the root of the project. After doing this, I still have the same error.

I've tried w/ and w/o the CMakeLists.txt modification to specify the components directory.

pio.ini

[platformio]
src_dir = main

[env:esp32-c6-devkitm-1]
platform = espressif32
framework = espidf
board = esp32-c6-devkitm-1

Directory layout image

Worth a note the espressif component manager still runs and brings in the zboss 3.0 lib from espressifs github. This is placed in a 'managed_components' directory at the root level. If the idf_components.yaml is removed this doesn't occur (as expected).

Any help would be appreciated. Thanks!

Jason2866 commented 1 year ago

You have to add a YML file. Example https://github.com/Jason2866/Arduino_IDF_LittleFS/blob/main/src/idf_component.yml This project is an example for using components via the component manager. Read the readme from this repo ;-)

Here is how the Arduino adds the zigbee components https://github.com/espressif/arduino-esp32/blob/master/idf_component.yml

valeros commented 12 months ago

Hi @asward, please retest your project with the latest platform version from the development branch that supports IDF 5.1.2:

[platformio]
src_dir = main

[env:esp32-c6-devkitm-1]
platform = https://github.com/platformio/platform-espressif32.git
framework = espidf
board = esp32-c6-devkitm-1
stale[bot] commented 8 months ago

This issue has been automatically marked as stale because it has not had recent activity. Please provide more details or it will be closed if no further activity occurs. Thank you for your contributions.