[En-Nut-Discussion] Nut/OS Initialization

Nathan Moore nategoose at gmail.com
Wed Sep 17 20:23:21 CEST 2008


On Wed, Sep 17, 2008 at 12:44 PM, Alain M. <alainm at pobox.com> wrote:

> To both Thiado and Nathan,
>
> Using NutMain() is not against C rules, using something before main()
> is.

The NutAppMain thing is only for gcc on Nut, as far as I have seen, and then
there is no main().


> The reason is not only phylosophical, it makes simple debugging become
> possible nightmares. As you apen a nut system in Eclipse it goes
> straight to main() and you cannot debug anything before that. I had to
> do it with Nut, and it took me 2 days to find a simple error in one
> initialization ... :(


I agree that having a place where you can make assumptions about correctness
up to that point is nice to have, but that is never really the case no
matter the
platform.
I'm not calling NutAppMain "main" in my code because I don't like what it
suggests.
As far as what Eclipse does by default, I'll bet that it's a setting that
you can change.

Nathan



More information about the En-Nut-Discussion mailing list