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.

How to rebuild pdk libraries for c6678



I have been trying to build the pdk libraries or the pa library but am not quite sure of the process to do so. Any help in this regards please.

Thanks, Aamir

  • I am assuming you are using TIcc67x device. The example CCS projects are available. Please browse to this directory.

    ..\pdk_C6678_1_0_0_17\packages\ti\drv\exampleProjects

    In the CCS development env. , you can import any project, build, load and run.

    Please ensure you have latest MCSDK, which is available at

    http://software-dl.ti.com/sdoemb/sdoemb_public_sw/bios_mcsdk/latest/index_FDS.html

    And use CCSv5.1.

     

    Let us know what else you need. Thanks.

  • Varada,

    I am familiar with making the different example projects. I have modified an example project for my use case which requires me to program multiple LUT2 rules in the packet accelerator module. The problem is the pa code has some #defines in the pa.h file that need to be modified, the pa lld library rebuilt and then the pa binary file for the library reloaded for me to exercise the appropriate Pa_setCustomLUT2 and Pa_addCustomLUT2 functions. What I need help in is figuring out how to go about making use of xdc etc and building libraries within the pdk directory hierarchy structure.

    Appreciate your kind response as without the pa changes I cannot test my PA api calls. Thanks, Aamir

  • Aamir - I understand your Question now and will try to get the details of the build environment for PDK LLDs, ASAP.

     

  • Aamir,

    BIOS MCSDK UG has a section to describe how to rebuild the LLD libraries and CSL.

    http://processors.wiki.ti.com/index.php/BIOS_MCSDK_2.0_User_Guide#Building_CSL_and_the_Low_Level_Device_Drivers

    Can you please go through this and let us know if it helps?

    -Aravind

  • Aravind,

    I have tried the steps outlined in the BIOS MCSDK userguide.

    I first setup the ENV variables needed for the pdksetupenv.bat and got that to run successfully.

    I then tried the pdkbuilder.bat and got errors (attached below is a condensed version when I just tried gmake -C ti/csl LIBDIR=./lib all).

    From my read of the errors it would appear that the cl6x fails to create the *.oe66 files from the *.c files. It then later complains about the missing file *.oe66 as it should.

    Any ideas on what may be wrong.

    Thanks, Aamir

  • Sorry forgot to include the error message.............

    Thanks, Aamir

    gmake: Entering directory `C:/Program Files/Texas Instruments/pdk_C6678_1_0_0_14
    /packages/ti/csl'
    gmake -f ./lib/ti.csl.intc.ae66.mk lib/ti.csl.intc.ae66
    gmake[1]: Entering directory `C:/Program Files/Texas Instruments/pdk_C6678_1_0_0
    _14/packages/ti/csl'
    cle66 src/intc/_csl_intcCombEventDispatcher.c ...
    if [ ! -d lib/src/intc ]; then mkdir -p lib/src/intc ; fi;
    rm -f lib/src/intc/_csl_intcCombEventDispatcher.oe66.dep
    /bin/cl6x -c --strip_coff_underscore -mo -o3 -q -k -eo.o -DC6678 -mv6600 --abi=e
    abi -i./src/intc -i.  -Dti_targets_elf_C66  -DMAKEFILE_BUILD -eo.oe66 -ea.se66 -
    fr=lib/src/intc -fs=lib/src/intc -ppa -ppd=lib/src/intc/_csl_intcCombEventDispat
    cher.oe66.dep -I. -I../../.. -IC:\Program\ Files\Texas\ Instruments\xdctools_3_2
    2_01_21/packages -IC:\PROGRA~1\TEXASI~1\PDK_C6~3\packages\ti\drv\/. -I/include -
    IC:\Program\ Files\Texas\ Instruments\edma3_lld_02_11_02_04/packages -I/. -I/. -
    I../.. -fc src/intc/_csl_intcCombEventDispatcher.c
    process_begin: CreateProcess(NULL, /bin/cl6x -c --strip_coff_underscore -mo -o3
    -q -k -eo.o -DC6678 -mv6600 --abi=eabi -i./src/intc -i. -Dti_targets_elf_C66 -DM
    AKEFILE_BUILD -eo.oe66 -ea.se66 -fr=lib/src/intc -fs=lib/src/intc -ppa -ppd=lib/
    src/intc/_csl_intcCombEventDispatcher.oe66.dep -I. -I../../.. "-IC:\Program File
    s\Texas Instruments\xdctools_3_22_01_21/packages" -IC:\PROGRA~1\TEXASI~1\PDK_C6~
    3\packages\ti\drv\/. -I/include "-IC:\Program Files\Texas Instruments\edma3_lld_
    02_11_02_04/packages" -I/. -I/. -I../.. -fc src/intc/_csl_intcCombEventDispatche
    r.c, ...) failed.
    make (e=2): The system cannot find the file specified.
    gmake[1]: *** [lib/src/intc/_csl_intcCombEventDispatcher.oe66] Error 2
    gmake[1]: Leaving directory `C:/Program Files/Texas Instruments/pdk_C6678_1_0_0_
    14/packages/ti/csl'
    gmake: *** [lib/ti.csl.intc.ae66] Error 2
    gmake: Leaving directory `C:/Program Files/Texas Instruments/pdk_C6678_1_0_0_14/
    packages/ti/csl'

  • I figured out the problem. I had incorrectly set the C6X_GEN_INSTALL_PATH and so the gmake was not able to make.

    I looked at all the paths I had set and redid the pdk setup of the environment again.

    Thanks, Aamir

  • Glad to hear that your issue is resolved. I was about to suggest the same thing (Check the env for the build).

    -Thanks,

    Aravind

  • Aravind,

    I was able to compile the pa library but in the directory pdk_C6678_1_0_0_14\packages\ti\drv\pa\fw\ are a couple of .c files which I was hoping would get regenerated as those are PDSP instructions that get downloaded from the host CPU to the PA PDSPs. Those *.c files need to be updated to take in the new values in the pa.h file.

    Looking at the file module.xs in the fw directory it is called by the package.bld file in the directory pdk_C6678**\packages\ti\drv\pa

    I tried to xdc XDCARGS="SETUP" release and got the following errors:

    Is there a way I can bypass all of this stuff and just regenerate just those 4 files in the fw subdirectory. Also Is there any documentation that explains a little about all of these different files like config.bld, xdc etc?

    C:\Program Files\Texas Instruments\pdk_C6678_1_0_0_14\packages\ti\drv\pa>xdc XDC
    ARGS="SETUP" release
    making package.mak (because of package.bld) ...
    ************* PA LLD Build Information *************
    PA LLD Install             : SETUP
    PA LLD Version             : 1,1,0,10
    Tools Directory            : C:/Program Files/Texas Instruments/ccsv5/tools/comp
    iler/C6000
    RTSC File Name             : palld_C6678L_1_1_0_10
    PA LLD Path                : .
    Coverity Analysis          : OFF
    C66  LE opts               : -mo -o3 -q -k -eo.o
    C66  BE opts               : -mo -o3 -q -k -eo.o -DBIGENDIAN
    ***********************************************************
    Building directory src
    Building directory docs
    Building directory fw
    Building directory example
    Building directory test
    package.mak:197: warning: overriding commands for target `lib/ti.drv.pa.ae66'
    makefile:68: warning: ignoring old commands for target `lib/ti.drv.pa.ae66'
    package.mak:210: warning: overriding commands for target `lib/ti.drv.pa.ae66e'
    makefile:77: warning: ignoring old commands for target `lib/ti.drv.pa.ae66e'
    generating interfaces for package ti.drv.pa (because package/package.xdc.inc is
    older than package.xdc) ...
        translating Settings
    cle66 package/package_ti.drv.pa.c ...
    cle66 src/pa.c ...
    cle66 src/painit.c ...
    archiving package/lib/./lib/ti.drv.pa/package/package_ti.drv.pa.oe66 package/lib
    /./lib/ti.drv.pa/src/pa.oe66 package/lib/./lib/ti.drv.pa/src/painit.oe66 into li
    b/ti.drv.pa.ae66 ...
    cle66e package/package_ti.drv.pa.c ...
    cle66e src/pa.c ...
    cle66e src/painit.c ...
    archiving package/lib/./lib/ti.drv.pa/package/package_ti.drv.pa.oe66e package/li
    b/./lib/ti.drv.pa/src/pa.oe66e package/lib/./lib/ti.drv.pa/src/painit.oe66e into
     lib/ti.drv.pa.ae66e ...
    ----------------------------
    PA LLD Eclipse Plugin Generation
    js: "C:/Program Files/Texas Instruments/xdctools_3_22_01_21/packages/xdc/xdc.tci
    ", line 337: xdc.services.global.XDCException: xdc.PACKAGE_NOT_FOUND: can't loca
    te the package 'xdc.tools.eclipsePluginGen' along the path: '../../..;C:/PROGRA~
    1/TEXASI~1/xdctools_3_22_01_21/packages;C:/PROGRA~1/TEXASI~1/PDK_C6~3/packages/t
    i/drv//.;C:/PROGRA~1/TEXASI~1/ccsv5/tools/compiler/C6000/include;C:/PROGRA~1/TEX
    ASI~1/edma3_lld_02_11_02_04/packages;C:\Program Files\Texas Instruments\xdctools
    _3_22_01_21/packages;C:/Program Files/Texas Instruments/pdk_C6678_1_0_0_14/packa
    ges/ti/drv/pa/./../../..;'. Ensure that the package path is set correctly.
    gmake.exe: *** [eclipse_plugin_generation] Error 1

    Thanks, Aamir

  • Hi, Aamir:

    All the files under pa/fw are binary release of the PASS firmware.
    You do not need to rebuild them.

    If you want to rebuild the PA LLD library, just use the makefile or type "xdc".

    If I answer your question, please click "verify answer" button.

    Best regards,

    Eric

     

     

     

     

     

     

     

  • Eric,

    I had rebuilt the pa lld library using the pdkbuilder.bat but my code only works for the first 4 custom LUT2 entries. I also tried using xdc in the pa directory. I changed the number of max custom LUT2 entries from 4 to 16 in the pa.h file.

    In the download PA firmware section it includes the classify1.c etc files in the function for pdsp 0, 1, 2. Here is my code snippet will calls to functions addMac, addIp and ConfigPort and addPort. Config port does the setCustomLUT2 and addPort does the addCustomLUT2. In the setCustomLUT2 it uses custIndex=0 and in the addCustomLUT2 it makes use of index 0 to 7 with the match changing for each entry. When I sent UDP packets in the port range 0x8000 to < -x8100 they get through to the host. similarly when i do x8100 to <0x8200 all the way to 0x8300 to <8x8400 they get through. However, packets for 0x8400 to <0x8800 do not get through. Which signifies to me the entries 4, 5, 6, 7 in teh custom LUT2 are not setup correctly.

    Thanks, Aamir

    UInt8destIpAddress[16] = { 0x0a, 0x00, 0x03, 0x17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
    UInt8destIpv6Address[16] = { 0xfd, 0x5d, 0xd5, 0x0a, 0x8c, 0x17, 0, 0x3, 0, 0, 0, 0, 0, 0, 0, 0x17 };
    UInt16byteOffsets[pa_NUM_BYTES_CUSTOM_LUT2] = { 2, 3, 4, 5 };

    UInt8byteMasks[pa_NUM_BYTES_CUSTOM_LUT2] = { 7, 0, 0, 0 };
    UInt8match[pa_NUM_BYTES_CUSTOM_LUT2] = { 0, 0, 0, 0 };

    if(Add_MACAddress () != 0){

    return -1;

    }

    if(Add_IPAddress (17,pa_IPV4,0,destIpAddress) != 0){

    return-1;

    }

    /* Add the port numbers on which our application is going to listen on */

    if(Config_Port (0, byteOffsets, byteMasks) != 0){

    return -1;

    }

    for(i=0; i<8; i++) {

    match[0] = i;

    if(Add_Port (i, 0, match) != 0){

    return -1;

    }

    }

  • Hi, Aamir:

    The PDSP firmware is provided as a binary array which does not change by rebuilding the PA LLD libraries.
    /**
     *   @brief  The maximum number of LUT2 Custom Types supported
     */
    #define pa_MAX_CUSTOM_TYPES_LUT2   4

    The constant pa_MAX_CUSTOM_TYPES_LUT2 defines number of customLUT2 types, not entries.
    You code looks right to me.
    Can you re-run your test case with c6678(c6670) simulator with logging enabled and send me the log file?!

    To enable log: Add the following lines under MODULE PASS at the corresponding simulator configuration file tisim_c667x_pv.cfg at simulation_csp_ny/bin/configurations:
                INPUT5  log_file,      pass.log;
                INPUT6  sys_stream_trace_level,  1;
                INPUT7  pa_lut1_trace_level,     1;
                INPUT8  pa_lut2_trace_level,     1;
                INPUT9  pa_cde_trace_level,      0;
                INPUT10 sa_php_trace_level,      0;

    The log file is available under simulation_csp_ny/env/ccs/drivers

    Best regards,

    Eric

     

     


     


     


     

  • Eric Ruei wrote the following post at 03-13-2012 8:32 AM:

    Hi, Aamir:

    The PDSP firmware is provided as a binary array which does not change by rebuilding the PA LLD libraries.

    Okay, I get that the PDSP code is provided as a binary and the pa.c file that is provided in the pa directory is for use by the pa lld in preparing the command for the pa.

    /**
     *   @brief  The maximum number of LUT2 Custom Types supported
     */
    #define pa_MAX_CUSTOM_TYPES_LUT2   4

    The constant pa_MAX_CUSTOM_TYPES_LUT2 defines number of customLUT2 types, not entries.

    yes, that is what I meant, I was loose with the use of the definitions.


    You code looks right to me.
    Can you re-run your test case with c6678(c6670) simulator with logging enabled and send me the log file?!

    I will try making use of the simulator and have UDP packets sent to it. Once I have that working, I can try adding your suggested additions. However, I was shying away from using simulator for bugs and other issues. I take it there is no means to enable some kind of internal logging like behaviour of the PA on the EVM.


    To enable log: Add the following lines under MODULE PASS at the corresponding simulator configuration file tisim_c667x_pv.cfg at simulation_csp_ny/bin/configurations:
                INPUT5  log_file,      pass.log;
                INPUT6  sys_stream_trace_level,  1;
                INPUT7  pa_lut1_trace_level,     1;
                INPUT8  pa_lut2_trace_level,     1;
                INPUT9  pa_cde_trace_level,      0;
                INPUT10 sa_php_trace_level,      0;

    The log file is available under simulation_csp_ny/env/ccs/drivers

    Best regards,

    Eric

  • Eric,

    I have tried linking in the pass.log. I just did it prior to sending out any packets from the host DSP as that should show you the setup of the PA. My read of the log file indicates that the LUT entries from 4 to 7 were not added. I am not as yet familiar enough to say more from it. I can also send you the logs after i send out 10 packets from the host DSP to be looped back through the PA to the host.

    Thanks, Aamir 

    7651.pass.log

  • Hi, Aamir:

    Can you send me the code that shows how you call Pa_addCustomLUT2()?
    I believe that there is something wrong how you call Pa_addCustomLUT2()?

    The parameter custIndex should be set to 0 for all custom LUT2 entries.

    Best regards,

    Eric

     

     

     

     

     

  • You are right! I pass custIndex into my addPort function and I use that as the custIndex in the Pa_addCustomLUT2 call as the 2nd parameter and also the custIndex handle. I though this index referred to the entry in the LUT2 table in the explanation as mentioned in the pa.h for the Pa_addCustomLUT2 i.e.  "This command is called to add a specific entry to the L4 (LUT2) lookup table. This function is called once per desired custom LUT2 match criteria.". So since I was adding 8 entries to the LUT2 lookup table, one for each match criteria, I was incrementing custIndex for each match criteria.

    I think I get it now - The custIndex is only for the custom Index of the custom LUT2 table and the actual entries are manually assigned by the PA sequentially I guess without any say from the host DSP so I should have custIndex=0 for all match entries in the call below.

    parameters for the Pa_addCustomLUT2 are:
                                custIndex,
                                match,
                                gPaL3Handles [ipLink],
                                FALSE,                      /* New Entry required */
                                &routeInfo,
                                gPaL4Handles[custIndex],
                                (paCmd_t) pHostDesc->buffPtr,
                                &cmdSize,
                                &cmdReplyInfo,
                                &cmdDest);

  • Hi, Aamir:

    Yes, you are right.
    The PASS supports multiple customLUT2 types, each one of them specifies different sets of offset and mask arrays.
    There can be a lot of entries for each custom type.

    If your question is answered, could you please click "verify answer" to close this thread?!

    Best regards,

    Eric

     

     

     

     

     

  • Eric,

    Thanks a lot for your help in this regards. I may have questions down the road on the log package as it appears really helpful in debugging the behaviour of the PA as I add all the custom LUT2 rules I need to handle ICMP and UDP for IPV4 and IPV6.

    Thanks again. Aamir

  • hi~
    I encountered the same error with you. I checked all the settings, there is no problem. Would you please tell me how to fix this error?
    Here is my settings:
    Configuring PDK Build Environment
    CGTOOL INSTALL Directory F:\ti\ccsv5\tools\compiler\c6000_7.4.2
    PDK Directory F:\ti\pdk_C6678_1_1_2_6\packages\ti\drv
    PDK BUILD ENVIRONMENT CONFIGURED
    Thanks!
  • Hi Steve,
    To get your question answered and tracked better can you make a fresh post for your issue?

    Thanks,
    Moses