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.

More NDK 2.2 issues - no example projects?

It looks like NDK 2.2 did away with the example projects (helloWorld, etc).

 

There are Windows-side apps in the winapps dir, but where are the target-side apps?

 

Anyways, to try to get around this I tried compiling the NDK 2.1 helloWorld app and got these errors:

 


**** Build of configuration Custom for project helloworld ****

C:\Program Files (x86)\Texas Instruments\ccsv4\utils\gmake\gmake -k all
'Building file: ../evm6472.tcf'
'Invoking: TConf Script Compiler'
"C:/Program Files (x86)/Texas Instruments/xdctools_3_20_06_81/tconf" -b -Dconfig.importPath="C:/Program Files (x86)/Texas Instruments/bios_5_41_02_14/packages;%NDK_INSTALL_DIR%/packages/ti/ndk/inc/tci;%NDK_INSTALL_DIR%/packages/ti/ndk/example/network/helloworld/common;;" "../evm6472.tcf"
js: "C:/Program Files (x86)/Texas Instruments/xdctools_3_20_06_81/include/utils.tci", line 582: Error: Can't find import file: 'helloworld.tci' (not found along 'C:\work\fourth_workspace\helloworld\Custom/../;C:/Program Files (x86)/Texas Instruments/bios_5_41_02_14/packages;c:\ccsv4\custom_ndk_2_20_08_24/packages/ti/ndk/inc/tci;c:\ccsv4\custom_ndk_2_20_08_24/packages/ti/ndk/example/network/helloworld/common;;;C:\Program Files (x86)\Texas Instruments\xdctools_3_20_06_81/include;C:\Program Files (x86)\Texas Instruments\xdctools_3_20_06_81/packages')
gmake: *** [evm6472cfg.cmd] Error 1
gmake: Target `all' not remade because of errors.
Build complete for project helloworld

 

What generates the projects .tci file? And is this the real cause of the error?

 

Thanks, Peter

  • Peter,

    The NDK 2.20 release only contains the core libraries.  It is now up to the SDK team to decide whether or not to include the standard NDK examples or not.  For the BIOS-MCSDK release, the team decided to just ship a demo application, since the demo basically covered the same features as the original NDK examples, plus a lot more.

    The demo app should be located here within your BIOS-MCSDK install:

    C:\Program Files\Texas Instruments\mcsdk_1_00_00_08\demos\evmc6472\hpdspua

     

    However, if you want to continue with what you have already tried (to build a NDK 2.1 example using the latest NDK 2.20), I've recently helped a customer do this for the DM648 hardware.

    Please see the forum post here in which I describe what I did to get the 2.1 example building with the new NDK 2.20 libraries.  I've also attached the updated example to the thread, too.  The changes you would need to make will be very similar to what was done for the DM648 example:

        http://e2e.ti.com/support/embedded/f/355/p/73846/292980.aspx#292980

    Steve

  • Hi Steve,

     

    It looks like the project you created for the other customer is set up for CCS v2. Is it a lot of work to import it into CCS v4?

     

    Peter

  • Hi Steve,

     

    So I went out on a limb and am trying to get helloWorld from NDK 2.1 to build using NDK 2.2. I'm pretty close (I didn't use your project as it is seems to be for an older version of CCS and it's for DM648, whereas I need it for 6472).

     

    So far I had to copy the src/hal tree from NDK 2.1 into NDK 2.2. But when linking helloWorld I have a number of unresolved errors:

     

    'Invoking: Linker'
    "C:/Program Files (x86)/Texas Instruments/ccsv4/tools/compiler/C6000 Code Generation Tools 6.1.19/bin/cl6x" -mv64+ -g -O2 --define=TYPES_BIOS --define=_INCLUDE_NIMU_CODE --define=_INCLUDE_IPv6_CODE --define=_NDK_EXTERN_CONFIG --diag_warning=225 -z -m"helloworld.map" --warn_sections -i"%NDK_INSTALL_DIR%/packages/ti/ndk/lib/c64plus/hal/" -i"%NDK_INSTALL_DIR%/packages/ti/ndk/lib/c64plus/" -i"C:/Program Files (x86)/Texas Instruments/ccsv4/tools/compiler/C6000 Code Generation Tools 6.1.19/lib" -i"C:/Program Files (x86)/Texas Instruments/ccsv4/tools/compiler/C6000 Code Generation Tools 6.1.19/include" -i"C:/Program Files (x86)/Texas Instruments/ccsv4/emulation/boards/evmc6472/bsl/lib" -i"C:/Program Files (x86)/Texas Instruments/bios_5_41_02_14/packages/ti/rtdx/lib/c6000" -i"C:/Program Files (x86)/Texas Instruments/bios_5_41_02_14/packages/ti/bios/lib" --reread_libs --xml_link_info="helloworld.xml" --rom_model -o "../bin/helloworld.out" -l"./evm6472cfg.cmd"  "./common/udpHello.obj" "./common/helloWorld.obj" "./evm6472/evminit.obj" "./nimu_eth.obj" "./evm6472cfg_c.obj" "./evm6472cfg.obj" "./csl_mdio.obj" -l"rts64plus.lib" -l"evm6472_bsl.lib" -l"hal_ser_stub.lib" -l"hal_timer_bios5.lib" -l"hal_userled_stub.lib" -l"miniPrintf.lib" -l"netctrl.lib" -l"nettool.lib" -l"os_bios5.lib" -l"stack.lib"
    <Linking>

     undefined        first referenced
      symbol              in file    
     ---------        ----------------
     _CSL_chipReadReg ./nimu_eth.obj 
     _HwPktClose      ./nimu_eth.obj 
     _HwPktInit       ./nimu_eth.obj 
     _HwPktOpen       ./nimu_eth.obj 
     _HwPktSetRx      ./nimu_eth.obj 
     _HwPktShutdown   ./nimu_eth.obj 
     _HwPktTxNext     ./nimu_eth.obj 
     __HwPktPoll      ./nimu_eth.obj 

    error: unresolved symbols remain
    error: errors encountered during linking; "../bin/helloworld.out" not built

    >> Compilation failure
    gmake: *** [../bin/helloworld.out] Error 1
    gmake: Target `all' not remade because of errors.
    Build complete for project helloworld

     

    I looked for HwPkt*  functions inside any of the HAL libs but could not find them. If I add the appropriate lib, I should be able to link successfully.

     

    Where can I find the lib to pass to the linker to resolve these references?

     

    Thanks, peter

  • Peter,

    My apologies for the previous post, you're right, that project was for CCSv3 and I didn't realize you were using CCSv4.

    I'm trying to understand why you're seeing those linker errors.  I see that the references to those undefined symbols are coming out of 'nimu_eth.obj'.  However, I am looking at the source code 'nimu_eth.c' and I don't see any references to those symbols.  Are you including 'nimu_eth.c' source file in your project?

    If so, I'm not sure that this is what you want to do.  I think the better option would be to link in the library 'nimu_eth.lib' instead.  Can you try that?

    You may want to follow the model of the c6472 demo app.  The demo project should have all libraries set up the same as you would need for your project.

    Also, if you still are stuck, can you  zip up your *entire* project and attach it to this forum?  Then I can have a look at exactly what you're doing.

    Steve

  • Hi Steve,

     

    I guess this is where my problem lies - I have no nimu_eth.lib. The NDK 2.2 does not come with the 6472 ethernet HAL. To get around this, I copied the src/hal dir from NDK 2.1 to NDK 2.2, into the same relative location. However, the build script doesn't build this branch. So then I just started copying HAL files from the NDK directly into my helloWorld project. I got it compiling copying all the HAL Ethernet source files into my project. But of course the correct way would be to have the HAL files built as part of the NDK, and then reference that built library from my project. I don't know enough about configuring the build environment in Eclipse to add the newly-added src/hal in my NDK - is this easy to do?

     

    BTW nimu_eth does contain references to the HwPkt* calls. ie. Line 172 of nimu_eth.c calls HwPktClose.

     

    To make a long story short, helloWorld is building fine now, but I would like to know how to build src/hal that I added into NDK 2.2 from 2.1, so that I only have to reference/link the library as you suggest.

     

    Peter

  • Peter,

    Sorry it took so long to get back to you on this.

    The nimu_eth.lib should be located within your MCSDK installation.

    I see that this library is in my computer here:

        C:\Program Files\Texas Instruments\mcsdk_1_00_00_08\packages\ti\platform\nimu\lib\nimu_eth.lib

    Do you see the library there?

    Steve

  • Steven,

    Im using MCSDK 1.0 build now which contains the NDK 2.2 version.

    I want to run a helloWorld program on my TI faraday board consisting of c6474 . Kindly support me with some examples of c6474 helloWorld programs for NDK 2.2 using SYS/BIOS 6.30 and CCSv4.2.0.

    Ive also downloaded the NSP 1.00.00.09 from http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/ndk/index.html for NDK 2.2 but this works for evm6478 DSP.

    I was using CCSv 4.1 and NDK 2.01.00 previously along with the c6474 NSP available for that NDK 2.01.00. The helloWorld program with that NSP was working great with the TI faraday board.

    KIndly provide me with the NSP for c6474 DSP so that i can compile the c6474 NSP for NDK 2.2 version on CCSv4.2 with SYS/BIOS 6.30

     

  • Peter, Santosh,

    BIOS MCSDK 1.0 actually includes NDK example projects. For C6474, then can be found in:

    C:\Program Files\Texas Instruments\mcsdk_1_00_00_08\packages\ti\platform\nimu\test\evm6474l

    Besides C6474, the other two C64x+ devices supported are C6472 and C6457.

    Hope this helps,

    Raj

     

  • Raj,

    Thanks for the help and i believe that this would help.

    I need to make some changes in the c6474 emac driver for my Board here since we use c6474 chipset on the CommAgility board, and need to make changes to the ethdriver.c as well as csl_mdio.c files. The MDIO line is missing in our board, so we would like to bypass this MDIO path.

    We had made the changes to the NSP provided for c6474 with NDK 2.0 and it all worked fine with NDK 2.0. These files were added to the project and re-build once again.

    How will i get these specific files for working with NDK 2.2 ? Can i use the same files which were used for NDK 2.0 ?

    will adding these files to the Project replace the functionality that is provided as part of the library ?

    Kindly address these issues.

    I would like the NSP if possible for c6474 just as TI has uploaded the NSP for c6748 at the NDK site.

    whom do i get in touch with ?

    Santosh

  • Santosh,

    In BIOS MCSDK 1.0 (http://software-dl.ti.com/sdoemb/sdoemb_public_sw/bios_mcsdk/latest/index_FDS.html), the NSP driver code are replaced by the CSL/EMAC/NIMU drivers, you can find the new driver code under:

    pdk_c64x_1_00_00_0x\packages\ti\csl

    pdk_c64x_1_00_00_0x\packages\ti\drv\emac

    mcsdk_1_00_00_0x\packages\ti\platform\nimu

    You need to merge your platform specific changes to the new CSL/EMAC/NIMU driver and then add the files merged into your project . Note that to bypass mdio, you may set the mdio_flag to FALSE when calling emac_open() API for the master core in the NIMU driver.

    The EMAC driver has a new set of APIs to make driver to be independent of NDK application, there are also some API changes in the CSL driver. For more details, please refer to the release notes and other design documents under the driver doc directory.

    Regards,

    Hao.

  • Santosh,

    For more information of the new EMAC LLD, see the Software Overview chapter of the online BIOS MCSDK User's Guide:
    http://processors.wiki.ti.com/index.php/BIOS_MCSDK_1.0_User_Guide

    There is also more detailed documentation in the EMAC LLD documentation set once you install the BIOS MCSDK software.

    Raj

  • Hao, Raj

    Thanks for the help relating to the examples relating to c6474.

    Well i will go thro the steps mentioned and check out the outcome on the board.

    Meanwhile can you please send me the link of the New CSLs released with the MCSDK 1.0 which are present under the PDK folder. It contains only the header and the library files, i would like to have a look at the sources too.

    Kindly send the link for the latest CSLs for c6474 used with MCSDK 1.0.

    Thanks

    Santosh

  • Santosh,

    The CSL sources are here:
    C:\Program Files\Texas Instruments\pdk_c64x_1_00_00_06\components\

    Regards,

    Hao.

  • Thanks Hao.

    But i cannot access this link. Is it behind a firewall or something, i dont have access to this site.

    Is there any other way from where i can get this CSL for c6474.

    Thanks
    Santosh

  • Santosh,

    There is no need to go to the individual component download page, we provide everything in MCSDK (in either MCSDK or CCS installers.) The CSL sources are here:
    C:\Program Files\Texas Instruments\pdk_c64x_1_00_00_06\components\

    Raj

  • Hi Hao,

    Thanks for the path for CSL sources which are a part of MCSDK 1.0 installation.

    I have checked out the same.

    One more query, in this latest release of NDK, if we want to make some changes to the sources of NDK, is it possible that just by including the source files as part of my helloWorld project and compiling it will take precedence over the actual functionality present in the NDK libraries? This was possible in NDK 2.01 where in when i include the NDK sources in the Project, it used to take precedence over the NDK libraries.

    Please confirm

    Regards

    Santosh

  • Santosh,

    Yes, that is right.

    Regards,

    Hao.

  • Hi Hao Zhang,

    Thanks for the timely help with NDK 2.2

    I have successfully compiled the Eth Driver library for c6474, the NIMU library, the Platform c6474 libraries and the helloWorld application by linking all these libraries as seen in the MCSDK workspace.

    The compilation and linking was successful. Im now doing the helloWorld program testing on the TI Faraday evm c6474 board by assigning an IP: 192.168.128.201.

    The problem here is that i cannot PING this ethernet interface IP: 192.168.128.201 (TI board IP).

    ---------------

    i get the following prints on the console:

    TCP/IP Stack 'Hello World!' Application

    emac_init: core 0, port 0, total number of channels/MAC addresses: 1/1

    MAC addresses configured for channel 0:

    00-24-BA-3A-0E-F2

    SGMII reset successful........

    SGMII config successful........

    emac_open core 0 port 0 successfully

    Registration of the EMAC Successful, waiting for link up ..

    Network Added: If-1:192.168.128.201

    Port 0 Link Status: 100Mb/s Full Duplex on PHY 1

    -----------

    Kindly let me know as to why the interface cannot be pinged ??

    Ive connected the evm c6474 on a 10/100 Mbps ethernet interface.

    Thanks

    Santosh

  • Hi Hao,

    Another update. The project which im building is :

    C:\Program Files\Texas Instruments\mcsdk_1_00_00_08\packages\ti\platform\nimu\test\evm6474l

    Regards

    Santosh

  • Santosh,

    From the log, I noticed that you were running the NDK on Core 0, and configuring the EMAC to use port 0 and channel 0, and the phy link status was also up. How did you connect your EVM with your PC, did you connect them in a private network via a 10/100Mbps switch? If not, try to do so and test it again.

    Did you change any code in the NIMU/EMAC/CSL driver in your project?

    Regards,

    Hao.

  • Yes . You are right, im running NDK on Core 0 and ive connected the EVM c6474 with my Host PC using an internal LAN network over 10/100Mbps switch.

    Ive assigned the IP to EVM as 192.168.128.201 and the Host Machine is set at IP: 192.168.128.200

    I have made some changes to the helloWorld.c file with regards to the uart, nand and tcsl configurations. Ive UNSET the Uart, Nand and TCSL flags in the EVM_Init() function present in the helloWorld.c file. I did this because the platform_init() function, was executing in the Function and not coming out of this function. When i halted the application, it was seen that it was looping around the IsFpgaReady() function.

    Do you think that i need to change the FPGA binary of the EVM ?

    After UNSETTING the flags, i was able to successfully come out of the platform_init() function, and the prints shown above were obtained, but i could not ping the EVM from the host machine.

    Im also attaching the helloWorld.c file with the changes made by me in EVM_init() function.

  • Here is the Helloworld example that is built with NDK2.2 and EMAC DRV in the MCSDK1.x  for Dual EVM 6474.Please use this as a reference for developing code in the DUAL EVM using MCSDK1.x and NDK2.2.

     

    http://processors.wiki.ti.com/images/0/05/NDK2_2_dual_evm6474.zip

     

    Thanks,

    Arun.