Can GNU LD print memory usage by memory space, rather then just as a bulk percentage?

后端 未结 1 1305
情歌与酒
情歌与酒 2021-01-05 03:43

I\'m working on an embedded project on an ARM mcu that has a custom linker file with several different memory spaces:

/* Memory Spaces Definitions */
MEMORY
         


        
相关标签:
1条回答
  • 2021-01-05 04:04

    Arrrgh, so of course, I find the answer right after asking the question:

    --print-memory-usage

    Used as -Wl,--print-memory-usage, you get the following:

        Memory region         Used Size  Region Size  %age Used
                     rom:       31284 B         2 MB      1.49%
                data_tcm:       26224 B        32 KB     80.03%
                prog_tcm:          0 GB        32 KB      0.00%
                     ram:      146744 B       320 KB     44.78%
                   sdram:          2 MB         2 MB    100.00%
    
    0 讨论(0)
提交回复
热议问题