Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: [AVR-Chat] Re: AVR Studio breakpoints

2012-08-19 by bobgardner@aol.com

-----Original Message-----
From: englsprogeny1 <englsprogeny1@yahoo.com>
To: AVR-Chat <AVR-Chat@yahoogroups.com>
Sent: Sun, Aug 19, 2012 2:14 am
Subject: [AVR-Chat] Re: AVR Studio breakpoints



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;
> 		}
> 	
> 		
> 			
> 	}
> 		
> 		
> 
> 		
> 
> 	
> 
> 
> }
>




------------------------------------

Yahoo! Groups Links




 


[Non-text portions of this message have been removed]

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.