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

Richard Rauch rrauch@itrgmbh.de
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
email: rrauch@itrgmbh.de
 
_______________________________________________

ITR GmbH 
Informationstechnologie Rauch 
Schnepfenreuther Hauptstrasse 27b
D-90425 Nuernberg
 
phone:  +49 (0) 911 3784437
VoIP:    +49 (0) 911 495221739
web:     http://www.itrgmbh.de
email:   info@itrgmbh.de
 
Geschaeftsfuehrer: Richard Rauch
Handelsregister: Nuernberg HR B 21676
USt-Id Nr. : DE228051873
_______________________________________________

-----Ursprüngliche Nachricht-----
Von: Sergei Gavrikov [mailto:sergei.gavrikov@gmail.com] 
Gesendet: Samstag, 26. März 2011 21:34
An: Richard Rauch
Cc: ecos-discuss@ecos.sourceware.org
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.

Hi,

It seems it was here
http://ecos.sourceware.org/docs-latest/ref/kernel-overview.html [Calling
Contexts]

> 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
standards)

  hal/common/current/tests/intr.c
  kernel/current/tests/kintr0.c
  kernel/current/tests/intr0.cxx


Sergei



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



More information about the Ecos-discuss mailing list