ATMEL Studio with SAM E70 Xplained

Go To Last Post
26 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi All,

 

I am new to ATMEL world and may be asking few stupid questions, excuse me for that.

 

Here is what I have,

EVAL kit: SMART SAM E70 Xplained

IDE: ATMEL STUDIO 7.0

 

I have created a simple LED blink project to start with, but I do not see LED0 blinking. So I obviously started debugging and the breakpoint do not hit in the ATMEL studio.

 

Can anyone help with me, if there is any specific settign that has to be done in ATMEL studio in order to the breakpoints to work? Then I can check if there is any issue with the example project I created.

 

As of now, I am not able to debug the project with ATMEL STUDIO 7.0

 

 

 

 

Attachment(s): 

This topic has a solution.

Thanks,
Yogesh

Last Edited: Thu. Apr 6, 2017 - 08:32 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

First thing I would check is what optimization level you're working on and what the debug level is.

 

Right click your project, select Properties. Under Toolchain->ARM/GNU C Compiler->Optimization set the level to None (-O0). The compiler may have been optimizing out your code.

 

Then under Toolchain->ARM/GNU C Compiler->Debugging set the level to Maximum (-g3).

 

Also make sure your active configuration is Debug and not Release, does your program stop at the entry point (main)?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi, 

 

i have exactly the same problem. The Change of Optimization level did not solve the problem.

I have set the breakpoint on sysclk_init() but the point is never been hit.

 

 

Christian

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I did make those changes into the tool cahin and still the same behaviour.

 

The program do not stop the the entry point (main). Is there anything else I am missing here?

 

If I pause the execution it halts in the disassembly and not in the main.c,

 

 

I am not sure why is this behaviour.

 

Thanks,
Yogesh

Last Edited: Thu. Apr 6, 2017 - 05:49 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Is your project based off of one of the example projects? If not I would start there. It should work out of the box and if not check the SAME70 xplained documentation to see if there is any jumpers that need to be changed.

 

File->New->Example Project, select SAME70 from the device family and choose the "Getting-Started Application on SAM - SAME70-XPLD"

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I first started with this example and observed the same issue.

 

I have connected the SAME70-XPLD eval kit to laptop using the USB cable and trying to debug as the kit has EDBG support. Corret me if I am missing any hardware connections which is required to debug a .c file.

I hope I dont need a ATMEL ICE for debugging?

 

Thanks,
Yogesh

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I got my SAME70 xplained board out opened the getting started example and hit the "start debugged and break (Alt+F5)" and it jumped to the main function right away without changing any settings.

 

My board has a jumper on J203 and no jumper on J200. D301 blinks if i hit F5.

 

Atmel ICE is not required.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yeah, this the exact thing I doing at my end. But I do not see the LED turing ON.

 

As part of debugging I erased teh FLASH by putting the jumper on J200. After that I was not able to program teh micro. Then I had to hold the RESET button on startup and after that proggramming of the micro started.

 

But still no help on turning on teh LED.

Thanks,
Yogesh

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I think the problem is in how you erased it. The same70 xplained documentation doesn't say all of the steps that the SAME70 datasheet says.

 

I reproduced your problem and got it back working.

 

1. unplug the USB cable

2. add J200 jumper

3. plug in the USB cable

4. press and hold the reset button

5. unplug the USB cable

6. release the reset button and remove J200 jumper

 

Now plug in the USB cable and try debugging.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I followed the steps mentioned by you and no improvments.

 

The program should halt at the entry point on clicking the debug and Halt  button (Alt+F5), which is not happening.

 

I am suspecting if anything has gone bad in the kit. If that is the case, the micro should not be detected at all, but the atmel studio happily connects to the kit.

This is where I am kind of stuck.

 

I am thinkin to order another kit and try once. Let me know if you think anythign else is missing here.

 

Also, please let me know the steps what you followed when you ran SAME70 for the first time.

Thanks,
Yogesh

This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Try one more time like this

 

1. plug in the USB cable

2. add J200 jumper

3. press and hold the reset button

4. unplug the USB cable

5. remove J200 jumper

6. plug in the USB cable

7. release the reset button

 

Now try debugging.

 

from the data sheet:

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

This time it worked very well.

 

Thank you for the quick support. So, the problem was the way I erased the micro. Because of which the micro was stuck in some undetermined state. Please correct me if I am wrong.

 

 

Now I can cancel my plans of overnighting a new eval kit smiley

Thanks,
Yogesh

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Glad I could help!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm having the same issue with the same70 xplained board, those steps didn't work for me :(

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Did you follow these steps,

1. plug in the USB cable

2. add J200 jumper

3. press and hold the reset button

4. unplug the USB cable

5. remove J200 jumper

6. plug in the USB cable

7. release the reset button

 

This should unlock/erase the micro. If not, are you able to see if the kit is detected in the Studio and Device manager?

 

Thanks,
Yogesh

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi thanks for your repply, I did those steps with no success, only when restarting the computer works

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Hey folks! Unfortunately, none of the the above mentioned steps solved my similar problem. The method that worked for me was making sure the GPNVBITS.BOOT_MODE bit was set. You can access it through the Device Programming window under the GPNVM Bits portion. When this is not set, the device never reaches breakpoints and never enters main(). With that bit set, the Getting Started and IOPORT Example1 work perfectly. Good luck folks!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Perfect! Setting the bit solved the issue. I did try the steps but they didn't work for me either.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks allot. setting the GPNVBITS.BOOT_MODE bit and then press the program button solve the problem!!!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I am running my ATSAME70 XPLD board over usb and Debugging/programming it over the built in debugger/programmer.
​I am running the newest Version of ATMEL STUDIO 7 and I cant seem to find the Window where I can set the GPNV Bit :( , also searching on the Internet doesnt help me out.... could somebody tell me where I can set that bit ? Id be really thankfull. Greetings Jack

 

 

 

 

 

 

 

 

 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You can access GPNVM from Tools->Device Programming (Ctrl_Shift+p shortcut) and then select your debug tool and goto GPNVM bits tab.

 

Thanks,
Yogesh

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thank you!  I was having this trouble and setting the bit worked for me.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I never would have found this so thanks very much!

After a bit more reading it makes sense, there is effectively 2 reset points, ROM or flash. The GPNVM Boot Mode selects which one to boot from. The ROM contains a preloaded program called SAM-BA that is a boot loader of sorts. I haven't figured out if it can auto step out of the ROM into flash, but what was happening to me was it's sitting here waiting for a command. That's why I could debug and see it running in the disassembly but not in my code as it wasn't running my code... 

You can give it a command by plugging into the Target USB port on the SAME70 Xplained board and in a terminal program set to 115k baud, send the ASCII 'G400000#', which means goto address 0x400000 and run. This is the start of the flash memory so then it runs your program.

Why the board is shipped with the boot mode set to ROM is very frustrating. They could have at least mention it in the getting started documents....

 

Darren. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have two SAME 70 kits, both have similar problem, the example LED problem did not work. Puzzled!!

Thanks to this forum, after setting the GPNVM bits, both units work normally.

I happened to have the SAMD21 kit, running the example LED - worked first time.

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Guys, does anybody know what could have caused my Xplained board to behave like in the below mentioned link.

https://community.atmel.com/foru...

Silly beans are always silly
:)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm having a similar issue where the E70 I have from the factory is in this locked state and I have to go through the erase process to be able to even read the GPNVM otherwise I get a 4109 error.

 

After the erase I try to modify the GPNVM bit and Atmel Studio says it was modified successfully but then when I read it back its different.

 

So 2 questions, why am I receiving micros that are locked from the factory and why is the gpnvm bit different after I attempt to write it?

 

Edit: I'm attempting to use the SWD interface with an Atmel ICE. I'll be attempting to use SAM-BA shortly.

Last Edited: Tue. Aug 22, 2017 - 08:04 PM