Increase Memory Resource in SDRAM.

Apr 25, 2007 5 Replies

Hi, I have a project with a big requeriment of memory. So I have decided to generate a linker script with every section to SDRAM. The problem is that I don't know how can I increase the "default memory area" for my app. The reason is that I do "xil_calloc", but when I put a big number I receive an error and I think I could do it in a Sdram with 32Mb. How can I increase the resources of my Sdram?. What is the section in "Linker Script" for doing it possible?.



Thanks



Erm, increase the heap size?

-Ben-

I have incresed heap_size, but it seems like sdram cannot use more than 60 kbytes.

Pablo schrieb:

That's no SDRAM problem. As the Xilinx EDK documentation states:

"The xil_* functions operate on a 64 kilobyte buffer, and allocate memory from that. The size of this buffer is fixed and cannot be changed currently. This is a limitation of the xil_* dynamic memory allocation routines." [oslib_rm.pdf/EDK 8.1]

I don't know if this has changed in subsequent EDK versions. The PPC405 malloc/calloc does not suffer from this limitation.

Best regards, Andreas

  1. Can you switch to PPC if you use MicroBlaze?
  2. Does your application require dynamic memory allocation?
  3. Can you use static memory allocation instead?
  4. Do you have to use xilkernel?
  5. Where do you store your application code?
  6. How much memory does your application need?
  7. How much is available?

Depending on the answers to these questions you can:

  1. Allocate your memory statically.
  2. Use PPC405 + external SDRAM + malloc.
  3. Implement a malloc which handles more than 64 KB. It's not complicated but memory fragmentation can become an issue on MicroBlaze as there's no MMU.
  4. Use an operating system like uClinux.
  5. Search for an C-based malloc library.

See

formatting link
for a discussion of possible malloc implementations on MMU-less systems.

Best regards, Andreas

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required