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 Cannot upload to Arduino Uno R4 Wifi (Read 2232 times)
fitch
Newbies
*
Offline


Posts: 9
Joined: Apr 21st, 2015
Cannot upload to Arduino Uno R4 Wifi
Sep 19th, 2023 at 10:01pm
Print Post  
Using latest version of Arduino IDE 2.1.1.  I can program a sketch with Arduino IDE but cannot using Visual Micro.  The command line for bossac appears to be identical for both environments.  If I try to run the same command from a cmd prompt, it fails similarly.

I know that Arduino does some sort of hack right before they program the board where they 'touch' the com port at 1200 baud.  Visual Micro tries to do the same thing, but it must not be quite the same as it fails, and the following programming fails, too.  I am at a loss as to the details of how either the Arduino or Visual Micro do their 'touch'.

Does anyone know how to perform a 'touch', and how I might incorporate that into Visual Micro so I can program from inside VS Studio?

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


Posts: 12187
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Cannot upload to Arduino Uno R4 Wifi
Reply #1 - Sep 19th, 2023 at 10:11pm
Print Post  
When posting please follow the guide in yellow above. That saves a lot of time.

Guessing...

Visual Micro does perform the touch at 1200 baud and you will see it then list available com ports while it waits for the new port to show after the touch. Each board package can set a flag to ensure this happens. The wait for a new port timesout if one does not arrive within a few seconds then upload attempts to use the currently selected port. It sounds like you might have the timeout then the wrong port will be used.

Assuming you see the ports listed then please try this.

Create a local board.txt and add this line to it.

upload.use_1200bps_touch.SetDTRFalse=true

Click save and then try the upload

Let us know the outcome. If it does not work then provide the requested info.

Thanks
« Last Edit: Sep 19th, 2023 at 10:20pm by Tim@Visual Micro »  
Back to top
IP Logged
 
fitch
Newbies
*
Offline


Posts: 9
Joined: Apr 21st, 2015
Re: Cannot upload to Arduino Uno R4 Wifi
Reply #2 - Sep 20th, 2023 at 2:20pm
Print Post  
Same behavior.

I added the line to my boards.txt file.  The complete new line looks like:
unor4wifi.upload.use_1200bps_touch.SetDTRFalse=true

Just so you know what is in the boards.txt file for this section:
unor4wifi.upload.tool=bossac
unor4wifi.upload.tool.default=bossac
unor4wifi.upload.protocol=sam-ba
unor4wifi.upload.transport=
unor4wifi.upload.vid=0x2341
unor4wifi.upload.pid=0x1002
unor4wifi.upload.use_1200bps_touch=true
unor4wifi.upload.wait_for_upload_port=false
unor4wifi.upload.native_usb=true
unor4wifi.upload.maximum_size=262144
unor4wifi.upload.maximum_data_size=32768
unor4wifi.upload.use_1200bps_touch.SetDTRFalse=true

When I plug the board in, my board shows up as COM19.  Should I expect to see another COM port show up after the touch that is used for the upload?  I don't see this, nor do I see it with the arduino environment.

Attached is the compiler output.  Thanks for your help.
  

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


Posts: 2695
Joined: Feb 13th, 2019
Re: Cannot upload to Arduino Uno R4 Wifi
Reply #3 - Sep 20th, 2023 at 4:00pm
Print Post  
Thanks for the detail.

Can you try updating to the most recent stable vMicro release from our Downloads Page (below) or from within Visual Studio?

Also remove the "unor4wifi.upload.use_1200bps_touch.SetDTRFalse=true" line from your boards.txt as it isn't required.
  
Back to top
IP Logged
 
fitch
Newbies
*
Offline


Posts: 9
Joined: Apr 21st, 2015
Re: Cannot upload to Arduino Uno R4 Wifi
Reply #4 - Sep 20th, 2023 at 4:43pm
Print Post  
Updated to latest version.  Works like a charm!  I should have tried that first, but was afraid my license would stop working.

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


Posts: 12187
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Cannot upload to Arduino Uno R4 Wifi
Reply #5 - Sep 20th, 2023 at 4:50pm
Print Post  
When you have a vs2022 visual micro license, then license will work in all vs2022 versions. This is because updates are currently delivered via the gallery. 

edit

As you know, we do reserve the right in future to charge for support and updates after the end of the support period. Hopefully we won't need too if Microsoft continue to release new visual studio versions such as 2019, 2022 etc.
« Last Edit: Sep 21st, 2023 at 1:52pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint