|
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,20 @@ 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= |
| 60 | +build.combine_command={build.link_command} {build.link_args.build-{build.link_mode}} {build.link_args.build-common} |
| 61 | + |
58 | 62 | # link_args.* are included by any link_command depending on the link_mode
|
59 | 63 | build.link_args.dynamic=-e main
|
60 |
| -build.link_args.static=-lc -lm -lgcc -L{build.variant.path} -Wl,--wrap=random -Wl,--wrap=calloc -Wl,--wrap=free -Wl,--wrap=malloc -Wl,--wrap=realloc |
| 64 | +build.link_args.static=-lc -lm -lgcc -L{build.variant.path} -Wl,--wrap=random -Wl,--wrap=calloc -Wl,--wrap=free -Wl,--wrap=malloc -Wl,--wrap=realloc |
| 65 | + |
| 66 | +# link_args.check-* are used to check the build. Only LLEXT needs these to emulate a static build (no -r!). |
| 67 | +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" |
61 | 68 |
|
62 | 69 | # 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" |
| 70 | +build.link_args.build-dynamic="-T{build.ldscript.path}/build-dynamic.ld" -r |
| 71 | +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 | 72 | build.link_args.build-common="-Wl,-Map,{build.path}/{build.project_name}.map" -o "{build.path}/{build.project_name}_debug.elf"
|
66 | 73 |
|
67 | 74 | # zsk_args are used to create the final binary with zephyr-sketch-tool
|
@@ -109,7 +116,9 @@ recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DARDUIN
|
109 | 116 | recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}"
|
110 | 117 |
|
111 | 118 | ## 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} |
| 119 | +recipe.c.combine.1.pattern={build.check_command-{build.link_mode}} |
| 120 | +recipe.c.combine.2.pattern={build.combine_command} |
| 121 | +recipe.c.combine.pattern={build.combine_command} |
113 | 122 | 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 | 123 |
|
115 | 124 | ## Create eeprom
|
|
0 commit comments