Skip to content

Commit ff86fa0

Browse files
committed
Merge branch 'bugfix/fix_esp32s3_diram_calculation_v4.4' into 'release/v4.4'
Tools: Fix diram size calculation (v4.4) See merge request espressif/esp-idf!21671
2 parents bd54673 + 2ae5290 commit ff86fa0

File tree

4 files changed

+25888
-387
lines changed

4 files changed

+25888
-387
lines changed

tools/idf_size.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -567,13 +567,17 @@ def in_iram(x: MemRegions.Region) -> bool:
567567
r = StructureForSummary()
568568

569569
diram_filter = filter(in_diram, segments)
570-
r.diram_total = int(get_size(diram_filter) / 2)
570+
r.diram_total = get_size(diram_filter)
571571

572572
dram_filter = filter(in_dram, segments)
573573
r.dram_total = get_size(dram_filter)
574574
iram_filter = filter(in_iram, segments)
575575
r.iram_total = get_size(iram_filter)
576576

577+
# This fixes counting the diram twice if the cache fills the iram entirely
578+
if r.iram_total == 0:
579+
r.diram_total //= 2
580+
577581
def filter_in_section(sections: Iterable[MemRegions.Region], section_to_check: str) -> List[MemRegions.Region]:
578582
return list(filter(lambda x: LinkingSections.in_section(x.section, section_to_check), sections)) # type: ignore
579583

0 commit comments

Comments
 (0)