This is the mail archive of the ecos-discuss@sourceware.org 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: startup issue on at91sam7S


Hi Greg,

On Thu, May 27, 2010 at 9:17 PM, Davies, Greg <Greg.Davies@ultra-ms.com> wrote:
> Hi,
>
> I'm having a strange problem getting eCos to startup on a sam7S. It
> seems to get "stuck" somewhere between the first instruction, and when
> the watchdog gets turned off. When the board is first powered, the LEDs
> are tri-stated (half lit), and every 14 seconds the reset line goes low
> momentarily. The 14 seconds is the default time for the watchdog
> timeout, but the micro doesn't always restart. It will stay hung up in
> this state for some random amount of time. Sometimes it works right
> away, sometimes it takes over 10 minutes. When it goes from being
> "stuck" to working normally, it does so when the reset line goes low (a
> normal watchdog reset).

This is a description of the system going haywire and I suggest you
don't focus that much on explaining how it went wrong, but focus on
how to make it right.

> I can't debug the code when it's "stuck" because there's no JTAG
> communication, so I can't just break and check what's happening. When
> there is JTAG communication, there's nothing to check because it will
> work fine from that point.

I suppose the code is running from flash. Try doing a "reset halt"
from your debugger, to get it halted at the very beginning of the
application, or try to set a breakpoint at 0x00100000. When you manage
to get the CPU to stop, remove all breakpoints and try single
instruction stepping (stepi in GDB console) up to the offending line.
If you encounter loops along the way, stepi once or twice, then insert
a breakpoint right after the loop and continue up to that point.
It is a tedious process, but you will get to see all the nice
initialization code.

Regards,
Edgar

> I'm looking for some suggestions on what eCos code or configuration I
> should experiment with to try and find an explanation. Any help would
> be greatly appreciated.
>
> Greg Davies, ?BCSc.
> Software Engineer
>
> Ultra Electronics
> Maritime Systems
> 40 Atlantic Street, Dartmouth
> Nova Scotia B2Y 4N2, Canada
>
> greg.davies@ultra-uems.com
> Tel: (902) 466 7491 x4120
> Fax: (902) 463 6098
>
> www.ultra-uems.ca
>
>
> --
> Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
> and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
>
>



-- 
Edgar Grimberg
System Developer
Zylin AS

ZY1000 JTAG Debugger http://www.zylin.com/zy1000.html
Phone: (+47) 51 63 25 00

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


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