RE: [avr-gcc-list] Problem with debbuggin with AVRStudio, WinAvr and JtagIce mkII
From: [EMAIL PROTECTED] [...] #include avr/io.h int somma(int a, int b) { return a+b; } int main () { int e = 10; int r = 1; r = somma(e,r); r=r+1; return r; } it's a stupid program. When debbugging it step by step the main regularly calls somma(e,r). After somma(e,r) finished, the control flow does not return in main at r=r+1 but in a part of memory without code (after the exit() of the main). Can you help me with this problem? Just a guess: Try making 'r' volatile, i.e., change the declaration of r to int volatile r = 1; Because r is not used other than as the return value, the compiler might be optimizing out accesses to the variable itself. The 'volatile' declaration forces the compiler to retain these accesses. HTH, -=Dave ___ AVR-GCC-list mailing list AVR-GCC-list@nongnu.org http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
Re: RE: [avr-gcc-list] Problem with debbuggin with AVRStudio, WinAvr and JtagIce mkII
Problem is most serious. The Push and Pop and Ret operation does not functioning corretly. When i do the Push and Pop operation the stack does unchage. thanks - Visita http://domini.interfree.it, il sito di Interfree dove trovare soluzioni semplici e complete che soddisfano le tue esigenze in Internet, ecco due esempi di offerte: - Registrazione Dominio: un dominio con 1 MB di spazio disco + 2 caselle email a soli 18,59 euro - MioDominio: un dominio con 20 MB di spazio disco + 5 caselle email a soli 51,13 euro Vieni a trovarci! Lo Staff di Interfree - ___ AVR-GCC-list mailing list AVR-GCC-list@nongnu.org http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
Re: [avr-gcc-list] Problem with debbuggin with AVRStudio, WinAvr and JtagIce mkII
[EMAIL PROTECTED] wrote: The Push and Pop and Ret operation does not functioning corretly. When i do the Push and Pop operation the stack does unchage. Try reading the FAQ... I bet you forgot to turn off the M103C fuse. - Visita http://domini.interfree.it, ... 10 lines of advertisement, plus another three blank lines -- compared to 5 lines content of your message. That looks like the best reason to *not* use that email provider. Maybe you'll tell'em. -- cheers, Jorg .-.-. --... ...-- -.. . DL8DTL http://www.sax.de/~joerg/NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-) ___ AVR-GCC-list mailing list AVR-GCC-list@nongnu.org http://lists.nongnu.org/mailman/listinfo/avr-gcc-list