2008-09-16 08:03:30 how call i call the function "l1_data_A_sram_alloc"?
Roy Shu (GERMANY)
Message: 62245
i want to use the L1 memory for PPI
in my program i have used the function l1_data_A_sram_alloc:
pData = (UINT16 *)l1_data_A_sram_alloc((size_t)MAXIMAGESZ);
but i have got the error:
ppi_test.c:(.text+0x18): undefined reference to `_l1_data_A_sram_alloc'
That means, i have missed some header file or something else?
so how can i use the function in my program?
which header or declaration would be added in?
Someone can help me?
Thanks a lot!
Roy
QuoteReplyEditDelete
2008-09-16 08:43:00 Re: how call i call the function "l1_data_A_sram_alloc"?
Robin Getz (UNITED STATES)
Message: 62249
Roy:
have a look at:
https://docs.blackfin.uclinux.org/doku.php?id=using_l1_memory
-Robin
QuoteReplyEditDelete
2008-09-17 10:51:21 Re: how call i call the function "l1_data_A_sram_alloc"?
Roy Shu (GERMANY)
Message: 62316
hi Robin,
i have read the documentation, and according to the section "dynamically allocating" i added the header
#include <asm/blackfin.h>
in my progam, but the error is still here.
I use the distribution and the toolchain with the version of 06R2. Is it the reason?
When i changed the toolchain to 08R1, the distribution is still 06R2. i could not find the libary such as stdio.h by the compiling with gcc. I think, i have already added the right path of the toolchain in ".bachrc".
With the toolchain 06 there is no problem. Do you know the reason?
I just want to simply allocat 1k or 2k bytes memory in L1 for the use of PPI, because with the other memory i get the irq_error from DMA (FIFO overflow) by the frequency which is higher than 2M Hz. By lower frequency there is no problem.
Thank you!
Roy
QuoteReplyEditDelete
2008-09-17 13:11:22 Re: how call i call the function "l1_data_A_sram_alloc"?
Mike Frysinger (UNITED STATES)
Message: 62323
if you're missing stdio.h, you didnt install the toolchain properly -- you forgot to install the C library. read the toolchain install documentation and the FAQ.
i dont think you read the L1 doc Robin gave you completely. it tells you how to do things properly when in kernel space and how to do things properly when in user space.
QuoteReplyEditDelete
2008-09-17 18:36:55 Re: how call i call the function "l1_data_A_sram_alloc"?
Roy Shu (GERMANY)
Message: 62337
Mike,
thanks for your answer, i have made a wrong use of L1 for the kenel instead of the user space.
I will try it again.
Thanks
Roy