Page 1 of 1

RAM/ROM Usage builder Output :-)

Posted: Thu Sep 22, 2016 12:51 pm
by Tabulous
Hi All
hope this is can be useful to others.

Wanted an easy way to show how much RAM/ROM was been used. You can do this looking at the *.map file and then work it out, but i wanted something easier.

Another forum user created a python script that does the same, but this needs you to download/install python to run.

So here is my version, this is what you will see after you have built your application, as you can see you know the RAM/ROM usage and how much the heap fill is. All very simple :-) Feel free to download and setup in your chibistudio. See readme for details.

make -j8 all
Linking build/ch.elf
Creating build/ch.hex
Creating build/ch.bin
Creating build/ch.dmp
Creating build/ch.list

text data bss dec hex filename
43776 1432 15304 60512 ec60 build/ch.elf

Heap Fill: 24.6% - 3.93/16KB
RAM usage: 75.4% - 12.07/16KB
ROM usage: 34.2% - 43.80/128KB

Done

Re: RAM/ROM Usage builder Output :-)

Posted: Tue Sep 27, 2016 5:12 pm
by acr
in linux it easy to install python, and hard to run .exe

Re: RAM/ROM Usage builder Output :-)

Posted: Wed Sep 28, 2016 12:14 pm
by Tabulous
acr wrote:in linux it easy to install python, and hard to run .exe


In windows its easy to install python too, but i did not want to install a whole package like that just to run a script......

I already have a big bloaty package installed, .Net so might as well use it :-)

Re: RAM/ROM Usage builder Output :-)

Posted: Mon Sep 06, 2021 1:27 pm
by raulvalencia2
Hi,

another way to know the size of ram used... ?

Re: RAM/ROM Usage builder Output :-)

Posted: Mon Sep 06, 2021 2:29 pm
by Giovanni
Hi,

Simplest way: look in the .map file, it is all in there.

Giovanni

Re: RAM/ROM Usage builder Output :-)

Posted: Mon Sep 06, 2021 5:46 pm
by steved
I just added:

Code: Select all

  USE_LDOPT = --print-memory-usage


to the makefile, near the top.

This prints more detailed usage information at the end of linking, which might suffice.

Re: RAM/ROM Usage builder Output :-)

Posted: Mon Sep 20, 2021 9:13 am
by mobyfab
my python code it's based on if someone need to modify it: viewtopic.php?f=8&t=2407