Microblaze : xil_malloc malloc

Aug 23, 2006 1 Replies

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


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

Join the Discussion

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

Didn't find your answer?

Ask the community — no account required