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) Debugging Arduino DUE (Read 19078 times)
Aleks
Junior Member
**
Offline


Posts: 24
Joined: Mar 8th, 2018
Debugging Arduino DUE
Mar 8th, 2018 at 8:55pm
Print Post  
Hi.
How to properly connect Arduino Due and configure Visual micro in the visual studio, to debug incoming data from the serial port?

You can how the driver looks in the image

« Last Edit: Mar 13th, 2018 at 9:29pm by Tim@Visual Micro »  

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: Debugging Arduino DUE
Reply #1 - Mar 9th, 2018 at 1:04pm
Print Post  
1. Make sure the DUE is working correctly. Does Serial.println("Hello world") work?
  
Back to top
WWW  
IP Logged
 
Aleks
Junior Member
**
Offline


Posts: 24
Joined: Mar 8th, 2018
Re: Debugging Arduino DUE
Reply #2 - Mar 10th, 2018 at 9:52am
Print Post  
Hi.
in Arduino IDE everything works.
VS does not see the device on the COM port.
Tried on different USB ports.Reinstall the driver.
Nothing helps.
Other boards, leo, uno, nano, is work!

https://drive.google.com/file/d/1Z0ZYOEpANs7FqaO93KKKEHPZFvIfdJi8/view

After reinstalling the drivers.

https://drive.google.com/file/d/1jI1sywoNhgBUAZY7jnOvUCvtUpEK-KYu/view
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Debugging Arduino DUE
Reply #3 - Mar 10th, 2018 at 3:07pm
Print Post  
Hello,

I want to help you but you have raised two questions.

Can we please first confirm that you can see the serial port in visual micro and upload okay?
  
Back to top
WWW  
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Debugging Arduino DUE
Reply #4 - Mar 10th, 2018 at 7:48pm
Print Post  
What is the version of visual micro you are using. "tools>extensions and updates>arduino ide for vs"

Thanks
  
Back to top
WWW  
IP Logged
 
Aleks
Junior Member
**
Offline


Posts: 24
Joined: Mar 8th, 2018
Re: Debugging Arduino DUE
Reply #5 - Mar 10th, 2018 at 9:12pm
Print Post  
Tim@Visual Micro wrote on Mar 10th, 2018 at 3:07pm:
Hello,

I want to help you but you have raised two questions.

Can we please first confirm that you can see the serial port in visual micro and upload okay?

