SAM-ICE debugger on SAM E70 sometimes stuck in Reset_Handler()

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

Hello,

I am using SAM-ICE on SAM E70 in SWD mode with a project created with Atmel Start. Sometimes when I press F5 to start debugging, the emulator does not get to my first breakpoint in main(). I press Break All Ctrl-F5 and see that the code is stuck in Reset_Handler() of startup_same70q20.c at *pDest++ = *pSrc++.

 

void Reset_Handler(void)
{
        uint32_t *pSrc, *pDest;

        /* Initialize the relocate segment */
        pSrc = &_etext;
        pDest =&_srelocate ;

        if (pSrc != pDest) {
                for (; pDest < &_erelocate;) {
                        *pDest++ = *pSrc++;
                }
        }

I suspect that the code in the MCU is not the same that is in the AS7 IDE because a watch on the pDest is stuck at 0 and does not increment.  The MCU behavious is more like looping in a while 1 endless loop.

 

Is there a way for me to confirm if the code in the MCU matches the IDE with a disassemble? Can I see the program counter or other registers of the SAM E70? Where can I get more info on the way the debugger works?

 

Frank

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

See this post for a similar problem: 

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

Also, latest Atmel Studio 7.0.1645 fixes a bug with the GPNVM bits 8 & 7 that automatically enables tightly coupled memory (TCM) by default so might not need the code mentioned in above link since SRAM should be configured correctly.

Last Edited: Tue. Oct 24, 2017 - 03:52 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

 

I have the same problem with SAMDA1J16B mcu, can you help me please ?