Microblaze : xil_malloc malloc

Hi

I want to allocate memory but it doesn't work. If I use xil_malloc I can not allocated enough memory, pointer to NULL is returned. Whem I want to use malloc, I get the following error:

./microblaze_0/lib//libc.a(malloc.o): In function `malloc': malloc.o(.text+0x8): relocation truncated to fit: R_MICROBLAZE_SRW32 .sdata malloc.o(.text+0x20): relocation truncated to fit: R_MICROBLAZE_SRW32 .sdata collect2: ld returned 1 exit status

I edit the heap size too.

Can anybody help me?

cu Emp

Reply to
Emp
Loading thread data ...

allocated enough memory, pointer to NULL is returned. Whem I want to use malloc, I get the following error:

malloc.o(.text+0x8): relocation truncated to fit: R_MICROBLAZE_SRW32 .sdata malloc.o(.text+0x20): relocation truncated to fit: R_MICROBLAZE_SRW32 .sdata collect2: ld returned 1 exit status

That error means that you do not have enough memory to store the .sdata section and sections after it in the linker script.

Try using a linker script that stores your program in external memory.

/Siva

Reply to
Siva Velusamy

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.