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
Normal Topic Can't upload to Uno after windows crash (Read 1111 times)
JonR
Junior Member
**
Offline


Posts: 10
Joined: Jul 30th, 2020
Can't upload to Uno after windows crash
Jul 31st, 2020 at 3:13am
Print Post  
I have a project that runs on an Uno and I am developing in Visual Studio 2019 with VMicro.  It has been working fine.  I had it open in VS and windows crashed to BSOD.  After getting everything back up, I get error that programmer is not responding.  Output attached.  I am uploading via a USB port and can still do so from the Arduino IDE but not vMicro. I've replaced USB driver, re-installed VS (an update).  I retrieved my last backup of the entire project when it was working and it fails also.  Any ideas?  I'm thinking something was corrupted by the crash but I don't know what.  Any help would be appreciated.
« Last Edit: Jul 31st, 2020 at 3:15am by JonR »  

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


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Can't upload to Uno after windows crash
Reply #1 - Jul 31st, 2020 at 3:24am
Print Post  
If you push the reset button on the board when it is attempting upload does it then work?

Did you try powering the pc off completely then restart?


The upload command is an external program you can run it in a .bat file or at the cmd.exe prompt

Code
Select All
"C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\avrdude" "-CC:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf" -v -V -patmega328p -carduino "-PCOM5" -b115200 -D r_control.ino.hex:i
 



Please report back any observations with the above in mind and we will look into the result if required.

« Last Edit: Jul 31st, 2020 at 3:24am by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
JonR
Junior Member
**
Offline


Posts: 10
Joined: Jul 30th, 2020
Re: Can't upload to Uno after windows crash
Reply #2 - Jul 31st, 2020 at 3:36pm
Print Post  
reset button did not work.
Yes I power cycled the PC early on.
batch file with command and a pause didn't work either.  It gave me same error as before plus multiple attempts reporting "not in sync".
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Can't upload to Uno after windows crash
Reply #3 - Jul 31st, 2020 at 3:42pm
Print Post  
Thanks for the info. The avrdude command that you ran externally is the atmel upload command. It isn't visual micro's exe and is a standard/normal windows command program.

The only difference between using that and what the Arduino IDE does is that Arduino runs the command using java as opposed to normal windows. The command is not designed to run better in one way v's the other so it's strange. The mega seems prone to this issue for a few users, I can see many posts about it on google.

What might help is to switch on verbose upload in the arduino ide file>preferences. This will then show us the upload command and allow us to confirm the toolchain paths are the same.

Did you also try a different usb port on the pc, sounds like a strange request but interesting to try.

Finally, confirm the usb driver that shows in device manager for the COM port.
  
Back to top
WWW  
IP Logged
 
JonR
Junior Member
**
Offline


Posts: 10
Joined: Jul 30th, 2020
Re: Can't upload to Uno after windows crash
Reply #4 - Jul 31st, 2020 at 3:50pm
Print Post  
I just discovered something.  I have a motor shield on the Uno that drives two stepper motors.  I also use two digital inputs D1 and D2 which I connected to limit switches.  I had forgot that I just put those limit switches in place about the same time as the crash. the limit switches are both closed right now so that puts a ground on D1 and D2.  I disconnected them and it uploads normally.  Do either of those have anything to do with uploading?
  
Back to top
 
IP Logged
 
JonR
Junior Member
**
Offline


Posts: 10
Joined: Jul 30th, 2020
Re: Can't upload to Uno after windows crash
Reply #5 - Jul 31st, 2020 at 3:57pm
Print Post  
I isolated it down to D1.  I moved my wires to D2 and D3 and everything seems to be ok.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint