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) Cannot load an Adafruit Pro Trinket (Read 10046 times)
Sherwood
Newbies
*
Offline


Posts: 6
Joined: Feb 1st, 2016
Cannot load an Adafruit Pro Trinket
Feb 1st, 2016 at 9:10pm
Print Post  
I cannot get my sketch loaded to an Adafruit Pro Trinket.  After I get a successful compilation I get the error:

Quote:
Uploading to I/O board using 'COM8'
The uploader returned an error
avrdude: error at /avrdude.conf:320: programmer type must be written as "id_type"


Using VS 2013 Professional and VM Pro (latest update) on Windows 8.1

With no hardware changes, the exact same sketch loads using the Arduino 1.6.5 IDE.

WinAVR is installed and I can run AVRDUDE manually.

With no hardware changes, if I change the board type to an Arduino Uno it loads.

I am using an Adafruit FTDI Friend and it is on COM8 and works (as per the previous two tests).

I assume something is not configured properly but can not figure out what and where.

Any suggestions?
« Last Edit: Feb 1st, 2016 at 9:11pm by Sherwood »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12187
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Cannot load an Adafruit Pro Trinket
Reply #1 - Feb 1st, 2016 at 10:37pm
Print Post  
Hi,

My understanding with the Trinket is that is doesn't have Serial/Usb upload. 

Instead, it uses a hardware programmer.

To upload to this board using the Arduino Ide you must have to select a programmer? Did you select one? (or maybe the Ide just so happened to already have the correct programmer selected)

Once you establish which programmer/upload method you are using, you can select the same on the "Visual Micro" menu in Visual Studio. + The command below the selected programmer says "Always use programmer for upload" which should also be selected.

I will look into the Trinket definitions to see how a message can more easily be displayed on screen when users have not selected/enabled a programmer. It seems like this is missing from Visual Micro.

Does this all make sense to you? Sorry if I have missed the point.

  
Back to top
IP Logged
 
Sherwood
Newbies
*
Offline


Posts: 6
Joined: Feb 1st, 2016
Re: Cannot load an Adafruit Pro Trinket
Reply #2 - Feb 2nd, 2016 at 1:23am
Print Post  
First of all, be careful.  There is a Trinket and a Pro Trinket and they have different processors and loading procedures!

I checked in the Arduino IDE to check the loader it uses and it is USBTinyISP.  So I selected this as the loader in VM and get almost the same error:

Quote:
Uploading to I/O board using 'USBtinyISP'
The uploader returned an error
avrdude: error at /avrdude.conf:320: programmer type must be written as "id_type"


I assume VM is creating a call to the specified boot loader and for some reason something is going wrong.  So I checked the command line created by the Arduino IDE:

Quote:
D:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude -CD:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega328p -carduino -PCOM8 -b115200 -D .cpp.hex:i


You can see that it is using a different path for the avrdude.conf than the Arduino IDE is using.  So I copied that conf file to where VM is looking and get the error from VM:

Quote:
Uploading to I/O board using 'USBtinyISP'
The uploader returned an error
avrdude: Error: Could not find USBtiny device (0x1781/0xc9f)


So there is something more than just the wrong conf file going wrong.

Is it possible to find the loader command line that VM is using and to adjust it?

Thanks
  
Back to top
 
IP Logged
 
Sherwood
Newbies
*
Offline


Posts: 6
Joined: Feb 1st, 2016
Re: Cannot load an Adafruit Pro Trinket
Reply #3 - Feb 2nd, 2016 at 1:33am
Print Post  
In rummaging around more in the forum I found the following related issue:
http://www.visualmicro.com/forums/YaBB.pl?board=ARDUINO_VS15/40

Not quite the same, but again it is about knowing the avrdude command line used.

I don't think the solution there would fix mine, and even if it did it would be a lot easier if VM had the ability to see what is being called.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12187
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Cannot load an Adafruit Pro Trinket
Reply #4 - Feb 2nd, 2016 at 11:26pm
Print Post  
Hi,

I am not entirely clear about what verbose outputs you are getting from vm or the arduino ide.

I have just made some tests and as long as I have "Visual Micro>Always use programmer for upload" ticked then I get the same output as the arduino ide same as you report previously "Uploading to I/O board using 'USBtinyISP'"

So I think that either you don't have the programmer setting enabled or we need to see what version of visual micro you are using. What does it say in tools>options>visual micro>version>version

Thanks

  
Back to top
IP Logged
 
Sherwood
Newbies
*
Offline


Posts: 6
Joined: Feb 1st, 2016
Re: Cannot load an Adafruit Pro Trinket
Reply #5 - Feb 3rd, 2016 at 12:11am
Print Post  
The VM version is 1.1601.30.  I just updated to Pro and installed the latest version a couple of days ago.

I checked and the use loader is checked and the selected loaded is usbtiny.isp.

The quoted text:  The first was my original error from VM.  The second is the command to avrdude that the Arduino IDE 1.6.5 uses for loading.  It uses a different version of the avrdude.conf file.  The third quote is the error from VM when I copied the conf file used by the Arduino IDE to the location being used by VM.

Hope this helps clarify

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


Posts: 12187
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Cannot load an Adafruit Pro Trinket
Reply #6 - Feb 3rd, 2016 at 12:17am
Print Post  
Hi,

Please switch on "Visual Micro>Verbose Messages" and try to upload. Then post or email the full output to info[at]visualmicro.com

Thanks
  
Back to top
IP Logged
 
Sherwood
Newbies
*
Offline


Posts: 6
Joined: Feb 1st, 2016
Re: Cannot load an Adafruit Pro Trinket
Reply #7 - Feb 3rd, 2016 at 12:59am
Print Post  
With verbose on and the conf file back to the original, I get:

Quote:
Uploading to I/O board using 'USBtinyISP'
Uploader started for board Pro Trinket 5V/16MHz (FTDI)
Uploader will use programmer name: usbtinyisp
D:\Program Files (x86)\Arduino\hardware\tools\avr\bin\avrdude 2.0/avrdude.conf" -v -patmega328p -cusbtiny adafruit_avr_protrinket5ftdi/Test.ino.hex:i"
Error during upload using programmer
Upload failed

Upload failed
avrdude: Version 6.0.1, compiled on Apr 15 2015 at 19:59:58
The uploader returned an error
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch
         System wide configuration file is 0/avrdude.conf"
avrdude: error at /avrdude.conf:320: programmer type must be written as "id_type"
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12187
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Cannot load an Adafruit Pro Trinket
Reply #8 - Feb 3rd, 2016 at 7:42pm
Print Post  
Thanks for the info. 

I am having problems replicating the issue. Please switch on "tools>options>visual micro>compiler>show build properties". This will provide additional detail in the verbose build output.

Then try the build and upload. 

Please attach or email the full output in a txt file.

Thanks
« Last Edit: Feb 3rd, 2016 at 7:43pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12187
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Cannot load an Adafruit Pro Trinket
Reply #9 - Feb 7th, 2016 at 1:38am
Print Post  
There has been some changed in the latest release 1602.6 that are related to upload. If you have time can you please try the version.

Thank you
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint