public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* RE: [ECOS] CQ7750
@ 2005-05-30 15:13 Raghu Bulusu
  2005-05-31  8:32 ` Gary Thomas
  0 siblings, 1 reply; 4+ messages in thread
From: Raghu Bulusu @ 2005-05-30 15:13 UTC (permalink / raw)
  To: 'ecos-discuss@sources.redhat.com'

Gary,

 	Thanks for the reply, I did use grep earlier but all the statements
seem to define function HAL_STUB_PLATFORM_INIT() as hal_diag_led_on()or a
null function. It may sound like a basic 'C' question but I want to know
when statement '#ifdef HAL_STUB_PLATFORM_INIT' in the function
initHardware() is true? 

Raghu
    

-----Original Message-----
From: Gary Thomas [mailto:gary@mlbassoc.com]
Sent: Friday, May 27, 2005 12:50 PM
To: Raghu Bulusu
Cc: eCos Discussion
Subject: Re: [ECOS] CQ7750


On Fri, 2005-05-27 at 12:43 -0400, Raghu Bulusu wrote:
> Hi,   
> 
>    I tried modifying the Hal of SH/CQ7750 for a new board with SH7750
> processor. I am building the Redboot image using Ecos Configtool 2.0.
> I am trying to get the LED's on the board turn on and off to make sure
that
> the processor is reading from the flash. I know the LED's are turned on at
> this part of file hal_stub.c in the initHardware function	
> 
> #ifdef HAL_STUB_PLATFORM_INIT          ----- ??
> // If the platform defines any initialization code, call it here.
>     HAL_STUB_PLATFORM_INIT();    ----- this calls the led on function
> #endif        
> 
> where is HAL_STUB_PLATFORM_INIT defined??? in the packages/Hal/*  
> 

Did you try looking in the sources?  A quick 'grep' shows where this is
defined (for each platform):

% find hal/sh -type f | xargs fgrep "HAL_STUB_PLATFORM_INIT("
hal/sh/cq7708/current/include/plf_stub.h:# define HAL_STUB_PLATFORM_INIT()
hal_diag_led_on()
hal/sh/cq7708/current/include/plf_stub.h:# define HAL_STUB_PLATFORM_INIT()
CYG_EMPTY_STATEMENT
hal/sh/cq7750/current/include/plf_stub.h:# define HAL_STUB_PLATFORM_INIT()
hal_diag_led_on()
hal/sh/cq7750/current/include/plf_stub.h:# define HAL_STUB_PLATFORM_INIT()
CYG_EMPTY_STATEMENT
hal/sh/dreamcast/current/include/plf_stub.h:# define
HAL_STUB_PLATFORM_INIT()              hal_diag_led_on()
hal/sh/dreamcast/current/include/plf_stub.h:# define
HAL_STUB_PLATFORM_INIT()              CYG_EMPTY_STATEMENT
hal/sh/edk7708/current/include/plf_stub.h:# define HAL_STUB_PLATFORM_INIT()
hal_diag_led_on()
hal/sh/edk7708/current/include/plf_stub.h:# define HAL_STUB_PLATFORM_INIT()
CYG_EMPTY_STATEMENT
hal/sh/hs7729pci/current/include/plf_stub.h:#define HAL_STUB_PLATFORM_INIT()
CYG_EMPTY_STATEMENT
hal/sh/se7751/current/include/plf_stub.h:#define HAL_STUB_PLATFORM_INIT()
CYG_EMPTY_STATEMENT
hal/sh/se77x9/current/include/plf_stub.h:#define HAL_STUB_PLATFORM_INIT()
CYG_EMPTY_STATEMENT
hal/sh/sh4_202_md/current/include/plf_stub.h:#define
HAL_STUB_PLATFORM_INIT()              CYG_EMPTY_STATEMENT

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------


Scanned by -- MCI Managed Email Content Service

Scanned by -- MCI Managed Email Content Service

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [ECOS] CQ7750
  2005-05-30 15:13 [ECOS] CQ7750 Raghu Bulusu
@ 2005-05-31  8:32 ` Gary Thomas
  0 siblings, 0 replies; 4+ messages in thread
From: Gary Thomas @ 2005-05-31  8:32 UTC (permalink / raw)
  To: Raghu Bulusu; +Cc: eCos Discussion

On Fri, 2005-05-27 at 14:41 -0400, Raghu Bulusu wrote:
> Gary,
> 
>  	Thanks for the reply, I did use grep earlier but all the statements
> seem to define function HAL_STUB_PLATFORM_INIT() as hal_diag_led_on()or a
> null function. It may sound like a basic 'C' question but I want to know
> when statement '#ifdef HAL_STUB_PLATFORM_INIT' in the function
> initHardware() is true? 
> 

It is indeed a basic C question; #ifdef tests to see if the macro
HAL_STUB_PLATFORM_INIT has been defined [in either the main source file
or in any of the files included via #include statements]

Using this construct allows a platform to define a function to be called
during stub startup, or leave it out.  In fact all of the include files
which define it to be the empty statement could simply have that line 
removed for the same effect.

> Raghu
>     
> 
> -----Original Message-----
> From: Gary Thomas [mailto:gary@mlbassoc.com]
> Sent: Friday, May 27, 2005 12:50 PM
> To: Raghu Bulusu
> Cc: eCos Discussion
> Subject: Re: [ECOS] CQ7750
> 
> 
> On Fri, 2005-05-27 at 12:43 -0400, Raghu Bulusu wrote:
> > Hi,   
> > 
> >    I tried modifying the Hal of SH/CQ7750 for a new board with SH7750
> > processor. I am building the Redboot image using Ecos Configtool 2.0.
> > I am trying to get the LED's on the board turn on and off to make sure
> that
> > the processor is reading from the flash. I know the LED's are turned on at
> > this part of file hal_stub.c in the initHardware function	
> > 
> > #ifdef HAL_STUB_PLATFORM_INIT          ----- ??
> > // If the platform defines any initialization code, call it here.
> >     HAL_STUB_PLATFORM_INIT();    ----- this calls the led on function
> > #endif        
> > 
> > where is HAL_STUB_PLATFORM_INIT defined??? in the packages/Hal/*  
> > 
> 
> Did you try looking in the sources?  A quick 'grep' shows where this is
> defined (for each platform):
> 
> % find hal/sh -type f | xargs fgrep "HAL_STUB_PLATFORM_INIT("
> hal/sh/cq7708/current/include/plf_stub.h:# define HAL_STUB_PLATFORM_INIT()
> hal_diag_led_on()
> hal/sh/cq7708/current/include/plf_stub.h:# define HAL_STUB_PLATFORM_INIT()
> CYG_EMPTY_STATEMENT
> hal/sh/cq7750/current/include/plf_stub.h:# define HAL_STUB_PLATFORM_INIT()
> hal_diag_led_on()
> hal/sh/cq7750/current/include/plf_stub.h:# define HAL_STUB_PLATFORM_INIT()
> CYG_EMPTY_STATEMENT
> hal/sh/dreamcast/current/include/plf_stub.h:# define
> HAL_STUB_PLATFORM_INIT()              hal_diag_led_on()
> hal/sh/dreamcast/current/include/plf_stub.h:# define
> HAL_STUB_PLATFORM_INIT()              CYG_EMPTY_STATEMENT
> hal/sh/edk7708/current/include/plf_stub.h:# define HAL_STUB_PLATFORM_INIT()
> hal_diag_led_on()
> hal/sh/edk7708/current/include/plf_stub.h:# define HAL_STUB_PLATFORM_INIT()
> CYG_EMPTY_STATEMENT
> hal/sh/hs7729pci/current/include/plf_stub.h:#define HAL_STUB_PLATFORM_INIT()
> CYG_EMPTY_STATEMENT
> hal/sh/se7751/current/include/plf_stub.h:#define HAL_STUB_PLATFORM_INIT()
> CYG_EMPTY_STATEMENT
> hal/sh/se77x9/current/include/plf_stub.h:#define HAL_STUB_PLATFORM_INIT()
> CYG_EMPTY_STATEMENT
> hal/sh/sh4_202_md/current/include/plf_stub.h:#define
> HAL_STUB_PLATFORM_INIT()              CYG_EMPTY_STATEMENT
> 
> -- 
> ------------------------------------------------------------
> Gary Thomas                 |  Consulting for the
> MLB Associates              |    Embedded world
> ------------------------------------------------------------
> 
> 
> Scanned by -- MCI Managed Email Content Service
> 
> Scanned by -- MCI Managed Email Content Service

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ECOS] CQ7750
  2005-05-29 12:11 Raghu Bulusu
@ 2005-05-30 15:08 ` Gary Thomas
  0 siblings, 0 replies; 4+ messages in thread
From: Gary Thomas @ 2005-05-30 15:08 UTC (permalink / raw)
  To: Raghu Bulusu; +Cc: eCos Discussion

On Fri, 2005-05-27 at 12:43 -0400, Raghu Bulusu wrote:
> Hi,   
> 
>    I tried modifying the Hal of SH/CQ7750 for a new board with SH7750
> processor. I am building the Redboot image using Ecos Configtool 2.0.
> I am trying to get the LED's on the board turn on and off to make sure that
> the processor is reading from the flash. I know the LED's are turned on at
> this part of file hal_stub.c in the initHardware function	
> 
> #ifdef HAL_STUB_PLATFORM_INIT          ----- ??
> // If the platform defines any initialization code, call it here.
>     HAL_STUB_PLATFORM_INIT();    ----- this calls the led on function
> #endif        
> 
> where is HAL_STUB_PLATFORM_INIT defined??? in the packages/Hal/*  
> 

Did you try looking in the sources?  A quick 'grep' shows where this is
defined (for each platform):

% find hal/sh -type f | xargs fgrep "HAL_STUB_PLATFORM_INIT("
hal/sh/cq7708/current/include/plf_stub.h:# define HAL_STUB_PLATFORM_INIT()              hal_diag_led_on()
hal/sh/cq7708/current/include/plf_stub.h:# define HAL_STUB_PLATFORM_INIT()              CYG_EMPTY_STATEMENT
hal/sh/cq7750/current/include/plf_stub.h:# define HAL_STUB_PLATFORM_INIT()              hal_diag_led_on()
hal/sh/cq7750/current/include/plf_stub.h:# define HAL_STUB_PLATFORM_INIT()              CYG_EMPTY_STATEMENT
hal/sh/dreamcast/current/include/plf_stub.h:# define HAL_STUB_PLATFORM_INIT()              hal_diag_led_on()
hal/sh/dreamcast/current/include/plf_stub.h:# define HAL_STUB_PLATFORM_INIT()              CYG_EMPTY_STATEMENT
hal/sh/edk7708/current/include/plf_stub.h:# define HAL_STUB_PLATFORM_INIT()              hal_diag_led_on()
hal/sh/edk7708/current/include/plf_stub.h:# define HAL_STUB_PLATFORM_INIT()              CYG_EMPTY_STATEMENT
hal/sh/hs7729pci/current/include/plf_stub.h:#define HAL_STUB_PLATFORM_INIT()              CYG_EMPTY_STATEMENT
hal/sh/se7751/current/include/plf_stub.h:#define HAL_STUB_PLATFORM_INIT()              CYG_EMPTY_STATEMENT
hal/sh/se77x9/current/include/plf_stub.h:#define HAL_STUB_PLATFORM_INIT()              CYG_EMPTY_STATEMENT
hal/sh/sh4_202_md/current/include/plf_stub.h:#define HAL_STUB_PLATFORM_INIT()              CYG_EMPTY_STATEMENT

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ECOS] CQ7750
@ 2005-05-29 12:11 Raghu Bulusu
  2005-05-30 15:08 ` Gary Thomas
  0 siblings, 1 reply; 4+ messages in thread
From: Raghu Bulusu @ 2005-05-29 12:11 UTC (permalink / raw)
  To: ecos-discuss

Hi,   

   I tried modifying the Hal of SH/CQ7750 for a new board with SH7750
processor. I am building the Redboot image using Ecos Configtool 2.0.
I am trying to get the LED's on the board turn on and off to make sure that
the processor is reading from the flash. I know the LED's are turned on at
this part of file hal_stub.c in the initHardware function	

#ifdef HAL_STUB_PLATFORM_INIT          ----- ??
// If the platform defines any initialization code, call it here.
    HAL_STUB_PLATFORM_INIT();    ----- this calls the led on function
#endif        

where is HAL_STUB_PLATFORM_INIT defined??? in the packages/Hal/*  

Thanks,
Raghu Bulusu
Design Engineer
Reptron Engineering Services
13750 Reptron Blvd
Tampa FL-33626
Ph: 813-814-5270
Fax: 813-814-5284
rbulusu@reptron.com



Scanned by -- MCI Managed Email Content Service

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-05-27 19:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-30 15:13 [ECOS] CQ7750 Raghu Bulusu
2005-05-31  8:32 ` Gary Thomas
  -- strict thread matches above, loose matches on Subject: below --
2005-05-29 12:11 Raghu Bulusu
2005-05-30 15:08 ` Gary Thomas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).