On 01.03.2012 14:38, Richard Zetterberg wrote:

> Cory: No, setting PB0 to 1 in DDRB two times in main doesn't change
> anything. Doing "DDRB = 0xFF;" doesn't change anything. However, if I
> put that line of code inside the "turn_on_pb" function it works as
> expected.

Why don't you include the whole program assembly (i.e. after linking),
but only compile units? This would also show the startup code, where a
fault in setting up the stack pointer would be visible (i.e. would cause
the "call" to fail and therefore resetting the MCU instead of the
behavior you desire).

Best regards,
Joe

_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Reply via email to