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.

[PDK] How to build NIMU with pdk_c667x_2_0_3

Hi,

I'm using the latest ProcSDK RTOS for C667x.
How can I build the code inside C:\ti\pdk_c667x_2_0_3\packages\ti\transport\ndk\nimu ?
There is no recipe for NIMU at top makefile.
So I tried the following command, but then xdc started to build NIMU for all of device, for example, AM57x, and etc, and it generates errors.

cd C:\ti\pdk_c667x_2_0_3\packages
set EDMA3LLD_BIOS6_INSTALLDIR=C:\ti\edma3_lld_2_12_01_25
pdksetupenv.bat
cd C:\ti\pdk_c667x_2_0_3\packages\ti\transport\ndk\nimu
xdc clean
xdc all

I just want to build NIMU only for C667x. And as you know, building NIMU is mandatory to fit the nimu driver into user's target board specification. Do you have any suggestion ?

Best Regards,
Naoki

  • Hi Naoki,

    Here are the steps I took to create an example nimu project:

    cd ~/ti/pdk_k2hk_4_0_2/packages
    source pdksetupenv.sh
    ./pdkProjectCreate.sh K2H all little nimu dsp

    As a result, I got the ccs project, generated in ~/ti/pdk_k2hk_4_0_2/packages/MyExampleProjects/NIMU_emacExample_EVMK2HC66BiosExampleProject

    In your case you should change the SoC from K2H to C6678, i.e. use:
    ./pdkProjectCreate.sh C6678 all little nimu dsp

    NOTE: I use linux, if your host pc is running windows, you should use the pdkProjectCreate.bat file.

    Hope this helps.

    Best Regards,
    Yordan
  • Yordan, Thanks for responding this but I'm not asking for generating the nimu CCS examples. I've already done it and it is working. I'm asking about the way to build nimu driver lib, not application code. Best regards Naoki
  • Can you please refer to this wiki page for rebuild the PDK of NIMU ?
    processors.wiki.ti.com/.../Rebuilding_The_PDK
    I haven't tried to build NIMU yet, tomorrow let me try and update you.
  • I think we can't build the NIMU as module like i2c, uart since its transport not drivers. So rebuilding the PDK didn't workout.
    Also I think we should modify the "~/ti/pdk_c667x_2_0_3/packages/ti/build/Rules.make" file to build the NIMU.

    PS: UPDATED

  • So what is the solution for this issue ? As I mentioned in early post, Re-Building NIMU transport is mandatory for NDK user's. I have some customers who are using NDK. The same question will be raised from them sooner or later.

    Best Regards,
    Naoki 

  • Tried to change lot of makefiles and declared the SOC and BOARD and nothing didn't workout.
    So I will check with dev team for this.
  • Hi Titus,

    Thank you so much for your help. Okay, please update me when you have progress on this.

    Best Regards,
    Naoki
  • Naoki,

    Could you please run C:\ti\pdk_c667x_2_0_3\packages\pdksetupenv.bat and then navigate to C:\ti\pdk_c667x_2_0_3\packages\ti\transport\ndk\nimu and run a gmake?

    This should rebuild the NIMU libs.

    Lali

  • Hi Lali,
    Thanks for replying.
    I have tried this already and not worked out. We would get "Nothing to be done for gmake" message.
    Any other suggestions please ?
  • Hi Titus,

    Could you also try xdc instead of gmake at C:\ti\pdk_c667x_2_0_3\packages\ti\transport\ndk\nimu ?

    Lali

  • Lali,

    Did you read my posts here ? I've already tried like this:

    cd C:\ti\pdk_c667x_2_0_3\packages
    set EDMA3LLD_BIOS6_INSTALLDIR=C:\ti\edma3_lld_2_12_01_25
    pdksetupenv.bat
    cd C:\ti\pdk_c667x_2_0_3\packages\ti\transport\ndk\nimu
    xdc clean
    xdc all

    This generates the errors. It seems xdc tries to build other processors, for example AM5xx. I just want to build NIMU only for C6678.

    Best Regards,
    Naoki

  • Naoki,

    I'm looking into this and will get back to you.

    Lali
  • Naoki,

    Could you please try this:

    In C:\ti\pdk_c667x_2_0_3\packages\ti\transport\ndk\nimu\config.bld

    Change the platforms section to the following.

    /* Create the SoC List  */
    var socs = { 
        /* device independent libraries */
        all :
        {
            /* Build this library */
            build: "true",
            /* SoC lib enabled */
            socDevLib: "false",
            /* Library options */
            copts: "",
            /* target lists, kept blank now, would be updated based on argument lists */
            targets: []
        },
        c6678 :
        {
            /* Build this library */
            build: "false",
           /* SoC lib enabled */
           socDevLib: "true",
           /* Library options */
           copts: "-DSOC_C6678 -DDEVICE_C6678",
           /* target list */
           targets: [ C66LE, C66BE],
           /* New variable */
           version: "v1"
        }
    };

    There is a problem here with the make steps that  will have to be looked into, but I'm trying to get you unblocked for now. Thanks for your patience.

    Lali

  • Hi Lali,

    Thanks for your help. I just tried your suggestion, ti.transport.ndk.nimu.ae66 and ti.transport.ndk.nimu.ae66e were generated on C:\ti\pdk_c667x_2_0_3\packages\ti\transport\ndk\nimu\lib\c6678\c66\release. But still I saw the following errors on my console window:

    cle66 src/v1/nimu_eth.c ...
    archiving obj/obj_e66/c6678/c66/release/obj/soc/src/v1/nimu_eth.oe66 into lib/c6
    678/c66/release/ti.transport.ndk.nimu.ae66 ...
    cle66e src/v1/nimu_eth.c ...
    archiving obj/obj_e66e/c6678/c66/release/obj/soc/src/v1/nimu_eth.oe66e into lib/
    c6678/c66/release/ti.transport.ndk.nimu.ae66e ...
    generating interfaces for package ti.transport.ndk.nimu (because package/package
    .xdc.inc is older than package.xdc) ...
    translating Settings
    sectti: not found
    xdctools_3_32_00_06_core\gmake.exe: *** [lib/c6678/c66/release/ti.transport.ndk.
    nimu.ae66_size.txt] Error 127

    As you noticed, there might be some problems in makefile. Please keep in touch with this issue and please let me know If you have any progress on this.

    Best Regards,
    Naoki
  • Naoki,

    Thanks for the feedback.
    I will file a bug report on this to have the development team take a look/fix.

    Please close this thread for now if you are ok with it. Thanks again for your patience.

    Lali
  • Naoki,

    Attached is my modified config.bld where I moved c6678 to the top of the list, the next is AM572x will fail but I don't care. Attached is my build log, as you can see that NIMU library is built for C6678. Hope this help! config.bld

    0456.buildlog.txt
    C:\ti\pdk_c667x_2_0_3\packages>dir
     Volume in drive C is OSDisk
     Volume Serial Number is C027-5E3C
    
     Directory of C:\ti\pdk_c667x_2_0_3\packages
    
    10/28/2016  05:06 PM    <DIR>          .
    10/28/2016  05:06 PM    <DIR>          ..
    10/04/2016  02:59 PM             3,835 API_Documentation.html
    10/04/2016  02:25 PM             1,056 macros.ini
    10/04/2016  02:25 PM             2,424 makefile
    10/04/2016  02:25 PM             2,052 pdkAppImageCreate.bat
    10/04/2016  02:25 PM             1,818 pdkAppImageCreate.sh
    10/28/2016  05:12 PM            22,490 pdkProjectCreate.bat
    10/04/2016  02:25 PM            20,221 pdkProjectCreate.sh
    10/28/2016  05:22 PM            13,608 pdksetupenv.bat
    10/04/2016  02:25 PM             9,717 pdksetupenv.sh
    10/28/2016  05:01 PM    <DIR>          ti
                   9 File(s)         77,221 bytes
                   3 Dir(s)  35,340,906,496 bytes free
    
    C:\ti\pdk_c667x_2_0_3\packages>pdksetupenv.bat
    Optional parameter not configured : CG_XML_BIN_INSTALL_PATH
    REQUIRED for xdc release build
    Example: set CG_XML_BIN_INSTALL_PATH=C:/ti/cg_xml/bin
    Optional parameter not configured : DOXYGEN_INSTALL_PATH
    REQUIRED for xdc release build
    Example: set DOXYGEN_INSTALL_PATH=C:/ti/Doxygen/doxygen/1.5.1-p1/bin
    **************************************************************************
    Environment Configuration:
        LIMIT_SOCS                : c667x
        LIMIT_BOARDS              : evmC6678
        PDK_INSTALL_PATH          : /ti/PD6029~1/packages/
        C6X_GEN_INSTALL_PATH      : C:/ti_6_1_3/ccsv6/tools/compiler/ti-cgt-c6000_8.
    1.0
        TOOLCHAIN_PATH_A15        : C:/ti_6_1_3/ccsv6/tools/compiler/gcc-arm-none-ea
    bi-4_9-2015q3
        TOOLCHAIN_PATH_A8         : C:/ti_6_1_3/ccsv6/tools/compiler/gcc-arm-none-ea
    bi-4_9-2015q3
        TOOLCHAIN_PATH_A9         : C:/ti_6_1_3/ccsv6/tools/compiler/gcc-arm-none-ea
    bi-4_9-2015q3
        TOOLCHAIN_PATH_M4         : C:/ti_6_1_3/ccsv6/tools/compiler/ti-cgt-arm_15.1
    2.1.LTS
        FPULIB_PATH               : C:/ti_6_1_3/ccsv6/tools/compiler/gcc-arm-none-ea
    bi-4_9-2015q3/lib/gcc/arm-none-eabi/4.9.3/fpu
        CROSS_TOOL_PRFX           : arm-none-eabi-
        XDC_INSTALL_PATH          : C:/ti/xdctools_3_32_00_06_core
        BIOS_INSTALL_PATH         : C:/ti/bios_6_45_01_29
        IPC_INSTALL_PATH          : C:/ti/ipc_3_43_02_04
        EDMA3LLD_BIOS6_INSTALLDIR : C:/ti/edma3_lld_2_12_01_25
        NDK_INSTALL_PATH          : C:/ti/ndk_2_24_03_35
        IMGLIB_INSTALL_PATH       : C:/ti/imglib_c66x_3_1_1_0
        UIA_INSTALL_PATH          : C:/ti/uia_2_00_03_43
    **************************************************************************
    Changing to short name to support directory names containing spaces
    current directory: /ti/PD6029~1/packages/
    PDK BUILD ENVIRONMENT CONFIGURED
    **************************************************************************
    
    C:\ti\PD6029~1\packages>cd ti
    
    C:\ti\PD6029~1\packages\ti>cd transport
    
    C:\ti\PD6029~1\packages\ti\transport>cd ndk/
    
    C:\ti\PD6029~1\packages\ti\transport\ndk>cd nimu
    
    C:\ti\PD6029~1\packages\ti\transport\ndk\nimu>xdc clean
    
    C:\ti\PD6029~1\packages\ti\transport\ndk\nimu>xdc
    making package.mak (because of package.bld) ...
    ************* nimu Socket Driver Build Information *************
    nimu Socket Driver Install      : TAR
    nimu Socket Driver LLD Version  : 1,0,0,2
    C66 Tools Directory             : C:/ti_6_1_3/ccsv6/tools/compiler/ti-cgt-c6000_
    8.1.0
    M4 Tools Directory              : C:/ti_6_1_3/ccsv6/tools/compiler/ti-cgt-arm_15
    .12.1.LTS
    A15 Tools Directory             : C:/ti_6_1_3/ccsv6/tools/compiler/gcc-arm-none-
    eabi-4_9-2015q3
    RTSC File Name                  : nimu_AM_1_0_0_2
    nimu Socket Driver LLD Path     : .
    CC LE opts                      : -mo -o3 -q -k -eo.o -DMEM_BARRIER_DISABLE
    CC BE opts                      : -mo -o3 -q -k -eo.o -DMEM_BARRIER_DISABLE
    M4 LE opts                      : -o4 -qq -pdsw255 -DMAKEFILE_BUILD
    A15 basic opts                  : -mno-unaligned-access -c -mtune=cortex-a15 -ma
    rm -DDRA7xx -gstrict-dwarf -Wall -D__ARMv7 -D_LITTLE_ENDIAN=1
    ****************************************************************
    Building directory src
    Building directory include
    Building directory example
    cle66 src/v1/nimu_eth.c ...
    archiving obj/obj_e66/c6678/c66/release/obj/soc/src/v1/nimu_eth.oe66 into lib/c6
    678/c66/release/ti.transport.ndk.nimu.ae66 ...
    cle66e src/v1/nimu_eth.c ...
    archiving obj/obj_e66e/c6678/c66/release/obj/soc/src/v1/nimu_eth.oe66e into lib/
    c6678/c66/release/ti.transport.ndk.nimu.ae66e ...
    cle66 src/v4/cpsw_nimu_eth.c ...
    "src/v4/cpsw_nimu_eth.c", line 15: fatal error: cannot open source file "ti/drv/
    emac/emac_drv.h"
    1 catastrophic error detected in the compilation of "src/v4/cpsw_nimu_eth.c".
    Compilation terminated.
    
    >> Compilation failure
    gmake.exe[1]: *** [obj/obj_e66/am572x/c66/release/obj/soc/src/v4/cpsw_nimu_eth.o
    e66] Error 1
    gmake.exe: *** [lib/am572x/c66/release/ti.transport.ndk.nimu.ae66] Error 2
    
    C:\ti\PD6029~1\packages\ti\transport\ndk\nimu>

    Regards, Eric