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
ka7ehk
PostPosted: Jul 08, 2012 - 06:46 AM
10k+ Postman


Joined: Nov 22, 2002
Posts: 12196
Location: Tangent, OR, USA

You know, it is really disconcerting to do a swap on a uint8 which reads 35 in the Locals view window and have it become 50, only to realize that it is displaying in bloody decimal!

Now, I have looked and looked and looked for a way to change the display format to hex or binary. Just by accident, I discovered that command-click brings up a contextual menu with the option for hex display.

Well, bugger the fact that it changes everything, not just the line you clicked. But, on top of that, there is no option for binary!

So, how can you view binary? Any hope for some lines decimal, some hex, and some binary? Or, will I have more success with a pint of the best local brew?

Jim

_________________
Jim Wagner
Oregon Research Electronics, Consulting Div.
Tangent, OR, USA

"The only thing standing between us and victory is defeat" P.G.Wodhouse in Wooster & Jeeves series
 
 View user's profile Send private message  
Reply with quote Back to top
larryvc
PostPosted: Jul 08, 2012 - 06:53 AM
Raving lunatic


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

The brew, and I will join you, just as soon as I am allowed to do that again. Wink

_________________
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
meolsen
PostPosted: Jul 08, 2012 - 10:13 AM
Resident


Joined: Jul 27, 2011
Posts: 582
Location: Atmel, Norway

Quote:

So, how can you view binary? Any hope for some lines decimal, some hex, and some binary? Or, will I have more success with a pint of the best local brew?


I've added an Improvement request into our internal bugtracker, AVRSV-3637 for further reference

_________________
:: Morten
 
 View user's profile Send private message  
Reply with quote Back to top
clawson
PostPosted: Jul 08, 2012 - 10:55 AM
10k+ Postman


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

I thought you just right clicked and said "view as hex" on the context menu - certainly the case in the generic VS2010.

EDIT: yes it's there, see picture...

_________________
 
 View user's profile Send private message  
Reply with quote Back to top
meolsen
PostPosted: Jul 08, 2012 - 11:32 AM
Resident


Joined: Jul 27, 2011
Posts: 582
Location: Atmel, Norway

Yes, but this is not on a per-line basis

_________________
:: Morten
 
 View user's profile Send private message  
Reply with quote Back to top
clawson
PostPosted: Jul 08, 2012 - 11:43 AM
10k+ Postman


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

You sure about that? I just tried it and switching it (actually quite annoyingly) switches the display of everything. I'd actually like it be able to set different interpretations per item myself.

(oh and it appears to be "sticky" from one debug session to the next).

_________________
 
 View user's profile Send private message  
Reply with quote Back to top
JohanEkdahl
PostPosted: Jul 08, 2012 - 12:41 PM
10k+ Postman


Joined: Mar 27, 2002
Posts: 18757
Location: Lund, Sweden

I would go look in the Visual Studio documentation (i.e. somewhere in MSDN from Microsoft). For items in the watch window you can (or at least you could) specify how the item should be displayed by adding a specifier to the item (e.g. the name of the variable was followed by a comma and a character specifying format and stuff). This works in the watch window, so you'd have to add to that window rather than looking in locals.

Not sure if it did binary, though...

I do not have the specific documentation on this handy right now, and I have other stuff in the pipe. Come back if you could not find it and I'll have a go at locating it tonight. (And, IIRC it has even been discussed here at 'freaks before).

And Jim, the hex to binary converter is right on the top of your shoulders.. Wink
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
meolsen
PostPosted: Jul 08, 2012 - 01:24 PM
Resident


Joined: Jul 27, 2011
Posts: 582
Location: Atmel, Norway

clawson wrote:
You sure about that? I just tried it and switching it (actually quite annoyingly) switches the display of everything. I'd actually like it be able to set different interpretations per item myself.

(oh and it appears to be "sticky" from one debug session to the next).


This is in the watch window i presume? Jim talked about the locals/autos window

_________________
:: Morten
 
 View user's profile Send private message  
Reply with quote Back to top
JohanEkdahl
PostPosted: Jul 08, 2012 - 01:29 PM
10k+ Postman


Joined: Mar 27, 2002
Posts: 18757
Location: Lund, Sweden

OK, I had a look. And Atmel seems to have screwed this up..

1) The documentation on how to do this in Visual Studio is e.g. here: http://msdn.microsoft.com/en-us/library/75w45ekt

2) Trying out a uint8_t variable b in Atmel Studio 6 (1863), and trying to display it as "b,x" in Atmel Studio you get this info about what is being watched: "unsigned long" and the value displayed (always zero?) does not reflect the value of the variable. Specifying ",o" for octal seems to work though (almost as good as hex - just as easy to convert to binary in your carbon-based converter).

HTH!
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
clawson
PostPosted: Jul 08, 2012 - 03:41 PM
10k+ Postman


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

Quote:

This is in the watch window i presume? Jim talked about the locals/autos window

You are telling me the different windows that dio the same operate differently?

EDIT: no you are wrong. The locals window operates exactly the same was the watch window and what's more the same "Hexadecimal display" option applies to both and is sticky.

_________________
 
 View user's profile Send private message  
Reply with quote Back to top
meolsen
PostPosted: Jul 08, 2012 - 04:04 PM
Resident


Joined: Jul 27, 2011
Posts: 582
Location: Atmel, Norway

clawson wrote:
Quote:

This is in the watch window i presume? Jim talked about the locals/autos window

You are telling me the different windows that dio the same operate differently?

EDIT: no you are wrong. The locals window operates exactly the same was the watch window and what's more the same "Hexadecimal display" option applies to both and is sticky.


No, they should do the same. When I change to hex display, all variables are shown in hex. As I read the question, Jim wanted to change this on a per-line basis

_________________
:: Morten
 
 View user's profile Send private message  
Reply with quote Back to top
larryvc
PostPosted: Jul 08, 2012 - 05:24 PM
Raving lunatic


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

Hi Morten,

Have you seen this thread?

http://www.avrfreaks.net/index.php?name ... highlight=

_________________
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
larryvc
PostPosted: Jul 08, 2012 - 05:39 PM
Raving lunatic


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

JohanEkdahl wrote:
OK, I had a look. And Atmel seems to have screwed this up..

Specifying ",o" for octal seems to work though (almost as good as hex - just as easy to convert to binary in your carbon-based converter).

HTH!

Specifying ,b displays in binary, at least it does on my Win7 machine. Wink

_________________
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
JohanEkdahl
PostPosted: Jul 08, 2012 - 06:04 PM
10k+ Postman


Joined: Mar 27, 2002
Posts: 18757
Location: Lund, Sweden

Windows version sould not have anything to do with this. I tried a few different format specifiers and you can see the result below. I also attached a screen shot of what it looks like when you use the context menu to shift to hexadecimal.

Results:
- The hex format specifier does not work
- The binary format specifier does not work
- The octal format specifier works
- The "Hexadecimal display" alternative in the context menu affects all items but those that have working format specifiers (i.e. octal).
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
larryvc
PostPosted: Jul 08, 2012 - 06:15 PM
Raving lunatic


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

Hmm?

_________________
Larry

Those afraid to embrace the future will quickly fade into the past. - larryvc


Last edited by larryvc on Jul 08, 2012 - 06:20 PM; edited 2 times in total
 
 View user's profile Send private message  
Reply with quote Back to top
JohanEkdahl
PostPosted: Jul 08, 2012 - 06:17 PM
10k+ Postman


Joined: Mar 27, 2002
Posts: 18757
Location: Lund, Sweden

My Atmel Studio is build 1863. What's yours, Larry?
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
larryvc
PostPosted: Jul 08, 2012 - 06:22 PM
Raving lunatic


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

The same, Johan. It's weird that we are not getting the same results.

_________________
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
JohanEkdahl
PostPosted: Jul 08, 2012 - 06:39 PM
10k+ Postman


Joined: Mar 27, 2002
Posts: 18757
Location: Lund, Sweden

If you have a small test project/solution, can you attach a ZIP of it here? I have attached mine below..
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
meolsen
PostPosted: Jul 08, 2012 - 07:05 PM
Resident


Joined: Jul 27, 2011
Posts: 582
Location: Atmel, Norway

larryvc wrote:
Hi Morten,

Have you seen this thread?

http://www.avrfreaks.net/index.php?name ... highlight=


I have read it. I'll look through the threads when I get into office on monday and make some bugzez

_________________
:: Morten
 
 View user's profile Send private message  
Reply with quote Back to top
ka7ehk
PostPosted: Jul 08, 2012 - 08:23 PM
10k+ Postman


Joined: Nov 22, 2002
Posts: 12196
Location: Tangent, OR, USA

Never having used "Visual Studio" (my visual desktop programming environment is RealBasic), this is totally new to me. So, thanks for the hints. I'll give it a try.

Jim

_________________
Jim Wagner
Oregon Research Electronics, Consulting Div.
Tangent, OR, USA

"The only thing standing between us and victory is defeat" P.G.Wodhouse in Wooster & Jeeves series
 
 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