RAM/ROM Usage builder Output :-)

ChibiOS public support forum for all topics not covered by a specific support forum.

Moderators: RoccoMarco, lbednarz, utzig, tfAteba, barthess

Tabulous
Posts: 509
Joined: Fri May 03, 2013 12:02 pm
Has thanked: 7 times
Been thanked: 17 times

RAM/ROM Usage builder Output :-)

Postby Tabulous » Thu Sep 22, 2016 12:51 pm

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
Attachments
binsize.zip
(7.74 KiB) Downloaded 294 times

acr
Posts: 14
Joined: Tue Nov 18, 2014 3:52 am

Re: RAM/ROM Usage builder Output :-)

Postby acr » Tue Sep 27, 2016 5:12 pm

in linux it easy to install python, and hard to run .exe

Tabulous
Posts: 509
Joined: Fri May 03, 2013 12:02 pm
Has thanked: 7 times
Been thanked: 17 times

Re: RAM/ROM Usage builder Output :-)

Postby Tabulous » Wed Sep 28, 2016 12:14 pm

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 :-)

raulvalencia2
Posts: 1
Joined: Mon Sep 06, 2021 9:59 am

Re: RAM/ROM Usage builder Output :-)

Postby raulvalencia2 » Mon Sep 06, 2021 1:27 pm

Hi,

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

User avatar
Giovanni
Site Admin
Posts: 14432
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 917 times
Contact:

Re: RAM/ROM Usage builder Output :-)

Postby Giovanni » Mon Sep 06, 2021 2:29 pm

Hi,

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

Giovanni

steved
Posts: 823
Joined: Fri Nov 09, 2012 2:22 pm
Has thanked: 12 times
Been thanked: 135 times

Re: RAM/ROM Usage builder Output :-)

Postby steved » Mon Sep 06, 2021 5:46 pm

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.

mobyfab
Posts: 483
Joined: Sat Nov 19, 2011 6:47 pm
Location: Le Mans, France
Has thanked: 21 times
Been thanked: 30 times

Re: RAM/ROM Usage builder Output :-)

Postby mobyfab » Mon Sep 20, 2021 9:13 am

my python code it's based on if someone need to modify it: viewtopic.php?f=8&t=2407


Return to “General Support”

Who is online

Users browsing this forum: No registered users and 8 guests