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) VisualMicro not able to use USBtinyISP programmer.. (Read 9906 times)
ryank
Newbies
*
Offline


Posts: 5
Joined: Apr 26th, 2015
VisualMicro not able to use USBtinyISP programmer..
Apr 27th, 2015 at 2:48am
Print Post  
Using Arduino IDE 1.6.3 with VM Release Candidate (1504.20 Sp3)

Trying to upload a sketch to Adafruit Trinket Pro 5V.. I downloaded the Adafruit board definitions from https://learn.adafruit.com/adafruit-arduino-ide-setup/arduino-1-dot-6-x-ide installed them in /programfiles/arduino/hardware/adafruit 

The Arduino IDE uploads perfectly using the USBtinyISP programmer: 

Code
Select All
uino5/bin/avr-ar rcs C:\Users\Main\AppData\Local\Temp\build3967390980591124196.tmp/core.a C:\Users\Main\AppData\Local\Temp\build3967390980591124196.tmp\WMath.cpp.o
uino5/bin/avr-ar rcs C:\Users\Main\AppData\Local\Temp\build3967390980591124196.tmp/core.a C:\Users\Main\AppData\Local\Temp\build3967390980591124196.tmp\WString.cpp.o
uino5/bin/avr-gcc -w -Os -Wl,--gc-sections -mmcu=atmega328p -o C:\Users\Main\AppData\Local\Temp\build3967390980591124196.tmp/Blink.cpp.elf C:\Users\Main\AppData\Local\Temp\build3967390980591124196.tmp\Blink.cpp.o C:\Users\Main\AppData\Local\Temp\build3967390980591124196.tmp/core.a -LC:\Users\Main\AppData\Local\Temp\build3967390980591124196.tmp -lm
uino5/bin/avr-objcopy -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 C:\Users\Main\AppData\Local\Temp\build3967390980591124196.tmp/Blink.cpp.elf C:\Users\Main\AppData\Local\Temp\build3967390980591124196.tmp/Blink.cpp.eep
uino5/bin/avr-objcopy -O ihex -R .eeprom C:\Users\Main\AppData\Local\Temp\build3967390980591124196.tmp/Blink.cpp.elf C:\Users\Main\AppData\Local\Temp\build3967390980591124196.tmp/Blink.cpp.hex

Sketch uses 1,030 bytes (3%) of program storage space. Maximum is 28,672 bytes.
Global variables use 9 bytes of dynamic memory.
uino5/bin/avrdude rduino5/etc/avrdude.conf -v -patmega328p -cusbtiny p.hex:i

avrdude: Version 6.0.1, compiled on Apr 15 2015 at 19:59:58
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is duino5/etc/avrdude.conf"

         Using Port                    : usb
         Using Programmer              : usbtiny
avrdude: usbdev_open(): Found USBtinyISP, bus:device: bus-0:\\.\libusb0-0001--0x1781-0x0c9f
         AVR Part                      : ATmega328P
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : USBtiny
         Description     : USBtiny simple USB programmer, http://www.ladyada.net/make/usbtinyisp/
avrdude: programmer operation not supported

avrdude: Using SCK period of 10 usec
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e950f
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: Using SCK period of 10 usec
avrdude: reading input file "C:\Users\Main\AppData\Local\Temp\build3967390980591124196.tmp/Blink.cpp.hex"
avrdude: writing flash (1030 bytes):

Writing | ################################################## | 100% 0.19s

avrdude: 1030 bytes of flash written
avrdude: verifying flash memory against C:\Users\Main\AppData\Local\Temp\build3967390980591124196.tmp/Blink.cpp.hex:
avrdude: load data flash data from input file C:\Users\Main\AppData\Local\Temp\build3967390980591124196.tmp/Blink.cpp.hex:
avrdude: input file C:\Users\Main\AppData\Local\Temp\build3967390980591124196.tmp/Blink.cpp.hex contains 1030 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 0.08s

avrdude: verifying ...
avrdude: 1030 bytes of flash verified

avrdude done.  Thank you. 



When I do the same with VM I get 

Code
Select All
Binary sketch size: 1,030 bytes (used 4% of a 28,672 byte maximum) (6.96 secs)
Uploading to I/O board using 'usbtinyisp'
Uploader started for board Pro Trinket 5V/16MHz (USB)
Uploader will use programmer name: usbtinyisp
Upload failed. Did you select the correct upload method for this board?
System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   at processing.app.debug.AvrdudeUploader.uploadUsingPreferences(String buildPath, String className, Boolean verbose, Boolean ProgrammerUploadUsing, String mcuProgrammerOverrideName)
   at processing.app.SketchEditor.Upload(Boolean verbose)
 



I've tried everything and I can not get VM to recognize the programmer Sad
  
Back to top
 
IP Logged
 
ryank
Newbies
*
Offline


Posts: 5
Joined: Apr 26th, 2015
Re: VisualMicro not able to use USBtinyISP programmer..
Reply #1 - Apr 27th, 2015 at 5:59am
Print Post  
I was able to get use to somehow use the usbtiny programmer by appending the trinket profiles to the main /progprogramfilesfiles/arduino/hardware/arduino/avr/boards.txt instead of leaving them in /programfiles/arduino/hardware/adafruit/avr/boards.txt (which works with the Arduino IDE)

I also am getting 'unknown indentifiers' in standard pinMode and Serial.begin expressions now for some reason..

Link to screenshot.. to large to attach
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: VisualMicro not able to use USBtinyISP programmer..
Reply #2 - Apr 27th, 2015 at 10:55am
Print Post  
Thanks for the good report.

It sounds like the trinket hardware definition inherits the avr core but the programmers are not being resolved correctly.

It would probably have worked if you copied the programmers.txt from the ide/hardware/...arduino/avr folder where you installed the trinket boards.txt

But your workaround is obviously also ok Smiley

We will fix in the next release. thanks again
  
Back to top
IP Logged
 
ryank
Newbies
*
Offline


Posts: 5
Joined: Apr 26th, 2015
Re: VisualMicro not able to use USBtinyISP programmer..
Reply #3 - Apr 27th, 2015 at 3:57pm
Print Post  
Ok, but any idea why its not recognizing basic arduino code? 

http://screencast.com/t/yLrUrOG6dRea
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: VisualMicro not able to use USBtinyISP programmer..
Reply #4 - Apr 27th, 2015 at 4:03pm
Print Post  
Which Arduino version are you using?
  
Back to top
IP Logged
 
ryank
Newbies
*
Offline


Posts: 5
Joined: Apr 26th, 2015
Re: VisualMicro not able to use USBtinyISP programmer..
Reply #5 - Apr 27th, 2015 at 4:23pm
Print Post  
1.6.3 IDE and 
1.1504.20  VM
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: VisualMicro not able to use USBtinyISP programmer..
Reply #6 - Apr 27th, 2015 at 4:30pm
Print Post  
Oh yes sorry you already said that.

The trinket is custom hardware that inherits the new Arduino 1.6.3 downloadable cores. I suspect the intellisense is picking up the wrong paths for the custom hardware. 

We will release an updated beta of he next day or two with the intellisense fix.

Thanks for the report.
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: VisualMicro not able to use USBtinyISP programmer..
Reply #7 - Apr 27th, 2015 at 7:55pm
Print Post  
I tried both the adafruit ide and their custom hardware defs

1)
If I put the adafruit hardware defs in the "user" hardware folder instead of under the ide then the programmers work okay. If under the ide/hardware the programmers fail for the adafruit hardware. I will look into that. The user hardware folder is normally documents\arduino\hardware.

Update: I had to move the adafruit defs back to under the Ide hardware folder because if you update your avr core using the new boards manager (using visual micro or the arduino ide) the compile fails. I updated to 1.6.6. I think this is a hole in the new Arduino board management system but I'll fix the programmer inheritance for the adafruit (user) hardware anyway.

2)

Intellisense the Arduino core. Few questions ...

- If you switch to a different board such as the uno, then back again does the problem resolve?
- If you right click PinMode and selected "Go to definition" what is the location of the arduino.h that opens?
- Are you using the default arduino 1.6.3 avr install or have you upgraded via Boards Manager? (I am not suggesting you should just asking)
- How did you create the project? Did you open an existing .ino and have visual micro auto create a project or use "File>New>Sketch Project"? 
- If you create a new project does the intellisense issue occur?

Thanks
« Last Edit: Apr 27th, 2015 at 8:37pm by Tim@Visual Micro »  
Back to top
IP Logged
 
ryank
Newbies
*
Offline


Posts: 5
Joined: Apr 26th, 2015
Re: VisualMicro not able to use USBtinyISP programmer..
Reply #8 - Apr 28th, 2015 at 3:47am
Print Post  
Instead of moving the adafruit trinket board definitions to the ide I tried it in the documents/arduino folder as mentioned.. Since its using a programmer it failed when I tried uploading a simple blink sketch immediately.. I reset waited a few more seconds and yes it uploaded a simple blink sketch to the trinket just fine.. 

Intellisense.. I'm still getting the same issues..

1) Switching boards does not change help
2) http://screencast.com/t/PT9Ov4eLl
3) I am using a clean install.. I uninstalled vstudio, arduino and visual micro including app data.. .. i then installed vstudio.. then the latest 1.6.3 arduino full install and then finally visual micro..  I have not touched the new board manager feature..
4) I created a new sketch from file->new->project sketch
5) Apparently yes..


*interesting note.. when i open a project from file->open->sketch project I get random intellisense errors.. http://screencast.com/t/pBJszN4q

« Last Edit: Apr 28th, 2015 at 3:57am by ryank »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: VisualMicro not able to use USBtinyISP programmer..
Reply #9 - Apr 28th, 2015 at 10:52am
Print Post  
Okay I think all problems relate to the way the adafruit definitions work in relation to the new arduino boards manager hardware system. I think Visual micro is confused with adafruit when Visual Micro finds the board definitions in the appdata temp folder...

I can see in your intellisense screen shot that you did previously install the 1.6.5 avr boards package using the boards manager. Un-installing the ide's does not affect this because the downloaded hardware is stored in c:\users\[your name]\appdata\roaming\arduino15 and auto-rediscovered when you open Visual Micro.

1)
Please rename or delete the arduino15 and folder and restart the ide or click tools>visual micro>reload tool chains.

2)
for the next week, you might also get better results using the "Arduino 1.5" option in Visual Micro along with 1.6.3. The 1.5 option is the same for Visual Micro except that it does not load the downloaded contributions from the appdata folder.

Sorry you are caught with custom hardware issues after the huge structural changes implemented by arduino in 1.6.3 last month with NO beta test time. We will be fully operational within a week.

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


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: VisualMicro not able to use USBtinyISP programmer..
Reply #10 - Apr 30th, 2015 at 10:23pm
Print Post  
There is a new beta that should fix many issues around custom hardware programmers and also 1.6.3+ intellisense.

There is still one quirk, if you put your defs under the arduino ide/hadrware folder the built-in 1.6.3 tool chain will be used. If in the sketchbook/hardware folder the latest "boards manager" downloaded (if exists) tool chain will be used. This is due to the order the hardware is loaded from the disk.

Please give it a try. Thanks
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint