Yahoo Groups archive

AVR-Chat

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

Thread

AVR Studio

AVR Studio

2008-11-09 by englsprogeny

I am playing with AvrStudio.  I have a cheap JTAG-ICE debugger that I
bought on ebay.
	 Item number: 300240185362	

The only way I can get this to hit a breakpoint [when in a loop] is to
do the following:

		if(count >250)
			count = 0;  [breakpoint here]

Count is a loop counter.  If I reset the value of count to any
non-zero value, the breakpoint doesn't work.

Also doing the following doesn't work:

	if(count >250){
			count = 0;
			marker = 1;  [Breakpoint here]
			}

Again, the only way I can get the breakpoint to consistently work is
to code it as:

if(count >250)
count = 0;  [breakpoint here]

Just curious as to why this happens.

Should I buy a better JTAG-ICE?  Should I use something else to debug
software?  Thanks for your input.

Cheers,

David

Re: AVR Studio Update

2008-11-09 by englsprogeny

Notes:

1.  count and marker are both volatile
2.  I can get it to break with the following, as well.

	if(count >250){
			
			marker = 0;  [Breakpoint Here]

			count = 3;
			}

It's almost like I need to have something set to zero before the
breakpoint is triggered within an if statement.

4. I get breakpoints normally when I'm not in an if statement






--- In AVR-Chat@yahoogroups.com, "englsprogeny" <englsprogeny@...> wrote:
Show quoted textHide quoted text
>
> I am playing with AvrStudio.  I have a cheap JTAG-ICE debugger that I
> bought on ebay.
> 	 Item number: 300240185362	
> 
> The only way I can get this to hit a breakpoint [when in a loop] is to
> do the following:
> 
> 		if(count >250)
> 			count = 0;  [breakpoint here]
> 
> Count is a loop counter.  If I reset the value of count to any
> non-zero value, the breakpoint doesn't work.
> 
> Also doing the following doesn't work:
> 
> 	if(count >250){
> 			count = 0;
> 			marker = 1;  [Breakpoint here]
> 			}
> 
> Again, the only way I can get the breakpoint to consistently work is
> to code it as:
> 
> if(count >250)
> count = 0;  [breakpoint here]
> 
> Just curious as to why this happens.
> 
> Should I buy a better JTAG-ICE?  Should I use something else to debug
> software?  Thanks for your input.
> 
> Cheers,
> 
> David
>

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

2008-11-09 by Cat

Try to disable all optimization in the compiler.

--------------------------------------------------
Show quoted textHide quoted text
From: "englsprogeny" <englsprogeny@yahoo.com>
Sent: Sunday, November 09, 2008 11:26 AM
To: <AVR-Chat@yahoogroups.com>
Subject: [AVR-Chat] Re: AVR Studio Update

> Notes:
> 
> 1.  count and marker are both volatile
> 2.  I can get it to break with the following, as well.
> 
> if(count >250){
> 
> marker = 0;  [Breakpoint Here]
> 
> count = 3;
> }
> 
> It's almost like I need to have something set to zero before the
> breakpoint is triggered within an if statement.
> 
> 4. I get breakpoints normally when I'm not in an if statement
> 
> 
> 
> 
> 
> 
> --- In AVR-Chat@yahoogroups.com, "englsprogeny" <englsprogeny@...> wrote:
>>
>> I am playing with AvrStudio.  I have a cheap JTAG-ICE debugger that I
>> bought on ebay.
>> Item number: 300240185362 
>> 
>> The only way I can get this to hit a breakpoint [when in a loop] is to
>> do the following:
>> 
>> if(count >250)
>> count = 0;  [breakpoint here]
>> 
>> Count is a loop counter.  If I reset the value of count to any
>> non-zero value, the breakpoint doesn't work.
>> 
>> Also doing the following doesn't work:
>> 
>> if(count >250){
>> count = 0;
>> marker = 1;  [Breakpoint here]
>> }
>> 
>> Again, the only way I can get the breakpoint to consistently work is
>> to code it as:
>> 
>> if(count >250)
>> count = 0;  [breakpoint here]
>> 
>> Just curious as to why this happens.
>> 
>> Should I buy a better JTAG-ICE?  Should I use something else to debug
>> software?  Thanks for your input.
>> 
>> Cheers,
>> 
>> David
>>
> 
> 
> 
> ------------------------------------
> 
> Yahoo! Groups Links
> 
> 
> 
>

Re: AVR Studio

2008-11-10 by Eelco Jannink

Can it not be that your compiler does some optimizations ?

Ik skips needless loops etc when optimized.... (is a compiler option)

Eelco

Re: AVR Studio Update

2008-11-10 by Graham Davies

--- In AVR-Chat@yahoogroups.com, "englsprogeny" <englsprogeny@...> 
wrote:

> Should I buy a better JTAG-ICE?
> Should I use something else to debug
> software?  Thanks for your input.

I don't think you've given us nearly enough information to do more than 
guess at your problem.  What *version* of AVR Studio are you using?  
What compiler (including version)?  What switches and options?  Have 
you tried stepping through at the assembly code level?  Do you have a 
complete program (not just a snippet) that exhibits the problem?

Graham.

Re: AVR Studio Update

2008-11-11 by englsprogeny

Graham,

Sorry about the lack of detail.

Here's more:

AVR Studio
Version 4.14
Build 589

WinAVR GCC 20080610

----------------code-------------

#include <avr/io.h>

void main(void)

{
	
	volatile int count;
	volatile int marker;
	char readB;
	
	
	DDRB = 0x00;	//all inputs
	PORTB = 0xff;	//pullups

	DDRC = 0Xff;
	PORTC = 1;
	
	
	count= 1;
	
	while(1)
	{
		count++;
		

		readB = PINB;

		if(PORTC & 0x80)
			PORTC = 0x01;
		else

			PORTC = PORTC<<1;

	
		if(readB != 0xff)
			PORTC = ~readB;



	

		if(count >250){
			
			marker = 0;

			count = 3;
			}

	}

}
----------------end of code




--- In AVR-Chat@yahoogroups.com, "Graham Davies" <Yahoo37849@...> wrote:
Show quoted textHide quoted text
>
> --- In AVR-Chat@yahoogroups.com, "englsprogeny" <englsprogeny@> 
> wrote:
> 
> > Should I buy a better JTAG-ICE?
> > Should I use something else to debug
> > software?  Thanks for your input.
> 
> I don't think you've given us nearly enough information to do more than 
> guess at your problem.  What *version* of AVR Studio are you using?  
> What compiler (including version)?  What switches and options?  Have 
> you tried stepping through at the assembly code level?  Do you have a 
> complete program (not just a snippet) that exhibits the problem?
> 
> Graham.
>

Re: AVR Studio Update

2008-11-11 by Graham Davies

--- In AVR-Chat@yahoogroups.com, "englsprogeny" <englsprogeny@...> 
wrote:

> Sorry about the lack of detail.
> Here's more: ... [more] ...

OK, so I've installed AVR Studio Version 4.14 Build 589 and WinAVR 
20080610 in a VirtualBox virtual machine running WinXP Home SP3 (I do 
this to get around the difficulty of running different versions of 
tools on the same machine).  I created a GCC project consisting only 
of a file with the exact code you supplied.  You did not say what 
device you are running on, so I used an ATmega16 in an STK500.  For a 
JTAG-ICE I am using the AVR ICE-Cube that I make and sell:
http://www.ecrostech.com/AtmelAvr/AvrIceCube
and this connects to the STK500 via an expansion board:
http://www.ecrostech.com/AtmelAvr/Stk500Exp.

I built the project without changing any options, started debugging, 
set a breakpoint at line 44 (count = 3) and ran.  The breakpoint was 
hit.  So, if I've interpreted your information correctly, I cannot 
reproduce your problem.

You ask "Should I buy a better JTAG-ICE?".  I could say "yes", since 
mine appears to work where yours doesn't.  However, there are still 
possible differences in our setups, including the host PC, the device 
being debugged (which you did not specify) and fuse settings.  You 
have not replied to any of the posts about optimization settings.  I 
see -Os on the compile command line in my build window.

This is as much help as I can give you for now.

Graham.

P.S. By the way, if anyone is looking for (paid) help on AVR projects 
or in fact any embedded systems project, the job I am working on has 
been put on hold and I am presently available.

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

2008-11-11 by Cat

Good luck Graham,

Cat
Show quoted textHide quoted text
> Graham.
> 
> P.S. By the way, if anyone is looking for (paid) help on AVR projects 
> or in fact any embedded systems project, the job I am working on has 
> been put on hold and I am presently available.

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

2008-11-11 by Philippe Habib

I know this isn't really a job board, but I also just finished a  
project and the next thing I've had lined up has been "ready to go in  
one or two more weeks" for the last 3 months.  I'm in the Silicon  
Valley area.
Show quoted textHide quoted text
On Nov 11, 2008, at 12:11 PM, Cat wrote:

> Good luck Graham,
>
> Cat
>
>
>> Graham.
>>
>> P.S. By the way, if anyone is looking for (paid) help on AVR projects
>> or in fact any embedded systems project, the job I am working on has
>> been put on hold and I am presently available.
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>
>
>

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

2008-11-12 by Kathy Quinlan

Hi All,

List mom here :)

I see no problems with people who work full time asking for any work, 
when it is our livelihood and getting a job means the difference between 
meeting bills and eating or not, all the leads we can get is welcomed.

If it gets out of hand I may have to change my mind, BUT given the 
limited amount we have had, and the extremely  minimal impact it has had 
on the list so far I am happy :)

Regards,

Kat.
(List mom mode off)

Philippe Habib wrote:
Show quoted textHide quoted text
>
> I know this isn't really a job board, but I also just finished a
> project and the next thing I've had lined up has been "ready to go in
> one or two more weeks" for the last 3 months. I'm in the Silicon
> Valley area.
>
> On Nov 11, 2008, at 12:11 PM, Cat wrote:
>
> > Good luck Graham,
> >
> > Cat
> >
> >
> >> Graham.
> >>
> >> P.S. By the way, if anyone is looking for (paid) help on AVR projects
> >> or in fact any embedded systems project, the job I am working on has
> >> been put on hold and I am presently available.
> >
> >
> > ------------------------------------
> >
> > Yahoo! Groups Links
> >
> >
> >
>
>

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

2008-11-12 by Roy E. Burrage

Where have you been Maw?  You've been awfully quiet lately.

Personally, I'd much rather see requests for job leads from those who 
have contributed to, and supported, this list as Graham and Philippe 
have than to see so many requests for homework and class projects to be 
done.  "How do I turn this LED on" and "I need to read power mains 
voltage" kinds of requests get a bit old after a while.

It's one thing to have a problem with an assembler or compiler upgrade 
inconsistency, or new hardware idiosyncrasies, quite another to be 
asking the rest of us to do school work.

Check in once in a while so we know one of those crocigators hasn't 
gotten hold of you, will you Maw?


REB


Kathy Quinlan wrote:
> Hi All,
>
> List mom here :)
>
> I see no problems with people who work full time asking for any work, 
> when it is our livelihood and getting a job means the difference between 
> meeting bills and eating or not, all the leads we can get is welcomed.
>
> If it gets out of hand I may have to change my mind, BUT given the 
> limited amount we have had, and the extremely  minimal impact it has had 
> on the list so far I am happy :)
>
> Regards,
>
> Kat.
> (List mom mode off)
>
> Philippe Habib wrote:
>   
>> I know this isn't really a job board, but I also just finished a
>> project and the next thing I've had lined up has been "ready to go in
>> one or two more weeks" for the last 3 months. I'm in the Silicon
>> Valley area.
>>
>> On Nov 11, 2008, at 12:11 PM, Cat wrote:
>>
>>     
>>> Good luck Graham,
>>>
>>> Cat
>>>
>>>
>>>       
>>>> Graham.
>>>>
>>>> P.S. By the way, if anyone is looking for (paid) help on AVR projects
>>>> or in fact any embedded systems project, the job I am working on has
>>>> been put on hold and I am presently available.
>>>>         
>>> ------------------------------------
>>>
>>> Yahoo! Groups Links
>>>
>>>
>>>
>>>       
>>  
>>     
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>
>
>
> ------------------------------------------------------------------------
>
>
> No virus found in this incoming message.
> Checked by AVG - http://www.avg.com 
> Version: 8.0.175 / Virus Database: 270.9.0/1779 - Release Date: 11/10/2008 7:53 AM
>
>   


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

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

2008-11-12 by Kathy Quinlan

LOL I have been busy, first it was a house that we bought needed major 
renovations (re lining drywall and doing a few ceilings (then security 
cabling, computer network cabling and upgrade of power cabling) painting 
etc) plus work gets in the way lol

I am back doing electronics design work :)

Not much AVR stuff, most of it is Pro Audio, but where I can I get my 
AVR's in the products :)

I might need to learn ARM soon (I also want to learn FPGA as I have 
always wanted to build a computer from discrete logic gates, but with 
the problems of supply and the work in re working things to iron out 
bugs I think an FPGA with all the code done in schematic capture will 
full fill that dream :)

I hope everyone else is doing fine :)

Regards,

Kat.

Roy E. Burrage wrote:
Show quoted textHide quoted text
>
> Where have you been Maw? You've been awfully quiet lately.
>
> Personally, I'd much rather see requests for job leads from those who
> have contributed to, and supported, this list as Graham and Philippe
> have than to see so many requests for homework and class projects to be
> done. "How do I turn this LED on" and "I need to read power mains
> voltage" kinds of requests get a bit old after a while.
>
> It's one thing to have a problem with an assembler or compiler upgrade
> inconsistency, or new hardware idiosyncrasies, quite another to be
> asking the rest of us to do school work.
>
> Check in once in a while so we know one of those crocigators hasn't
> gotten hold of you, will you Maw?
>
> REB
>
> Kathy Quinlan wrote:
> > Hi All,
> >
> > List mom here :)
> >
> > I see no problems with people who work full time asking for any work,
> > when it is our livelihood and getting a job means the difference 
> between
> > meeting bills and eating or not, all the leads we can get is welcomed.
> >
> > If it gets out of hand I may have to change my mind, BUT given the
> > limited amount we have had, and the extremely minimal impact it has had
> > on the list so far I am happy :)
> >
> > Regards,
> >
> > Kat.
> > (List mom mode off)
> >
> > Philippe Habib wrote:
> >
> >> I know this isn't really a job board, but I also just finished a
> >> project and the next thing I've had lined up has been "ready to go in
> >> one or two more weeks" for the last 3 months. I'm in the Silicon
> >> Valley area.
> >>
> >> On Nov 11, 2008, at 12:11 PM, Cat wrote:
> >>
> >>
> >>> Good luck Graham,
> >>>
> >>> Cat
> >>>
> >>>
> >>>
> >>>> Graham.
> >>>>
> >>>> P.S. By the way, if anyone is looking for (paid) help on AVR projects
> >>>> or in fact any embedded systems project, the job I am working on has
> >>>> been put on hold and I am presently available.
> >>>>
> >>> ------------------------------------
> >>>
> >>> Yahoo! Groups Links
> >>>
> >>>
> >>>
> >>>
> >>
> >>
> >
> >
> > ------------------------------------
> >
> > Yahoo! Groups Links
> >
> >
> >
> > ----------------------------------------------------------
> >
> >
> > No virus found in this incoming message.
> > Checked by AVG - http://www.avg.com <http://www.avg.com>
> > Version: 8.0.175 / Virus Database: 270.9.0/1779 - Release Date: 
> 11/10/2008 7:53 AM
> >
> >
>
> [Non-text portions of this message have been removed]
>
> 
> ------------------------------------------------------------------------
>
>
> No virus found in this incoming message.
> Checked by AVG - http://www.avg.com 
> Version: 8.0.175 / Virus Database: 270.9.2/1782 - Release Date: 11/11/2008 7:32 PM
>
>

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.