Hi,
So, I've put together a very small program from the example in the first tutorial.
It is 72 bytes when using -Os, but when I use -O0, it jumps to 3130 bytes! If I comment out the _delay_ms(1000); it goes back to a reasonable 104 bytes.
Two questions -
1. Why does it jump to over 3K ?
2. How do you debug on chips that have limited memory like a tiny13a with 2K ?
Thanks,
Alan
---------------------------------
#define F_CPU 4000000UL
#include
#include
int main()
{
DDRB=7;
while(1)
{
if (PINB & 8)
PORTB |= _BV(0);
else PORTB &= ~(_BV(0));
_delay_ms(1000);
}
}