[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:23:29 UTC 2011


Hi Carlos,

Thanks for your prompt answer. All the tools have been installed this week from latest revisions available. Below the details of my settings
Cheers
Stéphane Rey

>What version of the CodeSourcery tools are you using?
> Can you provide a full test case?
> * Board used.
> * Code.
> * Compiler options used to compile example.

***  Sourcery G++ Lite 2010.09-39 for ColdFire ELF

*** Eclipse IDE
     (eclipse-cpp-helios-SR2-win32.zip)
+ C/C++ Cross compiler support and C/C++ GDB hardware debugging plugin
     (http://download.eclipse.org/tools/cdt/releases/helios)
+ Zylin CDT plugin
     (http://www.zylin.com/zylincdt)

*** Flasher HIWAVE from Codewarrior 6.3

*** proprietary board with M51FAC128C + 4.9152 MHz crystal

*** Compiler settings
In the console the invoking commande line is :
m68k-elf-gcc -O0 -g3 -Wall -c -fmessage-length=0 -mcpu=51ac -MMD -MP -MF"main.d" -MT"main.d"

*** Modified settings from the fresh install:

-> Tool Settings
C/C++ Build\Cross-Settings : "m68k-elf"
C/C++ Build\Cross-Settings\Cross GCC Compiler\Miscellaneous\Other flags :"-c -fmessage-length=0 -mcpu=51ac"
C/C++ Build\Cross-Settings\Cross GCC Linker\Miscellaneous\Linker flags : "-T m51ac128evb-rom.ld"

-> Build Steps
Post build steps command :"m68k-elf-objcopy -I elf32-m68k ${ProjName} -O srec c:\perso\eclipse\project.s19"


*** source code

#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)

#define PTFD_PTFD0_MASK                 1
#define PTFD_PTFD1_MASK                 2
#define PTFD_PTFD2_MASK                 4
#define PTFD_PTFD3_MASK                 8
#define PTFD_PTFD4_MASK                 16
#define PTFD_PTFD5_MASK                 32
#define PTFD_PTFD6_MASK                 64
#define PTFD_PTFD7_MASK                 128

#define PTFDD_PTFDD0_MASK                 1
#define PTFDD_PTFDD1_MASK                 2
#define PTFDD_PTFDD2_MASK                 4
#define PTFDD_PTFDD3_MASK                 8
#define PTFDD_PTFDD4_MASK                 16
#define PTFDD_PTFDD5_MASK                 32
#define PTFDD_PTFDD6_MASK                 64
#define PTFDD_PTFDD7_MASK                 128

/************************
   Main Program Loop
************************/
int main(void) {

  unsigned int i;

  SOPT=0X53;

  // 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");};
  }

return 0;       } //end main








More information about the coldfire-gnu-discuss mailing list