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
Very Hot Topic (More than 25 Replies) Add new board- teensy? (Read 71061 times)
Les
Newbies
*
Offline


Posts: 1
Joined: Feb 22nd, 2012
Add new board- teensy?
Feb 23rd, 2012 at 2:09am
Print Post  
Hi, 

I was wondering how to add teensy to the list of boards?

Les
  
Back to top
 
IP Logged
 
markpdx
Newbies
*
Offline


Posts: 3
Location: Portland, OR
Joined: Feb 16th, 2012
Re: Add new board- teensy?
Reply #1 - Feb 25th, 2012 at 9:58pm
Print Post  
I also am wondering if we can get support for the Teensy board in Visual Micro.  I have a working Arduino IDE environment, with the Teensy extensions installed (called Teensyduino by its author). The Teensy boards show up in the Arduino IDE, but not in the Visual Micro boards list.

Teensy is very popular, costs only $16 in simplest form, and has nifty extras like USB emulations of keyboard/mouse/joystick/midi and more, so I prefer it to the standard Arduino boards. But coding in the Arduino IDE feels primitive compared to VS.

Can the VM author tell us how it obtains the list of supported boards, and if there's any way to add Teensy boards?

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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Add new board- teensy?
Reply #2 - Feb 26th, 2012 at 12:23am
Print Post  
@Les I am sorry i forgot to respond to your note.

At the moment the boards list is read from two places. The arduino ide hardware folder and, if it exists, the sketchbook\hardware folder (as documented for the standard arduino ide)

My understanding is that when you install teensy it modifies the arduino exe and version and I guess it uses a different folder to find the boards.txt. Otherwise you would see them in vm.

I wrote to the teensy people a few months ago to ask about their config and i received a great reply back but have not yet had a chance to review the outlined procedures.

I don't expect it to be difficult but generally vm needs a better way to support different platforms.

The most recent vm version is a step towards multi platform because the compiler process now uses a single xml definition file that describes the work it needs to perform and for which platform. There is still work to be done but development is moving along at a steady pace.

The idea being that you get to use teensy boards, arduino 0023 boards, arduino 1.0 boards, maple boards, arm boards and others.

If I get a chance I will review the email from teensy but if you have any ideas of suggestions please speak up.

I hope this gives some hope for the not to distant future Smiley
  
Back to top
IP Logged
 
markpdx
Newbies
*
Offline


Posts: 3
Location: Portland, OR
Joined: Feb 16th, 2012
Re: Add new board- teensy?
Reply #3 - Feb 26th, 2012 at 4:37pm
Print Post  
Thanks for the response! 
To try to help, I did a simple test to determine what files the Teensyduino installer 'touches' (I just sorted the files by date to see which were added/changed).

I was encouraged at first that the Teensyduino installer seemed to be only adding folders and files, but then I saw that it had touched pde.jar, and a bunch of .java files including AvrdudeUploader, Base, Compiler, Editor, EditorLineStatus, Serial, SerialMonitor, Sketch, and Target. 

So the fact that the Teensy doesn't show up in the boards list is only one symptom and it doesn't look like there's an easy hack to fix that.

So here's wishing you success in analyzing and solving the multi-board support challenge.

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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Add new board- teensy?
Reply #4 - Feb 26th, 2012 at 6:06pm
Print Post  
Thanks and thanks also to markpdx for the reminder

Yes now I recall teensy uses usb and not normal serial. The microchip stuff also affects the compiler and uploader hence trying to come up with a common xml decription/language to allow us to define the quirks of each platform.

The good news is that it's all open and not rocket science Smiley
« Last Edit: Feb 26th, 2012 at 6:06pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Justblair
Newbies
*
Offline


Posts: 9
Location: Glasgow, Scotland
Joined: Sep 29th, 2011
Re: Add new board- teensy?
Reply #5 - May 5th, 2012 at 11:33pm
Print Post  
I don' have the teensy, but I recently started using Visual Micro successfully with Arduino Leonardo clones.

All that I had to do to make it run successfully was to edit the boards.txt file and restart Visual Studio.  The Leonardo appeared in the list and once selected, Visual Micro worked just as it should.   

As the hardware is pretty much the same between Teensy and Leonardo, it should be possible to use that bootloader.  Bear in mind that the Leonardo bootloader is not quite finished just now and does not seem to support external interrupts as far as I can tell Cry
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Add new board- teensy?
Reply #6 - May 6th, 2012 at 2:01am
Print Post  
That's good to know about the leo thanks. 

You might know better but I think I've got some work to do for the teensy. Its software install alters the arduino IDE installation and also the teensy upload uses usb and not serial.

I bought one a few weeks ago but haven't had a chance to play with it. I have an email from the teensy man (Paul) telling me what needs to be done to support it but I haven't had a chance to look at it properly yet. I am looking forward to it Smiley

Trying to get the debug stuff documented on the main site at the moment. Boring!  Cry
  
Back to top
IP Logged
 
Justblair
Newbies
*
Offline


