From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4849 invoked by alias); 20 Nov 2003 14:35:26 -0000 Mailing-List: contact ecos-discuss-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@sources.redhat.com Received: (qmail 4841 invoked from network); 20 Nov 2003 14:35:24 -0000 Received: from unknown (HELO hermes.chez-thomas.org) (63.225.98.241) by sources.redhat.com with SMTP; 20 Nov 2003 14:35:24 -0000 Received: by hermes.chez-thomas.org (Postfix, from userid 2000) id B787850E0DF; Thu, 20 Nov 2003 07:35:19 -0700 (MST) Received: from localhost (localhost.localdomain [127.0.0.1]) by hermes.chez-thomas.org (Postfix) with ESMTP id A3D1450D8D6; Thu, 20 Nov 2003 07:35:16 -0700 (MST) From: Gary Thomas To: Aaron Case Cc: Ecos-Discuss In-Reply-To: References: Content-Type: text/plain Organization: MLB Associates Message-Id: <1069338915.1961.651.camel@hermes> Mime-Version: 1.0 Date: Thu, 20 Nov 2003 14:35:00 -0000 Content-Transfer-Encoding: 7bit X-Spam-Status: No, hits=-4.4 required=5.0 tests=AWL,EMAIL_ATTRIBUTION,IN_REP_TO,QUOTED_EMAIL_TEXT, REFERENCES,REPLY_WITH_QUOTES,USER_AGENT_XIMIAN autolearn=ham version=2.55 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) Subject: RE: [ECOS] context for creating interrupts on edb7312 X-SW-Source: 2003-11/txt/msg00273.txt.bz2 On Thu, 2003-11-20 at 07:25, Aaron Case wrote: > > Look at the timer test I just committed: > > hal/powerpc/mpc8xxx/current/tests/mpc8xxx_timer.c > > It creates, attaches, etc, an interrupt during cyg_user_start() > > and then tests that it works. It does work fine, BTW. > > > > How is this example different from what you are trying to do? > > > > The only real difference is the main_thread. > > What mechanisms start the scheduler in the default eCos package? I cant seem > to get interrupts to work without a explicit call to start the scheduler, > but I know when I include the main thread(by calling cyg_thread_create and > cyg_thread_resume) the scheduler starts. > > So in an effort to better understand eCos(not to try to run a rtos without a > scheduler) what could indirectly start the scheduler(other than your call to > cyg_scheduler_start)? It seems to start on its own with thread > initialization on my system. It happens automatically in "cyg_start()", so my test runs just as well even if I make this change: Index: hal/powerpc/mpc8xxx/current/tests/mpc8xxx_timer.c =================================================================== RCS file: /home/gthomas/my_cvs/develop/ecos/packages/hal/powerpc/mpc8xxx/current/tests/mpc8xxx_timer.c,v retrieving revision 1.1 diff -u -5 -p -r1.1 mpc8xxx_timer.c --- hal/powerpc/mpc8xxx/current/tests/mpc8xxx_timer.c 20 Nov 2003 14:21:54 -0000 1.1 +++ hal/powerpc/mpc8xxx/current/tests/mpc8xxx_timer.c 20 Nov 2003 14:29:39 -0000 @@ -149,12 +149,12 @@ cyg_user_start( void ) IMM->cpm_timers_trr1 = 0x2000; // Reference value IMM->cpm_timers_tcn1 = 0; IMM->cpm_timers_ter[0] = 0xFF; IMM->cpm_timers_tgcr1 = _TC_TGCR_RST1; // Reset & enable timer1 - cyg_scheduler_start(); - CYG_TEST_PASS("mpc8xxx_timer"); +// cyg_scheduler_start(); +// CYG_TEST_PASS("mpc8xxx_timer"); } // ------------------------------------------------------------------------- #else // ! CYGPKG_KERNEL Are you overriding "cyg_start()"? That's the place that the scheduler is normally started (although many of our tests do it explicitly) -- Gary Thomas 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