Skip to content

Commit c3c38a8

Browse files
authored
Enable precompiled libraries (#4209)
The latest versions of Arduino IDE shifted the responsibility for precompiled libraries support to the core developers, which breaks precompiled library support in esp32 Arduino core. See arduino/ArduinoCore-avr#52 for more details: ``` In this new version of the builder we are not doing any heuristics to find the right spot where the ldflags should be inserted (this was causing many bugs on its own); instead, we fully trust the core makers to add explicit support to precompiled libs. ``` This chage re-enables precompiled library support in the esp32 Arduino core.
1 parent 8fcc914 commit c3c38a8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Diff for: platform.txt

+3-1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ compiler.ar.flags=cru
4444

4545
compiler.size.cmd=xtensa-esp32-elf-size
4646

47+
compiler.libraries.ldflags=
48+
4749
# This can be overriden in boards.txt
4850
build.flash_size=4MB
4951
build.flash_mode=dio
@@ -82,7 +84,7 @@ recipe.S.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.cpreprocessor.fla
8284
recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}"
8385

8486
## Combine gc-sections, archives, and objects
85-
recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} -Wl,--start-group {object_files} "{archive_file_path}" {compiler.c.elf.libs} {compiler.libraries.ldflags} -Wl,--end-group -Wl,-EL -o "{build.path}/{build.project_name}.elf"
87+
recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} {compiler.libraries.ldflags} -Wl,--start-group {object_files} "{archive_file_path}" {compiler.c.elf.libs} -Wl,--end-group -Wl,-EL -o "{build.path}/{build.project_name}.elf"
8688

8789
## Create eeprom
8890
recipe.objcopy.eep.pattern={tools.gen_esp32part.cmd} -q "{build.path}/partitions.csv" "{build.path}/{build.project_name}.partitions.bin"

0 commit comments

Comments
 (0)