Skip to content

Commit

Permalink
Merge branch 'bugfix/fix_esp32s3_diram_calculation' into 'master'
Browse files Browse the repository at this point in the history
Tools: Fix diram size calculation

Closes IDFGH-8504

See merge request espressif/esp-idf!21243
  • Loading branch information
dobairoland committed Nov 29, 2022
2 parents 0786539 + 0810dd2 commit 2eabf60
Show file tree
Hide file tree
Showing 4 changed files with 34,134 additions and 14 deletions.
6 changes: 5 additions & 1 deletion tools/idf_size.py
Expand Up @@ -584,13 +584,17 @@ def in_iram(x: MemRegions.Region) -> bool:
r = StructureForSummary()

diram_filter = filter(in_diram, segments)
r.diram_total = int(get_size(diram_filter) / 2)
r.diram_total = get_size(diram_filter)

dram_filter = filter(in_dram, segments)
r.dram_total = get_size(dram_filter)
iram_filter = filter(in_iram, segments)
r.iram_total = get_size(iram_filter)

# This fixes counting the diram twice if the cache fills the iram entirely
if r.iram_total == 0:
r.diram_total //= 2

def filter_in_section(sections: Iterable[MemRegions.Region], section_to_check: str) -> List[MemRegions.Region]:
return list(filter(lambda x: LinkingSections.in_section(x.section, section_to_check), sections)) # type: ignore

Expand Down

0 comments on commit 2eabf60

Please sign in to comment.