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 Uploading ARDUINO NANO EVERY does not work from Visual Micro (Read 1698 times)
jirkaptr
Junior Member
**
Offline


Posts: 14
Location: CZ
Joined: Dec 14th, 2016
Uploading ARDUINO NANO EVERY does not work from Visual Micro
Mar 31st, 2023 at 7:34pm
Print Post  
The built sketch I uploaded successfully to ARDUINO NANO EVERY using ARDUINO IDE. Off course selection of platform and COM port must be correct. The upload report is stored in upper part of Attachment.

On the other hand, uploading the same sketch using Visual Micro fails – see bottom part of Attachment.

Maybe I'm wrong: In the case of VisualMicro, I feel the messages "Upload method will be: bootloader" and "Uploading via Bootloader" are suspicious. 
I guess this probably does not correspond to the fact that the ATmega 4809 does not contain a bootloader at all and is programmed by the UPDI pin via ATSAMD11 as an interface.

In Visual Micro I selected "Optional hardware programmer: No Programmer (Default)". Theoretically, it is possible to choose from two Optional HW programmers in VM: "Onboard ATMEL mEDBG (UNO WiFi Rev. 2)" and "AVR Dragon as ISP". None of them resemble the jtag2updi used in the Arduino IDE and thus uploading does not work with them.

In ARDUINO NANO EVERY -> boards.txt the jtag2updi protocol is specified:
nona4809.upload.tool=avrdude
nona4809.upload.tool.default=avrdude
nona4809.upload.tool.network=arduino_ota
nona4809.upload.protocol=jtag2updi

but protocol jtag2updi is clearly not applied.  I have no idea Whether and how I should add the list of programmers in VS/VM.

Used SW:
VisualMicro (V.2023.220.1905) is an extension of Visual Studio Community 2019 (V.16.11.24)
Arduino IDE V. 1.8.12
Arduino Platform: Arduino megaAVR Ver. 1.8.8 

How to solve the issue of uploading ARDUINO NANO EVERY from Visual Micro?
  

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


Posts: 12137
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Uploading ARDUINO NANO EVERY does not work from Visual Micro
Reply #1 - Mar 31st, 2023 at 8:21pm
Print Post  
The protocol will be passed to the upload tool .exe. 

You can see the arduino ide passing the protocol and visual micro will do the same when it performs the upload. Both IDE's are trying to use the same method. Neither ide is able to force the mcu into bootloader mode, Visual Micro should fallback and continue with COM3 same as arduino ide.

Please follow the guide above ensuring also that "vMicro>Uploader>verbose" is enabled

Thanks
« Last Edit: Mar 31st, 2023 at 9:19pm by Tim@Visual Micro »  
Back to top
IP Logged
 
jirkaptr
Junior Member
**
Offline


Posts: 14
Location: CZ
Joined: Dec 14th, 2016
Re: Uploading ARDUINO NANO EVERY does not work from Visual Micro
Reply #2 - Apr 1st, 2023 at 2:07pm
Print Post  
Hello, Tim,
I modified the environment according to your instructions in a separate email. The existence or non-existence of the Local-Board.txt file does not seem to matter. The behavior is the same in both cases. As a test, I added a nonsensical 'asdf' parameter. This too had no response.
The behavior changed when I set Compatibility>Allow Local Board.txt = true. See protocol below. But even in this case, the (non)existence or content of Local-Board.txt did not matter.
Sincerely
Jirkaptr
  

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


Posts: 12137
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Uploading ARDUINO NANO EVERY does not work from Visual Micro
Reply #3 - Apr 1st, 2023 at 2:39pm
Print Post  
The allow local boards.txt defaults to true. You must have switched it off.

I altered the response after my last post because when testing there was not the issue I thought it might be.

My last post asks for important information.

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


Posts: 14
Location: CZ
Joined: Dec 14th, 2016
Re: Uploading ARDUINO NANO EVERY does not work from Visual Micro
Reply #4 - Apr 1st, 2023 at 4:25pm
Print Post  
The "vMicro>Uploader>verbose" parameter was set to TRUE in previous examples - see the attachments of both reports. It's set TRUE even now.

I manipulated the Local file Board.txt according to the instructions. Also I returned the "Allow Local Board.txt" parameter to FALSE.

Unfortunately, I did not understand your other instructions.

New knowledge:
1. A correctly uploaded Arduino NANO Every sketch communicates correctly with the Arduino IDE monitor and with two other terminals via COM3.
2. Another project with an Arduino NANO board (the old one!) uploads and communicates with Visual Micro without a problem.
=>   So maybe the problem is not in the upload, but in the communication?
« Last Edit: Apr 1st, 2023 at 4:27pm by jirkaptr »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12137
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Uploading ARDUINO NANO EVERY does not work from Visual Micro
Reply #5 - Apr 1st, 2023 at 9:33pm
Print Post  
Please follow the guide in yellow above

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


Posts: 14
Location: CZ
Joined: Dec 14th, 2016
Re: Uploading ARDUINO NANO EVERY does not work from Visual Micro
Reply #6 - Apr 2nd, 2023 at 3:02pm
Print Post  
May be I found the cause of the uploading and monitoring problem when using Visual Micro.

It is important to set the "Communication>Friendly Port Lists" parameter to false. In this case, a minimal text string e.g. 'COM3' indicating the port is well acceptable for the VM uploader and for avrdude (parameter -P).

If set to true, then the text string 'COM3 - Arduino NANO Every' is probably too long (27 character string) or incomprehensible for the VM uploader and possibly for avrdude (parameter -P).

In Windows Device manager, the port is listed as "Arduino NANO Every (COM3)".

I hereby draw your attention to a possible discrepancy between the features of VM resp. avrdude and very long name of the microcontroller port declaration.

I consider the case resolved for myself.

I attach a report of erroneous behavior.
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint