|
3 | 3 | # For more info: |
4 | 4 | # https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification |
5 | 5 |
|
6 | | -name=Arduino Zephyr Boards (llext) |
| 6 | +name=Arduino Zephyr Boards |
7 | 7 | version=9.9.9 |
8 | 8 |
|
9 | 9 | # Compile variables |
@@ -55,13 +55,21 @@ upload.extension=elf-zsk.bin |
55 | 55 | build.ldscript.path={runtime.platform.path}/variants/_ldscripts |
56 | 56 | build.link_command="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" "-L{build.variant.path}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} {build.extra_flags} {build.extra_ldflags} {compiler.zephyr.common_ldflags} --specs=picolibc.specs --specs=nosys.specs {compiler.ldflags} {object_files} -Wl,--start-group "{build.path}/{archive_file}" {compiler.zephyr.extra_ldflags} {compiler.libraries.ldflags} -Wl,--end-group {build.link_args.{build.link_mode}} |
57 | 57 |
|
| 58 | +build.check_command-dynamic={build.link_command} {build.link_args.check-dynamic} -o "{build.path}/{build.project_name}_check.tmp" |
| 59 | +build.check_command-static=/bin/true |
| 60 | +build.check_command-static.windows=cmd /C cd . |
| 61 | +build.combine_command={build.link_command} {build.link_args.build-{build.link_mode}} {build.link_args.build-common} |
| 62 | + |
58 | 63 | # link_args.* are included by any link_command depending on the link_mode |
59 | 64 | build.link_args.dynamic=-e main |
60 | 65 | build.link_args.static=-lc -lm -lgcc -Wl,--wrap=random -Wl,--wrap=calloc -Wl,--wrap=free -Wl,--wrap=malloc -Wl,--wrap=realloc |
61 | 66 |
|
| 67 | +# link_args.check-* are used to check the build. Only LLEXT needs these to emulate a static build (no -r!). |
| 68 | +build.link_args.check-dynamic="-T{build.variant.path}/syms-dynamic.ld" "-T{build.ldscript.path}/memory-check.ld" "-T{build.ldscript.path}/build-static.ld" |
| 69 | + |
62 | 70 | # link_args.build-* are used to create the final binary. -common are added to both static and dynamic. |
63 | | -build.link_args.build-dynamic="-T{build.ldscript.path}/dynamic.ld" -r |
64 | | -build.link_args.build-static="-T{build.variant.path}/provides.ld" "-T{build.ldscript.path}/static.ld" |
| 71 | +build.link_args.build-dynamic="-T{build.ldscript.path}/build-dynamic.ld" -r |
| 72 | +build.link_args.build-static="-T{build.variant.path}/syms-static.ld" "-T{build.ldscript.path}/memory-static.ld" "-T{build.ldscript.path}/build-static.ld" |
65 | 73 | build.link_args.build-common="-Wl,-Map,{build.path}/{build.project_name}.map" -o "{build.path}/{build.project_name}_debug.elf" |
66 | 74 |
|
67 | 75 | # zsk_args are used to create the final binary with zephyr-sketch-tool |
@@ -109,7 +117,9 @@ recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DARDUIN |
109 | 117 | recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}" |
110 | 118 |
|
111 | 119 | ## Combine gc-sections, archives, and objects |
112 | | -recipe.c.combine.pattern={build.link_command} {build.link_args.build-{build.link_mode}} {build.link_args.build-common} |
| 120 | +recipe.c.combine.1.pattern={build.check_command-{build.link_mode}} |
| 121 | +recipe.c.combine.2.pattern={build.combine_command} |
| 122 | +recipe.c.combine.pattern={build.combine_command} |
113 | 123 | recipe.hooks.linking.postlink.1.pattern="{compiler.path}{build.crossprefix}strip" --strip-debug "{build.path}/{build.project_name}_debug.elf" -o "{build.path}/{build.project_name}.elf" |
114 | 124 |
|
115 | 125 | ## Create eeprom |
|
0 commit comments