avr-gcc

Why does avr-gcc bother to save the register state when calling main()?

The main() function in an avr-gcc program saves the register state on the stack, but when the runtime calls it I understand on a microcontroller there isn't anything to return to. Is this a waste of RAM? How can this state saving be prevented? ...

AVR Long running code from within timer interrupt

I've got some code that needs to run every 2 minutes which seems simple enough. The problem seems that triggering a long running process from within a timer causes the timers to go wobbly? any suggestions. My C knowledge is not that great so help me out with some basic ideas. The MCU is an Atmel Mega128L The long running process is an ...

Array not crossing 256 byte boundary

Is it possible to create an array that doesn't cross 256 byte boundary? That is addresses of the individual array items only differ in the lower byte. This is weaker requirement than keeping the array aligned to 256 bytes. The only solution I could think of was aligning to next_power_of_two(sizeof(array)), but I'm not sure about the gaps...

Binary compatibility between avr-gcc 3.4.0 and avr-gcc 4.3.x

I have inherited an application that links to a library which MAY HAVE been built with gcc3. Or maybe with the imagecraft compiler. That information has now vanished to the heavenly bitfield and I am left with a libXXX.a library against which to link my app. I cannot recompile the libXXX.a because it requires certain unknown headers from...