Note:
I'm using AVR Studio 4.18
I used the wizard to make the project (no external makefiles)
The app does stop at the 'phantom breakpoint'
--- In AVR-Chat@yahoogroups.com, "englsprogeny1" <englsprogeny1@...> wrote:
>
> As some of you know, I'm migrating to include AVR studio in my projects, instead of just what comes with WinAVR
>
> Below I try to set a breakpoint but AVR Studio moves this breakpoint down:
>
>
> I set the breakpoint at the line: PORTA = inputButtons;
>
> but AVR Studio moves this breakpoint down to PORTA = ~counter;
>
>
> Looking at the code I do not believe that the line that I want to break on is optimized out.
>
> Why is AVR Studio moving my breakpoint?
>
> Thanks for any input.
>
>
> //----- Include Files ---------------------------------------------------------
> #include <avr/io.h> // include I/O definitions (port names, pin names, etc)
> #include <avr/interrupt.h> // include interrupt support
> #include <avr/signal.h>
> #include <avr/delay.h>
>
>
> unsigned char localBufferLength = 0x20;
>
> unsigned char dataRead;
>
> void PrintMenu(void);
> void ProgMain(void);
>
> //----- Begin Code ------------------------------------------------------------
>
> int main(void)
> {
>
>
> //Port A is output
> DDRA=0xFF;
>
>
> //Port A is input
> DDRB=0x00;
> PORTB = 0xFF; //Pullups
>
> ProgMain();
>
> return 0;
> }
>
>
> void ProgMain(void)
> {
>
> unsigned char counter = 0;
> unsigned char inputButtons;
>
> while(1)
> {
>
> _delay_ms(20);
>
> inputButtons = PINB;
>
>
> if(counter<255)
> {
> counter++;
> }
> else
> counter = 0;
>
>
> inputButtons = inputButtons & 0x0F;
>
> if(inputButtons != 0x0F)
> {
>
> PORTA = inputButtons;
> }
> else
> {
> PORTA = ~counter;
> }
>
>
>
> }
>
>
>
>
>
>
>
>
> }
>Message
Re: AVR Studio breakpoints
2012-08-19 by englsprogeny1
Attachments
- No local attachments were found for this message.