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: eCos Startup, where to enable interruots the first time


On 26.03.2011 21:43, Richard Rauch wrote:

> We thought, in cyg_start we should enable interrupts. But after in
> Cyg_Scheduler::start_cpu HAL_THREAD_LOAD_CONTEXT is called. This function
> disables the interrupt bit in armreg_cpsr again 

AFAIR the HAL_THREAD_INIT_CONTEXT should set the context
so that the interrupts are enabled - at least that's
what hal\arm\arch\current\include\hal_arch.h says
in its comment and what the CPSR_THREAD_INITIAL is
set to. This is also what the comment in
HAL_THREAD_LOAD_CONTEXT right before
Cyg_Scheduler::start_cpu says.

If you set the breakpoint in the thread's function
and upon arriving there it has interrupts disabled in
the CPSR, something is wrong.

Debugging the context switch itself is a bit problematic -
don't count on the PSR value gdb tells you during the
switch.

-- 
                             Stano

-- 
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]