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.

[参考译文] PROCESSOR-SDK-J721E:SoC:J721E–主机仿真和 Mathlib 构建问题

Guru**** 2466550 points
Other Parts Discussed in Thread: MATHLIB

请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1471067/processor-sdk-j721e-soc-j721e-issues-with-host-emulation-and-mathlib-build

器件型号:PROCESSOR-SDK-J721E
主题中讨论的其他器件:MATHLIB

工具与软件:

SDK 版本:

ti-processor-sdk-rtos-j721e-evm-09_00_01_01

我正在尝试为运行主机仿真 J721E 使用 PSDK RTOS 但面临设置和编译方面的问题。 我有以下问题:

  1. 安装 PSDK RTOS 附加组件包 (ti-processor-sdk-rtos-j721e-evm-09_00_01_01-addon-linux-x64-installer.run)开 Ubuntu 22.04 (x86_64) 楼宇应用 C7x MMA TIDL 工具 ? 如果没有、该构建需要哪些基本依赖项?

  2. 构建 Mathlib 时出现问题:

    • 我将运行以下make命令来构建 Mathlib: make -j16 mathlib mathlib_cn common target_cpu=x86_64 target_scpu=c7100 target_platform=PC target_build=release checkPARAMS=1
    • 但是、我遇到了以下错误:  
      sowbhagya@LAPTOP-2OIPLMIC:~/ti-processor-sdk-rtos-j721e-evm-09_00_01_01/mathlib_02_06_01_00$ make -j16 mathlib mathlib_cn common TARGET_CPU=x86_64 TARGET_SCPU=C7100 TARGET_PLATFORM=PC TARGET_BUILD=release CHECKPARAMS=1
      TARGET_CPU=x86_64
      TARGET_BUILD=release
      find: ‘/home/sowbhagya/ti-processor-sdk-rtos-j721e-evm-09_00_01_01/mathlib_02_06_01_00/ti/mathlib/src/test/c7100’: No such file or directory
      find: ‘/home/sowbhagya/ti-processor-sdk-rtos-j721e-evm-09_00_01_01/mathlib_02_06_01_00/ti/mathlib/src/test/c7100’: No such file or directory
      find: ‘/home/sowbhagya/ti-processor-sdk-rtos-j721e-evm-09_00_01_01/mathlib_02_06_01_00/ti/mathlib/src/test/c7100’: No such file or directory
      find: ‘/home/sowbhagya/ti-processor-sdk-rtos-j721e-evm-09_00_01_01/mathlib_02_06_01_00/ti/mathlib/src/math_c7x/MATHLIB_cos/c7100’: No such file or directory
      find: ‘/home/sowbhagya/ti-processor-sdk-rtos-j721e-evm-09_00_01_01/mathlib_02_06_01_00/ti/mathlib/src/math_c7x/MATHLIB_cos/c7100’: No such file or directory
      find: ‘/home/sowbhagya/ti-processor-sdk-rtos-j721e-evm-09_00_01_01/mathlib_02_06_01_00/ti/mathlib/src/math_c7x/MATHLIB_div/c7100’: No such file or directory
      find: ‘/home/sowbhagya/ti-processor-sdk-rtos-j721e-evm-09_00_01_01/mathlib_02_06_01_00/ti/mathlib/src/math_c7x/MATHLIB_div/c7100’: No such file or directory
      find: ‘/home/sowbhagya/ti-processor-sdk-rtos-j721e-evm-09_00_01_01/mathlib_02_06_01_00/ti/mathlib/src/math_c7x/MATHLIB_sin/c7100’: No such file or directory
      find: ‘/home/sowbhagya/ti-processor-sdk-rtos-j721e-evm-09_00_01_01/mathlib_02_06_01_00/ti/mathlib/src/math_c7x/MATHLIB_sin/c7100’: No such file or directory
      find: ‘/home/sowbhagya/ti-processor-sdk-rtos-j721e-evm-09_00_01_01/mathlib_02_06_01_00/ti/mathlib/src/math_c7x/MATHLIB_sqrt/c7100’: No such file or directory
      find: ‘/home/sowbhagya/ti-processor-sdk-rtos-j721e-evm-09_00_01_01/mathlib_02_06_01_00/ti/mathlib/src/math_c7x/MATHLIB_sqrt/c7100’: No such file or directory
      find: ‘/home/sowbhagya/ti-processor-sdk-rtos-j721e-evm-09_00_01_01/mathlib_02_06_01_00/ti/mathlib/src/math_c7x/MATHLIB_tan/c7100’: No such file or directory
      find: ‘/home/sowbhagya/ti-processor-sdk-rtos-j721e-evm-09_00_01_01/mathlib_02_06_01_00/ti/mathlib/src/math_c7x/MATHLIB_tan/c7100’: No such file or directory
      HOST_ROOT=/home/sowbhagya/ti-processor-sdk-rtos-j721e-evm-09_00_01_01/mathlib_02_06_01_00
      HOST_COMPILER=GPP
      HOST_OS=LINUX
      HOST_CPU=x86_64
      HOST_ARCH=64
      TARGET_OS=LINUX
      TARGET_CPU=x86_64
      MMA_IMPLEMENTATION=
      SOC=
      TEST_ENV=
      TARGET_PLATFORM=PC
      TARGET_BUILD=release
      TARGET_OUT=/home/sowbhagya/ti-processor-sdk-rtos-j721e-evm-09_00_01_01/mathlib_02_06_01_00/out/x86_64/release
      TARGET_DOC=/home/sowbhagya/ti-processor-sdk-rtos-j721e-evm-09_00_01_01/mathlib_02_06_01_00/out/docs
      MODULES=linker_cmd regress_linker_cmd regress common test mathlib mathlib_cn mathlib_d math_c7x/MATHLIB_cos math_c7x/MATHLIB_div math_c7x/MATHLIB_sin math_c7x/MATHLIB_sqrt math_c7x/MATHLIB_tan
      SCM_ROOT=
      SCM_VERSION=
      [GCC] Compiling C++14 MATHLIB_cos_ci.cpp
      make: g++-5: No such file or directory
      [GCC] Compiling C++14 MATHLIB_div_ci.cpp
      make: *** [concerto/finale.mak:219: /home/sowbhagya/ti-processor-sdk-rtos-j721e-evm-09_00_01_01/mathlib_02_06_01_00/out/x86_64/release/module/mathlib/math_c7x/MATHLIB_cos/c71/MATHLIB_cos_ci.o] Error 127
      make: *** Waiting for unfinished jobs....
      make: g++-5: No such file or directory
      make: *** [concerto/finale.mak:219: /home/sowbhagya/ti-processor-sdk-rtos-j721e-evm-09_00_01_01/mathlib_02_06_01_00/out/x86_64/release/module/mathlib/math_c7x/MATHLIB_div/c71/MATHLIB_div_ci.o] Error 127
      • g++-51比1 为了构建 Mathlib、或者我们是否可以使用更新版本的 GCC (例如、g++-9g++-11)?
      • 如果可以使用更新的 GCC 版本、我们如何配置编译系统来使用它?
      • 如果g++-5需要、建议的安装方法是什么 Ubuntu 22.04. 、因为它在默认存储库中不可用?
    • 非常感谢为解决这些问题提供任何指导。

      谢谢!

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好!
    否不是必需的。您可以在系统上检查并使用 GCC 版本。

    无论使用的是 g++-5、请将其替换为当前的 GCC 版本。

    例如、
    您应该将 gcc_linux.mak [ti/ti-processor-sdk-rtos-j721e-evm-10_00_05/sdk_builder/concerto /compilers]中的 gcc 版本替换为您的当前版本。

    此致、
    Sivadeep。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好!
    我将检查此问题并很快进行更新。

    此致、
    Sivadeep。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好!
    您能否提供添加代码(如果可能)并说明您对 main.c 文件所做的所有更改。

    此致、
    Sivadeep。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    为了进行测试、我#include <c7x.h>在基本的"Hello、World!"中添加了一个 程序来验证是否正确包含头文件。 此外、我删除了.c其中的所有文件/home/sowbhagya/ti-processor-sdk-rtos-j721e-evm-09_00_01_01/c7x-mma-tidl/ti_dl/test/src/pc_linux、以确保干净的测试环境。 此外、我修改了concerto_common.mak文件、注释掉了包含.c文件的行、以防止编译这些文件。  但是、我在尝试使用 C7x 内在函数运行加两个数组的代码时遇到相同的问题、如中所述 TI_C7X_DSP_TRAING_IPYNB_00.07 .

    #include <stdio.h>
    #include <c7x.h>
    
    int main() {
        printf("Hello!!");
        return 0;
    }
    
    // #include <iostream>
    // #include <c7x.h>
    // #include <c7x_scalable.h>
    
    // using namespace c7x;
    
    // #define ARRAY_SIZE (96)
    
    // int main() {
    // //Declare input arrays
    // int16_t inArrayA[ARRAY_SIZE];
    // int16_t inArrayB[ARRAY_SIZE];
    
    // //Initialize input arrays
    // for(int32_t ctr = 0; ctr < ARRAY_SIZE; ctr++) {
    //     inArrayA[ctr] = ctr;
    //     inArrayB[ctr] = ctr;
    // }
    
    // //Display input array A
    // std::cout << "input array A = ";
    // for(int32_t ctr = 0; ctr < ARRAY_SIZE; ctr++) {
    //     std::cout << inArrayA[ctr] << ", ";
    // }
    // std::cout << "\n\n";
    
    // //Display input array B
    // std::cout << "input array B = ";
    // for(int32_t ctr = 0; ctr < ARRAY_SIZE; ctr++) {
    //     std::cout << inArrayB[ctr] << ", ";
    // }
    // int16_t outArrayC[ARRAY_SIZE];
    
    // //Initialize output array
    // for(int32_t ctr = 0; ctr < ARRAY_SIZE; ctr++) {
    //     outArrayC[ctr] = 0;
    // }
    
    // //Display output array C
    // std::cout << "output array C = ";
    // for(int32_t ctr = 0; ctr < ARRAY_SIZE; ctr++) {
    //     std::cout << outArrayC[ctr] << ", ";
    // }
    // for(int32_t i = 0; i < ARRAY_SIZE; i++) {
       
    //     //Read each element of input array
    //     int16_t a = inArrayA[i];
    //     int16_t b = inArrayB[i];
       
    //     //Add the elements
    //     int16_t c = a + b;
       
    //     //Store the sum in output array
    //     outArrayC[i] = c;
    // }
    
    // //Display output array C
    // std::cout << "output array C = ";
    // for(int32_t ctr = 0; ctr < ARRAY_SIZE; ctr++) {
    //     std::cout << outArrayC[ctr] << ", ";
    // }
    // int16_t *pInA = &inArrayA[0]; //pointer to input array A
    // int16_t *pInB = &inArrayB[0]; //pointer to input array B
    
    // int16_t *pOutC = &outArrayC[0]; //pointer to output array C
    
    // // Getting vector length of short_vec type
    // const int vec_len = element_count_of<short_vec>::value;
    
    // int32_t itr = 0;
    
    // for(int32_t ctr = 0; ctr < ARRAY_SIZE; ctr+=vec_len) {
       
    //     std::cout << "Iteration: " << itr++ << "\n";
       
    //     //Read a vector of 32-16b elements from input Array A
    //     short_vec vInA = *(short_vec *)(pInA + ctr);
       
    //     //Read a vector of 32-16b elements from input Array A
    //     short_vec vInB = *(short_vec *)(pInB + ctr);
       
    //     //Added 32-16b elements in parallel
    //     // '+' operator is overloaded to pick up the right instruction under the hood
    //     short_vec vOutC = vInA + vInB;
       
    //     //Store 32-16b elements to output array C
    //     *(short_vec *)(pOutC + ctr) = vOutC;
       
    //     //Display contents of vInA, vInB, vInC
    //     std::cout << "vInA  = ";
    //     vInA.print();
    
    //     std::cout << "vInB  = ";
    //     vInB.print();
    
    //     std::cout << "vOutC = ";
    //     vOutC.print();
           
    //     std::cout << "\n\n";
    // }
    // //Display output array C
    // std::cout << "output array C = ";
    // for(int32_t ctr = 0; ctr < ARRAY_SIZE; ctr++) {
    //     std::cout << outArrayC[ctr] << ", ";
    // }
    
    
    
    
    
    
    
    

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好!
    我将检查此问题并很快进行更新。

    此致、
    Sivadeep。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好!

    您能否共享编辑过的 concerto_common.mak 文件并指定您删除了哪些 C 文件? 此外、由于我无法重现问题、您能否在不删除任何文件的情况下尝试运行它?

    此致、
    Sivadeep

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    当然、我要附加 concerto _common.mak 文件的屏幕截图以及我已删除的 c 文件。  


    我对第7至14行作了评论。



    这是我的文件结构。 我已经删除了 PC_Linux 和 src 内的所有.c 文件。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好!
    我已经编辑了 concerto_common.mak 文件,并删除了所有的.c 文件,像你提到的,仍然无法重现你的问题。
    您是否可以尝试将 CGT 版本升级到4.1.0 LTS 并尝试相同的操作?

    此致、
    Sivadeep。