Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
memory usage
#1
Hi,
Probably a very simple question...
Where can I see memory usage (Flash, Ram) after compiling ?
From previous IDE's I could see it in map file if I remember well.

Thank you !
Reply
#2
P.S.: still running v1.1, as I prefer not to update while running project
Reply
#3
You can find that in the "Build messages" log.

You can also click at the map file to open it (see highlighted part in picture)

   
Reply
#4
Thank you for your prompt reply !
Sorry, I was some confused...
On my install, Build log is providing the information:
"
Used memory resources:
  text   data     bss     dec     hex
  64372   1088   2140   67600   10810
"
somewhere in the middle of the log file,

whereas "build message" only displays

||=== Build finished: 0 errors, 10 warnings (1 minutes, 44 seconds) ===|
Reply
#5
Probably you are using a generic (external) GCC Compiler.
Reply
#6
(09-06-2022, 07:59 AM)embitz Wrote: You can find that in the "Build messages" log.

You can also click at the map file to open it (see highlighted part in picture)

I think what they are asking is if you could show RO memory usage (.text+.extab+.exidx+.data) separately in the same way you show RW memory (.data + .bss).  I know it's not perfect, but it would give users a feel for how close they are to running out of flash/ram with each build.
Reply
#7
Ah I see, but the problem is that those memory segments are linker script specific. Although is almost defacto standard they may have, and can have, other names etc.
Reply
#8
I use this linker flag to print out the memory usage of my STM32H7 project:
-Wl,--print-memory-usage

The output looks like this (in the Build log window):
Code:
Memory region         Used Size  Region Size  %age Used
        ITCM_RAM:          0 GB        64 KB      0.00%
        DTCM_RAM:       30136 B       128 KB     22.99%
         SRAM_D1:      463256 B       512 KB     88.36%
        SRAM1_D2:       98764 B       127 KB     75.94%
        ETH_DESC:         480 B         1 KB     46.88%
        SRAM2_D2:          0 GB       128 KB      0.00%
        SRAM3_D2:       32735 B        32 KB     99.90%
        SRAM4_D3:          0 GB        64 KB      0.00%
        BOOT_RAM:          16 B        256 B      6.25%
      BACKUP_RAM:          92 B       3840 B      2.40%
           FLASH:      975388 B         2 MB     46.51%
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)