@@ -17,13 +17,13 @@ compiler.warning_flags.all=-Wall -Wextra
1717
1818compiler.path={build.compiler_path}
1919compiler.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}
2121compiler.c.elf.cmd={build.crossprefix}g++
2222compiler.c.elf.flags={build.llext_link_flags} -Wl,--gc-sections -mcpu={build.mcu} {build.float-abi} {build.fpu} -std=c++17
2323compiler.S.cmd={build.crossprefix}g++
2424compiler.S.flags=-c -x assembler-with-cpp -mcpu={build.mcu} {build.fpu}
2525compiler.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}
2727compiler.ar.cmd={build.crossprefix}ar
2828compiler.ar.flags=rcs
2929compiler.objcopy.cmd=
@@ -36,10 +36,10 @@ compiler.libraries.ldflags=
3636compiler.size.cmd={build.crossprefix}size
3737compiler.define=-DARDUINO=
3838
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"
4343compiler.zephyr.common_cxxflags=-fdata-sections -ffunction-sections -fno-unwind-tables
4444compiler.zephyr.common_ldflags=-fno-exceptions -fno-rtti -fno-threadsafe-statics -fno-unwind-tables -fno-use-cxa-atexit -lstdc++ -lsupc++ -lnosys -nostdlib
4545
@@ -87,20 +87,20 @@ build.zip.pattern={recipe.size.pattern}
8787# -----------------------
8888
8989## 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}"
9191
9292## 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}"
9494
9595## 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}"
9797
9898## Create archives
9999recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}"
100100
101101## Combine gc-sections, archives, and objects
102102recipe.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"
104104
105105## Create eeprom
106106recipe.objcopy.eep.pattern=
@@ -112,8 +112,8 @@ recipe.objcopy.bin.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf
112112recipe.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"
113113
114114## 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"
117117
118118## Compute size
119119recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf"
0 commit comments