simulavr-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Simulavr-devel] avrtest vs simulavrxx


From: address@hidden
Subject: Re: [Simulavr-devel] avrtest vs simulavrxx
Date: Fri, 08 May 2009 14:22:48 -0700

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
address@hidden
"War is only a hobby."
---- Msg sent via CableONE.net MyMail - http://www.cableone.net



reply via email to

[Prev in Thread] Current Thread [Next in Thread]