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.

C6678,测试pdk里面的例子,报错

我安装了ti-processor-sdk-rtos-c667x-evm-04.00.00.04-Windows-x86-Install.exe, 然后把C:\ti\pdk_c667x_2_0_6\packages\ti\transport\ndk\nimu\example\helloWorld 下面的例子取出来,新建一个工程编译,结果报错,是很有几个宏未定义如“

Description Resource Path Location Type
#20 identifier "CSL_C66X_COREPAC_REG_BASE_ADDRESS_REGS" is undefined .ccsproject /test0 line 702, external location: D:\Program Files (x86)\TI\pdk_c667x_2_0_2\packages\ti\csl\csl_cgemAux.h C/C++ Problem

Description Resource Path Location Type
#20 identifier "CSL_DSP_DSP_XMC_CTRL_REGS" is undefined .ccsproject /test0 line 184, external location: D:\Program Files (x86)\TI\pdk_c667x_2_0_2\packages\ti\csl\csl_xmcAux.h C/C++ Problem

我想请问,pdk与mcsdk的区别是什么呢?我安装的pdk,运行的也是pdk下面的例子,为什么会缺少这个宏定义呢?才接触C6678,请帮忙回答一下。

  • 不要拷贝出来新建工程,按照下面的步骤做,在pdk_c667x_2_0_5\packages\MyExampleProjects目录下生成pdk example。
    http://processors.wiki.ti.com/index.php/Rebuilding_The_PDK#PDK_Example_and_Test_Project_Creation


  • 首先感谢您的答复.

    我按照链接里的如下步骤操作:

    1. Select C/C++ Development perspective
    2. Click on File -> Import
    3. On the Import Dialog Box select Existing CCS/CCE Eclipse Project
    4. Click on Next
    5. This will pop up a new dialog box; ensure that 'Select Root Directory' option is selected
    6. Click on Browse and select the top level directory where the project is present. For example
      C:\ti\pdk_[soc]_[version]\packages\MyExampleProjects\
    7. Under the projects section you should see the project. For example
      GPIO_LedBlink_evmAM572x_c66xExampleProject
    8. Click Finish
    但是,我安装的pdk, 在pdk_c667x_2_0_5\packages下,没有MyExampleProjects目录;
    另外请问,ccs项目的工程文件名后缀是.ccs吗?
  • 上面的链接看了么?要先执行命令生成MyExampleProjects目录

    Windows Usage:
     pdkProjectCreate.bat [soc] [board] [endian] [module] [processor] [pdkDir]
    
     Description:     (first option is default)
      soc         -   AM335x / AM437x / AM571x / AM572x
      board       -   all
                     -or-
                      Refer to "pdk_<soc>_<version>\packages\ti\board\lib
                      for valid board inputs for the soc
      endian      -   little / big
      module      -   all
                      -or-
                      fatfs / gpio / i2c / icss_emac / mmcsd / nuimu / nimu_icss /
                      pcie / pruss / spi / uart / usb
      processor   -   arm / dsp / m4
      pdkDir      -   THIS FILE LOCATION / "C:\ti\pdk_<device>_<version>\packages"
    
      Example:
      a) pdkProjectCreate.bat
                  - Creates all module projects for the AM335x soc for arm little endian
      b) pdkProjectCreate.bat AM437x
                  - Creates all module projects for the AM437x soc for arm little endian
      c) pdkProjectCreate.bat AM437x idkAM437x
                  - Creates all module projects for idkAM437x device for arm little endian
      d) pdkProjectCreate.bat AM572x evmAM572x little
                  - Creates all module projects for evmAM571x device for arm little endian
      e) pdkProjectCreate.bat AM571x evmAM571x little i2c dsp
                  - Creates i2c module projects for evmAM571x device for dsp little endian
    
  • 有点不好意思,之前忙别的事情去了。等了很久才回来继续学习。

    终于把测试的例程,成功编译了。非常感谢您的答复。

    我运行的程序是:NIMU_emacExample_EVMC6678C66BiosExampleProject

    虽然程序运行了,打印了如下信息:

    [C66xx_0] QMSS successfully initialized
    CPPI successfully initialized
    PA successfully initialized
    TCP/IP Stack 'Hello World!' Application
    StackTest: using localIp

    。但是,我用C:\ti\ndk_2_25_01_11\packages\ti\ndk\winapps的helloWorld测试时,报错,我的测试操作如下:

    发送:helloworld 192.168.1.4

    返回:Testing UDP echo server at 192.168.1.4:7

               helloworld: timed out waiting for reply

    请再帮忙指导一下吧。十分感谢。

  • 请问安装目录不在c盘,怎么修改bat文件,能否提供详细的修改说明?
  • 您好:

       我按照文档说明操作,出现这样的问题,该怎么解决?

  • 我也遇到这个问题。解决方法是打开Project->Properties,在Build->C6000 Compiler->Advanced Options->Predefined Symbol中添加宏SOC_C6678。
    程序中有文件使用了宏CSL_C66X_COREPAC_REG_BASE_ADDRESS_REGS(我的是ti/csl/csl_cache.h文件),该宏是在ti/csl/soc/c6678/src/cslr_device.h中定义的,所以需要include文件cslr_device.h。在ti/csl/soc.h文件中有如下语句:
    ...
    #elif defined(SOC_C6678)
    #include <ti/csl/soc/c6678/src/cslr_device.h>
    #elif defined(SOC_C6657)
    #include <ti/csl/soc/c6657/src/cslr_device.h>
    ...
    所以需要在程序中添加宏定义SOC_C6678