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
Normal Topic Help with Feather M0 and ATMEL ICE with GDB debugging (Read 1087 times)
chriso
Newbies
*
Offline


Posts: 1
Joined: Feb 23rd, 2020
Help with Feather M0 and ATMEL ICE with GDB debugging
Feb 23rd, 2020 at 4:40am
Print Post  
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.
« Last Edit: Feb 23rd, 2020 at 3:47pm by chriso »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Help with Feather M0 and ATMEL ICE with GDB debugging
Reply #1 - Feb 25th, 2020 at 1:05pm
Print Post  
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
« Last Edit: Feb 25th, 2020 at 1:06pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint