[En-Nut-Discussion] .bss was Stuck !! Fixed (bug in NutOS)
Marc Wetzel
mwse at gmx.de
Fri Apr 2 11:35:29 CEST 2004
Hmmm.
The fun part of you solution is...
that this code (MCUCR=BV(SRE) | BV(SRW);) is already called in NutInit()
So I suppose you are on the wrong lane.
Marc
> -----Original Message-----
> From: en-nut-discussion-bounces at egnite.de
> [mailto:en-nut-discussion-bounces at egnite.de] On Behalf Of NGB
> Sent: Friday, April 02, 2004 11:28 AM
> To: Ethernut User Chat (English)
> Subject: Re: [En-Nut-Discussion] .bss was Stuck !! Fixed (bug
> in NutOS)
>
>
> You don't need to call it, the startup code calls it
> automatically Just paste anywhere in your code
>
> Nic
>
>
> Quoting Michel Hendriks <unreal at home.nl>:
>
> > When would you need to call that function?
> > >From NutMain?
> >
> > NGB said:
> > > A short stroll on avr freaks, and I found out that you
> actually need
> > > to
> > enable
> > > the xram yourself, before bss is cleared in .init4
> > > This problem would only appear if you have large arrays like I do
> > > and .bss
> > end is
> > > outside internal SRAM.
> > >
> > > The function below fixed it.
> > >
> > > void InitXramAccess (void) __attribute__ ((naked)) __attribute__
> > > ((section
> > (".
> > > init1")));
> > >
> > > void InitXramAccess (void)
> > > {
> > > outp(BV(SRE) | BV(SRW), MCUCR);
> > > }
> > >
> > > Nic
> > >
> > > -------------------------------------------------
> > >
> > > _______________________________________________
> > > En-Nut-Discussion mailing list
> > > En-Nut-Discussion at egnite.de
> > > http://www.egnite.de/mailman/listinfo.cgi/en-nut-discussion
> >
> >
> >
> > _______________________________________________
> > En-Nut-Discussion mailing list
> > En-Nut-Discussion at egnite.de
> > http://www.egnite.de/mailman/listinfo.cgi/en-nut-discussion
> >
>
>
>
>
> -------------------------------------------------
>
> _______________________________________________
> En-Nut-Discussion mailing list
> En-Nut-Discussion at egnite.de
> http://www.egnite.de/mailman/listinfo.cgi/en-nut-discussion
>
More information about the En-Nut-Discussion
mailing list