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  Send TopicPrint
Very Hot Topic (More than 25 Replies) start without debugging using avrisp2 (Read 37977 times)
Trek19
Junior Member
**
Offline


Posts: 82
Location: UK
Joined: Dec 2nd, 2013
start without debugging using avrisp2
Feb 9th, 2014 at 12:46pm
Print Post  
I want to use the avrisp programmer so that I can program standalone chips like the ATtiny84 using the ISP interface.
I am experimenting with an arduino uno first to reduce the risks possibly associated with using a core for the ATtiny85.
If I use ctrl + shift + p and select the .elf file all works OK.
(here is how to find the .elf files http://www.visualmicro.com/forums/YaBB.pl?num=1389194085/0#5
I cant however get the device programmed using the start without debugging shortcut.
I have :
Tools - Visual Micro - Programmers - avrisp.
Tools - Options - Visual Micro - General - programmers (it shows Last programmer avrisp) so I select - True.
Also in alt + f7 - Tool , I select Avrisp.


Anybody any ideas please?
« Last Edit: Feb 9th, 2014 at 12:49pm by Trek19 »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: start without debugging using avrisp2
Reply #1 - Feb 9th, 2014 at 2:58pm
Print Post  
Hi,

I am not sure if I understand. For now please forget everything you know about Atmel Studio,.elf files and ignore tools>options. 

Just do this which is Arduino compatible ...

1) Click "Tools>Visual Micro>Programmers" and select your programmer (avrisp mkII)
2) Click "Tools>Visual Micro>Upload using Programmer"
3) Now use any of the normal Atmel Studio start commands (with or without debugging) to upload using avrisp instead of serial.

Sorry if I have missed the point. Is this what you wanted to do?

I will review the wiki which I know needs improving.

Thanks
« Last Edit: Feb 9th, 2014 at 2:59pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Trek19
Junior Member
**
Offline


Posts: 82
Location: UK
Joined: Dec 2nd, 2013
Re: start without debugging using avrisp2
Reply #2 - Feb 9th, 2014 at 4:27pm
Print Post  
Done that and I get this:
Compiling 'Blink' for 'Arduino Uno'
Build folder: file:///C:/Users/Jim/AppData/Local/VMicro/Arduino/Builds/Blink/uno
Binary sketch size: 1084 bytes (used 3% of a 32256 byte maximum) (1.26 secs)
Uploading to I/O board using 'avrispmkii'
avrdude: usbdev_open(): did not find any USB device "usb"

I read on this site info on loading usb drivers but I did see in Device manager the USB listed but now its disappeared and only the jungo is present.
seems odd that the VS programmer works OK.
« Last Edit: Feb 9th, 2014 at 4:53pm by Trek19 »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: start without debugging using avrisp2
Reply #3 - Feb 9th, 2014 at 5:23pm
Print Post  
Atmel changed the usb drivers to Jungo some time ago and they are no longer compatible with the Arduino Ide.

Visual Micro uses the tools supplied with the Arduino Ide so you need to switch the driver back to the one that came with the installation disk of the mkisp mkII.

If you have problems or can't find the install disk there is a page here that explains how to switch the usb driver.

Don't shoot the messenger, I am just telling you how it is (not my fault)  Cheesy

ps: I am trying to find out from Atmel how to use their atprogram.exe to upload instead of the Arduino tool chain. I think this would be a better solution for advanced users of Atmel Studio. Not sure if it is possible my knowledge is weak in this area. If you have any ideas then they will be appreciated
« Last Edit: Feb 9th, 2014 at 5:26pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Trek19
Junior Member
**
Offline


Posts: 82
Location: UK
Joined: Dec 2nd, 2013
Re: start without debugging using avrisp2
Reply #4 - Feb 9th, 2014 at 5:45pm
Print Post  
OK I done that and uploading from "Start without debugging" works.
I now remember why I didnt go through that process of changing the driver, which I have tried in the past, because now I cant access the avrisp through AV studio directly ie without Visual Studio.
Is it possible to get both options without reloading the drivers each time.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: start without debugging using avrisp2
Reply #5 - Feb 9th, 2014 at 6:38pm
Print Post  
Please see the ps in my previous comments. If we can find the atpromgram.exe commands to upload with avrisp mkII then we can extend the config to support it. I don't think you would need a new release of Visual Micro for that.

Another thing that might be useful is that hopefully the next release will publish the .elf/hex etc to the standard Atmel build folder.
« Last Edit: Feb 9th, 2014 at 6:45pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Trek19
Junior Member
**
Offline


Posts: 82
Location: UK
Joined: Dec 2nd, 2013
Re: start without debugging using avrisp2
Reply #6 - Feb 9th, 2014 at 10:37pm
Print Post  
As I said its possible to use AV programmer with jungo to upload to arduino using ISP and .elf files so maybe its possible to add some code to the post build stage, alt + f7
I have been experimenting with atprogram.exe but have not got far yet, see:
http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&p=1134307&highli...

Have you tried this route?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: start without debugging using avrisp2
Reply #7 - Feb 10th, 2014 at 12:47pm
Print Post  
No I have not tried it yet but I am waiting for some information from Atmel to save hunting for it. It is quite easy to extend the 1.5.x programmer.txt in arduinoide/hardware/arduino/avr to include a different programmer like atprogram.exe. Hopefully this will be possible with the info.
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: start without debugging using avrisp2
Reply #8 - Feb 19th, 2014 at 5:08pm
Print Post  
Jungo compatible upload will be in the next release due over the next week or two



Thanks to some help from the team at Atmel!
« Last Edit: Feb 19th, 2014 at 5:09pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Trek19
Junior Member
**
Offline


Posts: 82
Location: UK
Joined: Dec 2nd, 2013
Re: start without debugging using avrisp2
Reply #9 - Feb 19th, 2014 at 5:18pm
Print Post  
Well done, I look forward to trying it.

  
Back to top
 
IP Logged
 
Trek19
Junior Member
**
Offline


Posts: 82
Location: UK
Joined: Dec 2nd, 2013
Re: start without debugging using avrisp2
Reply #10 - Mar 6th, 2014 at 6:41pm
Print Post  
To get this to work now should I now install:
Arduino 1.5.6-r2 
Visual Micro (1403.03 RC)
and re-install the jungo drivers.

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


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: start without debugging using avrisp2
Reply #11 - Mar 6th, 2014 at 6:57pm
Print Post  
Hi,

1403.03 RC + any Arduino 1.5.x version + Jungo drivers
  
Back to top
IP Logged
 
Trek19
Junior Member
**
Offline


Posts: 82
Location: UK
Joined: Dec 2nd, 2013
Re: start without debugging using avrisp2
Reply #12 - Mar 10th, 2014 at 12:18pm
Print Post  
I have: 1403.03 RC + Arduino 1.5.6-r2 version + Jungo drivers and I cant get anything to work.
I just downloaded Visual Micro (1403.08) but still the same as follows:

When VStudio starts I get the message:
VisualMicro Failed to create UI command items.
The parameter incorrect (exception from HRESULT :0x80070057(E_INVALIDARG))

At the end of the verbose output I get:
Binary sketch size: 1116 bytes (used 3% of a 32256 byte maximum) (2.70 secs)
Minimum Memory Usage: 11 bytes (1% of a 2048 byte maximum)
Uploading to I/O board using 'Atmel Studio AVRISP MkII (ISP)'
C:\Program Files\Atmel\Atmel Studio 6.1\atbackend\atprogram -d atmega328p -v -t avrispmk2 -i ISP program -c -f "C:\Users\Jim\AppData\Local\VMicro\Arduino\Builds\Blink\uno\Blink.hex"
Could not find tool.

Upload failed. Did you select the correct upload method for this board?
Error during upload using programmer
[DEBUG] Starting execution of "program"
[DEBUG] Starting process 'C:\Program Files\Atmel\Atmel Studio 6.1\atbackend\atbackend.exe'
[DEBUG] Connecting to TCP:127.0.0.1:49748
[INFO] Could not find tool. Retrying...
[INFO] Could not find tool. Retrying...
[INFO] Could not find tool. Retrying...
[INFO] Could not find tool. Retrying...
[INFO] Could not find tool. Retrying...

I have tried re-installing jungo and even going back to the earlier USB drivers but I cannot connect to anything anymore, not even an UNO (I have a second UNO with the bootloader still intact) directly through the USB even from the arduinoe interface not VS.

In Tools - Programmers I have tried both the versions of avrisp.
I have tried ctrl shift p and set the avrisp but when I hit apply nothing happens for a while and then I get the message:An ongoing operation is taking longer than expected Details tool-> connect
And when I close it I get this message:
Severity:            ERROR
ComponentId:      20100
StatusCode:      1
ModuleName:      TCF (TCF command: Tool:connect failed.)

USB driver initialization failed: Internal system error (0x20000007).

I can see the drivers in System Manager and in View - Atmel Tools I see avrisp as connected.

Not sure where to go from here.

« Last Edit: Mar 10th, 2014 at 12:35pm by Trek19 »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: start without debugging using avrisp2
Reply #13 - Mar 10th, 2014 at 12:44pm
Print Post  
Quote:
When VStudio starts I get the message:
VisualMicro Failed to create UI command items.
The parameter incorrect (exception from HRESULT :0x80070057(E_INVALIDARG))


This sounds like a custom library is causing a problem that Visual Micro should ignore or handle better. You might find that some libraries are missing from the "project>add/import sketch library>user" menu.

Please switch on "tools>options>visual micro>user interface>trace" and then re-start the ide. please email the trace output that appears after the ide re-starts. We might have to make a new beta and extend the trace messages if they do not clearly show the problem. This can be done quickly.

+ Please confirm that you see the list of boards in the tool bar?

Quote:
C:\Program Files\Atmel\Atmel Studio 6.1\atbackend\atprogram -d atmega328p -v -t avrispmk2 -i ISP program -c -f "C:\Users\Jim\AppData\Local\VMicro\Arduino\Builds\Blink\uno\Blink.hex"
Could not find tool.

Upload failed. Did you select the correct upload method for this board?
Error during upload using programmer
[DEBUG] Starting execution of "program"
[DEBUG] Starting process 'C:\Program Files\Atmel\Atmel Studio 6.1\atbackend\atbackend.exe'
[DEBUG] Connecting to TCP:127.0.0.1:49748
[INFO] Could not find tool. Retrying...
[INFO] Could not find tool. Retrying...
[INFO] Could not find tool. Retrying...
[INFO] Could not find tool. Retrying...
[INFO] Could not find tool. Retrying...

I have tried re-installing jungo and even going back to the earlier USB drivers but I cannot connect to anything anymore, not even the UNO directly through the USB.



I think this is a usb issue or Atmel Studio problem because we can see that Visual Micro has invoked the Atmel version of the programmer and that it then failed with an error communicating with another bit of Atmel software.

Code
Select All
C:\Program Files\Atmel\Atmel Studio 6.1\atbackend\atprogram -d atmega328p -v -t avrispmk2 -i ISP program -c -f "C:\Users\Jim\AppData\Local\VMicro\Arduino\Builds\Blink\uno\Blink.hex" 



I am sorry to not have a solution at hand. Maybe you can post this single issue on the atmel support site? Q: What would cause this message "[INFO] Could not find tool. Retrying..."

Quote:
In Tools - Programmers I have tried both the versions of avrisp.
I have tried ctrl shift p and set the avrisp but when I hit apply nothing happens for a while and then I get the message:An ongoing operation is taking longer than expected Details tool-> connect
And when I close it I get this message:
Severity:            ERROR
ComponentId:      20100
StatusCode:      1
ModuleName:      TCF (TCF command: Tool:connect failed.)


You would expect to see errors like this for a usb device that does not have the correct driver. If you were trying to use the Arduino version of avrisp mkII then you would see this error and it would be correct. As you know it is either atmel drivers or arduino drivers so one tool will always produce an error.

We do not use the ctrl+shift+p or the standard atmel screens for upload. You simply selected the programmer from tools>visual micro>programmers and then click "upload using programmer". Then hit F5 to upload using the selected programmer as you have done in your first example above.

Quote:
not even the UNO directly through the USB


You should still see the Uno in the Serial ports list? If not then something out of the ordinary has happened to your pc. The Atmel jungo drivers do not affect the standard Arduino usb/uno drivers.

After you have uploaded to an Arduino using a programmer you will no longer be able to upload using usb unless you burn a new bootloader. This is how Arduino works and is not within the control of Visual Micro.

However if programmer upload has failed ALWAYS, then I do not understand how your Arduino Uno would not allow usb upload. Did you upload using avrisp programmer before switching to the Atmel Jungo drivers, then this would explain why this happens?

If your Uno is no longer listed as a COM port then I would suggest re-starting your pc.

Hope to hear more.
  
Back to top
IP Logged
 
Trek19
Junior Member
**
Offline


Posts: 82
Location: UK
Joined: Dec 2nd, 2013
Re: start without debugging using avrisp2
Reply #14 - Mar 10th, 2014 at 1:30pm
Print Post  
Having re-started the ide with trace, in the "Micro system trace" output window I get:
CreateCommandBarItemsPerm      Begin AddinVer=1.1403.03
Permanent Items Setup Requested       - Exiting setup because some controls already exist
CreateCommandBarItemsPerm      End
Create UI command items      Begin
CreateCommandBarItems      Begin AddinVer=1.1403.03
Get Bar      Tools
Create Bar      Tools>Arduino
Adding      Tools>Ports
Adding      Tools>Other Ports
Adding      UI Menu-Board-Items
Adding      UI Menu-SerialPort-Items
Adding      Creating project menu libraries for platform
Adding      ToolBar-Lib-Items
Unable to create UI command items      The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))

In the Tools-Options-VB it says it places a file in a sub directory of the VB options.dll but I cant see where that is.

I went back to the Arduino install and and remmembered that I had un-checked the install USB drivers, assuming I would now be using jungo. So I re-installed arduino and the USB driver and now the arduino interface works but the VS still does not.

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


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: start without debugging using avrisp2
Reply #15 - Mar 10th, 2014 at 1:37pm
Print Post  
Quote:
Adding      ToolBar-Lib-Items
Unable to create UI command items      The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))


1)
At first glance, this does look like a library causing some confusion with the latest beta. I guess you have a "sketchbook folder\libraries folder" with a few custom libraries installed? 

2)
Do you see any libraries listed on project>add/import sketch library>user?

Quote:
In the Tools-Options-VB it says it places a file in a sub directory of the VB options.dll but I cant see where that is.


Sorry I do not understand any of this? Please explain more.

Quote:
I went back to the Arduino install and and remmembered that I had un-checked the install USB drivers, assuming I would now be using jungo. So I re-installed arduino and the USB driver and now the arduino interface works but the VS still does not.


Difficult to understand what does not work from this report.

Can you see the Uno listed under tools>visual micro>serial monitor? Is it ticked?

Did you un-check tools>visual micro>upload using programmer"?

Thanks
  
Back to top
IP Logged
 
Trek19
Junior Member
**
Offline


Posts: 82
Location: UK
Joined: Dec 2nd, 2013
Re: start without debugging using avrisp2
Reply #16 - Mar 10th, 2014 at 2:11pm
Print Post  
Quick reply on the Quote:
I went back to the Arduino install and and remembered that I had un-checked the install USB drivers, assuming I would now be using jungo. So I re-installed arduino and the USB driver and now the arduino interface works but the VS still does not.

I am talking about the Arduino 1.5.6-r2 version re-installation and dialogue. When I then ran the Arduino interface not the Visual Studio Visual Micro I was able to connect with the UNO (another one which has a boot loader) using the USB.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: start without debugging using avrisp2
Reply #17 - Mar 10th, 2014 at 2:15pm
Print Post  
Thanks, so you proven arduino usb is working with a board that has a bootloader.

So if you untick "upload using programmer" in Visual Micro and select the serial port then press F5 what happens?
  
Back to top
IP Logged
 
Trek19
Junior Member
**
Offline


Posts: 82
Location: UK
Joined: Dec 2nd, 2013
Re: start without debugging using avrisp2
Reply #18 - Mar 10th, 2014 at 2:15pm
Print Post  
Quote:
In the Tools-Options-VB it says it places a file in a sub directory of the VB options.dll but I cant see where that is. 
When I go to Tools - Option - VB - User Interface and select Trace there is a note that "the trace file can be found in a sub folder below the location of the visual micro addin dll", but I cant find that.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: start without debugging using avrisp2
Reply #19 - Mar 10th, 2014 at 2:24pm
Print Post  
A

Quote:
In the Tools-Options-VB it says it places a file in a sub directory of the VB options.dll but I cant see where that is. 
When I go to Tools - Option - VB - User Interface and select Trace there is a note that "the trace file can be found in a sub folder below the location of the visual micro addin dll", but I cant find that.


Okay some confusion here  Smiley

You mean "tools>options>visual micro" not "tools>options>VB"

The tip for the user interface trace might be out of date. The trace appears in the output window after you re-start Visual Micro (VM). If you run as administrator then it will also create the file report of the trace with the same info. 

We do not need the trace any more you have already reported what is says above. I then asked two questions of which I am still awaiting answers...

1) I guess you have a "sketchbook folder\libraries folder" with a few custom libraries installed? 

2) Do you see any libraries listed on project>add/import sketch library>user?

B

As concerns uploading I still need answers to these two questions please

Can you see the Uno listed under tools>visual micro>serial monitor? Is it ticked?

1) Did you un-check tools>visual micro>upload using programmer"?

2) If you untick "upload using programmer" in Visual Micro and also select the serial port from "tools>visual micro>serial monitor" then press F5 what happens?

Thanks
  
Back to top
IP Logged
 
Page Index Toggle Pages: [1] 2 
Send TopicPrint