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) Can't upload Arduino sketch to ATtiny chip on STK600 (Read 3113 times)
Jim Moomaw
Junior Member
**
Offline


Posts: 18
Joined: Feb 24th, 2020
Can't upload Arduino sketch to ATtiny chip on STK600
Feb 24th, 2020 at 1:15pm
Print Post  
Goal is to program ATtiny AVR chips using Arduino environment in Atmel Studio connected to STK600.  No issues getting sketch to compile but can't get it written to the device.  A clue I believe is that it's trying to use AVRDUDE bootload tool rather than the ISP programming port on the STK600 board.  I configured the vMicro Uploader and Debugger as spec'd by VM for this setup.  When running a vMicro "Build and upload" command AS7 throws up the Device Programming screen, which the device can fill in when I click around, but doesn't help the upload. 
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Can't upload Arduino sketch to ATtiny chip on STK600
Reply #1 - Feb 25th, 2020 at 4:29pm
Print Post  
Please follow the guide in red in this page.

https://www.visualmicro.com/page/Arduino-for-Atmel-Studio-7.aspx

You will see that you have the option to hand over to atmel studio device programming for upload and also an option to hand over to atmel studio debugging. 

Both upload and debug options are unconneted to each other. It might be that you decide to use normal usb upload (without use of programmer) alongside Atmel debugging or to use the programmer for both upload and debug.

If you still have questions then please follow the gude in yellow above so that we can see all your settings.

One extra tip: If you have not enabled the option on the uploader menu to "use programmer" then regardless of which programmer is selected in the list the bootloader will still be used for upload.
  
Back to top
WWW  
IP Logged
 
Jim Moomaw
Junior Member
**
Offline


Posts: 18
Joined: Feb 24th, 2020
Re: Can't upload Arduino sketch to ATtiny chip on STK600
Reply #2 - Feb 26th, 2020 at 12:02am
Print Post  
I did update to slightly newer Arduino 1.8.12, but that had no effect.  I can't find anything else that calls for updating.

Your link points to a page implying "Arduino for Atmel Studio 7" had a release in February 2020 with new features discussed on page and in menu choices, yet the installer page for that product shows the most current version 1911.23.0 released in Dec 2019.  My AS7 installation shows that same version.  This is likely why my installation doesn't have the new menu item "vMicro>General>Automatic Atmel Studio Device Selection", nor do I see 6 error messages, nor do my menu config screens look like your examples (attached).  Makes me think I'm running a downrev that has issues but neither the Tools Extensions Updater nor the website show a newer version.   

I don't see the "vMicro->Toggle Hidden Files" menu item, but perhaps that comes with the Feb-2020-release.   

I've set up the Dec-2019-release vMicro menus as closely as I can to what you show for the Feb-2020-release.  I'm happy to provide any data you need.  Since you only allow two attachments I'm combining several screen menu captures in one JPG.   Tx.
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Can't upload Arduino sketch to ATtiny chip on STK600
Reply #3 - Feb 26th, 2020 at 12:05am
Print Post  
Ignore that note, interim relase are available in the notifications and releases setion of this forum but you don't need the update. The instructions to upload using atmel device programming and/or to use atmel hardware debugging have not changed since your release.

I explained the two options for upload and/or debug in my previous message but you have not commented or given feedback about that.
  
Back to top
WWW  
IP Logged
 
Jim Moomaw
Junior Member
**
Offline


Posts: 18
Joined: Feb 24th, 2020
Re: Can't upload Arduino sketch to ATtiny chip on STK600
Reply #4 - Feb 26th, 2020 at 12:41am
Print Post  
I'm confused.  Do my menu screenshots not show I've configured them as you've instructed at your initial link?   Those are the configs I've used in the first and second post, which would seem to be as close as I can make them in the Dec-2019 release.  If you see these menus misconfigured by me let me know please and I'll retry.  

In a follow-on test I turned off "Enable Programmer For Uploads" in Uploader menu and the Output box clearly shows the system is trying (and failing) to use a bootloader.  So the "Enable" feature turned on shows the system is trying to use something *other* than a serial bootloader.  I don't seem to have the option of attaching anything else so I can't attach that dump. 
« Last Edit: Feb 26th, 2020 at 12:49am by Jim Moomaw »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Can't upload Arduino sketch to ATtiny chip on STK600
Reply #5 - Feb 26th, 2020 at 12:43am
Print Post  
Settings look good, "Debug>Start with or without debugging" uploads.
« Last Edit: Feb 26th, 2020 at 12:44am by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Jim Moomaw
Junior Member
**
Offline


Posts: 18
Joined: Feb 24th, 2020
Re: Can't upload Arduino sketch to ATtiny chip on STK600
Reply #6 - Feb 26th, 2020 at 12:52am
Print Post  
Huh.  I've been using the Vmicro 'build & upload'.  Should I be using the Debug menu instead?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Can't upload Arduino sketch to ATtiny chip on STK600
Reply #7 - Feb 26th, 2020 at 1:14am
Print Post  
It's best to use the real atmel commands if you want their stuff to happen.
  
Back to top
WWW  
IP Logged
 
Jim Moomaw
Junior Member
**
Offline


Posts: 18
Joined: Feb 24th, 2020
Re: Can't upload Arduino sketch to ATtiny chip on STK600
Reply #8 - Feb 26th, 2020 at 1:36am
Print Post  
Nuts.  Same result using Debug/Start w/o.
  
Back to top
 
IP Logged
 
Jim Moomaw
Junior Member
**
Offline


Posts: 18
Joined: Feb 24th, 2020
Re: Can't upload Arduino sketch to ATtiny chip on STK600
Reply #9 - Feb 26th, 2020 at 1:40am
Print Post  
I noticed that I can read and change device fuses so the connection from AS7 to STK600 to AVR chip all work.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Can't upload Arduino sketch to ATtiny chip on STK600
Reply #10 - Feb 26th, 2020 at 12:37pm
Print Post  
If you have "atmel device programming" as the uploader then when you click "Debug>Start and break" we would expect atmel to open device programming or use device programming for upload. If atmel fails it should open a dialog.

Please try this and then report what you see in the output window if upload fails.
  
Back to top
WWW  
IP Logged
 
Jim Moomaw
Junior Member
**
Offline


Posts: 18
Joined: Feb 24th, 2020
Re: Can't upload Arduino sketch to ATtiny chip on STK600
Reply #11 - Feb 26th, 2020 at 10:15pm
Print Post  
That seems to have worked.  The Device Programming window pops up, I click around to connect the device, Close the window, and then too quick to read and follow, the upload happens.   

I now seem to have a new problem... when the upload completes the STK600 changes the status LED from solid green (ready) to flashing red, which is either VTarget or AREF short-circuited (not sure what that means), or too much current which doesn't make sense since there's nothing but the AVR chip in the test socket and I'm supplying external power.  If I erase the chip and power-reset the STK600 the status LED goes solid green again.  Unless you have some experience with that one, I imagine that issue goes to a different forum.

OK, I think we're done and this issue is resolved.  Thank you!! 
  
Back to top
 
IP Logged
 
Jim Moomaw
Junior Member
**
Offline


Posts: 18
Joined: Feb 24th, 2020
Re: Can't upload Arduino sketch to ATtiny chip on STK600... Alternate solution
Reply #12 - Feb 26th, 2020 at 10:31pm
Print Post  
I noticed on the Device Programming / Memories tab there are ERASE CHIP, PROGRAM, VERIFY and READ buttons.  These also all work.  I can erase the chip, download the elf image, and verify the AVR image matches the PC file.  So I can imagine this panel can be used in place of the Debug tab commands if desired.  Two ways to go.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Can't upload Arduino sketch to ATtiny chip on STK600
Reply #13 - Feb 26th, 2020 at 10:35pm
Print Post  
Great and thanks for the update. Yes you are right now that you are using the atmel tools its outside of anything that visual micro can affect and also our knowlege.

If you do find a solution and see anything we can improve would be good to hear about it. 

one q: I am assuming the mcu mentioned on the atmel studio tool bar and project>device is correct for your board?
  
Back to top
WWW  
IP Logged
 
Jim Moomaw
Junior Member
**
Offline


Posts: 18
Joined: Feb 24th, 2020
Re: Can't upload Arduino sketch to ATtiny chip on STK600 - Blinking RED solution
Reply #14 - Feb 26th, 2020 at 11:56pm
Print Post  
Error was for AREF shunts being connected (the way the board ships from factory).  Both AREF0 and AREF1 shunts need to be set over to side (not connected) when using internal AVR reference.  Once removed and STK600 power-cycled, status LED was solid green, and AVR chip communication to AS7 worked perfectly.   

In fact, this situation is noted in the ATK600 User's Guide under "Analog Reference Voltages", but the web-format makes finding information like this very difficult.  Further, the short indication doesn't occur until the AVR is programmed, which is also confusing.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Can't upload Arduino sketch to ATtiny chip on STK600
Reply #15 - Feb 26th, 2020 at 11:57pm
Print Post  
Useful to know thanks
  
Back to top
WWW  
IP Logged
 
Jim Moomaw
Junior Member
**
Offline


Posts: 18
Joined: Feb 24th, 2020
Re: Can't upload Arduino sketch to ATtiny chip on STK600 - mcu Q
Reply #16 - Feb 27th, 2020 at 12:15am
Print Post  
Yes, I'm using an ATtiny861, and tried to align all the AS7 boxes to that device.  The board set was downloaded from Dr. Azzy's ATTiny site into my local Arduino file tree as he describes.   

Now, his boards require a specific way to reference pins in the code so they align with the physical pins on the AVR device.  I haven't done that verification step yet for my code since that seemed a 2nd order problem compared to getting the device to compile and upload. 

I'm doing a lot of first-time integration here (STK600, AS7, vMicro Arduino, ATtiny library, ATtiny chips), which always makes problems harder to isolate and solve.  Forums like this are critical to getting through the slog.  I greatly appreciate the help provided.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint