Forum Menu




 


Log in Problems?
New User? Sign Up!
AVR Freaks Forum Index

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
rfdes
PostPosted: Jun 20, 2012 - 12:56 AM
Newbie


Joined: Apr 22, 2005
Posts: 11


Hi..
I haven't used this compiler for years and am attempting to fix some issues with an ATtiny11 project from the past.

I'm struggling to debug the generated COFF debug file under AVRstudio 4.19. I have not been able to 'see' the global variables in the watch window. It has been awhile, so if anyone knows why this is occurring, I would appreciate it.

I'm running icctiny & AStudio under winxp. I vaguely remember some coff/AStudio issues, so please refresh my memory.

thanks
Jim
 
 View user's profile Send private message  
Reply with quote Back to top
clawson
PostPosted: Jun 20, 2012 - 08:20 AM
10k+ Postman


Joined: Jul 18, 2005
Posts: 62922
Location: (using avr-gcc in) Finchingfield, Essex, England

Are you even sure that 4.19 knows about the format? Sure it can debug COFF produced by CodeVision but that's because it's a current compiler and Atmel presumably test 4.19 against its output but the same may not be true for some compiler no one has heard of for years. Maybe try and find an older version of Studio?

BTW do try making any variables you want to watch 'volatile'.

_________________
 
 View user's profile Send private message  
Reply with quote Back to top
js
PostPosted: Jun 20, 2012 - 08:42 AM
10k+ Postman


Joined: Mar 28, 2001
Posts: 20630
Location: Sydney, Australia (Gum trees, Koalas and Kangaroos, No Edelweiss)

Don't think it's Codevision, maybe ImageCraft?

_________________
John Samperi
Ampertronics Pty. Ltd.
www.ampertronics.com.au
* Electronic Design * Custom Products * Contract Assembly
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
rfdes
PostPosted: Jun 20, 2012 - 07:15 PM
Newbie


Joined: Apr 22, 2005
Posts: 11


Yes, it's Image-Craft Icctiny..

I was told by another user that ONLY AVR Studio 3.56 would properly allow you to debug the COFF files. I installed 3.56, now I am able step through the code, but cannot 'see' any watched variables, even though I am declaring my global variables as 'volatile'. Each time I add a watch, the watch window shows 'Not in Scope'.

Any idea what the problem is? Is this related to the non-Sram feature of these parts (ATtiny 11, etc.)?

Any help would be appreciated..
Jim
 
 View user's profile Send private message  
Reply with quote Back to top
rfdes
PostPosted: Jun 20, 2012 - 09:32 PM
Newbie


Joined: Apr 22, 2005
Posts: 11


Ok.. The ability to view variables only appears to 'break' when attempting to declare variables as GLOBAL.
Here is a short example:

Code:
char var1;
char var2;

void main(void)
{
   var2 = var1 + 7;
   func1();
}

void foo (void)
{
   func1--;
}

This compiles/links without error(as it should).
When debugging coff file global variables var1 & var2 not visible in Studio 3.56. Program stepping OK.


Code:
void main(void)
{
   static char var1;
   static char var2;

   var2 = var1 + 7;
   func1();
}

void func1(void)
{
   var2--;
}

This compiles/links ok also, but this time the AVR studio simulator 'sees' the variables, var1 & var2 in the watch window.

Anyway, I'm not sure why I'm wasting my time with this. Just thought that this tool has been around a long time so certainly this is a know issue and thus a solution should be available (maybe what I'm doing IS the solution).

Thanks for listening..
Jim

$ Fixed code tags - JS $
 
 View user's profile Send private message  
Reply with quote Back to top
js
PostPosted: Jun 20, 2012 - 10:57 PM
10k+ Postman


Joined: Mar 28, 2001
Posts: 20630
Location: Sydney, Australia (Gum trees, Koalas and Kangaroos, No Edelweiss)

Both the ATtiny 11 and Studio 3.56 are very old. The ATtiny 11 is no longer recomended for new design ie obsolete.

Are you doing this for an exercise and do you have a chip on hand to play with? You may not be able to buy any.

_________________
John Samperi
Ampertronics Pty. Ltd.
www.ampertronics.com.au
* Electronic Design * Custom Products * Contract Assembly
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
larryvc
PostPosted: Jun 20, 2012 - 11:14 PM
Raving lunatic


Joined: Dec 06, 2007
Posts: 2512
Location: Redmond, WA USA

rfdes wrote:
This compiles/links without error(as it should).

No, That code will never compile without errors.

_________________
Larry

Those afraid to embrace the future will quickly fade into the past. - larryvc
 
 View user's profile Send private message  
Reply with quote Back to top
rfdes
PostPosted: Jun 20, 2012 - 11:50 PM
Newbie


Joined: Apr 22, 2005
Posts: 11


I just happen to have a handful of parts from years past. I figured why not use them for the task that I have in mind.

In response to the the code not compiling. Yes, you are correct. I was simply trying to give an example of the issue that I am having.

Jim
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT + 1 Hour
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2006 The PNphpBB Group
Credits