-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Issue while adding precompile archive #10473
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 @thetechguy2016 , Please not that IDE 1.8.12 had a very serious bug in precompiled libraries handling and should be updated |
hi @facchinm Thanks for your prior response , earlier i was using Arduino 1.8.10 now i just update it to 1.8.13 but the issue is still the same, can you just check my side if possible to resolve. i am using macos is there any issue with that anyway? |
Sorry, my fault, I didn't check if the cpp was still in the library.
Adding the flag in From 527f5c6df2c51b023cfd5dfd0cd9def996b4a805 Mon Sep 17 00:00:00 2001
From: Martino Facchin <[email protected]>
Date: Mon, 6 Jul 2020 11:10:17 +0200
Subject: [PATCH] Enable precompiled libs
---
platform.txt | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/platform.txt b/platform.txt
index 6c0a8910..f7aa7b5c 100644
--- a/platform.txt
+++ b/platform.txt
@@ -80,6 +80,7 @@ compiler.cpp.extra_flags=
compiler.ar.extra_flags=
compiler.objcopy.eep.extra_flags=
compiler.elf2hex.extra_flags=
+compiler.libraries.ldflags=
## generate file with git version number
## needs bash, git, and echo
@@ -102,7 +103,7 @@ recipe.S.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.cpreprocessor.fla
recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}"
## Combine gc-sections, archives, and objects
-recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {build.exception_flags} -Wl,-Map "-Wl,{build.path}/{build.project_name}.map" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} -o "{build.path}/{build.project_name}.elf" -Wl,--start-group {object_files} "{archive_file_path}" {compiler.c.elf.libs} -Wl,--end-group "-L{build.path}"
+recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {build.exception_flags} -Wl,-Map "-Wl,{build.path}/{build.project_name}.map" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} -o "{build.path}/{build.project_name}.elf" -Wl,--start-group {object_files} "{archive_file_path}" {compiler.c.elf.libs} {compiler.libraries.ldflags} -Wl,--end-group "-L{build.path}"
## Create eeprom
recipe.objcopy.eep.pattern=
--
2.27.0
@per1234 I think we already documented this but I don't remember where... Do you have any idea 🙂 ? |
@facchinm I don't believe it was previously documented, but I have now added it to the Arduino platform specification: arduino/arduino-cli#840 Since my understanding is that this issue was left open due to the need to make sure this is documented, I'll close it as fixed.
@thetechguy2016 here it is: arduino/arduino-builder@ffe9669 |
Hello everyone
i want to create a library but want to use it with archive file.
i create a test library and i got some error while compile.
Steps, I followed:
test.h file
test.cpp
test.ino file
I compile the code with
dot_a_linkage=true
then i will get thetest.a
file in temporary folder .now i delete the
test.cpp
file and addtest.a
file inside the esp8266 folder as mentioned above.and change the
test.a
file name tolibtest.a
now i compile the code with this
library.properties
, but nothing worksPlease help me out i have tried for more than 5 days still got error.
my test library is attached to this issue.
test.zip
The text was updated successfully, but these errors were encountered: