On Fri May  8 13:43 , Joel Sherrill  sent:
>I think I have tracked one down to this feature in
>avrtest that (I think) is not in simulavrxx and
>is probably the culprit
>
>        "  -d           Initialize SRAM from .data (for ELF program)\n"
>
>This sets a flag which is used later only to do this:
>
>        /* Also copy in SRAM.  */
>        if (flag_initialize_sram && vaddr >= DATA_VADDR)
>            memcpy(cpu_data + vaddr - DATA_VADDR,
>                   cpu_flash + addr, filesz);
>
>The avrtest crt0.S code doesn't appear to copy
>initialized data into RAM. 

crt0.S is avr assembly code that C programs execute before main?

>Any thoughts on how to implement this in simulavrxx?

I'd expect it to look a lot like the code that initializes the flash.

Perhaps the question is how to generate avr code that uses it?
I think that with gnu tools the compilation stage could be left alone.
The startup code could be mostly eliminated.
I think it would just have to assign the stack pointer.
The linker script would need to be changed.

--
Michael Hennebry
[email protected]
"War is only a hobby."
---- Msg sent via CableONE.net MyMail - http://www.cableone.net

_______________________________________________
Simulavr-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/simulavr-devel

Reply via email to