AW: [ECOS] eCos Startup, where to enable interruots the first time

Richard Rauch
Mon Mar 28 11:16:00 GMT 2011

Thanks for the fast reply,

We are working on a port for ARM9 microcontroller from atmel.

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 

Richard Rauch

Informationstechnologie Rauch 
Schnepfenreuther Hauptstrasse 27b
D-90425 Nuernberg
phone:  +49 (0) 911 3784437
VoIP:    +49 (0) 911 495221739
Geschaeftsfuehrer: Richard Rauch
Handelsregister: Nuernberg HR B 21676
USt-Id Nr. : DE228051873

-----Ursprüngliche Nachricht-----
Von: Sergei Gavrikov [] 
Gesendet: Samstag, 26. März 2011 21:34
An: Richard Rauch
Betreff: Re: [ECOS] eCos Startup, where to enable interruots the first time

On Sat, 26 Mar 2011, Richard Rauch wrote:

> Hi,
> I'm in doubt, when while startup of eCos the interrupts should be 
> enabled initially.
> I have read somewhere in cyg_start or cyg_scheduler_start, but I 
> cannot finde where exactely.


It seems it was here [Calling

> Of course, I can do it somewhere, but I want to follow the eCos standard.
Usually interrupt handlers are created, attached and configured during
system initialization, while global interrupts are still disabled. On most
hardware it will also be necessary to call cyg_interrupt_unmask, since the
sensible default for interrupt masking is to ignore any interrupts for which
no handler is installed.

Look around
% grep cyg_drv_interrupt_unmask $ECOS_REPOSITORY/devs

So, in the most cases you do not need to enable interrupts "by hands" if you
use eCos kernel, otherwise, take a look on these eCos tests (== eCos



Before posting, please read the FAQ:
and search the list archive:

More information about the Ecos-discuss mailing list