[coldfire-gnu-discuss] Debugging/Running program in internal Flash.
Claude Sylvain
csylvain at electro-technica.com
Fri Feb 16 16:44:40 UTC 2007
Hello Daniel,
>
> Daniel Jacobowitz wrote:
>
>
>
> There was a typo in Nathan's suggestion; could you try *(int
> *)&__data_start instead? __data_start is assigned an address at
> the start of RAM, which is different from pointing to the start
> of RAM; 0xb5b88126 is probably the first word in SRAM.
>
You're right. There is a typo error.
I tryed again without the typo error.
The problem seems to be still there.
Here is the GDB output:
----------
..
m68k-elf-sprite:Opening P&E USBMultilink port 1 (USB1 : USB-ML-CF Rev
C (PE60123
45))
m68k-elf-sprite:Target reset
0x00000000 in __interrupt_vector ()
(gdb) break main
Breakpoint 1 at 0x512: file ./src/main.c, line 172.
(gdb) print (unsigned int *)&__data_start
$1 = (unsigned int *) 0x20000000
(gdb) print *(unsigned int *)&__data_start
$2 = 3031990562
(gdb) p/x *(int *)&__data_start = 0x1234567
$3 = 0x1234567
(gdb) print *(unsigned int *)&__data_start
$4 = 19088743
(gdb) continue
Continuing.
Note: automatically using hardware breakpoints for read-only addresses.
Program received signal SIGTRAP, Trace/breakpoint trap.
0x00000004 in __interrupt_vector ()
(gdb) stepi
0x00000004 in __interrupt_vector ()
(gdb)
0x00000004 in __interrupt_vector ()
(gdb)
0x00000004 in __interrupt_vector ()
(gdb) p/x *(int *)&__data_start = 0x1234567
$5 = 0x1234567
(gdb) continue
Continuing.
Program received signal SIGTRAP, Trace/breakpoint trap.
0x00000004 in __interrupt_vector ()
(gdb) stepi
0x00000004 in __interrupt_vector ()
(gdb)
0x00000004 in __interrupt_vector ()
(gdb)
----------
Regards,
Claude Sylvain
Electro-Technica inc.
More information about the coldfire-gnu-discuss
mailing list