Skip to content

Commit 9ea23ae

Browse files
committed
os/tools/memstats_gnueabil.py : Show all section details dynamically
1. The updated script dynamically discovers all memory sections from the map file instead of hardcoding only 3 sections '.text/.data/.bss', revealing previously invisible sections like '.iram', '.psram_bss', '.psram_data' that contain significant memory usage 2. Size of sections like(.text) were smaller than actual previously Previous output: .data .bss .text Total 6100 4920 187469 198489 libboard.a Current output: Library/Binary .vectors .text .iram .data .bss .psram_data .psram_bss SRAM PSRAM Flash Other Total ----------------------------------------------------------------------------------------------------------------------------------------------- libboard.a 416 332210 7408 6100 4920 0 11700 18428 11700 332626 0 362754 Usage: python3 os/tools/memstats_gnueabil.py --help -----> It will give all command details For ex - to see memory information python3 os/tools/memstats_gnueabil.py -m -f ../Beken/xip_all/tinyara.map Detected Board: bk7239n Section Categories (dynamically detected from map file): FLASH: .text, .vectors SRAM: .bss, .data, .iram PSRAM: .psram_bss, .psram_data Library/Binary .vectors .text .iram .data .bss .psram_data .psram_bss SRAM PSRAM Flash Other Total ----------------------------------------------------------------------------------------------------------------------------------------------- libboard.a 416 332210 7408 6100 4920 0 11700 18428 11700 332626 0 362754 libbluetooth.a 0 219020 0 20 70692 0 0 70712 0 219020 0 289732 libwifi.a 0 156281 44945 216 46080 0 0 91241 0 156281 0 247522 libbk_phy.a 0 144848 480 168 2396 0 0 3044 0 144848 0 147892 libnet.a 0 66698 16900 152 56008 296 176 73060 472 66698 0 140230 libmiddleware.a 0 49946 5680 356 10260 0 0 16296 0 49946 0 66242 libfs.a 0 63669 0 0 0 0 64 0 64 63669 0 63733 libkernel.a 0 44303 4072 0 0 4 13580 4072 13584 44303 0 61959 libkarch.a 0 16847 2060 528 9220 528 860 11808 1388 16847 0 30043 libkmm.a 0 18267 0 0 0 24 9592 0 9616 18267 0 27883 libkc.a 0 22038 0 0 0 12 296 0 308 22038 0 22346 libcompression.a 0 15776 0 0 0 4 12 0 16 15776 0 15792 libdrivers.a 0 14387 0 0 0 0 360 0 360 14387 0 14747 libse.a 0 7996 0 0 0 140 256 0 396 7996 0 8392 NOLIB 0 6256 0 0 0 0 0 0 0 6256 0 6256 libgcc.a 0 5288 0 0 0 0 0 0 0 5288 0 5288 libpm.a 0 4470 0 0 0 36 60 0 96 4470 0 4566 libbinfmt.a 0 4068 0 0 0 12 40 0 52 4068 0 4120 libstubs.a 0 2182 0 0 0 0 0 0 0 2182 0 2182 libkwque.a 0 1153 0 0 0 0 28 0 28 1153 0 1181 libbk_coex.a 0 764 0 0 24 0 0 24 0 764 0 788 ----------------------------------------------------------------------------------------------------------------------------------------------- TOTAL 416 1196467 81545 7540 199600 1056 37024 288685 38080 1196883 0 1523648 Memory Distribution: SRAM: 288685 bytes (18.95%) PSRAM: 38080 bytes (2.50%) Flash: 1196883 bytes (78.55%)
1 parent eb85fed commit 9ea23ae

1 file changed

Lines changed: 697 additions & 247 deletions

File tree

0 commit comments

Comments
 (0)