This is the mail archive of the
mailing list for the eCos project.
Re: STM32, openocd and eCos
- From: Martin Hoffmann <m8ddin at googlemail dot com>
- To: ecos-discuss at ecos dot sourceware dot org
- Date: Tue, 25 Jan 2011 19:42:42 +0100
- Subject: Re: [ECOS] STM32, openocd and eCos
- References: <firstname.lastname@example.org> <alpine.DEB.2.00.1012122140180.16270@sg-laptop> <AANLkTimN0XRoWOGjLVtAkPGv+huz8JByr09wVKLoudw4@mail.gmail.com> <1292229790.20895.5.camel@blast>
- Reply-to: m8ddin at googlemail dot com
Am 13.12.10 09:43, schrieb Manuel Borchers:
> On Sun, 2010-12-12 at 21:53 +0000, Alan Bowman wrote:
>>> #ifndef HAL_IDLE_THREAD_ACTION
>>> #define HAL_IDLE_THREAD_ACTION(__count) __asm__ volatile ( "wfi\n" )
>> 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.
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.
Breakpoint 1 at 0x680080ca: file main.cc, 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: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss