Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 5219

SDK • Re: Compile not reporting correct RAM usage

$
0
0
This is (still) an MCU which doesn't have virtual memory translation lookaside buffer (TLB) for RAM.
There's a good reason to keep the stack(s) (remember - dual cores) so small in those RAM regions (SCRATCH_X and SCRATCH_Y). Those are both separate physical memories which can be accessed in parallel.
IMPORTANT
Banking is a physical partitioning of SRAM which improves performance by allowing multiple simultaneous accesses. Logically there is a single 264kB contiguous memory.
More detailed and meaningful structure and allocation can be seen with:
addr 0x1=Flash; 0x2=RAM

Code:

arm-none-eabi-size -Ax file.elfsection                  size         addr.text                  0x4004   0x10000000.rodata                 0x56c   0x10004008.ARM.exidx                0x8   0x10004574.binary_info             0x18   0x1000457c.ram_vector_table       0x110   0x20000000.uninitialized_data       0x0   0x20000110.data                   0x854   0x20000110.tdata                    0x0   0x20000964.tbss                     0x0   0x20000964.bss                    0x9f8   0x20000968.heap                 0x7eca0   0x20001360.scratch_x                0x0   0x20080000.scratch_y                0x0   0x20081000.stack_dummy            0x800   0x20081000.flash_end               0x14   0x10004de8.ARM.attributes          0x34          0x0.comment                 0x44          0x0.debug_info           0x21ca5          0x0.debug_abbrev          0x5b2b          0x0.debug_loclists        0xff9f          0x0.debug_aranges          0xc08          0x0.debug_rnglists        0x3175          0x0.debug_line           0x15cda          0x0.debug_str             0x59c9          0x0.debug_frame           0x2068          0x0.debug_line_str         0x286          0x0Total                 0xddc95
And deeper:

Code:

arm-none-eabi-readelf -a .file.elf

Statistics: Posted by gmx — Sat Oct 05, 2024 1:27 am



Viewing all articles
Browse latest Browse all 5219

Trending Articles