[En-Nut-Discussion] .bss was Stuck !! Fixed (bug in NutOS)

NGB ngbmoreau at yahoo.com.au
Fri Apr 2 11:27:51 CEST 2004


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
> 




-------------------------------------------------




More information about the En-Nut-Discussion mailing list