Tools: Fix memory calculations of idf_size.py

This commit is contained in:
simon.chupin
2021-07-28 00:24:05 +02:00
parent 48b98214ae
commit 294f9783fc
13 changed files with 64094 additions and 14968 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
+21 -6
View File
@@ -1,17 +1,32 @@
{
"dram_data": 9324,
"dram_bss": 8296,
"dram_rodata": 0,
"dram_other": 0,
"used_dram": 17620,
"available_dram": 163116,
"dram_total": 180736,
"used_dram_ratio": 0.09749026203966006,
"dram_remain": 163116,
"iram_vectors": 1024,
"iram_text": 37908,
"iram_other": 0,
"used_iram": 38932,
"available_iram": 92140,
"iram_total": 131072,
"used_iram_ratio": 0.297027587890625,
"used_diram": 0,
"available_diram": 0,
"used_diram_ratio": 0,
"iram_remain": 92140,
"diram_data": 9324,
"diram_bss": 8296,
"diram_text": 37908,
"diram_vectors": 1024,
"diram_rodata": 0,
"diram_other": 0,
"diram_total": 311808,
"used_diram": 56552,
"used_diram_ratio": 0.18136802134646962,
"diram_remain": 255256,
"flash_code": 146944,
"flash_rodata": 39580,
"total_size": 234780
"flash_other": 0,
"used_flash_non_ram": 186524,
"total_size": 283036
}
+15 -7
View File
@@ -1,8 +1,16 @@
Total sizes:
DRAM .data size: 9324 bytes
DRAM .bss size: 8296 bytes
Used static DRAM: 17620 bytes ( 163116 available, 9.7% used)
Used static IRAM: 38932 bytes ( 92140 available, 29.7% used)
Flash code: 146944 bytes
Flash rodata: 39580 bytes
Total image size:~ 234780 bytes (.bin may be padded larger)
Used static DRAM: 17620 bytes ( 163116 remain, 9.7% used)
.data size: 9324 bytes
.bss size: 8296 bytes
Used static IRAM: 38932 bytes ( 92140 remain, 29.7% used)
.text size: 37908 bytes
.vectors size: 1024 bytes
Used stat D/IRAM: 56552 bytes ( 255256 remain, 18.1% used)
.data size: 9324 bytes
.bss size: 8296 bytes
.text size: 37908 bytes
.vectors size: 1024 bytes
Used Flash size : 186524 bytes
.text : 146944 bytes
.rodata : 39580 bytes
Total image size: 283036 bytes (.bin may be padded larger)
+30
View File
@@ -64,6 +64,36 @@
&& coverage run -a $IDF_PATH/tools/idf_size.py --target esp32s2 --archive_details libdriver.a app_esp32s2.map &>> output \
&& echo -e "\n***\nRunning idf_size.py diff with another app (different target)..." &>> output \
&& coverage run -a $IDF_PATH/tools/idf_size.py app.map --diff app_esp32s2.map &>> output \
&& echo -e "\n***\nRunning idf_size.py for esp32h2..." &>> output \
&& coverage run -a $IDF_PATH/tools/idf_size.py --target esp32h2 app_esp32h2.map &>> output \
&& echo -e "\n***\nRunning idf_size.py for esp32h2 (target autodetected)..." &>> output \
&& coverage run -a $IDF_PATH/tools/idf_size.py app_esp32h2.map &>> output \
&& echo -e "\n***\nRunning idf_size.py --archives for esp32h2..." &>> output \
&& coverage run -a $IDF_PATH/tools/idf_size.py --target esp32h2 --archives app_esp32h2.map &>> output \
&& echo -e "\n***\nRunning idf_size.py --files for esp32h2..." &>> output \
&& coverage run -a $IDF_PATH/tools/idf_size.py --target esp32h2 --files app_esp32h2.map &>> output \
&& echo -e "\n***\nRunning idf_size.py --archive_details for esp32h2..." &>> output \
&& coverage run -a $IDF_PATH/tools/idf_size.py --target esp32h2 --archive_details libdriver.a app_esp32h2.map &>> output \
&& echo -e "\n***\nRunning idf_size.py for esp32c3..." &>> output \
&& coverage run -a $IDF_PATH/tools/idf_size.py --target esp32c3 app_esp32c3.map &>> output \
&& echo -e "\n***\nRunning idf_size.py for esp32c3 (target autodetected)..." &>> output \
&& coverage run -a $IDF_PATH/tools/idf_size.py app_esp32c3.map &>> output \
&& echo -e "\n***\nRunning idf_size.py --archives for esp32c3..." &>> output \
&& coverage run -a $IDF_PATH/tools/idf_size.py --target esp32c3 --archives app_esp32c3.map &>> output \
&& echo -e "\n***\nRunning idf_size.py --files for esp32c3..." &>> output \
&& coverage run -a $IDF_PATH/tools/idf_size.py --target esp32c3 --files app_esp32c3.map &>> output \
&& echo -e "\n***\nRunning idf_size.py --archive_details for esp32c3..." &>> output \
&& coverage run -a $IDF_PATH/tools/idf_size.py --target esp32c3 --archive_details libdriver.a app_esp32c3.map &>> output \
&& echo -e "\n***\nRunning idf_size.py for esp32s3..." &>> output \
&& coverage run -a $IDF_PATH/tools/idf_size.py --target esp32s3 app_esp32s3.map &>> output \
&& echo -e "\n***\nRunning idf_size.py for esp32s3 (target autodetected)..." &>> output \
&& coverage run -a $IDF_PATH/tools/idf_size.py app_esp32s3.map &>> output \
&& echo -e "\n***\nRunning idf_size.py --archives for esp32s3..." &>> output \
&& coverage run -a $IDF_PATH/tools/idf_size.py --target esp32s3 --archives app_esp32s3.map &>> output \
&& echo -e "\n***\nRunning idf_size.py --files for esp32s3..." &>> output \
&& coverage run -a $IDF_PATH/tools/idf_size.py --target esp32s3 --files app_esp32s3.map &>> output \
&& echo -e "\n***\nRunning idf_size.py --archive_details for esp32s3..." &>> output \
&& coverage run -a $IDF_PATH/tools/idf_size.py --target esp32s3 --archive_details libdriver.a app_esp32s3.map &>> output \
&& echo -e "\n***\nProducing JSON output..." &>> output \
&& coverage run -a $IDF_PATH/tools/idf_size.py --json app.map &>> output \
&& coverage run -a $IDF_PATH/tools/idf_size.py --json --archives app.map &>> output \
+2 -1
View File
@@ -17,6 +17,7 @@
from __future__ import print_function
import sys
from typing import Dict
try:
import idf_size
@@ -41,6 +42,6 @@ if __name__ == '__main__':
segments = {'iram0_0_seg': {'origin': 0, 'length': 0},
'dram0_0_seg': {'origin': 0, 'length': 0}}
sections = {}
sections = {} # type: Dict
print(idf_size.get_summary('a.map', segments, sections, 'esp32'), end='')