Hi. I understand English very badly, so I translate it using Google(
I do not understand what I need to see?
In the previous message, I put a screenshot, it shows which port I'm using.
Exactly the same as in the Arduino IDE.

  
Back to top
 
IP Logged
 
Aleks
Junior Member
**
Offline


Posts: 24
Joined: Mar 8th, 2018
Re: Debugging Arduino DUE
Reply #6 - Mar 10th, 2018 at 9:48pm
Print Post  
Tim@Visual Micro wrote on Mar 10th, 2018 at 7:48pm:
What is the version of visual micro you are using. "tools>extensions and updates>arduino ide for vs"

Version 1803.6.3 
While preparing the answer, I decided to check. it worked!
But I'm glad nothing.
When reloading the sketch, the same error.
I thought maybe it's in the computer.
Rebooted, but nothing helps.
On different ports at once an error.
I'm guessing that it's in some kind of cache.
If you have a debug version of a record in the log file.
I can install it and send the results.
  
Back to top
 
IP Logged
 
Aleks
Junior Member
**
Offline


Posts: 24
Joined: Mar 8th, 2018
Re: Debugging Arduino DUE
Reply #7 - Mar 10th, 2018 at 10:57pm
Print Post  
I tried the studio in amtel.
The sketch is loaded.
but I do not like amtel studio.
I write on C# and would like to work in the same environment.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Debugging Arduino DUE
Reply #8 - Mar 10th, 2018 at 11:06pm
Print Post  
Oh okay you have corrupt WMI database.

Change these options ...

"Tools>options>visual micro>communications>friendly port names" = False
"Tools>options>visual micro>communications>friendly port menus" = False

Why?

You see in your example "COM4 " not "COM4" this is because of some corruption in the windows WMI port names database.

Switch off the options and we use simpler windows port list.

I will try to trim() the extra space in the next release
« Last Edit: Mar 10th, 2018 at 11:07pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Aleks
Junior Member
**
Offline


Posts: 24
Joined: Mar 8th, 2018
Re: Debugging Arduino DUE
Reply #9 - Mar 11th, 2018 at 12:19pm
Print Post  
Tim@Visual Micro wrote on Mar 10th, 2018 at 11:06pm:
Oh okay you have corrupt WMI database.

Change these options ...

"Tools>options>visual micro>communications>friendly port names" = False
"Tools>options>visual micro>communications>friendly port menus" = False


It did not help

https://drive.google.com/file/d/1raU7KO02XSEFg-cmBURYBZyeQ61-AyDD/view

Compiling debug version of 'Blink1' for 'Arduino Due (Programming Port)'
Program size: 22 936 bytes (used 4% of a 524 288 byte maximum) (1,60 secs)
 
Uploading 'Blink1' to 'Arduino Due (Programming Port)' using 'COM3'
Uploader started for board Arduino Due (Programming Port)
Upload method will be: bootloader
Uploading via Bootloader 
no\bossac.exe -i -d --port=COM3 -U false -e -w -v -b C:\Users\aleks\AppData\Local\Temp\VMBuilds\Blink1\ARDUIN~2\Debug/BLINK1~1.BIN -R
The uploader process failed
No device found on COM3
Send auto-baud
Set binary mode


but when it started working on another port

Compiling debug version of 'Blink1' for 'Arduino Due (Native USB Port)'
Program size: 23 008 bytes (used 4% of a 524 288 byte maximum) (2,27 secs)
 
Uploading 'Blink1' to 'Arduino Due (Native USB Port)' using 'COM16'
Uploader started for board Arduino Due (Native USB Port)
Upload method will be: bootloader
Uploading via Bootloader 
PORTS {COM1,COM16} / {COM1,COM17} => {COM17}
no\bossac.exe -i -d --port=COM17 -U true -e -w -v -b C:\Users\aleks\AppData\Local\Temp\VMBuilds\Blink1\ARDUIN~1\Debug/BLINK1~1.BIN -R
Set binary mode
readWord(addr=0)=0x20001000
readWord(addr=0xe000ed00)=0x412fc230
readWord(addr=0x400e0740)=0
readWord(addr=0x400e0940)=0x285e0a60
version()=v1.1 Dec 15 2010 19:25:04
chipId=0x285e0a60
Connected at 921600 baud
..........
etc.


I do not care through which port to program.
Tell me how to configure the visual micro.
I need to send a string to the serial port and read it in the code.

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


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Debugging Arduino DUE
Reply #10 - Mar 11th, 2018 at 2:03pm
Print Post  
Okay thanks for the info.

Visual Micro is used by 1000's of people and the DUE is standard arduino board.

Visual Micro uses C#, Arduino IDE uses Java so that is only difference.

For upload both arduino and visual micro use external tool chain program

Code
Select All
no\bossac.exe -i -d --port=COM3 -U false -e -w -v -b C:\Users\aleks\AppData\Local\Temp\VMBuilds\Blink1\ARDUIN~2\Debug/BLINK1~1.BIN -R
 


See above, you can try it in .bat file outside of visual micro.

I suggest this might be a windows usb problem. I recommend deleting your usb driver from "control panel>device manager" then installing usb from \drivers folder below arduino ide.

or try different usb cable.
« Last Edit: Mar 11th, 2018 at 2:04pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Aleks
Junior Member
**
Offline


Posts: 24
Joined: Mar 8th, 2018
Re: Debugging Arduino DUE
Reply #11 - Mar 11th, 2018 at 5:00pm
Print Post  
Tim@Visual Micro wrote on Mar 11th, 2018 at 2:03pm:
I suggest this might be a windows usb problem. I recommend deleting your usb driver from "control panel>device manager" then installing usb from \drivers folder below arduino ide.

or try different usb cable.

In the third post on the first screenshot, I showed that in Arduino IDE, sketches are loaded on the Arduino Due (Programming Port).
I also wrote above that I reinstalled the driver. I tried on different ports. I tried 10 cables.
  
Back to top
 
IP Logged
 
Aleks
Junior Member
**
Offline


Posts: 24
Joined: Mar 8th, 2018
Re: Debugging Arduino DUE
Reply #12 - Mar 11th, 2018 at 5:01pm
Print Post  
Aleks wrote on Mar 11th, 2018 at 12:19pm:
I do not care through which port to program.
Tell me how to configure the visual micro.
I need to send a string to the serial port and read it in the code.

How to do this?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Debugging Arduino DUE
Reply #13 - Mar 11th, 2018 at 8:04pm
Print Post  
Please show picture of device manager > com ports. Also right mouse click the Due in the device manager list and click Properties. Then confirm usb driver name + date/time
  
Back to top
WWW  
IP Logged
 
Aleks
Junior Member
**
Offline


Posts: 24
Joined: Mar 8th, 2018
Re: Debugging Arduino DUE
Reply #14 - Mar 12th, 2018 at 8:26pm
Print Post  
Good day.
Here are links to all screenshots, the text in Russian, but I think it will be clear.
If not, I will install the English interface for Windows
Driver version 3.4.2014.8, date 08/08/2014
Download from the site wch.kn, it seems this is the last.
https://drive.google.com/file/d/149_mF_8kx0qBF9Yc7y_IDAbhy5sHmTd7/view
https://drive.google.com/file/d/1rTAcQDGMmCze-LX2y0_mVbz4zfdN-q7K/view
https://drive.google.com/file/d/1q8bVGb98lmcZE6RARxII_lY8bY1un74I/view
https://drive.google.com/file/d/17Hg7R6LxnmwweeHMw9IevIMaD4J71KwP/view

I started translating the documentation into Russian, and I read how to configure the extended output when compiling and loading.
I attach a link to a text file with all the data displayed.
Maybe this will help

https://drive.google.com/file/d/1OJeQ_GBr557lI7qHFi-veNBlKWcWX2OV/view

I will remind (I wrote earlier) in Arduino IDE uploading works.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Debugging Arduino DUE
Reply #15 - Mar 12th, 2018 at 10:19pm
Print Post  
Thanks for the info

Please open the project in the arduino ide. Switch on "file>preferences>upload verbose" and the upload. Then post the upload output from arduino here.

Then I can compare the difference.

Thanks
  
Back to top
WWW  
IP Logged
 
Aleks
Junior Member
**
Offline


Posts: 24
Joined: Mar 8th, 2018
Re: Debugging Arduino DUE
Reply #16 - Mar 13th, 2018 at 4:29am
Print Post  
« Last Edit: Mar 13th, 2018 at 12:43pm by Aleks »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Debugging Arduino DUE
Reply #17 - Mar 13th, 2018 at 1:21pm
Print Post  
The DUE has two ports

In Arduino IDE you must use the one that fails in Visual Micro. Otherwise your test is invalid.

Arduino Due (Programming Port)'

Please show verbose output from Arduino IDE when Programming Port is selected



  
Back to top
WWW  
IP Logged
 
Aleks
Junior Member
**
Offline


Posts: 24
Joined: Mar 8th, 2018
Re: Debugging Arduino DUE
Reply #18 - Mar 13th, 2018 at 2:38pm
Print Post  
Tim@Visual Micro wrote on Mar 13th, 2018 at 1:21pm:
The DUE has two ports

In Arduino IDE you must use the one that fails in Visual Micro. Otherwise your test is invalid.

Arduino Due (Programming Port)'

Please show verbose output from Arduino IDE when Programming Port is selected


Do you even read what I wrote above? Angry
I even applied screenshots.
Of course I know that DUE has two ports.
I even wrote that the port of Nativa USB? the sketch is uploaded from the visual micro.
I'm certainly dummy in microcontrollers but I know how to choose the right kind of port for programming and the COM port number in Arduino IDE and of course I chose Programming Port /
Honestly did not understand how you guessed that the wrong port was selected?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Debugging Arduino DUE
Reply #19 - Mar 13th, 2018 at 3:08pm
Print Post  
Well I am confused. You have reported many different COM port numbers

In visual micro the programming port is reported by you as being COM3

In visual micro the native USB port is higher.

In arduino you have COM20 selected yet you say it is the programming port??

In the arduino output it shows board reset at 1200 baud. Reset at 1200 baud is usually associated to Native USB type connections. It is possible that this is a false output from Arduino but I will look into it.

Code
Select All
Forcing reset using 1200bps open/close on port COM20 



Please be clear about COM port numbers and board names and explain why you have selected COM20 in arduino but COM3 in visual studio.

Thanks


ps: I read all your messages. Please be clear when you are talking about "Programming" port or "Native" port. Your reports talk about a "different port" but that is confusing because many users would say COM1 and COM2 are different ports.
« Last Edit: Mar 13th, 2018 at 3:10pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: [1] 2 
Send TopicPrint