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
_______________________________________________ AVR-chat mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/avr-chat
