[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-gcc-list] Anyone using WinAVR with AVRStudio 4?
From: |
Sander Pool |
Subject: |
[avr-gcc-list] Anyone using WinAVR with AVRStudio 4? |
Date: |
Tue, 24 Dec 2002 23:47:58 -0800 |
Folks,
thanks to the efforts of so many of you I now have a sweet avr-gcc setup on
my win32 system. I use Eric's WinAVR distribution and wanted to use objcopy
to produce .cof files for debugging in AVRStudio 4. The .cof file loads fine
but when I try to put breakpoints on certain lines it won't let me. This
seems to be related to conditional compilations such as in this signal
handler:
SIGNAL(SIG_OVERFLOW0) /* signal handler for tcnt0 overflow interrupt
*/
{
#ifdef USE_SPLITTER
if (splitter < 20) { // this slows things down a little
splitter++;
return;
}
splitter = 0;
#endif
#ifdef DO_SMOOTH
angle+= increm;
if (angle >= MAXVAL)
increm = -1;
if (angle <= MINVAL)
increm = 1;
#else
if (angle == MAXVAL)
angle = MINVAL;
else {
if (angle == MINVAL)
angle = MAXVAL;
}
#endif
#ifdef __AVR_ATmega128__
outp(angle, OCR3AH);
#else
outp(angle, OCR1AL);
#endif
outp(0, TCNT0); /* reset TCNT0 */
}
When I try to put a breakpoint on the outp(angle, OCR3AH); line it fails. I
can put breakpoints on other lines but it only seems possible if more than
one line of code got compiled.
In a related question, when I break somewhere and watch the value of a
variable it tells me it's not in scope even though it's been declared a
global.
Has anyone else run into these problems?
Thanks,
Sander
avr-gcc-list at http://avr1.org