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] 2 3  Send TopicPrint
Very Hot Topic (More than 25 Replies) Add new board- teensy? (Read 70969 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
 
Page Index Toggle Pages: [1] 2 3 
Send TopicPrint