Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Component with pre-built library and one level above the project root #1230

Closed
jacque99 opened this issue Nov 10, 2023 · 5 comments
Closed

Comments

@jacque99
Copy link

jacque99 commented Nov 10, 2023

Hello,

I have ESP32 S3 project and I am aiming to hold my generic components one level above the project root.
Project structure is as below.
- components
- zmod4xxx (component directory)
- common
- sensor
- wifi
- project_root
- src

Now, issue is that when I compile project it says "undefined reference to `init_iaq_2nd_gen'". This function is from the
zmod4xxx component which contains a pre-built binary file "lib_iaq_2nd_gen.a".
Please note that if I copy components folder to same level as project root where platformio.ini exists, then it compiles without any error.

I suppose zmod4xxxx component is ESP-IDF components, therefore I declared it in the CMakeLists.txt as below, according to the document.

    cmake_minimum_required(VERSION 3.16.0)
    include($ENV{IDF_PATH}/tools/cmake/project.cmake)
    list(APPEND EXTRA_COMPONENT_DIRS ../components)
    project(esp32s3_wo_pm)

Also I declared components folder in the platformio.ini lib_extra_dirs.

lib_extra_dirs =
    ../../common/esp-idf-lib/components
    ../../common/components
    ../components
    ../common

Please help me to find an issue. Below is my project folder.
https://github.com/jacque99/iaq_zmod4xxx.git

Thank you and best regards,
Lhagva

@valeros
Copy link
Member

valeros commented Nov 13, 2023

Thanks for reporting, should be fixed in the development branch.

@jacque99
Copy link
Author

Hello, thank you very much for your reply.
I have created develop branch, please fix there.

@valeros
Copy link
Member

valeros commented Nov 14, 2023

It's already fixed in this repository, you can pull the latest version directly in your platformio.ini:

[env:esp32-s3-devkitc-1]
platform = https://github.com/platformio/platform-espressif32.git
board = esp32-s3-devkitc-1
framework = espidf

@jacque99
Copy link
Author

Thank you for fixing it, it works perfectly.
Do you recommend updating the platform-espressif32? If yes please tell me which version I shall update.
I would be happy if you provide me with a link guiding for an update.

@valeros
Copy link
Member

valeros commented Nov 14, 2023

Currently, the upstream version of the platform from the repository is the only way to obtain the fix. When a new release is published you will be able to update it automatically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants