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.

C6670 NDK例程“hello”问题和修改NIMU驱动问题



 我用的是6670,用的自己的开发板,使用官方提供的helloworld 例程 实现DSP和PC 之间的通信。按照合作方提供的资料,我需要修改platform.c的程序。与TI提供的源代码相比,不同点在于:

TI源代码为:

#pragma DATA_SECTION(emac_port_mode,"platform_lib");

PLATFORM_EMAC_PORT_MODE emac_port_mode[PLATFORM_MAX_EMAC_PORT_NUM] =

{

    PLATFORM_EMAC_PORT_MODE_AMC,

    PLATFORM_EMAC_PORT_MODE_PHY

};

我所用的开发板的合作方提供的代码为:

PLATFORM_EMAC_PORT_MODE emac_port_mode[PLATFORM_MAX_EMAC_PORT_NUM] =

{

                   PLATFORM_EMAC_PORT_MODE_PHY,

                   PLATFORM_EMAC_PORT_MODE_NONE

};

这个差别会导致gTxPort不同,我想问一下gTxPort代表有什么含义呢?值不同会影响程序运行吗?

我看到社区有人提到 “C6678 NDK例程“client”问题和修改NIMU驱动问题”www.deyisupport.com/.../140854.aspx

题主使用下面的方法修改程序:

    我先新建一个工作空间,然后倒入这3个工程,依次编译(出现编译错误后,就添加或修改路径),然后下载。我先试着修改mimu_eth.c 中EMACInit_Core()函数的一个打印语句。原先为platform_write ("PASS successfully initialized \n"); 我修改为platform_write ("PASS successfully \n");但是程序运行后发现打印出来的依然是PASS successfully initialized。这说明我的修改没有成功啊。恳请得到大家的帮助。

  • 1,PORT属性取决于您的硬件板EMAC端口配置,_PHY是指EMAC 端口外部挂接的是PHY芯片,您看下你的硬件板 PORT0外面接的是PHY还是说SGMII直联,如果是SGMII直联,那么需要选择SGMII方式

    2,可能您编译的时候链接的还是老lib,确认下链接上的是新lib吧,可以看下编译时间

  •   非常感谢Thomas Yang1的回答。我想请问一下, 我应该在那儿设置连接新的lib文件呢?

  • 选择工程,点击右键,在ccs编译属性里面,build 目录下,C6000 link 项中选择File search path 设置文件名和路径即可

  • 您好!我遇到的情况是这样的。我的file search path 里面只有一个“lib.a”文件

    我的platform_libevmc6670l 文件编译结果如下。我该添加什么文件和路径呢?非常感谢你的回答。

    **** Build of configuration Debug for project platform_lib_evmc6670l ****

    "D:\\ti\\ccsv5\\utils\\bin\\gmake" -k all
    'Building file: ../src/evm66x_i2c.c'
    'Invoking: C6000 Compiler'
    "D:/ti/c6000 Code generation tool 7.4.2/bin/cl6x" -mv6600 -g --include_path="D:/ti/c6000 Code generation tool 7.4.2/include" --include_path="G:/hello/platform_lib_evmc6670l/include" --include_path="G:/" --include_path="D:/ti/pdk_C6670_1_0_0_17/packages" --include_path="D:/ti/pdk_C6670_1_0_0_17/packages/ti/platform" --include_path="D:/ti/pdk_C6670_1_0_0_17/packages/ti/csl" --include_path="G:/" --diag_warning=225 --big_endian --abi=eabi --preproc_with_compile --preproc_dependency="src/evm66x_i2c.pp" --obj_directory="src" "../src/evm66x_i2c.c"
    'Finished building: ../src/evm66x_i2c.c'
    ' '
    'Building file: ../src/evm66x_nand.c'
    'Invoking: C6000 Compiler'
    "D:/ti/c6000 Code generation tool 7.4.2/bin/cl6x" -mv6600 -g --include_path="D:/ti/c6000 Code generation tool 7.4.2/include" --include_path="G:/hello/platform_lib_evmc6670l/include" --include_path="G:/" --include_path="D:/ti/pdk_C6670_1_0_0_17/packages" --include_path="D:/ti/pdk_C6670_1_0_0_17/packages/ti/platform" --include_path="D:/ti/pdk_C6670_1_0_0_17/packages/ti/csl" --include_path="G:/" --diag_warning=225 --big_endian --abi=eabi --preproc_with_compile --preproc_dependency="src/evm66x_nand.pp" --obj_directory="src" "../src/evm66x_nand.c"
    'Finished building: ../src/evm66x_nand.c'
    ' '
    'Building file: ../src/evmc6670.c'
    'Invoking: C6000 Compiler'
    "D:/ti/c6000 Code generation tool 7.4.2/bin/cl6x" -mv6600 -g --include_path="D:/ti/c6000 Code generation tool 7.4.2/include" --include_path="G:/hello/platform_lib_evmc6670l/include" --include_path="G:/" --include_path="D:/ti/pdk_C6670_1_0_0_17/packages" --include_path="D:/ti/pdk_C6670_1_0_0_17/packages/ti/platform" --include_path="D:/ti/pdk_C6670_1_0_0_17/packages/ti/csl" --include_path="G:/" --diag_warning=225 --big_endian --abi=eabi --preproc_with_compile --preproc_dependency="src/evmc6670.pp" --obj_directory="src" "../src/evmc6670.c"
    'Finished building: ../src/evmc6670.c'
    ' '
    'Building file: ../src/evmc6670_phy.c'
    'Invoking: C6000 Compiler'
    "D:/ti/c6000 Code generation tool 7.4.2/bin/cl6x" -mv6600 -g --include_path="D:/ti/c6000 Code generation tool 7.4.2/include" --include_path="G:/hello/platform_lib_evmc6670l/include" --include_path="G:/" --include_path="D:/ti/pdk_C6670_1_0_0_17/packages" --include_path="D:/ti/pdk_C6670_1_0_0_17/packages/ti/platform" --include_path="D:/ti/pdk_C6670_1_0_0_17/packages/ti/csl" --include_path="G:/" --diag_warning=225 --big_endian --abi=eabi --preproc_with_compile --preproc_dependency="src/evmc6670_phy.pp" --obj_directory="src" "../src/evmc6670_phy.c"
    'Finished building: ../src/evmc6670_phy.c'
    ' '
    'Building file: ../src/evmc66x_ecc.c'
    'Invoking: C6000 Compiler'
    "D:/ti/c6000 Code generation tool 7.4.2/bin/cl6x" -mv6600 -g --include_path="D:/ti/c6000 Code generation tool 7.4.2/include" --include_path="G:/hello/platform_lib_evmc6670l/include" --include_path="G:/" --include_path="D:/ti/pdk_C6670_1_0_0_17/packages" --include_path="D:/ti/pdk_C6670_1_0_0_17/packages/ti/platform" --include_path="D:/ti/pdk_C6670_1_0_0_17/packages/ti/csl" --include_path="G:/" --diag_warning=225 --big_endian --abi=eabi --preproc_with_compile --preproc_dependency="src/evmc66x_ecc.pp" --obj_directory="src" "../src/evmc66x_ecc.c"
    'Finished building: ../src/evmc66x_ecc.c'
    ' '
    'Building file: ../src/evmc66x_fpga.c'
    'Invoking: C6000 Compiler'
    "D:/ti/c6000 Code generation tool 7.4.2/bin/cl6x" -mv6600 -g --include_path="D:/ti/c6000 Code generation tool 7.4.2/include" --include_path="G:/hello/platform_lib_evmc6670l/include" --include_path="G:/" --include_path="D:/ti/pdk_C6670_1_0_0_17/packages" --include_path="D:/ti/pdk_C6670_1_0_0_17/packages/ti/platform" --include_path="D:/ti/pdk_C6670_1_0_0_17/packages/ti/csl" --include_path="G:/" --diag_warning=225 --big_endian --abi=eabi --preproc_with_compile --preproc_dependency="src/evmc66x_fpga.pp" --obj_directory="src" "../src/evmc66x_fpga.c"
    'Finished building: ../src/evmc66x_fpga.c'
    ' '
    'Building file: ../src/evmc66x_gpio.c'
    'Invoking: C6000 Compiler'
    "D:/ti/c6000 Code generation tool 7.4.2/bin/cl6x" -mv6600 -g --include_path="D:/ti/c6000 Code generation tool 7.4.2/include" --include_path="G:/hello/platform_lib_evmc6670l/include" --include_path="G:/" --include_path="D:/ti/pdk_C6670_1_0_0_17/packages" --include_path="D:/ti/pdk_C6670_1_0_0_17/packages/ti/platform" --include_path="D:/ti/pdk_C6670_1_0_0_17/packages/ti/csl" --include_path="G:/" --diag_warning=225 --big_endian --abi=eabi --preproc_with_compile --preproc_dependency="src/evmc66x_gpio.pp" --obj_directory="src" "../src/evmc66x_gpio.c"
    'Finished building: ../src/evmc66x_gpio.c'
    ' '
    'Building file: ../src/evmc66x_i2c_eeprom.c'
    'Invoking: C6000 Compiler'
    "D:/ti/c6000 Code generation tool 7.4.2/bin/cl6x" -mv6600 -g --include_path="D:/ti/c6000 Code generation tool 7.4.2/include" --include_path="G:/hello/platform_lib_evmc6670l/include" --include_path="G:/" --include_path="D:/ti/pdk_C6670_1_0_0_17/packages" --include_path="D:/ti/pdk_C6670_1_0_0_17/packages/ti/platform" --include_path="D:/ti/pdk_C6670_1_0_0_17/packages/ti/csl" --include_path="G:/" --diag_warning=225 --big_endian --abi=eabi --preproc_with_compile --preproc_dependency="src/evmc66x_i2c_eeprom.pp" --obj_directory="src" "../src/evmc66x_i2c_eeprom.c"
    'Finished building: ../src/evmc66x_i2c_eeprom.c'
    ' '
    'Building file: ../src/evmc66x_nor.c'
    'Invoking: C6000 Compiler'
    "D:/ti/c6000 Code generation tool 7.4.2/bin/cl6x" -mv6600 -g --include_path="D:/ti/c6000 Code generation tool 7.4.2/include" --include_path="G:/hello/platform_lib_evmc6670l/include" --include_path="G:/" --include_path="D:/ti/pdk_C6670_1_0_0_17/packages" --include_path="D:/ti/pdk_C6670_1_0_0_17/packages/ti/platform" --include_path="D:/ti/pdk_C6670_1_0_0_17/packages/ti/csl" --include_path="G:/" --diag_warning=225 --big_endian --abi=eabi --preproc_with_compile --preproc_dependency="src/evmc66x_nor.pp" --obj_directory="src" "../src/evmc66x_nor.c"
    'Finished building: ../src/evmc66x_nor.c'
    ' '
    'Building file: ../src/evmc66x_spi.c'
    'Invoking: C6000 Compiler'
    "D:/ti/c6000 Code generation tool 7.4.2/bin/cl6x" -mv6600 -g --include_path="D:/ti/c6000 Code generation tool 7.4.2/include" --include_path="G:/hello/platform_lib_evmc6670l/include" --include_path="G:/" --include_path="D:/ti/pdk_C6670_1_0_0_17/packages" --include_path="D:/ti/pdk_C6670_1_0_0_17/packages/ti/platform" --include_path="D:/ti/pdk_C6670_1_0_0_17/packages/ti/csl" --include_path="G:/" --diag_warning=225 --big_endian --abi=eabi --preproc_with_compile --preproc_dependency="src/evmc66x_spi.pp" --obj_directory="src" "../src/evmc66x_spi.c"
    'Finished building: ../src/evmc66x_spi.c'
    ' '
    'Building file: ../src/evmc66x_uart.c'
    'Invoking: C6000 Compiler'
    "D:/ti/c6000 Code generation tool 7.4.2/bin/cl6x" -mv6600 -g --include_path="D:/ti/c6000 Code generation tool 7.4.2/include" --include_path="G:/hello/platform_lib_evmc6670l/include" --include_path="G:/" --include_path="D:/ti/pdk_C6670_1_0_0_17/packages" --include_path="D:/ti/pdk_C6670_1_0_0_17/packages/ti/platform" --include_path="D:/ti/pdk_C6670_1_0_0_17/packages/ti/csl" --include_path="G:/" --diag_warning=225 --big_endian --abi=eabi --preproc_with_compile --preproc_dependency="src/evmc66x_uart.pp" --obj_directory="src" "../src/evmc66x_uart.c"
    'Finished building: ../src/evmc66x_uart.c'
    ' '
    'Building file: ../src/platform.c'
    'Invoking: C6000 Compiler'
    "D:/ti/c6000 Code generation tool 7.4.2/bin/cl6x" -mv6600 -g --include_path="D:/ti/c6000 Code generation tool 7.4.2/include" --include_path="G:/hello/platform_lib_evmc6670l/include" --include_path="G:/" --include_path="D:/ti/pdk_C6670_1_0_0_17/packages" --include_path="D:/ti/pdk_C6670_1_0_0_17/packages/ti/platform" --include_path="D:/ti/pdk_C6670_1_0_0_17/packages/ti/csl" --include_path="G:/" --diag_warning=225 --big_endian --abi=eabi --preproc_with_compile --preproc_dependency="src/platform.pp" --obj_directory="src" "../src/platform.c"
    'Finished building: ../src/platform.c'
    ' '
    'Building target: G:/hello/platform_lib_evmc6670l/lib/debug/ti.platform.evm6670l.ae66'
    'Invoking: C6000 Archiver'
    "D:/ti/c6000 Code generation tool 7.4.2/bin/ar6x" r "G:/hello/platform_lib_evmc6670l/lib/debug/ti.platform.evm6670l.ae66" "./src/platform.obj" "./src/evmc66x_uart.obj" "./src/evmc66x_spi.obj" "./src/evmc66x_nor.obj" "./src/evmc66x_i2c_eeprom.obj" "./src/evmc66x_gpio.obj" "./src/evmc66x_fpga.obj" "./src/evmc66x_ecc.obj" "./src/evmc6670_phy.obj" "./src/evmc6670.obj" "./src/evm66x_nand.obj" "./src/evm66x_i2c.obj" "../lib/debug/ti.platform.evm6670l.lite.lib"
    ==> new archive 'G:/hello/platform_lib_evmc6670l/lib/debug/ti.platform.evm6670l.ae66'
    ==> building archive 'G:/hello/platform_lib_evmc6670l/lib/debug/ti.platform.evm6670l.ae66'
    'Finished building target: G:/hello/platform_lib_evmc6670l/lib/debug/ti.platform.evm6670l.ae66'
    ' '

    **** Build Finished ****