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]

Re: help me to port mbx860 ethernet


Nohee Ko wrote:
> 
> hi.
> I'm confused about routine below.
> for (init_entry = __RedBoot_INIT_TAB__; init_entry !=
> &__RedBoot_INIT_TAB_END__;  init_entry++) {
>         (*init_entry->fun)();
>     }
> this routine are in /redboot/current/src/main.c .
> 
> what does this routine do?
> It seems to do such like "RedBoot_init or things".

Yes.

> But I can't exactly understand this routine.
> where is __RedBoot_INIT_TAB__,  _RedBoot_INIT_TAB_END__ ?

They get defined in redboot's main.c:

CYG_HAL_TABLE_BEGIN( __RedBoot_INIT_TAB__, RedBoot_inits );
CYG_HAL_TABLE_END( __RedBoot_INIT_TAB_END__, RedBoot_inits );
extern struct init_tab_entry __RedBoot_INIT_TAB__[],
__RedBoot_INIT_TAB_END__;

You can see the definition of CYG_HAL_TABLE_* in
hal/common/current/include. It manipulates ELF symbols.

> And what does "(*init_entry->fun)()" function do?

It iterates over the contents of the table, calling the function in each
one.
 
> My board operates wrong when doing this routine ( actually right after
> power on)
> then, I can see weird message on my debug monitor.
> ==> +$T0540:fe00ef04;01:00004a8c;#b2

This indicates your board hit an exception at 0xfe00ef04. Perhaps
disassemble your image using powerpc-eabi-objdump -d to find exactly where
this address is.

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine


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