ATMEL ICE debugging SAM D20 via SWD on Atmel Studio 7

Discussions around product based on ARM Cortex M0+ core.
This forum will be discontinued soon.

Moderator: nferre

andersonaoli
Posts: 3
Joined: Mon Mar 28, 2016 3:21 pm

ATMEL ICE debugging SAM D20 via SWD on Atmel Studio 7

Mon Mar 28, 2016 3:34 pm

Hi!

I am trying to debug SAM D20 code via SWD on Atmel Studio 7 using the ATMEL-ICE. I am just programming but I can not debug.

The counter program never goes out of last address of the memory (0xFFFFFFFE) even clicking in any Steps... button

The ATMEL ICE is really able to do that?

In the annoucement the ATMEL says:

"Programming and debugging of all Atmel SAM ARM Cortex-M based microcontrollers on both SWD and JTAG interfaces"

Can you help me?
andersonaoli
Posts: 3
Joined: Mon Mar 28, 2016 3:21 pm

Re: ATMEL ICE debugging SAM D20 via SWD on Atmel Studio 7

Mon Apr 04, 2016 5:09 pm

Hello,

Its my first time on Atmel Studio, Atmel ICE and SAM D20. I already use another Cortex M.


After click "Start Debugging and Break" the target is attached and code Loaded in MCU.

It seems to be running, I click on Break All (pause) and the code is always at the last address (FFFFFFFE). Even I click on Step into, Step Over or Step Out, the code remain on this address.

What is the file responsible for the program start? In my code the address 00000000 is blank with a message "Memory out of bounds or read error " is it normal?

I am using the BMF055 example project on Atmel Studio.

Can anyone help me?
sarlacii
Posts: 68
Joined: Mon Jan 26, 2015 2:33 pm

Re: ATMEL ICE debugging SAM D20 via SWD on Atmel Studio 7

Tue Apr 05, 2016 10:41 am

Hi there andersonaoli

Sorry about the silence, but even with the additional detail I don't think anyone has had this issue. I'd check that you do not have conflicting devices listed in the project properties etc. And that the memory sizes rack up. Also, I have had an issue before where I changed the bin file location, and then forgot to change it back. As such I kept flashing the old file instead of the new one that I compiled. This could lead to mapping issues during debug.

Other than that, I'm not sure. Perhaps try starting from scratch with a new project, and then see if that works.

Go well.
andersonaoli
Posts: 3
Joined: Mon Mar 28, 2016 3:21 pm

Re: ATMEL ICE debugging SAM D20 via SWD on Atmel Studio 7

Tue Apr 05, 2016 4:09 pm

What you mean by " check that you do not have conflicting devices listed in the project properties etc"?

In the BMF055 datasheet says that is used the SAMD20 with Flash: 256KB and SRAM 32KB.

The example projects come with ATSAMD20J18, thats compatible with the specification above.

See the print: Image

Is normal we have no code at the address 0000000?

See the print 2 : Image

At the lines that appears a C code, we do not see the equivalent Assembly code in Disassembly View. Is it normal?

Am I on the way?
sarlacii
Posts: 68
Joined: Mon Jan 26, 2015 2:33 pm

Re: ATMEL ICE debugging SAM D20 via SWD on Atmel Studio 7

Wed Apr 13, 2016 8:27 am

Hi there

Yes, that is normal. The ability to link code exactly to the assembly is difficult to achieve when you have optimisation turned on. It is just a very rough guide line, and I often find it goes to an "out of bounds" area when doing certain actions in debug. So I just ignore it.

Instead of focusing on the disassembly, I'd rather try to trouble shoot the problem with a simple "hello world" program, and get that working with a known dev board etc. Once that works, go back to sorting the original issue.

Go well.

Return to “SAM D20 Cortex-M0+ MCU”

Who is online

Users browsing this forum: No registered users and 1 guest