Proxmark3 community

Research, development and trades concerning the powerful Proxmark3 device.

Remember; sharing is caring. Bring something back to the community.


"Learn the tools of the trade the hard way." +Fravia

You are not logged in.

Announcement

Time changes and with it the technology
Proxmark3 @ discord

Users of this forum, please be aware that information stored on this site is not private.

#1 2014-11-26 09:25:41

iceman
Administrator
Registered: 2013-04-25
Posts: 9,538
Website

ARM - Available memory

How is the memory used in the arm?  I got a 512kb ARM but I always get the feeling only the 64kb SRAM is used.  Can someone shed a light in this matter?

Offline

#2 2014-11-26 10:52:47

piwi
Contributor
Registered: 2013-06-04
Posts: 704

Re: ARM - Available memory

No, both memory types are used:

  • 512K (or 256K with smaller versions of the ARM) is the Flash Memory which is used for the bootloader, (most of) the executable code and the FPGA configuration data. The content of this memory survives a power on reset.

  • 64K is the SRAM which used for the executable code which is declared "RAMFUNC", all the variables, dynamically allocated memory, and the stack. Content of this memory is lost when power is lost.

Offline

#3 2014-11-26 12:56:15

iceman
Administrator
Registered: 2013-04-25
Posts: 9,538
Website

Re: ARM - Available memory

aha, thanks Piwi. 
But how do I know how much memory I used from the 256/512 kb ?

Offline

#4 2014-11-26 13:51:13

piwi
Contributor
Registered: 2013-06-04
Posts: 704

Re: ARM - Available memory

The linker creates a file armsrc/obj/fullimage.map which contains information on memory consumption. With the latest commit I find (among some negligible segments)

.fpgaimage:        0x1497e
.text:             0x135b8
.rodata:            0x2703
.data:              0x2918
.bss:               0xa0bc

The first three go into the Flash Memory and add up to 173625 Bytes. Note: half of this space is used for the (meanwhile two separate LF and HF) FPGA images. The rest is executable code and readonly data (constants).
The latter two go into the SRAM and add up to 51668 Bytes. This are initialized variables and RAMFUNCs and unitialized data (global and static local).

Which leaves us with 13868 Bytes for the heap (dynamic memory allocation) and the stack (including automatic local variables).

Offline

#5 2014-11-26 14:19:07

iceman
Administrator
Registered: 2013-04-25
Posts: 9,538
Website

Re: ARM - Available memory

And now  my is question,  how can I move the BigBuffer  to my abundant 512kb instead of the 64kb sram?

Offline

#6 2014-11-26 15:09:00

piwi
Contributor
Registered: 2013-06-04
Posts: 704

Re: ARM - Available memory

Make it readonly by declaring it const and initialize its contents at compile time already.  big_smile

Offline

Board footer

Powered by FluxBB