Open Corjan85 opened 6 years ago
My library.properties:
name=SI Custom Device
version=1.0.0
author=Sim Innovations
maintainer=Sim Innovations <corjan@siminnovations.com>
sentence=Allows to couple custom Arduino projects to Air Manager or Air Player
paragraph=TODO
category=Device Control
url=https://www.siminnovations.com
architectures=*
precompiled=true
ldflags=-lHWLib -lHWLibDriver -lSiBase
I believe this has been reported to the SAM and SAMD cores but not yet regarding the AVR core: https://github.com/arduino/ArduinoCore-sam/issues/46 https://github.com/arduino/ArduinoCore-samd/issues/278
Hi, Thanks for your quick response, and sorry about the other threads. I should have searched better.
Just checked the platform.txt in the ArduinoCore-avr github, but that platform.txt does not seem to be correct (just yet).
I believe line 68 should be replaced by this line:
recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} -mmcu={build.mcu} -o "{build.path}/{build.project_name}.elf" {object_files} {compiler.c.elf.extra_flags} "{build.path}/{archive_file}" "-L{build.path}" -lm
The link order would be:
That way a precompiled library can also use features from the ArduinoCore library.
Corjan
Hi, I just tried the upcoming precompiled library feature. I love it, but I noticed a possible bug.
I created a sketch with my own 3 libraries included (HWLib HWLibDriver SiBase), but I kept getting undefined reference errors while linking.
While diving into the problem I noticed the reason:
Link command:
Error:
Notice that my libraries are included before the object files of the sketch itself. Since ordering is very important during linking, this is causing the problem
Changing it to this fixes it:
I'm sorry if I am repeating a known bug.
Corjan