Override default behavior of memory analysis feature
This commit is contained in:
@@ -533,6 +533,12 @@ if any("-Wl,-T" in f for f in env.get("LINKFLAGS", [])):
|
||||
print("Warning! '-Wl,-T' option for specifying linker scripts is deprecated. "
|
||||
"Please use 'board_build.ldscript' option in your 'platformio.ini' file.")
|
||||
|
||||
#
|
||||
# Override memory inspection behavior
|
||||
#
|
||||
|
||||
env.SConscript("sizedata.py", exports="env")
|
||||
|
||||
#
|
||||
# Default targets
|
||||
#
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
import re
|
||||
|
||||
Import("env")
|
||||
|
||||
|
||||
def pioSizeIsRamSectionCustom(env, section):
|
||||
if section and re.search(
|
||||
r"\.dram0\.data|\.dram0\.bss|\.noinit", section.get("name", "")
|
||||
):
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
|
||||
def pioSizeIsFlashectionCustom(env, section):
|
||||
if section and re.search(
|
||||
r"\.iram0\.text|\.iram0\.vectors|\.dram0\.data|\.flash\.text|\.flash\.rodata|\.flash\.appdesc",
|
||||
section.get("name", ""),
|
||||
):
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
|
||||
env.AddMethod(pioSizeIsRamSectionCustom, "pioSizeIsRamSection")
|
||||
env.AddMethod(pioSizeIsFlashectionCustom, "pioSizeIsFlashSection")
|
||||
Reference in New Issue
Block a user