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.

66ak2h14: use QMSS LLD on ARM core

Other Parts Discussed in Thread: 66AK2H14

Hi,

I am new to using the using the Keystone II. My current goal is to compile and use the LLDs on the ARM cores running Linux. Particularly the QMSS LLD. I have found minimal documentation on building the MCSDK for the 66ak2h14. Most links redirect me to C66 DSP instructions... 

So far on my workstation:

-I have setup the ARM Linux cross compiler and have successfully built/ran a hello world file. 

-I have downloaded mcsdk 3_01_04_07.  

-I have setup the Linux DevKit using arago-2015.05-cortexa15-linux-gnueabi-mcsdk-sdk-i686.sh installing in the default directory (/usr/local/arago-2015.05)

-I think I have setup the MCSDK libraries for ARM linux by configuring the armv7setupenv.sh in pdk_keystone2_3_01_04_07/packages. I don't see an A15 setup file, so I am hoping changing the config will be ok... (please correct me if this is incorrect). I updated the CROSS_TOOL_INSTALL_PATH and LINUX_DEVKIT_INSTALL_PATH.

-I then did: source armv7setupenv.sh, make clean, make as per instructions. No errors.

The libraries were created in /usr/local/arago-2015.05/sysroots/cortexa15t2hf-vfp-neon-linux-gnueabi/usr/lib as I expected.

Issue:

Upon making a simple hello world file that simply includes a couple qmss headers:

#include <stdio.h>
#include <stdint.h>
#include <ti/drv/qmss/qmss_qm.h>

int main()
{
printf("Hello World!\n");
return 0;
}

arm-linux-gcc -L /usr/local/arago-2015.05/sysroots/cortexa15t2hf-vfp-neon-linux-gnueabi/usr/lib -I /usr/local/arago-2015.05/sysroots/cortexa15t2hf-vfp-neon-linux-gnueabi/usr/include hello_qmss.c -lqmss_qm hello_qmss.c

Results in many unknown type errors such as:

/usr/local/arago-2015.05/sysroots/cortexa15t2hf-vfp-neon-linux-gnueabi/usr/include/ti/csl/cslr_cp_timer16.h:53:5: error: unknown type name ‘Uint32’
/usr/local/arago-2015.05/sysroots/cortexa15t2hf-vfp-neon-linux-gnueabi/usr/include/ti/csl/cslr_cp_timer16.h:54:5: error: unknown type name ‘Uint32’
/usr/local/arago-2015.05/sysroots/cortexa15t2hf-vfp-neon-linux-gnueabi/usr/include/ti/csl/cslr_cp_timer16.h:55:5: error: unknown type name ‘Uint32’

Any idea what could be causing this?

Are there any examples that are similar to this? Are there examples specific to running LLDs on ARM linux? Most I have seen are for the C66 DSP cores.

Thank you,

-Dan

  • Hi Dan,

    This has been forwarded to the design team. Their feedback will be posted here.

    Best Regards,
    Yordan
  • Hi,

    After searching through some of the include files of the LLD, I noticed a define of "__ARMv7" that would reveal the typedefs that I was getting errors for. When I compile with this, I have no errors. 

    I did not see any examples or guides mentioning this. Are there examples? More detailed instructions? 

    -Dan

  • Continuing on...

    I attempted to call a function from the qmss library:

    // Allocate message queue
    msg_queue = Qmss_queueOpen(Qmss_QueueType_GENERAL_PURPOSE_QUEUE,QMSS_PARAM_NOT_SPECIFIED,&is_allocated);
    if(msg_queue < 0)
    {
    printf ("Failed to allocate QMSS message queue.\n");
    return -1;
    }

    Now I get the following errors:

    arm-linux-gnueabihf-gcc-4.7.3 -I/usr/local/arago-2015.05/sysroots/cortexa15t2hf-vfp-neon-linux-gnueabi/usr/include -D __ARMv7 -o hello_qmss hello_qmss.o -L /usr/local/arago-2015.05/sysroots/cortexa15t2hf-vfp-neon-linux-gnueabi/usr/lib -lqmss
    /home/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/bin/../lib/gcc/arm-linux-gnueabihf/4.7.3/../../../../arm-linux-gnueabihf/bin/ld: skipping incompatible ../../lib/libc.so.6 when searching for ../../lib/libc.so.6
    /usr/local/arago-2015.05/sysroots/cortexa15t2hf-vfp-neon-linux-gnueabi/usr/lib/libqmss.so: undefined reference to `Osal_qmssCsExit'
    /usr/local/arago-2015.05/sysroots/cortexa15t2hf-vfp-neon-linux-gnueabi/usr/lib/libqmss.so: undefined reference to `Osal_qmssAccCsEnter'
    /usr/local/arago-2015.05/sysroots/cortexa15t2hf-vfp-neon-linux-gnueabi/usr/lib/libqmss.so: undefined reference to `Osal_qmssBeginMemAccess'
    /usr/local/arago-2015.05/sysroots/cortexa15t2hf-vfp-neon-linux-gnueabi/usr/lib/libqmss.so: undefined reference to `Osal_qmssAccCsExit'
    /usr/local/arago-2015.05/sysroots/cortexa15t2hf-vfp-neon-linux-gnueabi/usr/lib/libqmss.so: undefined reference to `Osal_qmssEndMemAccess'
    /usr/local/arago-2015.05/sysroots/cortexa15t2hf-vfp-neon-linux-gnueabi/usr/lib/libqmss.so: undefined reference to `Osal_qmssCsEnter'
    collect2: error: ld returned 1 exit status
    make: *** [hello_qmss] Error 1

    This seems to not like the architecture this library is compiled for. Have I made an error in the library build script? Do I need to add different paths to alternate versions of these libraries?
  • Update:

    I have built several examples in the PDK that use the QMSS LLD. Each example I have seen has its own folder containing osal and mem functionality (allowing QMSS to link). Is there a reason why this is part of the example code and not built into the QMSS LLD?

    Most of the osal functions I have seen are empty, have the comments including "STUB function. TBD", and then return. Why is this? Are there any examples that have these functions completed?

  • Hi, Dan,

    Did you follow the build guide in MCSDK User's Guide for Keystone-2? If not, please try with the isntruction in "Build Guidelines for ARM User Mode LLDs" in

    http://processors.wiki.ti.com/index.php/MCSDK_UG_Chapter_Developing_PDK

    Rex

  • Hi Rex,

    Yes I have followed the instructions on that web page.

    As I mentioned in my previous reply, I have been able to build the LLDs and the examples. 

    When I went to make my own application however it would not build because it could not find various OSAL functions to link. I assumed these would have been included in the LLD. I included "fw_osal" and "fw_mem_allocator" files used in a folder of an example to allow my application to now link.

    Why are the OSAL functions not part of the LLD?

    Also, are they fully functional? I see many of them with a "STUB function. TBD" comment.

    -Dan 

  • Hi, Dan,

    fw_osal.c is our test code and is not part of QMSS LLD function. Only some components, not all, in PDK support ARM User Mode.

    Rex