This is the mail archive of the insight@sources.redhat.com mailing list for the Insight project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Problems using Insight/GDB for Coldfire


Hi!

I am currently working on a ucLinux project for a MCF5272 and I have some trouble using the Insight/GDB debugger with bdm.

I am using the binary version from sourceforge.net.

Before starting with ucLinux I build a small test application that runs in the SDRAM at 0x20000 (MCF5272C3 eval board).

Debugging with gdb works fine:

> m68k-bdm-elf-gdb tstart.elf
(gdb) load
(gdb) set $pc=0x20000
(gdb)
list
(gdb) list
1       int _main()
2       {
3       int i;
4       int a=1;
5       for (i=0;i<10;i++)
6               {
7               a*=(i+1);
8               }
9       for(;;);        return 0;
10      }
(gdb) break 5
(gdb) c
Continuing.

Breakpoint 1, _main () at main.c:5
5       for (i=0;i<10;i++)
1: x/i $pc  0x20042 <_main+10>: clrl %fp@(-4)

In the working directory is a .gdbinit file that configures the sdram controller and sets the target to /dev/bdmcf0 .

But with Insight I have the folling problem:

I start with

m68k-bdm-elf-insight

I can see memory and change it. I can see registers but can't change them.

File->Open

tstart.elf

Now I can see the code of the application at 0x20000 

but the memory below (0x1fff0)  and above (0x20080) are marked N/A.

Then I choose Run->Download

The download dialog shows: 134 bytes (118 .text and 16 .data). 

m68k-elf-objdump -x tstart.elf:


tstart.elf:     file format elf32-m68k
tstart.elf
architecture: m68k, flags 0x00000112:
EXEC_P, HAS_SYMS, D_PAGED
start address 0x00020000

Program Header:
    LOAD off    0x00002000 vaddr 0x00020000 paddr 0x00020000 align 2**13
         filesz 0x00000088 memsz 0x00000088 flags rwx
private flags = 0:

Sections:
Idx Name          Size      VMA       LMA       File off  Algn
  0 .text         00000076  00020000  00020000  00002000  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
  1 .data         00000010  00020078  00020078  00002078  2**2
                  CONTENTS, ALLOC, LOAD, DATA
 

Seems ok.

But now at 0x20000 there is :

0xcebc0000 0xffff2f07 0x48780010 0x61002226

instead of 

0x4e7146fc 0x27002e7c 0x00000000 0x4e7bf801

and I can't change the memory. 

What am I doing wrong? 

BTW: The buttons for step, next ... are greyed out.

Thanks
-- 

Dirk Dörr

P. S.:

I posted this message to:

bdm-devel@lists.sourceforge.net
uclinux-dev@uclinux.org

Attachment: start.tar.gz
Description: start.tar.gz


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]