Autocomplete feature in AVR Studio 5

Last post
25 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

In the video AVR Studio 5: How to use the Editor, the man uses a supposed autocomplete feature (without entering ctrl+enter) on AVR Studio 5. How can I enable it? I could not find it on google.

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

Quote:
How can I enable it?
I would like to know that too, if it can be enabled then it can be DISABLED..which is what I would want to do. :)

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

Someone knows the answer?

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

pvrego wrote:
Someone knows the answer?

Someone knows.

Is there anyone at AVR who can answer this question? It's getting asked over at Stack Overflow, http://stackoverflow.com/questions/8191671 and nobody there knows the answer. This forum entry is the first match to a Google search for "AVR Studio 5 Autocomplete."

When you post an answer, please delete all of the posts in this forum entry except the question and the answer (including this one), so that we can clean up the noise have a nice, clean, canonical entry.

Thank you.

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

I don't understand this thread. Auto-complete just works doesn't it?

See this video I recorded of my copy of AS5 auto-completing in a very similar way to the Atmel video. Is this not what you are talking about?

http://www.youtube.com/watch?v=6vKAp0wyDbs&feature=youtu.be

BTW that video recorded by CamStudio from RenderSoft which is absolutely brilliant for recording Windows. (I also converted it to a tight compression format using VirtualDub for upload to Youtube).

 

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

clawson wrote:
I don't understand this thread. Auto-complete just works doesn't it?

See this video I recorded of my copy of AS5 auto-completing in a very similar way to the Atmel video. Is this not what you are talking about?

http://www.youtube.com/watch?v=6vKAp0wyDbs&feature=youtu.be

This doesn't happen with my AVR Studio. I have to enter CNTRL+SPACE for the completion to come when typing the names (but it works for "." typing). Did you type this on the video? It looks like it, because the "autocomplete" has a delay when compared to typing speed. If this is the case, it's not automatic.

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

robertwharvey wrote:

Someone knows.

Well, I'd like to be one of this "someone" list hehe.

robertwharvey wrote:

When you post an answer, please delete all of the posts in this forum entry except the question and the answer (including this one), so that we can clean up the noise have a nice, clean, canonical entry.

I'm sure you have noticed that we cannot (and neither should) delete other's people posts. Sorry.

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

Before I recorded that video I did do a couple of "dry runs" to decide what I was going to type to show it in action. It seems to me that there may be some form of "caching" involved because the first time I started to type ADCSRA (for example) I'd actually got as far as about ADCSR before the auto-complete appeared. Yet when I did it the second or third time I didn't have to type much more than ADC before the options including ADCSRA appeared.

The "mystring" on the other hand was virtually instantaneous. I only typed about "my" when it popped up the "mystring" suggestion.

So it does look like it has to go away and parse the .h files when you first start to type but I imagine that once it has read io.h and (in this case, because I was writing for mega16) iom16.h, then further "look ups" happen much quicker.

I also thought at first that maybe it would only work if the file already contained a #include that would lead to the symbol definition so before I recorded the video I had:

#include 

(because I was thinking of using printf()) and I also had:

#include 

as I planned to use strlen() in the example. But as a test to see if it was dependent on the #include's being present I later removed both of them from the file and yet it would still auto-complete. However what I didn't check was whether it was because I HAD those previously and it had cached the .h contents that they still subsequently worked. I guess I should have tried an example from a .h file that was never #include'd and see if it would be found anyway.

EDIT: actually I just went back and tried that. Intending to use cosh() from I started (slowly!) typing 'c','o','s','h' but it did not autocomplete though when I typed:

float f;

I only got as far as the "fl" before the rest appeared.

As a further test I then when back to the top of the file and typed:

#include <

on typing the '<' it automatically provided the closing '>'

#include <>

and I only got as far as typing:

#include 

when it popped up "math.h" as a suggestion - which I took by hitting [Enter].

Having added that #include I then started to type the line:

f = cos

At that point it colour highlighted the "cos" (which it didn't do previously) to show that it was a recognised function - but there was no auto-complete. However when I typed the 'h', that is:

f = cosh

it popped up a window with the two suggestions "cosh()" and "coshf()". I hit [Enter] with the highlight on cosh and it complete it with opening and closing parenthesis (rather curiously split over two line??).

So, yes, auto-complete works but I think you have to make sure you have the right #include's in place for it to be able to wok (which I guess makes sense, otherwise, amongst hundreds of .h in the library which one(s) would it chose?).

I guess what you could do if you don't know which .h various library functions live in is to start every file with:

#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 

to make sure you have all the bases covered! ;-)

Cliff

 

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

Fun piece of trivia: those AS5 usage videos were actually recorded in Atmel Norway by a coworker while I was working there, and then re-dubbed by the marketing team before pushing them out to production. I'm actually the typist on one or two videos (I forget which). You'll know I'm the one because there's a few typos the person makes during the explanation -- I was typing English into a Norwegian keyboard, which follows the English UK physical layout and not the English US layout we Australians use. Drove me mental during my stay, so this time I'm bringing my own keyboard.

- Dean :twisted:

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

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

My wife's laptop is the opposite - all other laptops and computers here are UK keyboards but we bought her laptop while on holiday in the States and it has a US keyboard. It bugs the living daylights out of me trying to touch type at my normal speed on it!

 

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

Quote:

which I guess makes sense, otherwise, amongst hundreds of .h in the library which one(s) would it chose?)

And even more to the point: If you have two (non-system) header files with two separate functions named foo, which one is it going to suggest?

Suggesting functions from e.g. header files that have not been included makes little sense, and would be "technically awkward".

And it would probably drive me mad. :D

"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]

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

Any auto completion would drive me mad.

It would be more productive to just make Studio 5 compile properly, and have sensible prompts / defaults.

David.

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

Quote:

My wife's laptop is the opposite - all other laptops and computers here are UK keyboards but we bought her laptop while on holiday in the States and it has a US keyboard. It bugs the living daylights out of me trying to touch type at my normal speed on it!

I have a vague memory of using an old computer as a child with an English UK keyboard (gigantic enter key, swapped punctuation key locations) but we've been US style for many, many years now. The Norwegian keyboard layout is completely useless for C programming - seriously, look it up! - but as I said I still struggled due to the slightly different physical layout when logically switched to English.

Looking through those ASF/AS5 introductory videos, I honestly can't remember which one I helped out with. They do bring back memories; one of my first tasks was to walk Glen (AVR training extrodinaire) through the various steps with the framework and datasheet to get a LED blinking. I laugh now, since now all I can picture is Glen's face with the re-dubbed American accent saying his lines. I prefer the original Glen versions, they had far more character and would make you laugh if you could hear them.

Quote:

Any auto completion would drive me mad.

It would be more productive to just make Studio 5 compile properly, and have sensible prompts / defaults.

It's provided by a third-party component called "VisualAssist" which Atmel has licenced for AVRStudio 5, and provides the same sort of functionality as the native Visual Studio Intellisense, if that was available. It actually works quite well. If you don't like it, turn off VisualAssist from the VisualAssist menu.

Quote:

And even more to the point: If you have two (non-system) header files with two separate functions named foo, which one is it going to suggest?

If you try to ALT-G an identifier with multiple definitions, you'll get a drop-down asking which one you want to go to. I'm not sure what the auto-completion would do about it however.

- Dean :twisted:

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

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

Quote:

gigantic enter key,

By that you mean "normal sized" Enter key I take it? ;-) That is one of the main things that defeats my touch typing as the yanks put a large [\] key where half the [Enter] key is supposed to be! (oh and they hid [£] all together!)

 

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

Quote:
Any auto completion would drive me mad.
Tbh, its one of the few things i like in AS5 , especially when working with the XMegas with their wealth of registers. The other thing i really like is that AS5 needs about 3 minutes to start on my notebook :P . Ow and lets not forget about the very useful initial setup, aarghh.

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

clawson wrote:
Before I recorded that video I did do a couple of "dry runs" to decide what I was going to type to show it in action. It seems to me that there may be some form of "caching" involved because the first time I started to type ADCSRA (for example) I'd actually got as far as about ADCSR before the auto-complete appeared. Yet when I did it the second or third time I didn't have to type much more than ADC before the options including ADCSRA appeared.
...

I agree with you, I guess that there should be a type of caching in AS5. This could explain why it takes some time to appear.

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

Well, Simon Ins from Stack Overflow answered how to enable/disable the autocomplete:

Quote:
In AVR Studio 5 select the VAssistX menu and click on 'Enable/Disable Visual Assist X". This should turn on and off the feature.

heeh I'm surprised I did not realize this before. I hope I don't continue this noob for so long :-p

Thank you all comments.

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

If VAssistX would not be included in AS5 how much smaller would the install be?

I still think that AS5 should have checboxes at the download point so the user can choose what he wants and needs to use rather than DL a GB of stuff which will never be used.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

Quote:

If VAssistX would not be included in AS5 how much smaller would the install be?

My guess is not a whole lot - it's a small plugin. The bulk of AS5 comes from the inclusion of ASF and the Toolchain, which weigh several hundred megabytes each.

- Dean :twisted:

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

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

Quote:
The bulk of AS5 comes from the inclusion of ASF and the Toolchain
Ok then, AVR8 assembler2 only "Toolchain", no ASF. Back to 50M or less? :wink:

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

Quote:

The bulk of AS5 comes from the inclusion of ASF and the Toolchain, which weigh several hundred megabytes each.

The complete WinAVR install package is currently at about 28 MB.

Say Dean, when you get to Trondheim, could you take some photos for us where the Toolchain pelple aim a shotgun at their feet and pull the trigger... :wink:

OT: Now that I perhaps hot some attention from an Atmel employee (no not you, Dean) I'll just toss in that the AVR Studio 5 help is fubar. I have no locally installed help, and when I try to get to the online help, for reading or to install locally, it seems AS5 goes to MSDN to look for Atmel stuff. I am saying this here since there since I know of no official way to report AS5 bugs, and just dropping this here and there just might make it read by someone at Atmel..

"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]

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

Quote:

The complete WinAVR install package is currently at about 28 MB.

But when decompressed and installed, WinAVR 20100110 takes 250MB of space, vs Atmel's 377MB. Definitely a big difference, but not as big as you'd think. I think the extra size of the Atmel version is due to the added architectures since the old WinAVR release, but I'm not sure. AS5 is includes everything, so the apparent size is the IDE, Toolchain and ASF. Previously you had to split these components into three installs, which means the sizes appear lower unless you add them all together.

That said, it would be nice if it was a little more modular, so that people who really, really don't want to use ASF for instance don't have to install it -- that could just disable the "Example Projects" feature and remove all the templates except for the basic C/C++ template.

- Dean :twisted:

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

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

Quote:
people who really, really don't want to use ASF
ie Anyone not using C?

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

Quote:

I'll just toss in that the AVR Studio 5 help is fubar.

Johan,

Note that to use the disk based (not online) help you have to install it. That would be great (though after a 0.6GB download I'm not clear why it isn't simply decompressed/installed anyway??) if it were not for the fact that it is signed with a security certificate and that certificate expired on 10th October 2011. When you try to install following the procedure explained under the help menu entry for help manager you will simply see "unhandled exception" as a result of this. The solution (as found by some clever person here - see if you can search out the thread) is to set your PC data back to something like 7th October 2011 just while you do the install. However note that when I did this, because I'm connected by VPN to an Active Directory server the time synchronization went completely out of the window and it took me several days to repair the damage caused. So be warned!

EDIT it was "tblough" in this thread:

http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=112747&start=0&postdays=0&postorder=asc&highlight=

 

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

Quote:

Johan,

Note that to use the disk based (not online) help you have to install it


I tried that, but going through the procedure in AS5 to install local, disk-based help I am thrown to the MSDN site which (of-course) says it knows nothing about the Atmel stuff AS5 looking for to download.

A similar error occurs if I try to access the online help - i.e. AS5 goes to MSDN.

For Atmels information, in the unlikely event that this thread is a part of the unofficial bug reporting system (since, again, there is no official one) I can add that i) I downloaded the "small" AS5 install package that does not bring the AVR Toolchain and ASF, and ii) I have Microsoft Visual Studio (2008?) installed on the same machine.

Anyway, all this is likely meaningless typing since it is very unlikely that this thread will be designated the official bug report system for AS5. (To sum up: Atmel ends support on AS4, and goes MIA re support/bugs in AS5. No-one seems to care, and no-one seems embarrased re this situation.)

"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]