Hi there,

I'm trying to debug weird bus fault exceptions on my STM32 part.
Sometimes the program compiles and runs just fine, and other times it
gives a bus fault exception during __init(). I'm stepping into __init,
which is initializing the initialized data segment (copying ROM into
RAM), and I see this:

(gdb) monitor reset halt
JTAG tap: stm32.cpu tap/device found: 0x3ba00477 (Manufacturer: 0x23b,
Part: 0xba00, Version: 0x3)
JTAG Tap/device matched
JTAG tap: stm32.bs tap/device found: 0x16410041 (Manufacturer: 0x020,
Part: 0x6410, Version: 0x1)
JTAG Tap/device matched
target state: halted
target halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x0800011c

(gdb) si
0x0800011e in __init () at lib/src/stm32f10x_vector.c:213
213     pulSrc = &_sidata;
1: x/i $pc
0x800011e <__init+2>: str r3, [r7, #0]
Current language:  auto; currently c
(gdb) p pulSrc
$27 = (u32 *) 0x8000134
(gdb) p &_sidata
$28 = (long unsigned int *) 0x800a000
(gdb) si
215     for(pulDest = &_sdata; pulDest < &_edata; )
1: x/i $pc
0x8000120 <__init+4>: ldr r3, [pc, #76] (0x8000170 <__init+84>)
(gdb) p &_sidata
$29 = (long unsigned int *) 0x800a000
(gdb) p pulSrc
$30 = (u32 *) 0x8000134
(gdb)


What gives? Either the variable isn't being set correctly, or the
debugger isn't reporting it back to me correctly. Or I'm totally dense
and missing something. I'm using basically the stock STM32 scripts on
revision 1370, with an Olimex ARM-USB-JTAG and the Olimex STM32-P103 dev
board. GDB is rev 6.8.50.20081007-cvs.

--n

_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to