I've been tearing my hair out trying to use Atmel Studio 7 to debug a program on the Adafruit Feather M0 with the Segger JLink. I also can't rewrite the bootloader to the Feather M0.
I have read the Adafruit debugging of ATSAMD21 processors at learn.adafruit.com/proper-step…-arduino-zero-m0/overview.
I have attached the JLink to the board through the SWD interface and can read the memory of a fresh board that still has the Adafruit-burned bootloader with mem8, mem16, etc commands in JLink.exe. But as soon as I try to use Atmel Studio 7 to debug a sketch, the bootloader is overwritten with 0xFF's and AT7 debugging errors out. I tried to restore the bootloader with AS7 and it fails.
Using the JLink.exe software directly without AS7, I can use the w1 command to write to the M0 flash and it reads back correctly. But as soon as I try to write the whole bootloader .hex file with the loadfile command, I get the attached error. I have tried slowing the JLink speed down to 1000 kHz and even 500 kHz, but same error occurs.
The bootloader.hex file is attached.
Thanks for any ideas.
I have read the Adafruit debugging of ATSAMD21 processors at learn.adafruit.com/proper-step…-arduino-zero-m0/overview.
I have attached the JLink to the board through the SWD interface and can read the memory of a fresh board that still has the Adafruit-burned bootloader with mem8, mem16, etc commands in JLink.exe. But as soon as I try to use Atmel Studio 7 to debug a sketch, the bootloader is overwritten with 0xFF's and AT7 debugging errors out. I tried to restore the bootloader with AS7 and it fails.
Using the JLink.exe software directly without AS7, I can use the w1 command to write to the M0 flash and it reads back correctly. But as soon as I try to write the whole bootloader .hex file with the loadfile command, I get the attached error. I have tried slowing the JLink speed down to 1000 kHz and even 500 kHz, but same error occurs.
The bootloader.hex file is attached.
Thanks for any ideas.