This is the mail archive of the mailing list for the eCos 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]

Re: STM32, openocd and eCos

Am 13.12.10 09:43, schrieb Manuel Borchers:
> On Sun, 2010-12-12 at 21:53 +0000, Alan Bowman wrote:
>>> hal/cortexm/arch/current/include/hal_arch.h:294
>>> #define HAL_IDLE_THREAD_ACTION(__count) __asm__ volatile ( "wfi\n" )
>>> #endif
>> If your issue is with the WFI instruction (and it sounds like it is),
>> then the STM32 chips (or is it the Cortex itself?) provide support for
>> maintaining a clock to keep JTAG operating when the chip is in its low
>> power modes - the default is to stop the clock and then the JTAG
>> connection is lost.  You need to write to the DBGMCU_CR register, as
>> detailed in 30.16 of the RM0008 Reference Manual for the chips.  I
>> certainly found I had issues unless I wrote this at the point where my
>> debugger connected to the target.  I think that this is better done as
>> an openocd/jtag script item than as a modification to the eCos idle
>> thread handling, although probably a note in the documentation to that
>> effect would be worthwhile.
> Thanks for your answers!
> I was already suspecting something like that but didn't look into the
> header-files, only in the C files and didn't find anything.
> I'll try that out tonight and report back if it didn't solve it, but I
> guess this is the problem.
Hi Manuel,

Did it solve your problem?
I also started working with this Mini STM32 Board
and took the STM3210E as a base.

Got it flashed with OpenOCD and the same hardware setup (ft2232
usb2jtag), and can step through the code from the very beginning to

But I cannot continue to any breakpoint, (for example set to main).
After cont I can only Ctrl-C.
Here is the gdb output:

target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x080001e4 msp: 0x20010000
Loading section .rom_vectors, size 0x8 lma 0x68008000
Loading section .text, size 0x3ce8 lma 0x68008008
Loading section .rodata, size 0x10d lma 0x6800bcf0
Loading section .data, size 0x1a8 lma 0x6800be08
Start address 0x68008009, load size 16293
Transfer rate: 64 KB/sec, 4073 bytes/write.
(arm-gdb)br main
Breakpoint 1 at 0x680080ca: file, line 28.
Program received signal SIGINT, Interrupt.
0x6902e536 in ?? ()

Can you give me a hint, how to correctly configure an ecos setup for
this board, using the JTAG to flash and debug?

Thanks in advance,

Before posting, please read the FAQ:
and search the list archive:

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