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) Problem with Atmel Ice as programmer on Arduino Due - Atmel Studio (Read 6132 times)
devCad
Newbies
*
Offline


Posts: 8
Joined: Apr 4th, 2017
Problem with Atmel Ice as programmer on Arduino Due - Atmel Studio
Apr 4th, 2017 at 6:17pm
Print Post  
I have a strange problem using Atmel Ice as programmer on Arduino Due (latest Atmel Studio with latest Visual Micro extension):

- If I go to 'Tools - Device programming' then Apply - Read and goto the Memories page, the Program is loaded and verified to Arduino Due - OK

- If I use the 'VMicro - Uploader - Upload last build' menu, I get the error:
Uploading 'GrblDue' to 'Arduino Due (Programming Port)' using 'Atmel Studio Device Programming'
Error during upload using programmer
Indice oltre i limiti della matrice.

- If I use the 'VMicro - Build and upload' I'm redirected to  'VMicro - Uploader - Upload last build' all times. Here again the upload works inside the Memories page.
But if I just use the Apply & Read buttons then Set - Close, the upload doesn't work

- every time I come back to  'VMicro - Uploader - Upload last build',  I must press the Apply & Read buttons, as the Device Signature filed is blank.

Looks like the Device Signature is not saved, also if I press the Set button.

Is this Normal?
How can I fix that?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Problem with Atmel Ice as programmer on Arduino Due - Atmel Studio
Reply #1 - Apr 4th, 2017 at 6:55pm
Print Post  
Hi,

Thanks for the post.

1)

Don't use "upload last build" it looks like it's trying to do a normal arduino programmer upload. I will put it on the list for a fix.

2)

When using atmel studio device programming you can right click the project name in the solution explorer and click Properties. On the Properties panel there is a Tab called Tool. Use that tab to set your preferred device then the upload should always happen without prompt.

The tools>device programming option is unconnected to the atmel project but the project>properties>tool option is related to the project.

Does this make sense or have I missed the point?
  
Back to top
WWW  
IP Logged
 
devCad
Newbies
*
Offline


Posts: 8
Joined: Apr 4th, 2017
Re: Problem with Atmel Ice as programmer on Arduino Due - Atmel Studio
Reply #2 - Apr 5th, 2017 at 8:42am
Print Post  
The dialog that every time I use the 'Build and Upload' menu is prompted and doesn't keep the latest settings is the one opened also by the "Tools - Device Program".
I cannot find the way to open that dialog by the right mouse on the Project, I just see a different dialog using your procedure, and that keep the settings in the right way.

Looks like the settings of the "Tools - Device Program" dialog are not saved, if after closing it I immediately open it again the settings are empty again.

I run AtmelStudio on Windows 10 as Administrator, but without the "Run as admin" property (that should not be required, I think. I tried it but nothing changes).

Thank you for your attention
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Problem with Atmel Ice as programmer on Arduino Due - Atmel Studio
Reply #3 - Apr 5th, 2017 at 10:07am
Print Post  
I heve removed your question about visual studio. That might be for another thread on another day but only after you have first understood atmel studio.

Before we discuss anything else it's important that you give feedback about point 2) in my previous message

Have you set the tool in project properties>tool as I described previously?

If the answer is YES then please confirm if the "vmicro>compile and upload" or the blue/green toolbar arrows builds and uploads using the ICE

In you answer it is important that you do not attempt to use the "tools>device programming" option because it is confusing this discussion. It is also important that you do not attempt to use "upload last build". 1st test is compile and upload only.

Thanks
  
Back to top
WWW  
IP Logged
 
devCad
Newbies
*
Offline


Posts: 8
Joined: Apr 4th, 2017
Re: Problem with Atmel Ice as programmer on Arduino Due - Atmel Studio
Reply #4 - Apr 5th, 2017 at 10:29am
Print Post  
Yes, I set the Tool as Atmel-ICE with JTAG interface.

When I press the "vmicro>compile and upload" menu the compilation if performed, than the 'Device Programming' dialog is displayed with:
Device signature = not read
Target voltage = ----

At this point I press Apply, then Read
If I press Close, then nothing happens.
If I go to Memories, the Program button works ok, looks like this is the only chance I have to Upload the firmware using the Atmel-ICE hardware.

At next "vmicro>compile and upload" still the same, I must still press Apply and so on.

The hardware debug works well.
  
Back to top
 
IP Logged
 
devCad
Newbies
*
Offline


Posts: 8
Joined: Apr 4th, 2017
Re: Problem with Atmel Ice as programmer on Arduino Due - Atmel Studio
Reply #5 - Apr 5th, 2017 at 10:46am
Print Post  
More Info:

if I press the 'Debugging - Start debug...' the 'Device Programming' dialog is displayed with:
AtmelICE
ATSAM3X8E
JTAG
Device signature = not read
Target voltage = ----

but just pressing Close the firmware is then uploaded.

So I expected the same should happen using the "vmicro>compile and upload" menu, as I can see exactly the same settings in  the 'Device Programming' dialog. Looks like the IDE doesn't start the uploading here, as nothing happens, no message, and the firmware is not loaded (I verified it).
I must manually do that going to the Memories tag of  the 'Device Programming' dialog, and that is very annoying...
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Problem with Atmel Ice as programmer on Arduino Due - Atmel Studio
Reply #6 - Apr 5th, 2017 at 10:48am
Print Post  
Thanks.

I tried it yesterday but with an Arduino Zero that I had at hand. I set the programmer to be EDBG in the project>properties>tool and upload worked seamlessly.

I will try to dig out an ICE and see what happens but I have to say that as soon as compile ends we are using the standard atmel system without any possibility of interference or assistance from Visual Micro. So right now I suspect that this is how Atmel Studio works.

You can test it by creating a new atmel gcc application project. You won't have any arduino in that but you should be able to use project>properties>tool on exactly the same way to see how it works. When you create a gcc project it will ask for an mcu, use the search box instead of scrolling the very long list.

In Visual Studio (and Atmel Studio) you can use the default Arduino programmers. I think arduino.cc have added an ICE option recently but there will be no possibility of debug. I can also tell you there are usb driver conflicts between arduino and atmel. If you have the atmel drivers working, which you do, I expect you will be fiddling in device manager to change the usb driver to use the arduino versions. It's a long standing conflict between atmel and arduino and best avoided.

I think the best route is to test a native gcc project. If that shows the same traits where by the device programming window always opens then that would be a good question for the atmel forum. Maybe it's a bug, maybe it's an oversight or maybe our lack of knowledge.
  
Back to top
WWW  
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Problem with Atmel Ice as programmer on Arduino Due - Atmel Studio
Reply #7 - Apr 5th, 2017 at 10:49am
Print Post  
To answer your other question. have you enabled vmicro>debugger>use atmel studio debugging?
  
Back to top
WWW  
IP Logged
 
devCad
Newbies
*
Offline


Posts: 8
Joined: Apr 4th, 2017
Re: Problem with Atmel Ice as programmer on Arduino Due - Atmel Studio
Reply #8 - Apr 5th, 2017 at 10:59am
Print Post  
Yes, and it works
  
Back to top
 
IP Logged
 
devCad
Newbies
*
Offline


Posts: 8
Joined: Apr 4th, 2017
Re: Problem with Atmel Ice as programmer on Arduino Due - Atmel Studio
Reply #9 - Apr 5th, 2017 at 11:12am
Print Post  
I tried with an Atmel sample and is the same.

The strange thing is that after closing the 'Device Programming' dialog after the Start Debug the upload works as expected.
Closing the 'Device Programming' dialog after "vmicro>compile and upload", nothing happens.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Problem with Atmel Ice as programmer on Arduino Due - Atmel Studio
Reply #10 - Apr 5th, 2017 at 11:20am
Print Post  
Oh yes that is correct. Visual Micro compile/upload will only do compile/upload when using atmel debug.

When using atmel debugging with Visual Micro you can use "Debug>Start" to compile/upload and start debug.

Atmel only thinks you need its debugger when you use it's commands, so Visual Micro makes sure its commands know what to do.
« Last Edit: May 2nd, 2017 at 6:23pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint