Skip to content

Commit c43bb81

Browse files
committed
Add flags to prelink recipe for linker script preprocessing
By default, add define for RAM and FLASH max size -DLD_MAX_SIZE={upload.maximum_size} -DLD_MAX_DATA_SIZE={upload.maximum_data_size} Signed-off-by: Frederic.Pillon <[email protected]>
1 parent 8ab8f67 commit c43bb81

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

platform.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@ recipe.hooks.prebuild.1.pattern.macosx=bash -c "[ -f {build.opt.sourcepath} ] ||
9696
# preprocess linker file
9797
preprocld.name=preproc.ld
9898
preprocld.filepath={build.path}/{preprocld.name}
99-
recipe.hooks.linking.prelink.1.pattern="{compiler.path}{compiler.c.cmd}" -x c -E -P {compiler.c.flags} {build.info.flags} {compiler.c.extra_flags} {build.extra_flags} {compiler.arm.cmsis.c.flags} "{build.variant.path}/{build.ldscript}" -o "{preprocld.filepath}"
99+
preprocld.flags=-DLD_MAX_SIZE={upload.maximum_size} -DLD_MAX_DATA_SIZE={upload.maximum_data_size}
100+
recipe.hooks.linking.prelink.1.pattern="{compiler.path}{compiler.c.cmd}" -x c -E -P {preprocld.flags} {compiler.c.flags} {build.info.flags} {compiler.c.extra_flags} {build.extra_flags} {compiler.arm.cmsis.c.flags} "{build.variant.path}/{build.ldscript}" -o "{preprocld.filepath}"
100101

101102
# compile patterns
102103
# ---------------------

0 commit comments

Comments
 (0)