From 555cca8cac05011a31519d00cdce4517e44b3686 Mon Sep 17 00:00:00 2001 From: hathach Date: Thu, 29 Jun 2017 13:01:59 +0700 Subject: [PATCH] add SRAM usage when compiling --- boards.txt | 2 ++ platform.txt | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/boards.txt b/boards.txt index cbfca828..0f645060 100644 --- a/boards.txt +++ b/boards.txt @@ -28,6 +28,8 @@ feather52.bootloader.tool=nrfjprog feather52.upload.tool=nrfutil feather52.upload.protocol=nrfutil feather52.upload.maximum_size=167936 +# ram size varies depending on S132 (check linker script) +feather52.upload.maximum_data_size=51072 # required if using native usb ( for reference ) #feather52.upload.use_1200bps_touch=false diff --git a/platform.txt b/platform.txt index cb43bc1a..0ac08c14 100644 --- a/platform.txt +++ b/platform.txt @@ -89,7 +89,7 @@ recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DF_CPU= recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}" ## Combine gc-sections, archives, and objects -recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} "-L{build.variant.path}" "-L{nrf.sdk.path}/components/toolchain/gcc" "-T{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" --specs=nano.specs --specs=nosys.specs {compiler.ldflags} -o "{build.path}/{build.project_name}.elf" {object_files} -Wl,--start-group -lm "{build.path}/{archive_file}" -Wl,--end-group +recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} "-L{build.variant.path}" "-L{build.core.path}" "-T{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" --specs=nano.specs --specs=nosys.specs {compiler.ldflags} -o "{build.path}/{build.project_name}.elf" {object_files} -Wl,--start-group -lm "{build.path}/{archive_file}" -Wl,--end-group ## Create output (bin file) #recipe.objcopy.bin.pattern="{compiler.path}{compiler.elf2bin.cmd}" {compiler.elf2bin.flags} {compiler.elf2bin.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin" @@ -111,6 +111,7 @@ recipe.output.save_file_hexu={build.project_name}.save.hex ## Compute size recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf" recipe.size.regex=\.text\s+([0-9]+).* +recipe.size.regex.data=(\.data|\.bss|\.stack)\s+([0-9]+).* ## Export Compiled Binary recipe.output.tmp_file={build.project_name}.hex