qemu-arm
[Top][All Lists]
Advanced

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

Re: [Qemu-arm] .bss more than LM3S6965evb RAM size


From: Peter Maydell
Subject: Re: [Qemu-arm] .bss more than LM3S6965evb RAM size
Date: Sat, 21 Oct 2017 17:44:48 +0100

On 21 October 2017 at 12:10, Hui Yie Teh <address@hidden> wrote:
> I see, thanks for your reply Peter!
>
> What if I have a stack size of 2048*4 as I'm using 4 threads with that stack
> size? Will that be in the RAM as well?

Your stack certainly should be in RAM. If it gets put
anywhere else then you will find it doesn't work. (This is
actually a fairly common mistake with hard-to-recognize
results: when the program uses the stack the writes go
into nowhere and the reads come back as zero, so the
result is weird behaviour as variables stored on the
stack silently get zeroed...)

> Also, this is the memory map of my linker:
>
>> MEMORY {
>> RAM_INT (AIW) : ORIGIN = 0x20000000, LENGTH = 16M
>> ROM_INT (RX)  : ORIGIN = 0x00000000, LENGTH = 64M
>> }
>
>
> I was wondering if it means that I have 16MB of RAM and 64MB of ROM? Or does
> it not affect the original RAM and ROM sizes?

What you tell the linker affects how it tries to place
things in the executable it produces. You can lie to
the linker about what the hardware has (or in this
case about what the QEMU model has). The effect will
be that the linker will believe you and produce an
executable that doesn't work. I would recommend fixing
your linker script.

thanks
-- PMM



reply via email to

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