I have an GNU assembler for avr. I am also able to assemble the assembly
produced by sdcc after minor modifications in existing sdcc code.
what kind of linker script will I require, if I want to use GNU avr linker
to link these assembled files?
Thanks in advance for any help.
This is known problem. SDCC's live range analysis algorithm
goes a little haywire if the locals are used before definition.
Fixing this will cause massive performance problems.
work around ... initialize local variables before use.
for following snippet,
void foo (unsigned char);
unsigned char i, j , k ;
i = !j;
i = i + k;
The value of "sym->stack" inside genFunction() is not correct for
--stack-auto. Thais value is 0 , but it should have been 2. The .dumprassgn
file tells me that variable "i" is given a register and variables "j" and
"k" are on stack.