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

Harald Kipp harald.kipp at egnite.de
Fri Apr 2 12:40:40 CEST 2004


Nic,

Many thanks, that was excellent bug tracing.

Btw. I'm almost sure that a previous version of the avr-libc
_did_ clear .bbs in external memory.

Harald

At 18:49 02.04.2004 +1000, you wrote:
>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




More information about the En-Nut-Discussion mailing list