Posts: 9
Location: Glasgow, Scotland
Joined: Sep 29th, 2011
Re: Add new board- teensy?
Reply #7 - May 6th, 2012 at 8:41am
Print Post  
I wonder if the teensy supports loading sketches using an ICSP?  I had some issues initially when I loaded the leo bootloader onto a 32u4 breakout board.  For a little time I was uploading sketches via my usbTiny successfully.

No exactly what the OP was looking for, but perhaps a stopgap solution?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Add new board- teensy?
Reply #8 - May 6th, 2012 at 12:53pm
Print Post  
yes, if it works then it works Smiley
  
Back to top
IP Logged
 
Experimentalist
Junior Member
**
Offline


Posts: 29
Location: UK
Joined: Oct 6th, 2012
Re: Add new board- teensy?
Reply #9 - Oct 6th, 2012 at 7:42pm
Print Post  
Hi

Is there any advance on supporting the Teensy boards by PJRC ? Undecided

These are the only boards I have and they are great value for money, it would be great to be able to use Visual Micro with them.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Add new board- teensy?
Reply #10 - Oct 6th, 2012 at 8:56pm
Print Post  
Yes which one(s) have you got? I bought one or two a while back but haven't had a chance to try them. 

Paul said he would give me instructions for hooking vm up when ready but if you can tell me how to configure arduino ide for what you have I can take a look at it.

I'm on the verge of adding in the capability to register your own new platforms so teensy would be a good test
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Add new board- teensy?
Reply #11 - Oct 6th, 2012 at 11:31pm
Print Post  
Okay I've finally installed the teensy stuff. It look great the only question is where to put the options such as USB Type, Cpu Speed and Keyboard layout.

The idea is to allow various types of hardware so it would be nice for these interface and compiler routines to be extensible. Open source compiler plugins for the plugin, a bit like the visualizations in the debugger system.

I'm going to contact Paul at Teensy to get some tips on the protocols and give some thought to an xml format that would allow us to describe the menu items and compiler code that needs to be applied. This should then lend itself nicely to a "new board type" setup window.
« Last Edit: Oct 6th, 2012 at 11:32pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Experimentalist
Junior Member
**
Offline


Posts: 29
Location: UK
Joined: Oct 6th, 2012
Re: Add new board- teensy?
Reply #12 - Oct 8th, 2012 at 7:16pm
Print Post  
Hi

Great news !

I currently have a couple of each of Teensy 2.0 & Teensy++ 2.0

My current project uses the USB serial and keyboard  and my Arduino settings are as follows.

Arduino 1.0.1
Teensyduino, Version 1.09
Board: Teensy 2.0
USB Type: Serial + Keyboard + Mouse + Joystick
CPU Speed: 16 MHz
Keyboard layout: United Kingdom

I also butchered one of Paul's USB types:
Disk(SD Card) + Keyboard

and added USB serial functionality to it, this was so I could use the SD card with the keyboard and USB serial. I have a working version of this if it is of interest but I have reverted to "Serial + Keyboard + Mouse + Joystick" to speeed up development at the moment.

If you need any more info please let me know.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Add new board- teensy?
Reply #13 - Oct 9th, 2012 at 12:27pm
Print Post  
I've been looking at this and it will take a bit of extra time that I don't have right now. It amazes me why unix programmers use such crude systems of storing settings! Check out the teensy boards.txt file in the arduino\Hardware\teensy folder to see what I mean!!

You could make intellisense work in VS with the current system but you would need to copy (and rename) the teensy folder from arduino/hardware to sketchfolder/hardware and rename the boards for use in vs. 

I am short of time but will try to give you an example asap
  
Back to top
IP Logged
 
Experimentalist
Junior Member
**
Offline


Posts: 29
Location: UK
Joined: Oct 6th, 2012
Re: Add new board- teensy?
Reply #14 - Oct 9th, 2012 at 10:27pm
Print Post  
Hi

Thanks for taking the time to reply. Where is the Visual Macro equivalent of the Boards.txt file?

When I run the Teensy boards.txt file through a CRLF fixer it does not look too bad:

menu.usb=USB Type
menu.speed=CPU Speed
menu.keys=Keyboard Layout

teensy1.name=Teensy 1.0
teensy1.upload.protocol=halfkay
teensy1.upload.maximum_size=15872
teensy1.upload.speed=12000000
teensy1.upload.disable_flushing=true
teensy1.bootloader.path=undefined
teensy1.serial.restart_cmd=true
teensy1.serial.safe_baud_rates_only=true
teensy1.upload.avrdude_wrapper=teensy_reboot
teensy1.build.mcu=at90usb162
teensy1.build.core=teensy
teensy1.build.elide_constructors=true
teensy1.build.cpp0x=true
teensy1.build.dependency=true
teensy1.build.linker_relaxation=true
teensy1.build.post_compile_script=teensy_post_compile
teensy1.menu.usb.serial.name=Serial
teensy1.menu.usb.serial.build.define0=-DUSB_SERIAL
teensy1.menu.usb.hid.name=Keyboard + Mouse
teensy1.menu.usb.hid.build.define0=-DUSB_HID
teensy1.menu.usb.hid.fake_serial=teensy_gateway
teensy1.menu.speed.16.name=16 MHz
teensy1.menu.speed.8.name=8 MHz
teensy1.menu.speed.4.name=4 MHz
teensy1.menu.speed.2.name=2 MHz
teensy1.menu.speed.1.name=1 MHz
teensy1.menu.speed.16.build.f_cpu=16000000L
teensy1.menu.speed.8.build.f_cpu=8000000L
teensy1.menu.speed.4.build.f_cpu=4000000L
teensy1.menu.speed.2.build.f_cpu=2000000L
teensy1.menu.speed.1.build.f_cpu=1000000L
teensy1.menu.keys.en-us.name=US English
teensy1.menu.keys.en-us.build.define1=-DLAYOUT_US_ENGLISH
teensy1.menu.keys.fr-ca.name=Canadian French
teensy1.menu.keys.fr-ca.build.define1=-DLAYOUT_CANADIAN_FRENCH
teensy1.menu.keys.xx-ca.name=Canadian Multilingual
teensy1.menu.keys.xx-ca.build.define1=-DLAYOUT_CANADIAN_MULTILINGUAL
teensy1.menu.keys.da-da.name=Danish
teensy1.menu.keys.da-da.build.define1=-DLAYOUT_DANISH
teensy1.menu.keys.fi-fi.name=Finnish
teensy1.menu.keys.fi-fi.build.define1=-DLAYOUT_FINNISH
teensy1.menu.keys.fr-fr.name=French
teensy1.menu.keys.fr-fr.build.define1=-DLAYOUT_FRENCH
teensy1.menu.keys.fr-be.name=French Belgian
teensy1.menu.keys.fr-be.build.define1=-DLAYOUT_FRENCH_BELGIAN
teensy1.menu.keys.fr-ch.name=French Swiss
teensy1.menu.keys.fr-ch.build.define1=-DLAYOUT_FRENCH_SWISS
teensy1.menu.keys.de-de.name=German
teensy1.menu.keys.de-de.build.define1=-DLAYOUT_GERMAN
teensy1.menu.keys.de-dm.name=German (Mac)
teensy1.menu.keys.de-dm.build.define1=-DLAYOUT_GERMAN_MAC
teensy1.menu.keys.de-ch.name=German Swiss
teensy1.menu.keys.de-ch.build.define1=-DLAYOUT_GERMAN_SWISS
teensy1.menu.keys.is-is.name=Icelandic
teensy1.menu.keys.is-is.build.define1=-DLAYOUT_ICELANDIC
teensy1.menu.keys.en-ie.name=Irish
teensy1.menu.keys.en-ie.build.define1=-DLAYOUT_IRISH
teensy1.menu.keys.it-it.name=Italian
teensy1.menu.keys.it-it.build.define1=-DLAYOUT_ITALIAN
teensy1.menu.keys.no-no.name=Norwegian
teensy1.menu.keys.no-no.build.define1=-DLAYOUT_NORWEGIAN
teensy1.menu.keys.pt-pt.name=Portuguese
teensy1.menu.keys.pt-pt.build.define1=-DLAYOUT_PORTUGUESE
teensy1.menu.keys.pt-br.name=Portuguese Brazilian
teensy1.menu.keys.pt-br.build.define1=-DLAYOUT_PORTUGUESE_BRAZILIAN
teensy1.menu.keys.es-es.name=Spanish
teensy1.menu.keys.es-es.build.define1=-DLAYOUT_SPANISH
teensy1.menu.keys.es-mx.name=Spanish Latin America
teensy1.menu.keys.es-mx.build.define1=-DLAYOUT_SPANISH_LATIN_AMERICA
teensy1.menu.keys.sv-se.name=Swedish
teensy1.menu.keys.sv-se.build.define1=-DLAYOUT_SWEDISH
teensy1.menu.keys.en-gb.name=United Kingdom
teensy1.menu.keys.en-gb.build.define1=-DLAYOUT_UNITED_KINGDOM
teensy1.menu.keys.usint.name=US International
teensy1.menu.keys.usint.build.define1=-DLAYOUT_US_INTERNATIONAL

teensy2.name=Teensy 2.0
teensy2.upload.protocol=halfkay
teensy2.upload.maximum_size=32256
teensy2.upload.speed=12000000
teensy2.upload.disable_flushing=true
teensy2.bootloader.path=undefined
teensy2.serial.restart_cmd=true
teensy2.serial.safe_baud_rates_only=true
teensy2.upload.avrdude_wrapper=teensy_reboot
teensy2.build.mcu=atmega32u4
teensy2.build.core=teensy
teensy2.build.elide_construct
  
Back to top
 
IP Logged
 
Experimentalist
Junior Member
**
Offline


Posts: 29
Location: UK
Joined: Oct 6th, 2012
Re: Add new board- teensy?
Reply #15 - Oct 9th, 2012 at 10:31pm
Print Post  
FYI when I start Visual Studio at present I get:

---------------------------
Visual.Micro.Visual.Studio.Arduino.10
---------------------------
Visual Micro failed to create UI command items 

Object reference not set to an instance of an object.
---------------------------
OK   
---------------------------

The result of the above message is the boards drop down does not work. I have not altered anything to cause this and it was fine the firsst time I ran it. Sorry to post this here, where should it go?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Add new board- teensy?
Reply #16 - Oct 10th, 2012 at 10:41am
Print Post  
It's okay to post here.

I had this problem when I attempted to move the teensy folder from "arduino/hardware" to "sketch book folder\hardware". 

The way it works is that vm reads the contents of the boards.txt files in the "sketchbook folder\hardware" and "arduino\hardware". 

So there must be a strange (or teensy) boards.txt that vm is picking up.

Do you have any folders under "Sketch book\Hardware"? 

nb: Your sketch book folder is probably MyDocuments\Arduino\hardware


Ina any event I will fix this when I look at teensy again in a week or so but you can make it work for now ...

Download arduino 1.0.x and put it in a new folder on your machine. Point vm options to the clean arduino ide and re-start vs. 

You should then have a working non-teensy arduino/visual studio system.
« Last Edit: Oct 10th, 2012 at 10:41am by Tim@Visual Micro »  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Add new board- teensy?
Reply #17 - Oct 11th, 2012 at 11:29am
Print Post  
1)

Quote:
hen I run the Teensy boards.txt file through a CRLF fixer it does not look too bad


It's not the CRLF that is difficult, if you open the file in Visual Studio it displays correctly. The problem is that the boards.txt file format doesn't support defining menus and the normal rule is that the first entry with a .name= is the board name. 

Furthermore all the teensy menu options are the common, should have been placed in a file called menu.txt and assigned to boards using simple properties in the boards.txt

So the teensy solution was a quick hack with little thought to other hardware vendors.

In the case of teensy it is worse because they hijack the normal arduino ide. At least with chipKit we know we are dealing with a different format because the arduino.exe is called mpide.exe

When we look at chipKit and other hardware vendors they also are doing their own thing. It's very difficult to allow some of these changes because it might be broken by arduino.cc changes in the future.

2)
If you switch on Tools>Options>Visual Micro>Trace you will see where vm is hitting the problem. It's actually the Teensy boards.txt causing the problem. There will be an update shortly which prevents the problem and allows intellisense in VS.

I doubt I will use the boards.txt to draw any menu items in Visual Studio. We need a well designed xml file to register new interface options not just a teensy specific quick hack. But I'll do as much as is possible without causing future upgrade problems.
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Add new board- teensy?
Reply #18 - Oct 11th, 2012 at 3:13pm
Print Post  
  
Back to top
IP Logged
 
Experimentalist
Junior Member
**
Offline


Posts: 29
Location: UK
Joined: Oct 6th, 2012
Re: Add new board- teensy?
Reply #19 - Oct 12th, 2012 at 8:22am
Print Post  
Hi, great start I will try this out later hopefully and report back anything I think is useful. I really appreciate the effort.  Smiley
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Add new board- teensy?
Reply #20 - Oct 12th, 2012 at 10:03am
Print Post  
The version will be available sometime over the weekend

@Les and others, I am sorry this has taken so long. I didn't realize the Teensy modified boards.txt causes errors
  
Back to top
IP Logged
 
Experimentalist
Junior Member
**
Offline


Posts: 29
Location: UK
Joined: Oct 6th, 2012
Re: Add new board- teensy?
Reply #21 - Oct 12th, 2012 at 1:49pm
Print Post  
I am sure Paul of PJRC will do what he can to help. He is a very helpful guy and will be keen to make his product viable with Visual Micro I am sure
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Add new board- teensy?
Reply #22 - Oct 12th, 2012 at 2:04pm
Print Post  
Yes, we will see. I know Paul will help where he can but something tells me we just have to work with what we have. 

It takes so long to get any agreement for the community on these things.

Paul, Arduino, Wiring, ChipKit, Maple are all making open source noises but in reality they are competitors so don't communicate very well. I am not suggesting this is wrong but it makes progress more difficult.

What I would like to do is design an xml file structure that allows the various platforms to be described. This would enable a single compiler to work using these xml instructions. 

The xml could also describe additional user interface options such as Teensy Keyboard, Speed etc., location of help files and manufacturers web site url +++

The only problem with that is we move away from what the manufacturers are maintaining themselves such as the teensy/chipkit boards.txt extensions.

It's a problem so see the cleanest way forward  Cry
  
Back to top
IP Logged
 
Experimentalist
Junior Member
**
Offline


Posts: 29
Location: UK
Joined: Oct 6th, 2012
Re: Add new board- teensy?
Reply #23 - Oct 12th, 2012 at 8:39pm
Print Post  
How do I officially join the beta test program?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Add new board- teensy?
Reply #24 - Oct 13th, 2012 at 1:00pm
Print Post  
Email sent Smiley
  
Back to top
IP Logged
 
Experimentalist
Junior Member
**
Offline


Posts: 29
Location: UK
Joined: Oct 6th, 2012
Re: Add new board- teensy?
Reply #25 - Oct 16th, 2012 at 7:52pm
Print Post  
Gone quiet again, Twitter was talking of an update on Sunday just gone, any news?  Undecided
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Add new board- teensy?
Reply #26 - Oct 16th, 2012 at 9:57pm
Print Post  
Yes I have a version but don't want to put it on codeplex until it has been tested by existing users. Currently waiting for feed back from a couple of experienced users.

It's here if you want to try it out.

http://www.visualmicro.com/downloads/ArduinoForVisualStudio_WriteVars.msi

If you are a debug beta tester then you need to let me know otherwise the visualizations will fail without a secondary installer that I will email to you.
  
Back to top
IP Logged
 
Experimentalist
Junior Member
**
Offline


Posts: 29
Location: UK
Joined: Oct 6th, 2012
Re: Add new board- teensy?
Reply #27 - Oct 28th, 2012 at 10:12pm
Print Post  
Tim

I have been away and have only just had chance to get back to this. I have the latest versions of Visual Micro and the debugger installed and have succesful compilation for my Teensy 2. How do I configure the upload when using the Teensy? I can set the serail port but output window shows: 

avrdude: Can't find programmer id "halfkay"

The Teensy usually uses its own programmer but I am unsure how to set this up.

Also my project is using the USB serial as its main interface so I presume to use the Visual Micro debugging I need to wire to some extra pins and include another library. I am working through the videos and documentation at present but would be grateful of any guidance you can offer.

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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Add new board- teensy?
Reply #28 - Oct 28th, 2012 at 10:32pm
Print Post  
Hi Andy,

The teensy announcement is here http://visualmicro.com/page/Teensy-for-Microsoft-Visual-Studio.aspx

As you will read, this first version only provides intellisense, upload still needs to be using Arduino IDE with "External Editor" checkbox enabled. This means no debug for Teensy yet.

Over the next few weeks I will be adding support for the Due, I hope to add the Teensy upload support and menu items at that time.

In terms of debug on other pins. Yes if Teensy supports SoftwareSerial then you can use that to debug. 

However the new debug feature of changing variables on a running Arduino works better, at the moment, with normal hardware serial. SoftwareSerial is okay at 57600 (or slower) but still needs a little bit more work.

Anyway, the standard debug stuff works fine with SoftwareSerial (other digital pins)
  
Back to top
IP Logged
 
Experimentalist
Junior Member
**
Offline


Posts: 29
Location: UK
Joined: Oct 6th, 2012
Re: Add new board- teensy?
Reply #29 - Nov 13th, 2012 at 9:31pm
Print Post  
Tim

I see there have been some new releases, any news on the upload and debug options for the Teensy as yet?

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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Add new board- teensy?
Reply #30 - Nov 13th, 2012 at 9:50pm
Print Post  
Hi Andy,

Not yet but I hope to find the time next week. I plan to add the Teensy menu items at the same time.

Tim
« Last Edit: Nov 13th, 2012 at 9:50pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Experimentalist
Junior Member
**
Offline


Posts: 29
Location: UK
Joined: Oct 6th, 2012
Re: Add new board- teensy?
Reply #31 - Dec 13th, 2012 at 3:20pm
Print Post  
Tim

Any update re upload and debug options for the Teensy ?

Support for Teensy 3.0 ?

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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Add new board- teensy?
Reply #32 - Dec 13th, 2012 at 5:04pm
Print Post  
Hi Andy,

I've started the work along with Arduino 1.5. Got side tracked by end of year stuff at work but will complete over the xmas break

T
  
Back to top
IP Logged
 
Rei Vilo
Member
***
Offline


Posts: 123
Joined: Jan 10th, 2012
Re: Add new board- teensy?
Reply #33 - Dec 14th, 2012 at 9:07pm
Print Post  
Adding only Teensy 3.0 would be pity. Adding other popular boards represents only a fractional additional work.

I think there's room for an add-in on Windows supporting multi boards, much like the embedXcode template on OS X.

Looking broader, a cross-platform IDE like NetBeans is an even better choice.

So we're ending with a cross-boards multi-platform add-in!
« Last Edit: Dec 14th, 2012 at 9:08pm by Rei Vilo »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Add new board- teensy?
Reply #34 - Dec 15th, 2012 at 2:55pm
Print Post  
The problem with all the current make file systems are that they are not fully compatible with Arduino and others. 

Your system is certainly the best makefile system but still a long way from providing a 100% compatible system.

+ Teensy requires additional menu items to enable users to easily switch to the correct usb keyboard layout and cpu speed. The menu items need only be visible to users when a Teensy board is selected.

I hope to complete the multi-board work over the christmas break. The most work is required in areas that are not related to compilation, such as library detection, additional user interface support etc.

Another big consideration is that I like Visual Studio and like many others use it for my work and also to create other windows and web programs. It's Microsoft and it's very easy  Smiley
  
Back to top
IP Logged
 
Experimentalist
Junior Member
**
Offline


Posts: 29
Location: UK
Joined: Oct 6th, 2012
Re: Add new board- teensy?
Reply #35 - Jan 3rd, 2013 at 8:07pm
Print Post  
Happy New Year, any advances with the Teensy stuff over xmas ?
Smiley
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Add new board- teensy?
Reply #36 - Jan 3rd, 2013 at 11:26pm
Print Post  
Hi, Yes I made good progress with Due and Teensy. Required a re-write of the compiler and some UI elements.

I ran out of time for a release but will do so over the next few weeks.

Instead of making specific code for each I have a new app config system that should also allow you to add your own hardware should something else come out in the future Smiley

Sorry for the delay.

T
« Last Edit: Jan 3rd, 2013 at 11:28pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Alban
Junior Member
**
Offline


Posts: 26
Location: Holland
Joined: Nov 11th, 2012
Re: Add new board- teensy?
Reply #37 - Jan 4th, 2013 at 9:58pm
Print Post  
Teensy support would be greatly appreciated!!! Not sure if it already there but how about the jeenode from jeelabs?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Add new board- teensy?
Reply #38 - Jan 5th, 2013 at 1:11pm
Print Post  
I thought jeenode was std arduino. I have some here but never used them. I'll take a look at them sometime to see the programming instructions
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Add new board- teensy?
Reply #39 - Jan 7th, 2013 at 1:13am
Print Post  
There is an alpha plugin with Teensy here if you want to try it

Tested with teensy 3.0 using teensyduino ide 1.0.3
  
Back to top
IP Logged
 
Experimentalist
Junior Member
**
Offline


Posts: 29
Location: UK
Joined: Oct 6th, 2012
Re: Add new board- teensy?
Reply #40 - Jan 8th, 2013 at 8:44pm
Print Post  
Tim

Great news, just got the Teensyduino stuff and currently uninstalling Visual Micro previous version, anything special I need to do when trying this?

Ex.
  
Back to top
 
IP Logged
 
Experimentalist
Junior Member
**
Offline


Posts: 29
Location: UK
Joined: Oct 6th, 2012
Re: Add new board- teensy?
Reply #41 - Jan 8th, 2013 at 8:52pm
Print Post  
FYI

(Not sure of what this means as yet but thought I would post it for comment)

Just got this message on first startup after removing old Visual Micro and installing "ArduinoForVisualStudio_1301_07.msi":

---------------------------
Visual Micro
---------------------------
OpenProject: Unable to ensure project sketch files: Index was out of range. Must be non-negative and less than the size of the collection.

Parameter name: index
---------------------------
OK   
---------------------------

Then got this when building:

System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
   at System.ThrowHelper.ThrowArgumentOutOfRangeException()
   at System.Collections.Generic.List`1.get_Item(Int32 index)
   at processing.app.SketchEditor.get_SelectedBoard()
   at processing.app.SketchEditor.getBoardPreferences()
   at processing.app.SketchBuilder.get_BuildFolder()
   at processing.app.SketchBuilder.get_BuildPath()
   at Visual.Micro.Visual.Studio.Arduino.AddInApp.CompileDo(Project oProject, Boolean IsDebugStartCommand)
   at Visual.Micro.Visual.Studio.Arduino.AddInApp.OnBeforeCommandEvent(String sGuid, Int32 ID, Object CustomIn, Object CustomOut, Boolean& CancelDefault)
« Last Edit: Jan 8th, 2013 at 8:54pm by Experimentalist »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Add new board- teensy?
Reply #42 - Jan 8th, 2013 at 9:01pm
Print Post  
I think it's a harmless message. Can you see all the boards okay? Intellisense working if you type "Serial."?

If you close and re-open the same sketch do you see the error again?

Thanks

FYI: This is what "ensuring the sketch files" means.

When you open a sketch project vm attempts to ensure that the vs project matches the sketch on disk. You might have added new .ino files using the arduino ide to an existing vs sketch, in which case, vs needs to show the new files in the project view and also to ensure that it's intellisense knowledge of libraries etc is up to date. 

The latter check is performed when ino files are saved, board selection is changed and at other times during usage.

So the particular function that failed at startup is relatively unimportant but I'll look into exactly why it happens. 
  
Back to top
IP Logged
 
Experimentalist
Junior Member
**
Offline


Posts: 29
Location: UK
Joined: Oct 6th, 2012
Re: Add new board- teensy?
Reply #43 - Jan 8th, 2013 at 9:25pm
Print Post  
Same error:

---------------------------
Visual Micro
---------------------------
OpenProject: Unable to ensure project sketch files: Index was out of range. Must be non-negative and less than the size of the collection.

Parameter name: index
---------------------------
OK   
---------------------------

on save, close and reopen. Boards drop down showing Teensy 2.0 what ever I click does not seem to change. Do I need to edit any files/ settings in the IDE to point to the new Teensyduino 1.0.3 Beta 10 folder or boards file?
  
Back to top
 
IP Logged
 
Experimentalist
Junior Member
**
Offline


Posts: 29
Location: UK
Joined: Oct 6th, 2012
Re: Add new board- teensy?
Reply #44 - Jan 8th, 2013 at 9:31pm
Print Post  
Okay found an incorrect path for the "Arduino Application" in the setup of Visual Micro under Visual Studio options and things are starting to come to life. Error gone now when saved and re-opened, Teensy 3.0 board available, will play more and report back.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Add new board- teensy?
Reply #45 - Jan 8th, 2013 at 10:48pm
Print Post  
Great. I've been doing some teensy debug testing this eve. It seems ok for trace (read-only) but no good for update of variables during debug.

Interestingly enough if I select std arduino boards, such as Uno, when using teensyduino I get the same problem.

If I replace the teensyduino/hardware/arduino folder with the one from arduino 1.0.3 thje std arduino boards work correctly.

So Teensyduino 1.0.3 is not really arduino 1.0.3. Paul at pjrc seems to do have altered the search read function or something. This is what the debugger uses for variable update/modification.

If I can work out the actual difference I can make an optional debugger setting to handle it.

  
Back to top
IP Logged
 
Experimentalist
Junior Member
**
Offline


Posts: 29
Location: UK
Joined: Oct 6th, 2012
Re: Add new board- teensy?
Reply #46 - Jan 10th, 2013 at 7:16am
Print Post  
Tim

I am sure if you ask Paul he will give you the details, he is very proactive in the support of his hardware. I am looking forward to testing the debugger with the Teensy products. I will drop Paul a line via email with a link to this post.

Going to do some more work on my project in a minute so will see the current state of play with my VM in VS setup.

Ex.
  
Back to top
 
IP Logged
 
Experimentalist
Junior Member
**
Offline


Posts: 29
Location: UK
Joined: Oct 6th, 2012
Re: Add new board- teensy?
Reply #47 - Jan 10th, 2013 at 1:48pm
Print Post  
Hi Tim

Just tried compile with Teensy 3.0 project and was surprised to see the Teensy Loader launch !

I can confirm that both F6, compile only and F5, compile and upload, worked fine.

This is great as I now no longer need the Arduino IDE open at all.

Great work 

Ex.
  
Back to top
 
IP Logged
 
Paul Stoffregen
Newbies
*
Offline


Posts: 1
Joined: Jan 10th, 2013
Re: Add new board- teensy?
Reply #48 - Jan 10th, 2013 at 2:50pm
Print Post  
Hi everyone!  Paul here... the guy who designed Teensy.

Tim and I have been communicating about the technical details.  Just wanted to let you know we're talking and I'm trying to answer all his questions.
  
Back to top
 
IP Logged
 
Marius
Developer
****
Offline


Posts: 204
Location: Centurion RSA
Joined: Sep 7th, 2011
Re: Add new board- teensy?
Reply #49 - Jan 10th, 2013 at 3:43pm
Print Post  
Thanks Paul, this is great news. Some of us have been waiting for a long time for VM to host the Teensy stuff. I for one have been holding back until today. I just ordered my first two Teensy's because it looks like Tim has the problems sorted or in hand. I am very excited about this marriage.
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Add new board- teensy?
Reply #50 - Aug 18th, 2013 at 11:13pm
Print Post  
A few points about Teensy and the latest version of Visual Micro (1308.18)

1) Atmel Studio

At the request of Atmel Corp. the Atmel Studio plugin does not support non-atmel hardware however it seems reasonable that because Paul at pjrc contributes so much to the Arduino Ide an exception can reasonable made for Teensy. This means that both Teensy 2 and Teensy 3 are supported in Atmel Studio.

2) 

Support for Teensy and Arduino in the same Visual Studio or Atmel Ide

The new release provides a the facility to extend any version of Arduino (or oem Ide) using similar design to the 1.5 boards and platform txt system. 



3)

Arduino 1.0, 1.5.2 and 1.5.3 + library structures can be mixed and matched with any Arduino version (subject to compatible cores)
  
Back to top
IP Logged
 
Caswal Parker
Newbies
*
Offline


Posts: 2
Joined: Aug 21st, 2013
Re: Add new board- teensy?
Reply #51 - Aug 21st, 2013 at 1:51pm
Print Post  
I just come across Visual Micro and it looks amazing. I mainly use teensy' as I like the form factor and price point Smiley

I'm not an AVR/Micro programmer by trade, I'm a games programmer, so being able to use Visual Studio is a huge boon.

So I downloaded the above 1308.18 and it took a bit of messing with to compile. Following the defines here (http://visualmicro.com/page/Teensy-for-Microsoft-Visual-Studio.aspx) threw me a little. As the underscores for F_CPU and LAYOUT_US_ENGLISH are not there and I didn't notice. I guessed that serial should be USB_SERIAL or USBSERIAL but I can't find any #ifdef etc macros that use in any source files in the hardware\teensy directories.

Starting simple I am trying to get the Blink example to compile:

Code
Select All
/* LED Blink, Teensyduino Tutorial #1
   http://www.pjrc.com/teensy/tutorial.html

   This example code is in the public domain.
*/

const int ledPin = 6;   // Teensy has LED on 11, Teensy++ on 6
const int ledPin2 = 6;   // Teensy has LED on 11, Teensy++ on 6

// the setup() method runs once, when the sketch starts

void setup() {
  // initialize the digital pin as an output.
  pinMode(ledPin, OUTPUT);
}

// the loop() methor runs over and over again,
// as long as the board has power

void loop() {
  digitalWrite(ledPin, HIGH);   // set the LED on
  digitalWrite(ledPin2, HIGH);   // set the LED on
  delay(1000);                  // wait for a second
  digitalWrite(ledPin, LOW);    // set the LED off
  digitalWrite(ledPin2, LOW);   // set the LED on 
  delay(1000);                  // wait for a second
}
 



But I appear to be getting the following linker error:

Code
Select All
Compiling 'Blink' for 'Teensy++ 2.0'
core.a(pins_teensy.c.o)* : : In function `_init_Teensyduino_internal_':
pins_teensy.c : undefined reference to `usb_init'
Error creating .elf
 



I'm not sure as to what happens in the magical black box behind the scenes. I'm using arduino ide 1.0.5 with teensyduino installed on top. It builds just fine using the arduino ide.

The other thing I noticed, it seemed to select the arduino configuration I had, even though the Teensy configuration was selected.

Edit:

Horrid temp fix, commenting out usb_init(), and my search for any use of USB_SERIAL was accidently limited to a sub folder of the hardware directory when I didn't realise. So that's why I couldn't find any.

Edit2: Ok, for some reason now all is compiling with usb_init uncommented. Hmmph
« Last Edit: Aug 21st, 2013 at 2:04pm by Caswal Parker »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Add new board- teensy?
Reply #52 - Aug 21st, 2013 at 3:22pm
Print Post  
Hi there,

We have not tested Teensy with the new system in 1308.18. In theory it should just work but prob best tested off line.

I suggest using 1305.21 if the following does not work..

The Teensy defines can be found in the boards.txt of the respective arduinoide/hardware folders

I believe there is a difference between the underscores of the defines between teensy 2.0 and teensy 3.0

Can you confirm exactly which project defines you are setting so I can test over the next day or so

Thanks


  
Back to top
IP Logged
 
Lefteris
Newbies
*
Offline


Posts: 3
Joined: Aug 21st, 2013
Re: Add new board- teensy?
Reply #53 - Aug 21st, 2013 at 3:46pm
Print Post  
Hello,

I am sorry for jumping into the thread but I also have problems with getting teensy to work (I am using Teensy++ 2.0). More specifically, I have downloaded the latest beta of vm (1308.18) and configured the application paths (for teensy since there is no other TeensyIDE, I have used the same as the Arduino IDE). 

My problem is that I do not know where to define the F_CPU, LOCALE_US_ENGLISH and USB_SERIAL. When I define them in the Project->Project Options->Toolchain->AVR-GCC and AVR_G++ they seem to get ignored.
« Last Edit: Aug 21st, 2013 at 4:01pm by Tim@Visual Micro »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Add new board- teensy?
Reply #54 - Aug 21st, 2013 at 3:52pm
Print Post  
Please create new threads when you can. It is easier for answers and also avoids previous users who have a working solution from getting notifications.

But anyway here is the solution

This wiki page might be useful is shows the defines http://www.visualmicro.com/page/Teensy-for-Microsoft-Visual-Studio.aspx

The projects properties are available by clicking the project in the solution explorer and then clicking View>Properties Window (F4 in VS and CTRL+ENTER in Atmel). It can be confusing because both VS and Atmel have various properties windows. The one you are looking at is the wrong window, the right one is a tool window not a dialog window.

All of the Visual Micro project options are in the same place, so not only should be be able to set the project properties as per the wiki link above you should also be able to switch on debugging

This article explains how to open the properties window
« Last Edit: Aug 21st, 2013 at 4:03pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Lefteris
Newbies
*
Offline


Posts: 3
Joined: Aug 21st, 2013
Re: Add new board- teensy?
Reply #55 - Aug 21st, 2013 at 4:09pm
Print Post  
Sorry for hijacking the thread, I was mislead by the similarity on the issue. 

Thank you for your help and clarification. It now works as expected.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Add new board- teensy?
Reply #56 - Aug 21st, 2013 at 4:11pm
Print Post  
No problem, I understand it isn't easy to determine if a problem is new or not. Thanks very much for the update.
  
Back to top
IP Logged
 
Caswal Parker
Newbies
*
Offline


Posts: 2
Joined: Aug 21st, 2013
Re: Add new board- teensy?
Reply #57 - Aug 22nd, 2013 at 2:22am
Print Post  
For the Teensy++ 2.0 I have to define the following in Defines - Configuration:

F_CPU=16000000L;USB_SERIAL;LAYOUT_US_ENGLISH

Not getting much luck from the serial monitor, but I havn't looked too much into it as yet.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Add new board- teensy?
Reply #58 - Aug 22nd, 2013 at 7:26am
Print Post  
Thanks I will update the constants in the docs.

The serial monitor works fine, needs a println() in the code to force a flush to screen. 

If you are using the debugger and serial in your code at a different speed to 115200 then you will need to set the debugger to use the new speed.

Good to hear it is working
  
Back to top
IP Logged
 
Page Index Toggle Pages: [1] 
Send TopicPrint