Pages: [1]   Go Down
Author Topic: How to check amount of free ram (and used)  (Read 2389 times)
0 Members and 1 Guest are viewing this topic.
Turku
Offline Offline
Full Member
***
Karma: 1
Posts: 228
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

My project is getting bigger on a XP Pro computer. I am slowly getting worried about ram. There is nothing about this in project folders. What can I do, except clean up my project.

By the way, am I the only one who can't find a suitable forum among Arduino forums.
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 210
Posts: 13031
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1213583720/19#19
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1213583720/23#23

http://www.arduino.cc/playground/Code/AvailableMemory
Logged

Turku
Offline Offline
Full Member
***
Karma: 1
Posts: 228
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks, Compile time memory check is good enough for me now. But I found only old elf-files. How do I get those now of my current projects. Or some way check memory at compile time.
Logged

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 129
Posts: 8601
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
How do I get those now of my current projects.
If you're using the IDE hold SHIFT while compiling. This will show you the location of the temp working folder.

Go there and run avr-size onthe .elf file in a dos window.

avr-size *.elf

You will get something like

   text    data     bss     dec     hex
  29060    1024     366   30450    76f2

Add data and bss to get the RAM used.

______
Rob
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Turku
Offline Offline
Full Member
***
Karma: 1
Posts: 228
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It works, fine. But C:\Program Files\arduino-0022\hardware\tools\avr\bin is not in my path settings, needed a bit of work before avr-size would run. I copied the exe, is there any reason to include the in path settings. How do you actually do it.

By the way, the numbers seem to be in decimal, not in hex, am I right?

This (too) should be in IDE.
Logged

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 129
Posts: 8601
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Because I have AVR Studio installed the path was already set.

Quote
is there any reason to include the in path settings. How do you actually do it.
If you're going to be doing much of this that I'd say yes. I haven't used DOS for so long I can't remember. You can see the existing path with the "path" command. IIRC you used to do something like

PATH new_folder;%path%

To add "new_folder" to the path without deleting all the existing folders. (But check this out, as I said I haven't used DOS at this level for years)

______
Rob


Logged

Rob Gray aka the GRAYnomad www.robgray.com

Turku
Offline Offline
Full Member
***
Karma: 1
Posts: 228
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have to check AVR studio, but it requires registration. There is a setting for paths in XP control panel/system. But I think Avr studio could be nice to try.
Logged

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 129
Posts: 8601
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I have to check AVR studio, but it requires registration.
I've been using it for quite a while and quite like it. It's a it old now and could do while modern features, to that end AS5 beta has just been released, see here

http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=103949&postdays=0&postorder=asc

But it might be worth waiting on that. Meanwhile I'm happy with AS4 for some things, but mostly now I just use an editor and makefile.

_____
Rob
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Pages: [1]   Go Up
Jump to: