[coldfire-gnu-discuss] GDB freeze when steping into a loop with P&E BDM

Stephane Franck Rey stephane.franck.rey at cern.ch
Fri May 20 20:26:33 UTC 2011


Sorry, I was just transferring my answer to the list when I've seen I hadn't done it.

I havn't tested it from gdb command line. I will not be on my computer before monday in order to try it. I will let you know then the results. 

Thanks
Stephane


________________________________________
From: Carlos O'Donell [carlos at codesourcery.com]
Sent: 20 May 2011 22:21
To: Stephane Franck Rey
Cc: coldfire-gnu-discuss at codesourcery.com
Subject: Re: [coldfire-gnu-discuss] GDB freeze when steping into a loop with P&E BDM

On 5/20/2011 4:16 PM, Stephane Franck Rey wrote:

Please keep the list in the CC so others can learn about the problem.

> #define SOPT (*( unsigned char *)0xFFFF9802)
> #define SOPT_COPE_MASK                  128
>
> #define PTFD (*( unsigned char *)0xFFFF800A)
> #define NVFTRIM (*(unsigned char *)0x000003FE)
> #define PTFDD (*( unsigned char *)0xFFFF800B)

Should be volatile otherwise the compiler will optimize them away as
constants when -ON for N > 0.

>    // Turn ON/OFF PTE6/7 LEDs
>    PTFDD |=  0 | PTFDD_PTFDD0_MASK   | PTFDD_PTFDD1_MASK;
>    PTFD =0xff ;
>    PTFD =0x00 ;
>
>    for (;;) {
>         PTFD |=  PTFD_PTFD0_MASK ;
>         PTFD&= ~PTFD_PTFD1_MASK;
>         for (i=1; i<50000; i++){asm ("nop");};
>
>           PTFD&= ~PTFD_PTFD0_MASK;;
>           PTFD |=  PTFD_PTFD1_MASK ;;
>        for (i=1; i<40000; i++){asm ("nop");};
>    }

Have you debugged this from the command line gdb to show it's not an IDE
problem?

Cheers,
Carlos.
--
Carlos O'Donell
Mentor Graphics / CodeSourcery
carlos at codesourcery.com
+1 (650) 331-3385 x716



More information about the coldfire-gnu-discuss mailing list