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.

Linking EDM3 LLD driver for C66AK2H into an application project.

Other Parts Discussed in Thread: OMAPL138, SYSBIOS

Hello!

I am a newbie with the MCSDK. I am writing some ARM code in Linux and have a problem in linking the EDMA3 LLD driver into my code. The linker complains:

"gcc-linaro-arm-linux-gnueabihf-4.8-2014.04_linux/bin/../lib/gcc/arm-linux-gnueabihf/4.8.3/../../../../arm-linux-gnueabihf/bin/ld: cannot find -ledma3_lld_drv.ae66". The same errors come also for the rest of the edma3_lld-libraries.

I compile my project with the following command:

arm-linux-gnueabihf-g++ \
-Dxdc_target_types__=ti/targets/std.h \
-D__TMS470__ \
-Dxdc_target_name__=C66 \
-O3 \
-I/home/neukkari/ti/edma3_lld_02_11_13_17/packages/ti/sdo/edma3/drv/sample \
-I/home/neukkari/ti/edma3_lld_02_11_13_17/packages \
-I/opt/ti/bios_6_35_04_50/packages \
-I/opt/ti/xdctools_3_25_03_72/packages \
-L/home/neukkari/ti/edma3_lld_02_11_13_17/packages/ti/sdo/edma3/drv/lib/66/release \
-L/home/neukkari/ti/edma3_lld_02_11_13_17/packages/ti/sdo/edma3/rm/lib/tci6636k2h-evm/66/release \
-L/home/neukkari/ti/edma3_lld_02_11_13_17/packages/ti/sdo/edma3/drv/sample/lib/tci6636k2h-evm/66/release \
-lm -ledma3_lld_drv.ae66 -ledma3_lld_rm.ae66 -ledma3_lld_drv_sample.ae66 \
-o arm.elf \
main.cpp

which succeeds just fine, but then the linking fails.

In the directory:

/home/neukkari/ti/edma3_lld_02_11_13_17/packages/ti/sdo/edma3/drv/lib/66/release

I have the following files:

edma3_lld_drv.ae66e and
edma3_lld_drv.ae66,

both have the size of 274kB.

From what I know the libraries should be named "lib***.a" (just like the library "m" linked successfully has) but these have no such a prefix and extension. I have tried renaming them but no help. Also, there should be the corresponding .so files, but I haven't found them either in my HD and the problem with that should appear only in runtime anyway.

The libm.a can be found under gcc-linaro--arm-linux-gnueabihf (and several other places). I have tried copying the edma3_lld_drv.ae66 also there + tried the renaming tricks, but no help.

The EDMA3_LLD driver came along with the MCSDK package 3_01_03_06 and it seems to have support for my target (K2HEVM).

Am I missing something in my configuration or am I using completely wrong tools for this? I have written successfully applications without the MCSDK with this very compiler and run them in the target board without any problems, so the compiler itself works for my target.

I need also the .so files. I wonder why they are not present at all. Can the driver installation have been failed? There was no issues in running it, though.

Regards,

Ari

  • Hi Ari,

    Welcome to the TI E2E forum. I hope you will find many good answers here and in the TI.com documents and in the TI Wiki Pages (for processor issues). Be sure to search those for helpful information and to browse for the questions others may have asked on similar topics (e2e.ti.com). Please read all the links below my signature.

    We will get back to you on the above query shortly. Thank you for your patience.

  • Hi,

    which succeeds just fine, but then the linking fails.

    In the directory:

    /home/neukkari/ti/edma3_lld_02_11_13_17/packages/ti/sdo/edma3/drv/lib/66/release

    I have the following files:

    edma3_lld_drv.ae66e and
    edma3_lld_drv.ae66,

    You may have to use the following ARM EDMA3 driver if you use ARM app.
    C:\ti\edma3_lld_02_11_13_17\packages\ti\sdo\edma3\drv\lib\arm9\release

    "66" mentions about C66xx DSP multicore processor.So you have to use appropriate ARM library.
  • Thanks for the quick reply!

    Titusrathinaraj Stalin said:

    "66" mentions about C66xx DSP multicore processor.So you have to use appropriate ARM library.

    Yes, I probably need to use ARM driver (ARM Cortex A15) instead of C66 for ARM application.

    The problem is that there are only .mk files in the folders under

    "C:\ti\edma3_lld_02_11_13_17\packages\ti\sdo\edma3\drv\lib"

    other than "66" and furthermore, there is no folder at all for arm15.

    Do I now need to compile the driver myself? And if so, where do I find a makefile (or CCS .pjt) for doing it? There seems be a "makerules" folder where also a .mk file for the A15 exists, but I don't know how to make with such a file. I tried making with the instructions of "makerules_spec.pdf" but got errors too strange for me to understand.

    I am a bit disappointed because the installer did not create all the driver binaries and libs for me in the first place. Now I need to bother you there.

    Best regards,

    Ari

  • Hi,
    Please refer to the EDMA3 UG to build EDMA3 LIB in the following location.

    C:\ti\edma3_lld_02_11_13_17\packages\ti\sdo\edma3\drv\docs\EDMA3_Driver_User_Guide.pdf
  • Hello,

    I rebuilt all the drivers from the sources and finally succeeded in it. The compiler now finds the libraries after renaming them to "libedma***.a" and I guess they are compatible because the errors I had before all vanished.Thanks a lot for your help so far!

    I am using the following libraries:

    -L...packages/ti/sdo/edma3/drv/lib/a15/release \
    -L...packages/ti/sdo/edma3/rm/lib/generic/arm9/release \
    -L...packages/ti/sdo/edma3/drv/sample/lib/omapl138-evm/arm9/release \
    -lm -ledma3_lld_drv.aa15fg -ledma3_lld_rm.ae9 -ledma3_lld_drv_sample.ae9 \

    Are these right for my C66AK2H target (ARM Cortex-A15 CPU)? I am a bit curious about the ARM9 and especially OMAPL138, but if they are OK, then fine!

    My next problem is that the linker cannot find any of the EDMA_DRV functions. They all produce an error like:

    "undefined reference to 'EDMA3_DRV_open'"

    I am writing my code in C++ and I use the

    extern "C" when including the edma3 headers. Any ideas what might be wrong? Do I need the ".so" files already when linking or are the library-files enough in that phase? I have ccsv5, ccsv6, bios5 and bios6 installed. Can these conflict if I accidentally use some of the files from a different versions?

    BRS, Ari

  • Hi,
    You are right.
    We can't use "arm9" libraries for K2H platform since its arm cortex-a15.
    You can see "a8" folder in the same location, so atleast we could have "a15" folder for K2H platform.

    I'm not sure that we have EDMA3 LLD support for ARM Cortex-A15.
    Let me check with internal team and get back to you.

  • Hi,
    I managed to solve the previous problem. I had my makefile a bit wrongly formatted.
    Now I only have link problems with some functions, like

    "ti_sysbios_hal_Hwi_enableInterrupt__E"

    and complaints of using "VFP register arguments" in my code while the driver does not.

    I still would like to know if the libraries are the correct ones I asked in my previous post.

    Best regards,
    Ari
  • Hi,
    How about your SYS/BIOS (RTOS) version ?
  • Hi,
    I am lost with the versions where to find them.
    Under the /ti directory I have:
    bios_6_41_00_26
    ctoolslib_1_1_1_0
    mcsdk_bios_3_01_03_06
    mcsdk_linux_3_01_03_06
    xdctools_3_30_05_60
    xdctools_3_30_05_60_core6x

    I do not know about SYS/BIOS or RTOS. Sorry!
    Can you please tell me how to see if I have them installed at all and which versions they are.

    Regards, Ari
  • Hi,

    while waiting news from the ARM Cortex A15 support for the EDMA3 LLD driver I proceeded with the GPIO. It seems that there is no GPIO support either for the A15 in the MCSDK. Is this true? Is the MCSDK meant be used with the DSP cores only? And if so, then how am I supposed to use the EDMA3, GPIO and other peripherals in A15? Accessing the HW registers directly (=writing my own drivers) or? Fortunately this is not a big problem for me in doing so since I have been writing them for years for our earlier TI SoCs and have a lots of code ready for that. Basically I just modify the register addresses and that's it mostly. But it would still be a bit disappointment since I have spent days to work in belief there are drivers ready and easy to use.

    When concerning all this what worries me most is the TCP/IP support. I need to communicate with a PC from the A15 through the TCP/IP, but I guess I can use the ARM Linux kernel functions for that, right?

    Best regards,

    Ari

  • Hi,
    Your understanding is correct.
    For A15, we are running Linux on it and don't have bare or BIOS code for peripherals and having for DSP cores.
    Most of the customers preferred Linux for ARM and RTOS (SYS/BIOS) for DSP cores.

    You can refer this platform (DSP) code and try to use it for A15.
    C:\ti\pdk_keystone2_3_01_01_04\packages\ti\platform\evmk2h\platform_lib\src

    We have NDK examples for DSP cores and Linux would support ethernet (NETCP, 10GbE) for ARM.

    Please refer to the following link for keystone 2 Linux support.
    processors.wiki.ti.com/.../MCSDK_UG_Chapter_Exploring
  • Hello Titus,
    I have been playing with the linaro-arm-linux-gnueabihf compiler for a long time and become eventually more and more lost.
    Maybe it is better finally to ask the questions I should have probably asked in the very beginning since I am a newbie with this K2H EVM board:

    What is the best strategy to implement the following system in the K2H:
    1. One CPU must be dedicated doing rapid I/O and DMA transfers. Previously in my DaVinci board I used the ARM for this with no operating system at all.
    2. Three CPUs must run an algorithm for processing the data produced by the CPU mentioned above. Previously in my DaVinci board I used the DSP CPU for this with no operating system at all.

    Should the CPU of the point 1 above be also a DSP CPU or can it be ARM? Are both ARM CPUs reserved for Linux? I ask this because it begins to look like I cannot use ARM (Cortex A15) for my purposes at all because:
    - adding my own interrupt handlers is not allowed by the ARM Linux , should be a driver to do so and I don't want to write my own ARM Linux drivers (if not necessary)
    - there is no ARM Linux drivers for GPIO or DMA for Cortex A15

    To simplify all the questions above: Should I completely forget about the ARM and write all my code into the DSP using the MCDSK or can there be any use of the ARM for me other than it runs the Linux?

    Regards,
    Ari