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.