[ECOS] STM32, openocd and eCos

Manuel Borchers manuel@matronix.de
Mon Dec 13 08:43:00 GMT 2010

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.


Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

More information about the Ecos-discuss mailing list