Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Hot Topic (More than 8 Replies) Installing for Teensy 3.x (Read 32976 times)
stevech
Member
***
Offline


Posts: 147
Location: So. Calif. US
Joined: Jun 16th, 2013
Installing for Teensy 3.x
Jan 13th, 2014 at 4:36pm
Print Post  
I'm an experienced firmware developer needing a bit of guidance on using Visual Micro for the Teensy 3.x target (Studio 6.1 is installed).
Teensy, as you probably know, is using Arduino 1.0.5 installation.
That works fine for me.
I've used Eclipse with Arduino 1.5.2 with Teensy, but want to switch to Visual Studio + Visual Micro.

I've re-read the installation guide several times and used trial and error quite a bit.
But I wind up with no "boards" listed in the visual studio GUI.
I'm assuming that, for the drop-down dialog in the bottom-most toolbar, where it lists Arduino 1.0.x, Arduino 1.5.x, and Teensy, that I should choose Teensy,  for my Teensy 3 target.

Teensy 3 is installed (win 7 64 bit): C:\arduino\hardware\teensy

What pathname should be used when specifying to the menu:
Tools->options->Visual Micro->General->Application IDE location

Using C:\arduino\hardware\teensy  (for the dropdown choice of 'Teensy'), yields an empty Micro Boards list.

Visual Micro will read both the arduino and the teensy boards installed for that ide.

I recommend this version of Visual Micro, released yesterday, which has intellisense improvements for teensy http://visualmicro.codeplex.com/releases/view/106554

Thanks in advance.
« Last Edit: Jan 13th, 2014 at 4:42pm by Tim@Visual Micro »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Installing for Teensy 3.x
Reply #1 - Jan 13th, 2014 at 4:40pm
Print Post  
Hi,

The location must point to the folder where the .exe exists. 

In this case you are still using Arduino Ide which runs from arduino.exe in c:\arduino

So the location you enter will be c:\arduino

Thanks
  
Back to top
IP Logged
 
stevech
Member
***
Offline


Posts: 147
Location: So. Calif. US
Joined: Jun 16th, 2013
Re: Installing for Teensy 3.x
Reply #2 - Jan 13th, 2014 at 5:06pm
Print Post  
thanks... but choosing C:\arduino for the IDE location for a Teensy 3 (non-AVR target) project yields a blank boards choice drop-down. 
The boards.txt file for teensy 3 is located in C:\arduino\hardware\teensy.

No doubt something dumb I'm doing or not doing!



  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Installing for Teensy 3.x
Reply #3 - Jan 13th, 2014 at 5:13pm
Print Post  
Hi,

Visual Micro discovers the boards.txt files from below the hardware folder so it is fine that the teensy files are installed there. I guess you used the Teensyduino installer which is what I did.

Other users have reported Teensy working with Visual Micro so this must be some other problem. It is normally only a matter of getting this path right.

Would you please email a screenshot with the c:\arduino path completed to info [at] visualmicro.com

Thanks
  
Back to top
IP Logged
 
stevech
Member
***
Offline


Posts: 147
Location: So. Calif. US
Joined: Jun 16th, 2013
Re: Installing for Teensy 3.x
Reply #4 - Jan 13th, 2014 at 6:51pm
Print Post  
OK. With your help, the IDE path mysteriously started working such that there are boards to choose from now. Weird; I had tried that maybe 10 times. I think I was overlooking that you have to choose Teensy a second time in the final dialog box.

Next item I need help on:
I choose Teensy 3.1 then file->new->Sketch Project. I assume we use Sketch Project, not new->Project. Not sure.

Then try as I might, I cannot get the project properties to display as described at
http://www.visualmicro.com/page/Teensy-for-Microsoft-Visual-Studio.aspx
Clicking on the new (sketch) project (not solution name) in the explorer, then 
The View->Other Windows menu yields just a two-item menu, not the large list shown in the web page above. I tried the alternatives suggested: F4 key, CTRL+ENTER.  For the Teensy 2, some days ago, I was able to get the large menu for properties. But not now, for Teensy 3.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Installing for Teensy 3.x
Reply #5 - Jan 13th, 2014 at 7:17pm
Print Post  
Hi,

Opening and creating sketch projects

The easiest way to create a project is to use "File>New>Sketch Project". If you have a solution open already then click "File>Close Solution" before doing so otherwise a 2nd project containing the new Sketch will be added into the current solution. Newer users often find it easier to use one solution per project in the early days of using Visual Studio

To open an existing sketch use "File>Open>Sketch Project". Again close the solution first if open.

Once you become more familiar with Visual Studio you will find there are lots of other ways to open sketches. For example, with the solution closed (an empty Visual Studio Ide) click File>Open>File and navigate to any Arduino sketch then click to open a .pde/.ino. The addin will detect the Arduino sketch and ask you if you want to create a new sketch project. or if a project already exists it will ask you if you want to open it.

Advanced users can simply create a normal empty Visual Studio Win32 C++ project and add a .ino of the same name. Visual Micro will kick in and provide Arduino functionality as normal.

The only rules are the Arduino rule which state that an Arduino sketch must contain a .ino file of the same name as the folder. In Visual Studio the project must also have the same name as the folder and the .ino

So, in summary, the special "Sketch" menu items created by Visual Micro are the best for newer users of Visual Studio. These menu items are also aware of the "SketchBook" folder so position file explorers to where Arduino projects are normally saved.

Project properties

Normally you just click the name of the project in the solution explorer then click to View the properties as shown in the wiki page. The properties appear in a movable/pin-able tool window. Maybe it is minimized as a tab at the side of the Ide? 

Anyway the document needs updating because in the last few versions when you click the yellow question mark on the tool bar Visual Micro opens the platform explorer but also opens the properties window.

So to cut a boring story short, just click the yellow question icon on the toolbar  Smiley 

The properties window is not specific to the micro-controller location so because you have seen it before I think the window is minimized to tab. If you can't see it then please send a screen shot of your IDE with a sketch open and after pressing the yellow button

Thanks

wiki here: http://www.visualmicro.com/archive.aspx
getting started guide here: http://www.visualmicro.com/page/arduino-visual-studio-getting-started.aspx
youtube about tool windows and debugger: http://www.youtube.com/watch?v=fFM8_RhIG0U
« Last Edit: Jan 13th, 2014 at 7:20pm by Tim@Visual Micro »  
Back to top
IP Logged
 
stevech
Member
***
Offline


Posts: 147
Location: So. Calif. US
Joined: Jun 16th, 2013
Re: Installing for Teensy 3.x
Reply #6 - Jan 13th, 2014 at 7:37pm
Print Post  
Fumble-boy here just found that I can get to the project micro general defines properties ONLY by pressing ALT-ENTER.  

I was able to compile a hello world example for the Teensy 3.1. Didn't find how to launch Paul's USB uploader from the IDE, so I just manually activated the uploader from its window. 

Progress. 

Now perhaps I'll try the debugger and hopefully I'll like it and purchase.

I appreciate your help. As I learn more, I'd be happy to help edit the new user document material. Sometimes it's best for clarity to be added by other than the software developer, as we newbies just don't know what we don't know!  

Part of the challenge as a newbie is finding the tutorials on the Visual Micro web site.

I've been developing firmware for a very long time, using IAR and Eclipse. But not Visual Studio. So a lot of the writing may assume the reader is well versed in Visual Studio.




« Last Edit: Jan 13th, 2014 at 7:47pm by stevech »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Installing for Teensy 3.x
Reply #7 - Jan 13th, 2014 at 7:54pm
Print Post  
Thanks, you are entirely right. The visualmicro.com web site needs some serious work. It's the next job on the list. The sales of the debugger will hopefully bring in some cash to get some help. It's a huge task otherwise.

Sorry I missed the fact that you are using Atmel Studio and not Visual Studio. The function keys and menus are slightly different between the two products (nothing to do with vm) but please confirm if the "?" icon opens the property window for you in Atmel Studio.

Thanks

Atmel Studio is simple and a big leap over the Arduino Ide, however I am not sure it compares to Eclipse which appears to be much more powerful. In my view, Visual Studio Pro is the best for building Arduino programs but it is too expensive for most.

I will be interested to hear how you get on thanks!
« Last Edit: Jan 13th, 2014 at 7:55pm by Tim@Visual Micro »  
Back to top
IP Logged
 
stevech
Member
***
Offline


Posts: 147
Location: So. Calif. US
Joined: Jun 16th, 2013
Re: Installing for Teensy 3.x
Reply #8 - Jan 13th, 2014 at 8:21pm
Print Post  
yes, yellow "?" appears. I see a Micro Explorer window. It has a reference for libraries.

Missing, in the the editor, is intelligent code completion (is that what Micro$oft calls Intellisense?).
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Installing for Teensy 3.x
Reply #9 - Jan 13th, 2014 at 8:33pm
Print Post  
The question mark button should open two things, one you mentioned is the explorer.

If intellisense is missing then the installer has not set a registry key or Atmel hadn't shutdown properly and has overwritten the key. You can either run the Visual Micro installer and click uninstall then run again and click install. This normally solves the issue but make sure atmel was closed first.

Alternatively, shutdown Atnel then download and run this windows .reg file which will add the key http://www.visualmicro.com/downloads/AtmelExtSourceAvr.rar

I forgot to answer this ...

Quote:
I was able to compile a hello world example for the Teensy 3.1. Didn't find how to launch Paul's USB uploader from the IDE, so I just manually activated the uploader from its window. 


The Teensy Usb uploader should appear when you attempt to build and upload. If you only build then the uploader will not appear.

Click "Debug>Start without debugging" or the respective function key or the blue arrow on the toolbar to "Build and Upload". Or click "Project>Upload last build" to skip the build and upload the last compilation.

  
Back to top
IP Logged
 
stevech
Member
***
Offline


Posts: 147
Location: So. Calif. US
Joined: Jun 16th, 2013
Re: Installing for Teensy 3.x
Reply #10 - Jan 13th, 2014 at 8:46pm
Print Post  
OK. I hope this thread helps others. It would be good to make a digest of this.

The registry edit command you sent fixed the lack of intellisense. Visual Studio had crashed previously due merely to me trying to open a recent project in a manner it didn't expect. So you may need to reestablish that registry key automatically on startup or some such, as there will be other reasons that Visual Studio crashes.

Debug->Start Without Debugging
yields this error
'Upload Using' requires a programmer. Upload cancelled.

However, PJRC's loader is running in a window on the PC desktop. And it somehow knows which .hex to use because it will program the current .hex if I invoke it manually by pushing the boot/reset button on the Teensy.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Installing for Teensy 3.x
Reply #11 - Jan 13th, 2014 at 8:55pm
Print Post  
Hi,

Yes it makes sense to add the key when vm starts. Will do thanks for the suggestion.

I think you ticked Tools>Visual Micro>Upload using programmer" by mistake. Un-tick for normal serial upload.

Yes you are right, once Pauls upload has opened knowing about the build location it should auto detect file changes (sorry can't exactly recall how it works it was a while ago when the integration was done)

If you are an advanced user you can switch on "Tools>Options>Visual Micro>Compiler>Always show build folder" then CTRL+Click the link in the build output to view the temp build directory.

Double click drill down into most code errors should be working well with Teensy. Interested to hear if/when it fails as it has just been overhauled.

Thanks again for the feedback, always useful if nothing else shows what areas of documentation to work on first  Smiley

You will also find a number of users have made youtube videos such as HumanHardDrive and DiscoveringElectronics

Edit: Just checked the Atmel Studio main page on Visualmicro.com and it includes a "How to test a new installation guide" that answer many of the questions you have asked. I am going to make the page more obvious on the site.
« Last Edit: Jan 13th, 2014 at 9:05pm by Tim@Visual Micro »  
Back to top
IP Logged
 
stevech
Member
***
Offline


Posts: 147
Location: So. Calif. US
Joined: Jun 16th, 2013
Re: Installing for Teensy 3.x
Reply #12 - Jan 13th, 2014 at 9:10pm
Print Post  
Menu item Download without debugging now works with the PJRC loader. I unticked the menu choice Visual Micro->upload with programmer option. I must have ticked that way back, assuming, well, PJRC's USB uploader was a programmer. Well, not.

I put in one syntax error. Clicked on compiler output window in which the error was displayed. The editor correctly jumped to that line - in the one source module I have. I assume it would go to the correct tab/file.

OK. Good. I humbly suggest that a terse, concise one page writeup that starts with an assumed working Arduino and visual studio/Atmel and ends with Visual Micro -  is badly needed. Terse to a fault. Incomplete sentences. Bullets or step #. Assume the reader is a visual studio virgin. Use URL links to tangents on more-details, rather than having it in-line. Use outline numbering or some such to delineate. As is, this early documentation seems to be a quilt rather than a procedure, but I know how these things can go. Most of your time is as a freeware author and indeed, you do have another life to live!

Comment on Eclipse: Funny you say what you did, above. My first work with Eclipse was a huge python project with an small memory ARM embedded system target. It did a good job with the indentation goofyness of Python editing. But Eclipse is more than a bear to get started with. Many expletives were issued. There was no one to mentor me. I'd not want to ever, ever do that again. I liked Komodo for python much better.

My C/C++ work professionally has long been with IAR. It's expensive by hobbyist/student standards, but well worth it, especially with J-link, for professional work where hourly labor rates at the customer price level are so high.
« Last Edit: Jan 13th, 2014 at 9:17pm by stevech »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Installing for Teensy 3.x
Reply #13 - Jan 13th, 2014 at 9:25pm
Print Post  
Great, my C++ is terrible so it will be useful to ask you some questions sometimes.

Thanks for the feedback it really is useful. I've been trying to find some time to investigate a better web site tool that can help structure the documentation more easily. Currently the site uses blogEngine and it isn't designed to serve technical/help.

I am also wondering if a single well written pdf manual would better replace the entire site as it currently stands. Problem is that I can't write well myself so some help is needed. Possibly from a doctor  Grin
  
Back to top
IP Logged
 
stevech
Member
***
Offline


Posts: 147
Location: So. Calif. US
Joined: Jun 16th, 2013
Re: Installing for Teensy 3.x
Reply #14 - Jan 13th, 2014 at 9:55pm
Print Post  
And, for Teensy 3 remember to do this for each project, including pre-existing project not used with Visual Micro... Display project properties, then alter project compiler defines:

(Atmel VS) Press ALT+ENTER
OR non-Atmel:
Click the project in the solution explorer
Click the menu View > Other Windows > Properties Window

Edit Micro General > Defines Project as follows:-

Teensy 3.0 running at 96mhz, Mode = USB Serial + Keyboard English, use this for the Defines Project:
F_CPU=96000000;USB_SERIAL;LAYOUT_US_ENGLISH 

or

Teensy 2.0 running at 16mhz, Mode = USB Serial + Keyboard English, use this:
F_CPU=16000000L;USB_SERIAL;LAYOUT_US_ENGLISH
« Last Edit: Jan 13th, 2014 at 9:56pm by stevech »  
Back to top
 
IP Logged
 
stevech
Member
***
Offline


Posts: 147
Location: So. Calif. US
Joined: Jun 16th, 2013
Re: Installing for Teensy 3.x
Reply #15 - Jan 13th, 2014 at 10:01pm
Print Post  
Tim@Visual Micro wrote on Jan 13th, 2014 at 9:25pm:
Great, my C++ is terrible so it will be useful to ask you some questions sometimes.

Thanks for the feedback it really is useful. I've been trying to find some time to investigate a better web site tool that can help structure the documentation more easily. Currently the site uses blogEngine and it isn't designed to serve technical/help.

I am also wondering if a single well written pdf manual would better replace the entire site as it currently stands. Problem is that I can't write well myself so some help is needed. Possibly from a doctor  Grin

Can you just write it in Microsoft Office Word? Then I will help with formatting, conciseness, etc, and make PDF and/or HTML versions.  Don't forget the terse installation procedure. Newcomers often won't have the patience to press on if it's not 10 minutes to lift-off and no bewilderment.

Easy button.
« Last Edit: Jan 13th, 2014 at 10:03pm by stevech »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Installing for Teensy 3.x
Reply #16 - Jan 13th, 2014 at 10:05pm
Print Post  
Thanks very much
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint