Pages: [1]   Go Down
Author Topic: More information about the compiled programs  (Read 1263 times)
0 Members and 1 Guest are viewing this topic.
Portugal
Offline Offline
God Member
*****
Karma: 6
Posts: 962
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I think it would be nice to see how much ram is being used, like winavr and avr-gcc shows, as it would help a lot of people as a shortage of ram can cause any strange behavior and its something that is hard to discover, and it is simple to add, I think  smiley-wink
Sorry for the strange english.
Logged

Portugal
Offline Offline
God Member
*****
Karma: 6
Posts: 962
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So, after a lot of people getting strange behaviours in their big programs due to running out of ram and not knowing that why doesn't anybody cares about this?
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17292
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well it has been discussed around here several times. It's not clear to me that any compiler can prevent/warn of all run time ram problems like stack overflow or memory heap overflow etc, however I'm sure not the one to explain that well. I'm sure the compiler reports somewhere ram use for variable and array useage, but again I can't point you to a specific method of obtaining the information from the compiler, sorry.

Lefty
Logged

Phoenix, Arizona USA
Offline Offline
Faraday Member
**
Karma: 40
Posts: 5570
Where's the beer?
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
It's not clear to me that any compiler can prevent/warn of all run time ram problems like stack overflow or memory heap overflow etc

About the best that could be done, if anything, would be to show how much statically allocated SRAM was in use, at the very start of the program; determining what happens after that would be on-par (or identical, most likely) to "solving the halting problem" (in other words, you could name your price for selling the technology that allowed you to do so, collect the Nobel Prize, and be smug in knowing you were smarter than both Alonzo Church and Alan Turing - AKA "not bloody likely!")...
Logged

I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

Portugal
Offline Offline
God Member
*****
Karma: 6
Posts: 962
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The avr studio after compiling shows how much ram is used at compile time, so that information is given by the gcc compiler, and must even be hidden in some file that is created at compile time, showing that data with the skecth size seems to me a pretty simple thing.
Logged

Dallas
Offline Offline
Sr. Member
****
Karma: 3
Posts: 337
nephew as a kittens
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I think the only way to do this sort of thing is to run the code in a simulator. Having an Arduino virtual machine would be pretty cool...you could see all kinds of cool stuff real-time.
Logged

England
Offline Offline
Full Member
***
Karma: 0
Posts: 211
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

no, avr-size gives this information, and is part of avr-gcc, that arduino uses...
Logged

Pages: [1]   Go Up
Jump to: