Dean's Atmel Studio Extensions

Go To Last Post
37 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi all! A few months ago at work I've had to switch from my preferred text editor (Sublime Text) to Atmel Studio to ease development of our current reference design project, and I've found a few things that were bugging me. Since the tools team is a bit tied up with other projects, I've started fixing them myself with a few basic extensions.

They're all open source and if you have any suggestions on things for me to make next, let me know.

Feedback welcome - the titles will give you direct downloads from my site rather than via the Atmel Gallery. That means that you don't need to sign up to download and install them, but you will be getting early beta code rather than the stable versions I push via the gallery. If you don't want potentially unstable code, use the gallery versions instead.

LSSClassifier:

Provides syntax highlighting to LSS files inside Atmel Studio. Makes reading LSS output from the compiler a bit easier.

HEXClassifier:

Provides syntax highlighting to HEX/EEP files inside Atmel Studio. Makes reading HEX output from the compiler a bit easier.

MarginOfError:

Shows error/warning symbols next to source lines that produce them after a build has completed. Mouse over the icon to see the error/warning text (note: only updates after a build, so will not show Naggy warnings live).

Stack Checker:

For TINY, MEGA and XMEGA only; shows the maximum amount of stack used in your current debug session, so you can see if you're running out of space.

DataSizeViewer:

Shows and sorts the sizes of symbols in your project - i.e. how large your functions and variables are in the final compiled binary. Double click a symbol to jump to it in your code.

BuildTaskbarOverlay:

Shows an overlay icon on the Windows 7 taskbar showing the last compile result - whether the compilation was successful, failed, in progress or completed with warnings.

- Dean :twisted:

Make Atmel Studio better with my free extensions. Open source and feedback welcome!

Last Edited: Tue. Dec 3, 2013 - 02:10 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I don't suppose you'd fancy doing a tutorial to show how us mere mortals could write such extensions?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

There's a PDF in the gallery that shows a simple setup and a simple "Hello World" Extension (chapter 2, The Atmel Studio IDE SDK). The SDK is available from the partner site at the gallery.

:: Morten

 

(yes, I work for Atmel, yes, I do this in my spare time, now stop sending PMs)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Someone else posted a link to a tutorial here a few weeks ago. Could be for plain MS Visual Studio, rather than specific Atmel Studio, though. I'll try to see if I can find it..

So, you're going to be a C#/VB.NET programmer now, Cliff? :wink:

"He used to carry his guitar in a gunny sack, or sit beneath the tree by the railroad track. Oh the engineers would see him sitting in the shade, Strumming with the rhythm that the drivers made. People passing by, they would stop and say, "Oh, my, what that little country boy could play!" [Chuck Berry]

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

So, you're going to be a C#/VB.NET programmer now, Cliff?

Well I've done a bit of VB in my time and I've worked through some C# examples. It's just that there are a few things I'd like in the editor for my own entertainment. More than anything I'd like to know what is actually visible/changeable.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You need Visual Studio 2010 Professional to develop extensions. Since Atmel Studio is built on the Visual Studio Shell, you can follow Microsoft's extensive documentation on MSDN on editor extending. Pretty much everything can be hooked and changed within reason. I'm brand new to all of this (started with C# for my LUFA integration, then branched out) so I'm a terrible candidate to give directions to others.

There's also the public Atmel Studio SDK which adds the interfaces for Atmel specific stuff like debugging and programming, and device information. You don't have to use that if you're making more general extensions, however.

In any case, I'm currently looking for more suggestions for new extensions. What do you think "boy, I wish it had X" when you look at the current Studio release? Throw everything in here and I'll see what's actual possible/feasible.

- Dean :twisted:

Make Atmel Studio better with my free extensions. Open source and feedback welcome!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Margin Of Error:

Yes! I often find myself wondering, "so where's the cursor hiding?"

274,207,281-1 The largest known Mersenne Prime

Measure twice, cry, go back to the hardware store

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ok, silly question from me. I want to install say the stack checker. so I download it and then ??? :oops:

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Run it, and it will prompt to install.

- Dean :twisted:

Make Atmel Studio better with my free extensions. Open source and feedback welcome!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for these extensions Dean.

Any joy with naggy for c++?

regards
Greg

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Not yet, can't get the darn thing to compile.

- Dean :twisted:

Make Atmel Studio better with my free extensions. Open source and feedback welcome!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I like MarginOfError and I thank you.....

Minor issue., on my Studio 6.1 it doesn't update the margin markers when I just do a Compile (Ctrl+F7) of a file.

Build Solution (F7) and Continue (F5) work fine.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
Minor issue., on my Studio 6.1 it doesn't update the margin markers when I just do a Compile (Ctrl+F7) of a file. 

Compiling a file does not generate a linked output file so the system does not know what will happen with memory. I think that not updating the memory usage is the reasonable behaviour.

regards
Greg

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The Margin of Error extension just hooks the build complete event and updates the margins from the error list. That means that it will only pick up changes when a build is performed, rather than live (unfortunately, it seems there is no event for when something updates the error list such as Naggy).

- Dean :twisted:

Make Atmel Studio better with my free extensions. Open source and feedback welcome!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
Provides syntax highlighting to LSS files inside Atmel Studio. Makes reading LSS output from the compiler a bit easier
Dean these are some NICE extensions, esp. for LSS files ! Maybe a check thru the old Studio wishlist post is a step in the right direction for further ideas. I'll look through there whenever I have time.

1) Studio 4.18 build 716 (SP3)
2) WinAvr 20100110
3) PN, all on Doze XP... For Now
A) Avr Dragon ver. 1
B) Avr MKII ISP, 2009 model
C) MKII JTAGICE ver. 1

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Dean,
what about a pop-up structure viewer!?!

when you hover the mouse over a char or an int the system displays the value.

What if you hover over an object or a struct... could the entire struct/array/obj member vars be displayed in a window? If the struct/array/obj contains pointers then hovering over them could bring up a child window.

I would be impressed!

regards
Greg

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

object or a struct... could the entire struct/array/obj member vars be displayed in a window?

This... works? See attachment.

Attachment(s): 

:: Morten

 

(yes, I work for Atmel, yes, I do this in my spare time, now stop sending PMs)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

By pressing on the + symbol for a structure I get this sort of display. Thanks. If I try the same for an object I get the refactoring menu. is there some extra step?

Thanks

regards
Greg

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

No, as you see, my image is of an object.

:: Morten

 

(yes, I work for Atmel, yes, I do this in my spare time, now stop sending PMs)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Added new HEX classifier - it's basic at the moment, but somewhat useful still (Morten and I are working on making it reformat the view into something a bit more interesting rather than just re-colouring the fields as it is now).

Updated the MarginOfError extension to fix the flickering tooltips and the icons overlaying over breakpoints.

- Dean :twisted:

Make Atmel Studio better with my free extensions. Open source and feedback welcome!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks Dean. I will try it out.

Some feedback on the elf data size viewer.

When I open the elf data viewer the name field takes 90% of the window with the storage class and size at the far right of the window. I always need to manually re-size the columns.

is it possible to auto-size the columns so that the name/class/size are all close together?

Thanks

regards
Greg

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Aww, Morten specifically coded it to do that to make it look better, and if I remove that he will super-sadface. Why do you want that?

- Dean :twisted:

Make Atmel Studio better with my free extensions. Open source and feedback welcome!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Dean,
the problem is that the size and storage class are so far away that I can't align them with the names.

Maybe it works well if the window is not very wide..... but on a wide window it doesn't work. On the other and if the window is narrow.... then there is probably no need to right justify.

I thought I would provide the feedback.

ps.... I have successfully loaded the hex classifier direct form your site as the extension manager never seems to work for me..... but what doe sit do? is there some doco somewhere?

regards
Greg

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hrm, I guess I could make it user-configurable, but Morten will be unhappy as I said. He wasn't happy when I changed the sorting code...

For the HEX classifier; it's not of great utility to most, but useful for me at least. If you open a HEX file in Atmel Studio (or from your projet's Output node in the Solution Explorer) it colors the various HEX fields to make it easier to see where the data, address, etc. sections are.

- Dean :twisted:

Make Atmel Studio better with my free extensions. Open source and feedback welcome!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Is anyone feeling brave enough to try the latest DataSizeViewer and HEX Classifier extensions from the original post? The former is now self-contained and now works with ELF files opened for debugging, while the latter now works with SREC files (thanks to Morten). Both will be uploaded to the gallery once someone confirms they do not catch fire.

- Dean :twisted:

Make Atmel Studio better with my free extensions. Open source and feedback welcome!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I gotta to try your Margin of Error extension. It look like a good functionality. Thanks Dean.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Morten and I are working on improving the usefulness of the HEXClassifier - the latest version on my site now decomposes the HEX/SREC/EEP data section into ASCII so you can see any strings in the final binary.

- Dean :twisted:

Make Atmel Studio better with my free extensions. Open source and feedback welcome!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

return.of wrote:
I gotta to try your Margin of Error extension. It look like a good functionality. Thanks Dean.

You must!

Sometimes I'd click on an error, and then couldn't find where it put the cursor. Margin of Error makes it clear.

274,207,281-1 The largest known Mersenne Prime

Measure twice, cry, go back to the hardware store

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

MarginOfError (version on my site) now also shows yellow/red overview markers next to the scrollbar on the right-hand side, so you can quickly scroll to the line with the error in the currently opened document.

- Dean :twisted:

Make Atmel Studio better with my free extensions. Open source and feedback welcome!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
MarginOfError (version on my site) now also shows yellow/red overview markers next to the scrollbar on the right-hand side, so you can quickly scroll to the line with the error in the currently opened document.
Nice addition to a very useful plugin. I'll have to update it. I've started using Eclipse on a Linux project and it has that feature and it's really nice. I installed the stack checker but haven't been able to figure out how to use it.

Stupid Captcha's

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Another fix - the algorithm I used to place the markers next to the scrollbar was very inaccurate; while I still haven't worked out the exact placing it's now very close. As a bonus, clicking on the error indicators will now jump to the error in the document.

For the stack checker: hit the big question mark button on the toolbar for instructions.

- Dean :twisted:

Make Atmel Studio better with my free extensions. Open source and feedback welcome!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Here's an idea for you, Dean :wink: :

An "ordinary MS Visual Studio" has, in the context menu for solution and project nodes in the Solution Explorer, the possibility to open an ordinary Windows Explorer on/in that folder. Personally I exercise that a lot at work, and sorely miss it in Atmel Studio.

Would it be possible to implement a plugin/extension for that?

What would I need to donate for you to do that? :wink:

"He used to carry his guitar in a gunny sack, or sit beneath the tree by the railroad track. Oh the engineers would see him sitting in the shade, Strumming with the rhythm that the drivers made. People passing by, they would stop and say, "Oh, my, what that little country boy could play!" [Chuck Berry]

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Err - in AS6.1, right-clicking an item in the Solution Explorer has a "Open File Location" menu entry. Isn't that what you're after?

- Dean :twisted:

Make Atmel Studio better with my free extensions. Open source and feedback welcome!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

Err - in AS6.1, right-clicking an item in the Solution Explorer has a "Open File Location" menu entry.

Well, ill be...

To my defense, it should be said that what a standard Visual Studio has is that operation on "folders" in the Solution explorer - in Atmel Studio they are on the individual files.

But that will do just fine, Dean. (You just missed out on a donation :wink:)

"He used to carry his guitar in a gunny sack, or sit beneath the tree by the railroad track. Oh the engineers would see him sitting in the shade, Strumming with the rhythm that the drivers made. People passing by, they would stop and say, "Oh, my, what that little country boy could play!" [Chuck Berry]

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It's experimental, but the latest MarginOfError version on my site will live-update, so it will now work with Naggy in real time.

- Dean :twisted:

Make Atmel Studio better with my free extensions. Open source and feedback welcome!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi Dean,

 

i really like your extensions, and i use them regularily. But i have now installed the Stack Usage Checker, which corectly fills the RAM of the Controller with 0xdeadbeef (can be seen in the memory window while debugging) but the graph always shows 100% usage . no matter how much 0xdeadbeef still is in ram. Is there a trick to making it work?

 

Greetings from germany

Malte

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Just curious if these will get compatibility with Atmel Studio 7?  A few work in 7, but the one I really want (stack checker) isn't.  Thanks for them though. I use them often.