This is the mail archive of the ecos-discuss@sources.redhat.com 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: Question about Instrumentation? Thanks


Thanks a lot. I got it work.
But I have a slight question: Is the RTC is created by the
cyg_hal_invoke_constructors() as (real time clock) C++ object and this
happens before calling to cyg_start( ). so does the real time clock start to
run before calling cyg_start( ) and real time clock isr( ) will be called,
then why there is no instrumentation in the real time clock isr? Why the
scheduler need to be started first for the real clock tick instrumentation?
Thanks a lot.
Is the following calling path correct? Thanks a lot.

vectors.S --> initilization --> cyg_hal_invoke_constructors() --> real time
clock starts to run and its isr( ) get called every 10ms (in the isr( ) of
the RTC     CYG_INSTRUMENT_CLOCK( ISR, 0, 0) is called ) -->
cyg_start( ) --> xxxx

Why the scheduler need to be started before instrumentation for clock?

BTW CYGDBG_KERNEL_INSTRUMENT_FLAGS is enabled in my ecos configuration.


-----Original Message-----
From: ecos-discuss-owner at sources dot redhat dot com
[mailto:ecos-discuss-owner at sources dot redhat dot com]On Behalf Of Jonathan Larmour
Sent: 26 March 2003 16:30
To: Qiang Huang
Cc: Andrew Lunn; Ecos-Discuss
Subject: Re: [ECOS] Question about Instrumentation? Thanks


Qiang Huang wrote:
> Thanks a lot. Now I tried to instrument the clock tick as well but I got
> some problem. I configured the ecos with instrument support and used the
> following program, but the output didn't contains the clock tick. shown in
> below thanks a lot.
>
>
>
> PROGRAM
> void cyg_start(void)
> {

Surely this means the scheduler hasn't started! The two events you list
are thread delay and thread sleep - since the kernel hasn't yet started it
operates only the thread available, the idle thread.

I'm amazed your program woke up at all after the delay without clock
interrupts.

>  int i;
>
>   diag_printf("Starting User Program!\n");
>
>  cyg_instrument_enable(CYG_INSTRUMENT_CLASS_CLOCK, 0);
>  cyg_instrument_enable(CYG_INSTRUMENT_CLASS_THREAD, 0);

Presumably you have CYGDBG_KERNEL_INSTRUMENT_FLAGS disabled in CDL
otherwise you wouldn't even get the output you are getting.

Jifl
--
eCosCentric    http://www.eCosCentric.com/    The eCos and RedBoot experts
--[ "You can complain because roses have thorns, or you ]--
--[  can rejoice because thorns have roses." -Lincoln   ]-- Opinions==mine


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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]