[En-Nut-Discussion] Nut/OS Initialization

Alain M. alainm at pobox.com
Tue Sep 16 23:26:17 CEST 2008


Harald Kipp escreveu:
> Yes, in any case this should not force anyone to re-write existing 
> applications.

I agree :)

>> If HardwareInit() is kept in a separate linker module
>> (this is important!), users like myself can simply override it on a project
>> basis by providing project specific object file with a custom implementation
>> of HardwareInit().
> Yes, this "hidden initialization" should not add any code if not 
> configured. 

"Some" initalization will allways be needed. I pesonaly dislike anything 
hidden, if it is hidden and is incorrect it may become a nightmare...

> Or the other way round, it will be configured by default to 
> allow an easy start for newbies. Programmers may disable it without penalty.

I prefer this way round. Maybe it could have 2 parts:
1) hidden initialization of very basic stuff, but not much
2) a default example easy-start HardwareInit() to do further 
initialuzation, eventualy (specialy for ethernet) create a thread to 
keep monitoring and reinitializing

Alain




More information about the En-Nut-Discussion mailing list