This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: cyg_thread_delay on ARM7 crashes randomly
- From: Andrew Lunn <andrew at lunn dot ch>
- To: Brett Delmage <Brett dot Delmage at twobikes dot ottawa dot on dot ca>
- Cc: ECOS mailing list <ecos-discuss at ecos dot sourceware dot org>
- Date: Mon, 1 May 2006 19:54:43 +0200
- Subject: Re: [ECOS] cyg_thread_delay on ARM7 crashes randomly
- References: <Pine.LNX.4.61.0605011318050.17047@pannier.canbike.ca>
On Mon, May 01, 2006 at 01:52:26PM -0400, Brett Delmage wrote:
> I have a simple test program, a simplification of the TwoThreads program.
> All it does is initialize and resume one thread. The single thread calls
> cyg_thread_delay(1) in a loop.
>
> The target is a minor variation of the Philips LPC 2106, running on a
> Philips LPC2114 ARM7. Compiler is GCC 3.4.2
>
> The program crashes after a random period of time, ranging from almost
> immediately to maybe tens of seconds. But when I enable tracing, dumping
> trace messages to serial port 0 at 9600 baud, the program has run for over
> half an hour without crashing.
>
> There is no other I/O or source of interrupts occuring other than the real
> time clock, that I am aware of.
>
> When the program crashes, my JTAG debugger shows the
> PC at ffff ffd7, and all other registers = ffff ffff
>
> Putting breakpoints on all the vectors except IRQ doesn't trigger when the
> crash occurs. A breakpoint at the IRQ does trigger, indicating the clock
> interrurpt is occurring, and also triggering the debugger breakpoint.
>
> This looks like an interrupt occurring when it shouldn't but who knows.
>
> I'm have no idea why my debugger (Ashling PFARM and Opella) stops when the
> program crashes.
>
> All ideas, including debugging suggestions very much welcomed.
Do you have CYGPKG_INFRA_DEBUG enabled? Enabling it might give some
interesting results.
Andrew
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss