Hi,
I am completly new to this board but have used AVRs. This sketch appears to compile to over 900 bytes. Maybe someone can tell me why?
Ger
Hi,
I am completly new to this board but have used AVRs. This sketch appears to compile to over 900 bytes. Maybe someone can tell me why?
Ger
which sketch?
Yes the sketch complies to 962 bytes. What exactly are you looking to know? Do you think it should be smaller?
Each function in the sketch will take up a certain number of bytes once compiled. Not much you can do to change that. Just remember once compiled all the spaces and comments are not included in the complied code.
Hi again,
Is this 900+ bytes what ends up in the chip or is it something less?
I imagine a simple sketch like this should compile in under 50 bytes.
Ger
I imagine a simple sketch like this should compile in under 50 bytes.
Why would you think that? Where is this sketch you are talking about?
The button sketch included in the IDE under examples,digital.
Ger
If you use direct port access you could remove some size to the sketch, but the ide uses the avr-gcc toolchain, so it wouldn't differ a lot from a normal c program made in avrstudio.
This sketch:
void setup()
{
}
void loop()
{
}
which does absolutely nothing compiles to 436 bytes. That's a bit more than the 50 bytes you were expecting a functional sketch to use.