@@ -17,13 +17,13 @@ compiler.warning_flags.all=-Wall -Wextra
17
17
18
18
compiler.path={build.compiler_path}
19
19
compiler.c.cmd={build.crossprefix}gcc
20
- compiler.c.flags=-g -c {compiler.warning_flags} {compiler.zephyr.macros} "@{compiler.zephyr.cflags }" {compiler.zephyr.arch.define} -MMD -mcpu={build.mcu} {build.float-abi} {build.fpu}
20
+ compiler.c.flags=-g -c {compiler.warning_flags} {compiler.zephyr.macros} "@{compiler.zephyr.cflags_file }" {compiler.zephyr.arch.define} -MMD -mcpu={build.mcu} {build.float-abi} {build.fpu}
21
21
compiler.c.elf.cmd={build.crossprefix}g++
22
22
compiler.c.elf.flags={build.llext_link_flags} -Wl,--gc-sections -mcpu={build.mcu} {build.float-abi} {build.fpu} -std=c++17
23
23
compiler.S.cmd={build.crossprefix}g++
24
24
compiler.S.flags=-c -x assembler-with-cpp -mcpu={build.mcu} {build.fpu}
25
25
compiler.cpp.cmd={build.crossprefix}g++
26
- compiler.cpp.flags=-g -Os -std=c++17 -c {compiler.warning_flags} {compiler.zephyr.macros} "@{compiler.zephyr.cxxflags }" {compiler.zephyr.common_ldflags} {compiler.zephyr.extra_ldflags} {compiler.zephyr.common_cxxflags} {compiler.zephyr.extra_cxxflags} {compiler.zephyr.arch.define} -MMD -mcpu={build.mcu} {build.float-abi} {build.fpu}
26
+ compiler.cpp.flags=-g -Os -std=c++17 -c {compiler.warning_flags} {compiler.zephyr.macros} "@{compiler.zephyr.cxxflags_file }" {compiler.zephyr.common_ldflags} {compiler.zephyr.extra_ldflags} {compiler.zephyr.common_cxxflags} {compiler.zephyr.extra_cxxflags} {compiler.zephyr.arch.define} -MMD -mcpu={build.mcu} {build.float-abi} {build.fpu}
27
27
compiler.ar.cmd={build.crossprefix}ar
28
28
compiler.ar.flags=rcs
29
29
compiler.objcopy.cmd=
@@ -36,10 +36,10 @@ compiler.libraries.ldflags=
36
36
compiler.size.cmd={build.crossprefix}size
37
37
compiler.define=-DARDUINO=
38
38
39
- compiler.zephyr.includes ={build.variant.path}/includes.txt
40
- compiler.zephyr.cflags ={build.variant.path}/cflags.txt
41
- compiler.zephyr.cxxflags ={build.variant.path}/cxxflags.txt
42
- compiler.zephyr.macros=-imacros{build.variant.path}/llext-edk/include/zephyr/include/generated/zephyr/autoconf.h -imacros{build.variant.path}/llext-edk/include/zephyr/include/zephyr/toolchain/zephyr_stdint.h
39
+ compiler.zephyr.includes_file ={build.variant.path}/includes.txt
40
+ compiler.zephyr.cflags_file ={build.variant.path}/cflags.txt
41
+ compiler.zephyr.cxxflags_file ={build.variant.path}/cxxflags.txt
42
+ compiler.zephyr.macros=" -imacros{build.variant.path}/llext-edk/include/zephyr/include/generated/zephyr/autoconf.h" " -imacros{build.variant.path}/llext-edk/include/zephyr/include/zephyr/toolchain/zephyr_stdint.h"
43
43
compiler.zephyr.common_cxxflags=-fdata-sections -ffunction-sections -fno-unwind-tables
44
44
compiler.zephyr.common_ldflags=-fno-exceptions -fno-rtti -fno-threadsafe-statics -fno-unwind-tables -fno-use-cxa-atexit -lstdc++ -lsupc++ -lnosys -nostdlib
45
45
@@ -87,20 +87,20 @@ build.zip.pattern={recipe.size.pattern}
87
87
# -----------------------
88
88
89
89
## Compile c files
90
- recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DARDUINO={runtime.ide.version} -D{build.board} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} -DARDUINO_ARCH_ZEPHYR {build.library_discovery_phase_flag} {build.extra_flags} {build.extra_ldflags} {compiler.c.extra_flags} "-I{build.core.path}/api/deprecated" "-I{build.core.path}/api/deprecated-avr-comp" {includes} "-iprefix{build.variant.path}" "@{compiler.zephyr.includes }" -o "{object_file}" "{source_file}"
90
+ recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -DARDUINO={runtime.ide.version} -D{build.board} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} -DARDUINO_ARCH_ZEPHYR {build.library_discovery_phase_flag} {build.extra_flags} {build.extra_ldflags} {compiler.c.extra_flags} "-I{build.core.path}/api/deprecated" "-I{build.core.path}/api/deprecated-avr-comp" {includes} "-iprefix{build.variant.path}" "@{compiler.zephyr.includes_file }" -o "{object_file}" "{source_file}"
91
91
92
92
## Compile c++ files
93
- recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DARDUINO={runtime.ide.version} -D{build.board} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} -DARDUINO_ARCH_ZEPHYR {build.library_discovery_phase_flag} {includes} {build.extra_flags} {build.extra_ldflags} {compiler.cpp.extra_flags} "-I{build.core.path}/api/deprecated" "-I{build.core.path}/api/deprecated-avr-comp" "-iprefix{build.variant.path}" "@{compiler.zephyr.includes }" "{source_file}" -o "{object_file}"
93
+ recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -DARDUINO={runtime.ide.version} -D{build.board} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} -DARDUINO_ARCH_ZEPHYR {build.library_discovery_phase_flag} {includes} {build.extra_flags} {build.extra_ldflags} {compiler.cpp.extra_flags} "-I{build.core.path}/api/deprecated" "-I{build.core.path}/api/deprecated-avr-comp" "-iprefix{build.variant.path}" "@{compiler.zephyr.includes_file }" "{source_file}" -o "{object_file}"
94
94
95
95
## Compile asm files
96
- recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DARDUINO={runtime.ide.version} -D{build.board} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} -DARDUINO_ARCH_ZEPHYR {includes} {build.extra_flags} {build.extra_ldflags} {compiler.cpp.extra_flags} "-I{build.core.path}/api/deprecated" "-I{build.core.path}/api/deprecated-avr-comp" "-iprefix{build.variant.path}" "@{compiler.zephyr.includes }" "{source_file}" -o "{object_file}"
96
+ recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DARDUINO={runtime.ide.version} -D{build.board} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} -DARDUINO_ARCH_ZEPHYR {includes} {build.extra_flags} {build.extra_ldflags} {compiler.cpp.extra_flags} "-I{build.core.path}/api/deprecated" "-I{build.core.path}/api/deprecated-avr-comp" "-iprefix{build.variant.path}" "@{compiler.zephyr.includes_file }" "{source_file}" -o "{object_file}"
97
97
98
98
## Create archives
99
99
recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}"
100
100
101
101
## Combine gc-sections, archives, and objects
102
102
recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} {build.extra_flags} {build.extra_ldflags} {compiler.zephyr.common_ldflags} "-T{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" --specs=picolibc.specs --specs=nosys.specs {compiler.ldflags} -o "{build.path}/{build.project_name}_debug.elf" {object_files} "{build.path}/{archive_file}" {compiler.zephyr} {compiler.zephyr.extra_ldflags} {compiler.libraries.ldflags}
103
- 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
103
+ 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"
104
104
105
105
## Create eeprom
106
106
recipe.objcopy.eep.pattern=
@@ -112,8 +112,8 @@ recipe.objcopy.bin.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf
112
112
recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex"
113
113
114
114
## Mangle the file
115
- recipe.hooks.objcopy.postobjcopy.1.pattern={runtime.tools.zephyr-post-build-tool.path}/post_build {postbuild_debug} {postbuild_mode} {build.path}/{build.project_name}.elf
116
- recipe.hooks.objcopy.postobjcopy.2.pattern={runtime.tools.zephyr-post-build-tool.path}/post_build {postbuild_debug} {postbuild_mode} {build.path}/{build.project_name}.bin
115
+ recipe.hooks.objcopy.postobjcopy.1.pattern=" {runtime.tools.zephyr-post-build-tool.path}/post_build" {postbuild_debug} {postbuild_mode} " {build.path}/{build.project_name}.elf"
116
+ recipe.hooks.objcopy.postobjcopy.2.pattern=" {runtime.tools.zephyr-post-build-tool.path}/post_build" {postbuild_debug} {postbuild_mode} " {build.path}/{build.project_name}.bin"
117
117
118
118
## Compute size
119
119
recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf"
0 commit comments