More information about the compiled programs

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 :wink:
Sorry for the strange english.

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?

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

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!")...

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.

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.

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