This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: RedBoot crash after do_go()
- From: Gary Thomas <gary at mlbassoc dot com>
- To: David POUTY <david dot pouty at com2gether dot net>
- Cc: eCos Discussion <ecos-discuss at ecos dot sourceware dot org>
- Date: 07 Jan 2004 10:37:43 -0700
- Subject: Re: [ECOS] RedBoot crash after do_go()
- Organization: MLB Associates
- References: <00a301c3d544$3cff69d0$8300a8c0@PC4>
On Wed, 2004-01-07 at 10:32, David POUTY wrote:
> Hi,
>
> I try to execute a simple application from RedBoot (MPC8xx plateform).
> When application is finished RedBoot display exit code, then crash
> (enter in GDB mode).
> It seems that the stack is corrupted BEFORE the application is executed.
>
> During function hal_thread_load_context(), the macro 'hal_cpu_int_merge'
> is called to merge MSR register value with the thread context previously
> initialized (HAL_THREAD_INT_CONTEXT). The thread MSR value contains
> MSR_EE (to external enable irqs).
>
> The stack is corrupted when MSR_EE bit is set to MSR in
> 'hal_cpu_int_merge' !!
> I use GDB with BDI probe. There's no interrupt pending (SIPEND=0).
What happens if you execute the program via GDB, instead of RedBoot?
One thing to try (no guarantees) would be to disable the cache flush
code that's in mbx.S (only when CYG_HAL_STARTUP_RAM is defined). Look
at how it's done on a newer platform, like the adder.
--
Gary Thomas <gary@mlbassoc.com>
MLB Associates
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss