Go Down

Topic: More information about the compiled programs (Read 1 time) previous topic - next topic

Senso

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  ;)
Sorry for the strange english.

Senso

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?

retrolefty

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

cr0sh

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!")...
I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

Senso

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.

BetterSense

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.

UltraMagnus

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

Go Up
 

Quick Reply

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Note: this post will not display until it's been approved by a moderator.
Name:
Email:

shortcuts: alt+s submit/post or alt+p preview