-
-
Notifications
You must be signed in to change notification settings - Fork 114
Lock using static libraries *.a #326
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
Comments
Hi, Check out the readme in https://github.com/BoschSensortec/BSEC-Arduino-library |
Hi @luluv1 , This will produce a Let me know if it works or there's any improvement! |
Thank you @facchinm , I did all the steps. Using a foo.cpp, it creates a foo.a in the tmp folder. I attach the library created using dot_a_linkage -> libfoo.zip Thank you very much for your help, |
Hi @luluv1 , |
Hi @facchinm , You are right, it works fine. My mistake when I create the foo library on my own. Also, I find another interesting point. (Which is maybe obvious for you) Thank you for your help. |
Hello,
I would like to link a static library into my Arduino project. I have tested it for SAMD and AVR respectively ( Arduino Uno et Arduino Zero)
I have already read this topics:
https://arduino.stackexchange.com/questions/57891/how-to-use-a-precompiled-library-in-a-project-with-arduino-ide
https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5:-Library-specification#libraryproperties-file-format
arduino/Arduino#4336
I follow the instruction in order to add static library, then I can see it in the Contributed library (attached file)
Here is the source code of my compiled library :
int foo(void) { return 1; }
Then, I create a library using ar tool.
I create a repo called foo which include
-/src
---foo.h
---/{architecture_mcu_name}
-----libfoo.a
My foo.h contain the function prototype : int foo(void);
FInally I create the ino project, include the library....
Link with the library is done because if I want to link a libfoo.a from a dismatch architecture I got an error.
Hence, there is no compilation error, no link error but when i call the function foo(); I am lock, the print FOOFOOFOOFOO is never done.
Any idea ?
Thank you
PS: this is a simple example in order to reproduce the problem, can be done with avr-gcc or arm-none-eabi-gcc
The text was updated successfully, but these errors were encountered: