*** OK - I think I figured the answer, the answer is that this memory is used to load static strings (see first reply for more details)
*** I'm leaving this post here, in case it will help someone who was bothered with that.
hi,
I'm using an Arduino-nano for operating a led matrix
running into some memory problem, I'm trying to figure out what parts of my program occupies the most memory.
to do that I looked at the symbol table, and found the following mystery:
the __data_start symbol is 0x800100
the last static variable in the data segment (named _ZTV14HardwareSerial) is at 0x800251 and is 18 bytes long,
naturally I would expect that the bss segment would start right after that (with some padding maybe to get it 16 bit aligned).
however - the bss segment starts at 0x800598, so there's apx 821 bytes at the end of the data segment which I'm not sure what they are used for.
I wouldn't complain about 821b normally, but the whole thing has 2k of SRAM, so that's quite a concern.
here is a snippet from the objdump:
/c/Program\ Files\ (x86)/Arduino/hardware/tools/avr/bin/avr-objdump.exe -t onairsign.ino.elf
00800100 g .data 00000000 __data_start
00800100 l O .data 000000c8 very_big_static_var
00800100 l d .data 00000000 .data
008001c8 l O .data 00000004 _ZL12displayState
008001cc g O .data 00000002 __malloc_heap_end
008001ce g O .data 00000002 __malloc_heap_start
008001d0 g O .data 00000002 __malloc_margin
008001d2 l O .data 0000000c _ZN14DisplayBitmaps23AudioCapturing_Overlay3E
008001de l O .data 0000000c _ZN14DisplayBitmaps23AudioCapturing_Overlay2E
008001ea l O .data 0000000c _ZN14DisplayBitmaps23AudioCapturing_Overlay1E
008001f6 l O .data 0000000c _ZN14DisplayBitmaps19AudioCapturing_BaseE
00800202 l O .data 00000009 _ZN14DisplayBitmaps21AudioPlaying_overlay4E
0080020b l O .data 00000009 _ZN14DisplayBitmaps21AudioPlaying_overlay3E
00800214 l O .data 00000009 _ZN14DisplayBitmaps21AudioPlaying_overlay2E
0080021d l O .data 00000009 _ZN14DisplayBitmaps21AudioPlaying_overlay1E
00800226 l O .data 00000009 _ZN14DisplayBitmaps16AudioPlayingBaseE
0080022f l O .data 0000000a CSWTCH.4
00800239 l O .data 0000000c _ZTV28AudioCapturingDisplayElement
00800245 l O .data 0000000c _ZTV26AudioPlayingDisplayElement
00800251 l O .data 00000012 _ZTV14HardwareSerial
<What is this gap ???>
00800598 g .bss 00000000 __bss_start
00800598 g .data 00000000 __data_end
00800598 g .data 00000000 _edata
00800598 l O .bss 00000001 _ZN8SPIClass13interruptSaveE
00800598 l d .bss 00000000 .bss
I'm attaching the full objdump outptut,
any explanation about this gap would be helpfull
thanks
Gal
memory_dump.txt (11.8 KB)