[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-chat] avr-size .bss bigger than RAM?
From: |
Stuart Longland |
Subject: |
Re: [avr-chat] avr-size .bss bigger than RAM? |
Date: |
Wed, 26 Jul 2017 08:10:58 +1000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 |
On 25/07/17 22:36, Rolf Pfister wrote:
> I would say it uses more than 29 bytes too much. Because data also
> needs SRAM. And subroutine calling and interrupts will also need some
> bytes of SRAM for the stack.
> Maybe you didn't see something going wrong yet because it didn't fill
> all reserved data structures yet.
Right… I was a bit surprised that it would allow such a program to link.
arm-ld complains when the data structures won't fit into the spaces
allocated by the linker script.
I did another check, and found one of my structures occupied the full
512 bytes, so I've cut it back, .bss is now 279 bytes.
Often the code will define a big integer array somewhere and call that
the stack, so you know exactly where it is and how big it is. AVR
though, all that is abstracted.
Anyone know where I can find out how much RAM is allocated for stack on AVR?
--
Stuart Longland (aka Redhatter, VK4MSL)
I haven't lost my mind...
...it's backed up on a tape somewhere.
signature.asc
Description: OpenPGP digital signature