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

NGB ngbmoreau at yahoo.com.au
Fri Apr 2 10:49:22 CEST 2004


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

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




More information about the En-Nut-Discussion mailing list