Skip to content

How to link static libraries into arduino code? #1426

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

Closed
sysizlayan opened this issue May 23, 2018 · 3 comments
Closed

How to link static libraries into arduino code? #1426

sysizlayan opened this issue May 23, 2018 · 3 comments

Comments

@sysizlayan
Copy link

Hardware:

Board: ESP32 Dev Module
Core Installation/update date: Manually updated every day, always using last master
IDE name: Arduino IDE
Flash Frequency: 80Mhz
Upload Speed: 921600

Description:

Hi, I am curerntly working on IOT project and I need to link BSEC library for BME680 sensor. Library link is given below.
https://www.bosch-sensortec.com/bst/products/all_products/bsec
This library is compiled for many processor architectures and ESP32 is one of them. However Arduino libraries does not contain ESP32. So I needed to link static ".a" library to my arduino sketch.
Is it possible? Where should I place the ".a" file and which files should I edit to be able link this file to my sketch.

In short, how can one link a static libraries to project?

@sysizlayan
Copy link
Author

I have used the methods mentioned in
arduino/Arduino#4336
Changed, platform.txt and libraries required files as said in documents in BSEC.
Arduino builder is also changed to PR219 version, this allows arduino to be able link precompiled libraries.

@jttaylor86
Copy link

Where is the arduino builder saved?

@Anupam7219
Copy link

Please find simple steps for using custom build ESP32 Static lib(.a) file in Arduino IDE.

  1. Open ld_libs file in “C:\Users\XXY\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32s3\flags”

  2. Add your static lib file name in file (Example: Hellolib)

Image

  1. Copy custom buid external lib file in “C:\Users\XYZ\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-632e0c2a\esp32s3\lib” location.

Image

Build project from IDE.

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

No branches or pull requests

3 participants