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....
Support requests without the output above may be impossible to answer, so please help us to help you
 
  HomeSearch Tutorials & Wiki visualmicro.com LoginHelpRegister  
 
Page Index Toggle Pages: 1
Send Topic Print
Help with Feather M0 and ATMEL ICE with GDB debugging (Read 119 times)
chriso
Newbies
*
Offline



Posts: 1
Help with Feather M0 and ATMEL ICE with GDB debugging
Feb 23rd, 2020 at 4:40am
 
When I try to use the ATMEL ICE debugger with VM and VS2019 I get this error:

Uploading 'PoolAlarmMaster' to 'Adafruit Feather M0' using 'Atmel-ICE'
Open On-Chip Debugger 0.9.0-g932ec70 (2017-02-15-12:34)
Licensed under GNU GPL v2
For bug reports, read
     http://openocd.org/doc/doxygen/bugs.html
debug_level: 0
adapter speed: 500 kHz
adapter_nsrst_delay: 100
cortex_m reset_config sysresetreq
target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x91000000 pc: 0xfffffffe msp: 0xfffffffc
** Programming Started **
auto erase enabled
Error: SAMD: NVM lock error
Error during upload using programmer
The uploader process failed

The uploader process failed
The uploader returned an error
Error: Failed to erase row containing 00000000
Error: error writing to flash at address 0x00000000 at offset 0x00000000
Runtime Error: embedded:startup.tcl:454: ** Programming Failed **
in procedure 'program'
in procedure 'program_error' called at file "embedded:startup.tcl", line 510
at file "embedded:startup.tcl", line 454

Not sure what is going on. I know the debugger works because I can connect to my M0 using Atmel Studio 7 and can load a program, etc.

OK, I realize what the problem is. VM on VS is trying to write to the protected bootloader area on the M0, so my question is now: why is VM trying to write to this area if I am compiling an Arduino sketch? 

Thanks for any help you might be able to give.
Back to top
« Last Edit: Feb 23rd, 2020 at 3:47pm by chriso »  
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10555
United Kingdom
Re: Help with Feather M0 and ATMEL ICE with GDB debugging
Reply #1 - Feb 25th, 2020 at 1:05pm
 
There are various ways to upload however in atmel studio I suggest you use the programmer called "atmel studio device programming". Then visual micro will hand over to the atmel project properties to handle the upload.

Otherwise switch off the programmer and use the standard serial/usb upload which requires less knowledge.

More info in the red tips of this page

https://www.visualmicro.com/page/Arduino-for-Atmel-Studio-7.aspx
Back to top
« Last Edit: Feb 25th, 2020 at 1:06pm by Visual Micro »  
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send Topic Print