This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Build issue with Edma3LLD library

Other Parts Discussed in Thread: SYSBIOS

Hi Champs

I post this question on behalf of my customer:

"I’m porting an algo on Arm A8 of BeagleBone Black for a benchmark but I’m struggling with Edma3LLD library : following some examples from ti-processor-sdk-rtos-am335x-evm-03.00.00.04, when I insert the following line in the app.cfg: 

/* USE EDMA3 Sample App */

xdc.loadPackage('ti.sdo.edma3.drv.sample');

then I got the following error message:

can't find the library 'lib/a8/release/edma3_lld_drv.aea8fnv' specified by package ti.sdo.edma3.drv.  It wasn't found along the path 'C:/TI_SDK/Arm335x/bios_6_45_01_29/packages;C:/CCSProj/Platform;C:/TI_SDK/Arm335x;C:/TI_SDK/Arm335x/edma3_lld_2_12_01_24/packages;C:/ti/ccsv6/ccs_base;C:/TI_SDK/Arm335x/xdctools_3_32_00_06_core/packages;..;'.                .xdchelp             

(the strange thing is that after creating a project for beaglebone black in CCS, if you open Property -> CCS General -> RTSC -> Target  you find ti.targets.arm.elf.A8Fnv but edma3_lld_2_12_01_24\packages\ti\sdo\edma3\ contains only aa8fg files)

 

If I omit the previous lines in the cfg file, I’m able to compile and to link but later the edma3init function call fails. Do you have some example for beaglebone using edma3lld under SysBios ? I’m trying to avoid Linux OS, to be able to take the full control of L3 OCMC0 and internal SRAM, but any suggestion is welcome. 

By the way, I downloaded AM335x starterware too and I created a second project but there is no so much documentation about it : there are some examples but there is no a flow chart about initializations and the order of the initializations.

Again : if you have some example that could fit with my goal to have the full control of internal memory for a ping-pong mechanism using DMA, that could be very useful for me.

"

Please advice

Thanks, Patrick Verkennis

EP FAE

  • Patrick,

    Looks like the ARM toolchain no longer supports COFF format and we need to rebuild the edma3 libraries in ELF format. I think the Sitara forum can provide better help because this issue is in the Processor SDK. I'll try to get your forum thread moved over there.

    ~Ramsey

  • Hello.

    Following spru523i.pdf:

    .aa8fg        For Cortex-A8 targets (ELF format, little endian, GNU compiler)

    ....

    .aea8fnv    For Cortex-A8 targets (ELF format, little endian, TI compiler, uses hardware -based vector floating point support, recommended over .aea8f)

    ....

    So the problem is not ELF format but the Neon support: this problem is confirmed when I tried to create an equivalent project relaying on am335x starterware library. It happened that after enabling the --neon option, the compilation produced the following error message :

    error #20: identifier "__sqrtf" is undefined

    The reason is the --float_support option vfplib : compiler didn't recognize the intrinsic function --sqrtf and tried to call a __sqrtf function from vfplib.;
     changing --float_support option in VFPv3 solved the previous problem but a problem with the linker arose :

    error #16004-D: file "C:/TI_SDK/AM335X_StarterWare_02_00_01_01/binary/armv7a/cgt_ccs/am335x/system_config/Release/system.lib<init.obj>" has a Tag_ABI_VFP_args attribute value of "0" that is different than one previously seen ("1"); combining incompatible files

    It seems to me that TI is not releasing library supporting hw accelerator and unfortunately all my attempts to generate this kind of library are unsuccessful : for example I tried to modify the batch file  edma3_lld_release.bat to generate the ELF format but it's not working (in env.mk file there are some absolute paths like :

    # BIOS
    bios_PATH = /home/gtbldadm/processor-sdk-rtos-krogoth-build/build-CORTEX_1/arago-tmp-external-linaro-toolchain/sysroots/am335x-evm/usr/share/ti/ti-sysbios-tree
    bios_INCLUDE = $(bios_PATH)/packages

    # XDC
    xdc_PATH = /home/gtbldadm/processor-sdk-rtos-krogoth-build/build-CORTEX_1/arago-tmp-external-linaro-toolchain/sysroots/am335x-evm/usr/share/ti/ti-xdctools-tree
    xdc_INCLUDE = $(xdc_PATH)/packages

    # EDMA3 LLD
    edma3_lld_PATH = /home/gtbldadm/processor-sdk-rtos-krogoth-build/build-CORTEX_1/arago-tmp-external-linaro-toolchain/work/am335x_evm-linux-gnueabi/edma3-lld-rtos/2.12.01.24-r0.0.tisdk-int2/git
    include $(edma3_lld_PATH)/packages/component.mk
     ) : is it possible to have some documentation on how to fix this situations ? If the support for Neon is not supported in the current distribution, is it possible to have some documentation about how to generate the right libraries ? 

    Thank you and best regards,

    Enzo Scianni

  • Hello.

    After some weeks, I have the following situation :

    1) SysBios + EDMA3LLD: I used the following procedure to generate a compatible library format (I need aea8fnv extension for ELF format, little endian, TI compiler, hardware -based vector floating point support) :

    a) Added --float_support=VFPv3 option in line 61 of rules_TI_a8.mk

    b) Replaced GCC option with TI in all lines from 278 to 325 labelled as "To build libs For Platform am335x-evm Target a8" of makefile in <Installation Dir>/am335x/edma3_lld_2_12_01_25/package

    c) Called gmake in am335x/edma3_lld_2_12_01_25/package with ghe following options : gmake libs FORMAT=ELF TARGET=a8     PLATFORM=am335x-evm. Previously I followed all the step described in 2.4.1 of  EDMA3_Driver_User_Guide.doc (it could be better to move this file in edma3_lld_2_12_01_25/docs)

    This produces files with extension aea8f that I renamed in aea8fnv (it's possible and it could be better to modify script files ...) and a this point I was able to compile and link in my project. The problem arrives later when I call edma3init(0, &edma3Result) : using debugger and analyzing the stack the initialization fails on edma3GlobalRegionInit call with the following exception message :

    [CortxA8]  0x8001c154  R8  = 0x00000000
    R1 = 0x00000000  R9  = 0x8001c154
    R2 = 0x49000000  R10 = 0x00000540
    R3 = 0x00000003  R11 = 0x00000c20
    R4 = 0x00000000  R12 = 0x00000000
    R5 = 0x8001c154  SP(R13) = 0x80021640
    R6 = 0x00000008  LR(R14) = 0x8001884c
    R7 = 0x8001c154  PC(R15) = 0x80021640
    PSR = 0x00000008
    DFSR = 0x00001008  IFSR = 0x00000000
    DFAR = 0x49000284  IFAR = 0x00000000
    ti.sysbios.family.arm.exc.Exception: line 205: E_dataAbort: pc = 0x80021640, lr = 0x8001884c.
    xdc.runtime.Error.raise: terminating execution

    2) AM335X_StarterWare_02_00_01_01 :  Following some project examples, I created a project relaying on starterware library modifying MMUConfigAndEnable function to have access to OCMC and SRAM memory areas, then disabling cache and calling in the following order :

        /* Configure EDMA module clock */
        EDMAModuleClkConfig();
        /* Initialize EDMA */
        EDMA3Init(EDMAAPP_EDMACC_BASE_ADDRESS, 0);
        EDMA3Init(EDMAAPP_EDMACC_BASE_ADDRESS, 1);

        /* Initialize ARM interrupt controller */
        IntAINTCInit();

        /* Enable the EDMA CC0 system interrupt in AINTC.*/
        IntSystemEnable(SYS_INT_EDMACOMPINT);

    skipping the call of IntEnable because I want to handle flags of EDMA termination by polling avoiding to be interrupted during the nested loops for calculus implementation. 

    Everything is ok, but when I call manually the EDMA transfer I'm able to see the Parmeter Set modified but data are not transferred.

    Best Regards,

    Scianni Vincenzo

  • HI

    I would like to repeat your experiment.  Can you zip me and attach the libraries that you use so I can use them?

    Thanks

    Ran

  • I examined the project and this is my answer:

    Patrick, here is what I think

     

    Edma3init is part of the sample code.  If you look at the code you see that it requires some extern variables.  For example, I look at the edma driver User Guide (you can find it in the directory edma3_lld_2_12_01_25\packages\ti\sdo\edma3\drv\docs  ) page 63, the first line says

    /** EDMA3 Driver Instance specific Semaphore handle */

    extern EDMA3_OS_Sem_Handle semHandle[];

     

    On the other hand, when you look at the code itself  (directory edma3_lld_2_12_01_25\packages\ti\sdo\edma3\drv\sample\src ) you may notice that there are several additional extern definitions that I think are missing from our setting.  (If I am wrong, let me know)

     

    What I suggest is to replace the edma3init with the functions that are actually called,  that is, create and open.  You can see the description of these functions in the chn documentation in the same doc directory as the User Guide. Below is the top of the chn page that describes the initialization.

     /cfs-file/__key/communityserver-discussions-components-files/791/Doc1.docx     

    So my advice is either take the complete sample project (if you find it) where all the externs are defined, or use the basic building block create and open

     

    Does it make sense?

    I close the thread

    Ran