Welcome, Guest. Please Login or Register
Arduino IDE for Visual Studio
 
 
When Logging a Support Issue in the Forum, please ensure you have also:-
  • Enabled vMicro > Compiler > Show Build Properties and Verbose
  • 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
 
  HomeSearch Tutorials & Wiki visualmicro.com LoginHelpRegister  
 
Pages: 1 2 3 
Send Topic Print
Arduino Due (Native USB Port) Upload using Atmel ICE (Read 1900 times)
Visual Micro
Administrator
*****
Offline



Posts: 10855
United Kingdom
Re: HELP on new version 2020.518.1
Reply #40 - Jun 13th, 2020 at 6:50pm
 
Have you every used the ICE before? Just purchased it?
Back to top
 
WWW  
IP Logged
 
Marco (Italy)
Member
***
Offline



Posts: 103
Re: HELP on new version 2020.518.1
Reply #41 - Jun 14th, 2020 at 7:52am
 
Hi Tim, I've been using Atmel ICE since 2018 with vMicro.Even before the last vMicro update, Atmel ICE always had the problem that it did not load the software correctly on the board if you did not load the same software using serial download before.  Once the software downloaded via serial (Native/Programming) then it was always possible to download and use Atmel ICE to download and test the software the important thing was never to press the erase key on the board, when you press the erase key on the board you must always repeat the process starting from the serial download. For me this is a potential issue to solve. There was also an issue (solved) that emerged after the last VMicro update but it was solved by put to off the debugging if the up-loading was done from the native serial usb, before it was not necessary. Thanks bye! Smiley
Back to top
 
 
IP Logged
 
Marco (Italy)
Member
***
Offline



Posts: 103
Re: HELP on new version 2020.518.1
Reply #42 - Jun 17th, 2020 at 4:36pm
 
Hi, some news about this topic after my last post?
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10855
United Kingdom
Re: HELP on new version 2020.518.1
Reply #43 - Jun 18th, 2020 at 8:12pm
 
Much of what you have said applies to the intricasies of your chosen way of using a programmer. A discussion about the erase key is not related to Visual Micro.

It is very important to provide the information requested in yellow above when you first make a report and when your confguration is in the state that is not working for you. This avoids many words and answers all the qequestions about what you have selected. It would show when you are using atmel studio device programming and what options you have selected in visual micro. This is very important information to avoid lengthy discussion.

Please also be clear about which IDE you are using that is also important when discussing programmers.

I would like to clearly understand the report before looking into anything.

You are saying that:- You have an upload issue using an ICE programmer if Serial debugging is enabled?

Is this correct?
Back to top
 
WWW  
IP Logged
 
Marco (Italy)
Member
***
Offline



Posts: 103
Re: HELP on new version 2020.518.1
Reply #44 - Jun 19th, 2020 at 10:04am
 
Hi, here the log file from Arduino IDE + atmel ICE. Of course I have select as programmer in menu skech the option Programmer Atmel SAM- ICE.
Back to top
 

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



Posts: 10855
United Kingdom
Re: HELP on new version 2020.518.1
Reply #45 - Jun 19th, 2020 at 12:13pm
 
I removed your other post. Let us just answer one simple question at a time.

This is what is in the output you posted from the arduino ide. Please speak with arduino on the arduino.cc/forums to rectify this error.

Thank you.

Code (C++):
Sketch uses 44464 bytes (8%) of program storage space. Maximum is 524288 bytes.
processing.app.debug.RunnerException: Please select a programmer from Tools->Programmer menu
	at cc.arduino.packages.uploaders.SerialUploader.uploadUsingProgrammer(SerialUploader.java:298)
	at cc.arduino.packages.uploaders.SerialUploader.uploadUsingPreferences(SerialUploader.java:90)
	at cc.arduino.UploaderUtils.upload(UploaderUtils.java:77)
	at processing.app.SketchController.upload(SketchController.java:732)
	at processing.app.SketchController.exportApplet(SketchController.java:703)
	at processing.app.Editor$UploadHandler.run(Editor.java:2047)
	at java.lang.Thread.run(Thread.java:748)
Please select a programmer from Tools->Programme 

Back to top
 
WWW  
IP Logged
 
Marco (Italy)
Member
***
Offline



Posts: 103
Re: HELP on new version 2020.518.1
Reply #46 - Jun 19th, 2020 at 8:00pm
 
A first answer from Arduino Forum. But is not a solution...The reason for this is the Arduino IDE only supports using programmers with boards of the architecture of the platform that contains the programmer definition. The "Atmel SAM-ICE" programmer you selected from the Arduino IDE's Tools > Programmer menu is from the "Arduino SAMD (32-bits ARM Cortex-M0+) Boards" platform, which uses the samd architecture. The Arduino Due is part of the "Arduino ARM (32-bits) Boards" platform, which uses the sam architecture.

This sort of confusion is prevented in Arduino IDE 1.8.13 by the change to only displaying the programmers of the currently selected board's platform in the Tools > Programmer menu.

I'd guess you could add an "Atmel SAM-ICE" programmer definition to the "Arduino ARM (32-bits) Boards" platform. I'm not sure why Arduino didn't define any programmers for that platform. I can provide you instructions for how to copy paste a programmer definition into the platform, but I might be leading you astray. I don't own an Atmel SAM-ICE programmer to be able to test my advice in advance. So you are probably better off either waiting for someone else here who knows more about this topic to comment, or else do some searching to see if there are some existing instructions about setting up a programmer for the Due.
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10855
United Kingdom
Re: HELP on new version 2020.518.1
Reply #47 - Jun 19th, 2020 at 9:16pm
 
Thanks, now select the programmer you want to use in Visual Micro and then try the upload. Before the upload ensure that the settings in yellow above are applied and also uploader>verbose.

Then attach the output at a txt file here.

Note: You can switch off vMicro>Compiler>Verify. It is not needed and makes a very large output/report.



Back to top
 
WWW  
IP Logged
 
Marco (Italy)
Member
***
Offline



Posts: 103
Re: HELP on new version 2020.518.1
Reply #48 - Jun 20th, 2020 at 6:36am
 
Hi, here the log file. At the end of upload, via Atmel ICE, the target Arduino DUE board in to unkown state. Do not run and is not possible to start the debugger with Atmel ICE
Back to top
 

Please Register or Login to the Forum to see File Attachments
 
IP Logged
 
Marco (Italy)
Member
***
Offline



Posts: 103
Re: HELP on new version 2020.518.1
Reply #49 - Jun 22nd, 2020 at 5:19pm
 
Hi, any news about this issue?
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10855
United Kingdom
At the end of upload, via Atmel ICE, the target Arduino DUE board in to unkown state
Reply #50 - Jun 22nd, 2020 at 5:29pm
 
We will look at it during the week and report back thanks
Back to top
« Last Edit: Jun 22nd, 2020 at 5:33pm by Visual Micro »  
WWW  
IP Logged
 
Marco (Italy)
Member
***
Offline



Posts: 103
Re: HELP on new version 2020.518.1
Reply #51 - Jun 26th, 2020 at 3:59pm
 
OK great I'm waiting for news about this issue  Grin
Back to top
 
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline



Posts: 464
Re: HELP on new version 2020.518.1
Reply #52 - Jun 26th, 2020 at 6:26pm
 
Investigating this further, and reading up on the DUE Bootloader specifics, it seems that the GPNVRAM bit #2 is set to 0 by the ERASE button press, which puts it into a state where it is waiting to be programmed permanently (even after power cycle).

I have been able to perform the following cycle successfully, with the additional command at in step #4 fixing the issue:-
1) Connect DUE via Native USB Port, Select Debug: Hardware, Atmel ICE, Uploader: Atmel ICE
2) Press ERASE Button on Board
3) Upload to Board using Atmel ICE via Visual Micro
4) Run the below command in command prompt:-
Code:
C:\ProgramData\vmicro\tools\openocd-0.10.0.20200213\bin/openocd.exe -s "C:\ProgramData\vmicro\tools\openocd-0.10.0.20200213/scripts/" -c "adapter driver cmsis-dap" -c "cmsis_dap_vid_pid 0x03eb 0x2141" -c "set CHIPNAME at91sam3X8E" -c "source [find target/at91sam3ax_8x.cfg]" -c "init; halt" -c "at91sam3 gpnvm show all" -c "at91sam3 gpnvm set 1" -c "at91sam3 gpnvm clear 2" -c "at91sam3 gpnvm show all" -c "reset run" -c "shutdown"
 


5) Press Reset Button on Board (will try to remove this with commands)

I was running Blink and the LED starts blinking again after the final reset.

Step 4 will give output which contains the GPNVRAM bits, before (first) and after (second) the change (so can undo if needed):
Code:
sam3-gpnvm0: 0
sam3-gpnvm1: 0
sam3-gpnvm2: 0

sam3-gpnvm0: 0
sam3-gpnvm1: 1
sam3-gpnvm2: 0 



Would it be possible to try this approach on your board, just as a double check before we look at integrating it into the upload commands?
Back to top
 
 
IP Logged
 
Marco (Italy)
Member
***
Offline



Posts: 103
Re: HELP on new version 2020.518.1
Reply #53 - Jun 27th, 2020 at 5:59am
 
STATUS ISSUE: [SOLVED] 

Steps:
1)  OK
2)  OK
3)  OK
4)  OK in attach the output log file
5)  OK reset then => RUN LED blinking.

sam3-gpnvm0: 0
sam3-gpnvm1: 0
sam3-gpnvm2: 0

sam3-gpnvm0: 0
sam3-gpnvm1: 1
sam3-gpnvm2: 0

shutdown command invoked

C:\Users\marco>
Back to top
« Last Edit: Jun 27th, 2020 at 6:04am by Marco (Italy) »  

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



Posts: 464
Re: Due Native USB, with Atmel ICE - Upload/Reset
Reply #54 - Jun 30th, 2020 at 6:12pm
 
Thanks for the confirmation and persistence with this.

We have included this in the 20.06.18.6 Release of Visual Micro for the Due Native USB, with Atmel ICE and Segger JLink Programmers.

https://www.visualmicro.com/forums/YaBB.pl?board=VS_ARDUINO_EXT_RELEASES

There will be additional messages shown in the output window on upload, to ensure the RESET button is pressed if needed, as we couldn't find a reliable way to reset the board from OpenOCD at present fully.
Back to top
« Last Edit: Jun 30th, 2020 at 10:09pm by Visual Micro »  
 
IP Logged
 
Marco (Italy)
Member
***
Offline



Posts: 103
Re: Arduino Due (Native USB Port) Upload using Atmel ICE
Reply #55 - Jul 1st, 2020 at 1:07pm
 
[SOLVED]
I have download and instal this version 20.06.18.6. it's work fine including debug via Atmel ICE.

On my test the target work fine without a manual reset at the end of upload.  Cheesy Grin

thanks a lot vM!!!
Back to top
« Last Edit: Jul 1st, 2020 at 2:01pm by Visual Micro »  
 
IP Logged
 
Pages: 1 2 3 
Send Topic Print