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.

[参考译文] Linux/LAUNCHXL-CC1310:在尝试为 CC1310编译 tirtos 时、生成失败、并出现分段故障(转储内核)

Guru**** 2584835 points


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

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/606483/linux-launchxl-cc1310-make-fails-with-segmentation-fault-core-dumped-when-trying-to-compile-tirtos-for-cc1310

器件型号:LAUNCHXL-CC1310

工具/软件:Linux

我正在尝试使用 Ubuntu 17.04上的 GCC 编译 tirtos。

我设置 imports.mak 中所需的所有内容:

#
#设置各种 cgtools 的位置
#
这些变量可以在此处或命令行上设置。
#
#除了
指向它们各自的位置之外、CCS_ARMCOMPILER、GCC_ARMCOMPILER 和 IAR_ARMCOMPILER 变量#也用作
"开关"、用于禁用使用这些 cgtools 进行的构建。 要使用
特定的 cgtool 禁用# build,请将 cgtool 的变量设置
为#空或删除/注释掉其定义
:# IAR_ARMCOMPILER ?=
#或
# #IAR_ARMCOMPILER ?= c:/Program Files (x86)/IAR Systems/Embedded Workbench 7.5/ARM
#
如果 cgtool 的*_ARMCOMPILER 变量被设置(非空),
则安装程序中的各种子组件#将尝试使用该 cgtool 进行构建。 这意味
着#如果设置了多个*_ARMCOMPILER cgtool 变量,则使用
每个非空*_ARMCOMPILER cgtool 生成子生成#。
#

XDC_INSTALL_DIR ?=/home/tomer/ti/xdctools_3_50_00_10_core


#CCS_ARMCOMPILER ?= c:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.0.LTS
gcc_armCOMPILER ?=/home/tomer/ti/gcc-arm-none-eabi-5_4-2016q3
#IAR_ARMCOMPILER ?= c:/Program Files (x86)/IAR Systems/Embedded Workbench 7.5/ARM

ifeq ("$(shell)"、"sh.exe")
# for Windows/DOS shell
客户经理 = DEL
rmdir =-rmdir /S /Q
DEVNULL = NUL
ECHOBLANKLINE =@cmd /c echo。
else
#用于类似 Linux 的 shell
客户经理 = rm -f
rmdir = rm -rf
DEVNULL =/dev/null
ECHOBLANKLINE =回波
endif

当我尝试运行 make 时:

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

    您能否尝试在 XDCtools 中运行"gmake"而不是"make"?

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

    它执行同样的操作:

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

    这是因为 Linux 内核错误影响许多基于 Java 的程序。 最近在 Ubuntu 16.04上遇到过这种情况。 执行 Linux 更新/升级并获取最新的内核、它应该可以再次运行。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    我们不使用 Eclipse、当尝试在 SDK 随附的 tirtos GCC 文件夹中运行 make 时会出现错误。 即使它确实在 makefile 文件中的某个位置使用 Java、我们也会运行内核4.10 (uname -a 输出:"Linux Ubuntu 4.10.0-24-generic #28-Ubuntu SMP Wed Jun 14 08:14:34 UTC 2017 x86_64 x86_64 x86_64 x86_64 x86_64 x86_64 GNU/Linux")的 Ubuntu 17.04。 我还尝试执行更新、但这是 Ubuntu 存储库中提供的最新版本。
    是否有任何方法可以知道 makefile 可能会失败的位置? 您是否在构建系统中使用了一些特殊工具? Java 运行时的版本是否重要? (OpenJDK/Oracle Java)?
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    Tomer、
    一种简单的权变措施是将环境变量 java_tool_options 设置为-Xss2560k。 如果该变通办法解决了该问题,则问题就是上述 Linux 内核中的错误。
    如果这不能解决问题、请尝试运行 gmake -n 这将为您提供 gmake 即将执行的完整命令行。 它将如下所示:
    /home/tomer/ti/xdctools_3_50_00_10_core/xs --xdcpath=...

    将'--d'添加到该命令行,如下所示:
    /home/tomer/ti/xdctools_3_50_00_10_core/xs --d --xdcpath=...
    请在此处发布输出。
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好!

    我在全新的 Ubuntu 17.04安装中再次安装了所有内容、这次它工作正常。 我没有机会尝试您的建议。 现在我可以成功编译 tirtos、但在编译任何示例时遇到问题、链接器无法找到确实 存在的库、这是 make 命令的输出:

    Tomer@Ubuntu:~/ti/simplelink_cc13x0_sdk_1_30_00_06/examples/rtos/CC1310_LAUNCHXL/easylink/rfEasyLinkTx/tirtos/gcc 创建
    链接...
    /home/tomer/gcc-arm-none-eabi-5_4-2016q3/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/bin/ld:找不到-l:/home/tomer/ti/simplelink_cc13x0_sdk_1_30_00_06/source/ti/display/lib/display.am3g
    /home/tomer/gcc-arm-none-eabi-5_4-2016q3/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/bin/ld:找不到-l:/home/tomer/ti/simplelink_cc13x0_sdk_1_30_00_06/source/ti/mw/lcd/lib/lcd.am3g
    /home/tomer/gcc-arm-none-eabi-5_4-2016q3/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/bin/ld:找不到-l:/home/tomer/ti/simplelink_cc13x0_sdk_1_30_00_06/source/ti/grlib/lib/grlib.am3g
    /home/tomer/gcc-arm-none-eabi-5_4-2016q3/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/bin/ld:找不到-l:/home/tomer/ti/simplelink_cc13x0_sdk_1_30_00_06/source/ti/drivers/rf/lib/rf_multiMode_cc13x0.am3g
    /home/tomer/gcc-arm-none-eabi-5_4-2016q3/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/bin/ld:找不到-l:/home/tomer/ti/simplelink_cc13x0_sdk_1_30_00_06/source/ti/drivers/lib/drivers_cc13x0.am3g
    /home/tomer/gcc-arm-none-eabi-5_4-2016q3/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/bin/ld:找不到-l:/home/tomer/ti/simplelink_cc13x0_sdk_1_30_00_06/source/ti/drivers/pdm/lib/pdm_cc13x0.am3g
    /home/tomer/gcc-arm-none-eabi-5_4-2016q3/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/bin/ld:找不到-l:/home/tomer/ti/simplelink_cc13x0_sdk_1_30_00_06/kernel/tirtos/packages/ti/dpl/lib/dpl_cc13x0.am3g
    /home/tomer/gcc-arm-none-eabi-5_4-2016q3/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/bin/ld:找不到-l:/home/tomer/ti/simplelink_cc13x0_sdk_1_30_00_06/source/ti/devices/cc13x0/driverlib/bin/gcc/driverlib.lib
    collect2:错误:LD 返回1个退出状态
    makefile:53:目标'rfLinkTx.eout'的配方失败
    

    但是、它说找不到的库有:

    Tomer@Ubuntu:~/ti/simplelink_cc13x0_sdk_1_30_00_06/examples/rtos/CC1310_LAUNCHXL/easylink/rfEasyLinkTx/tirtos/gcc file /home/tomer/ti/simplelink_cc13x0_sdk_1_30_00_06/source/ti/display/lib/display.am3g
    /home/tomer/ti/simplelink_cc13x0_sdk_1_30_00_06/source/ti/display/lib/display.am3g:Current ar archive 

    "make -n"输出:

    Tomer@Ubuntu:~/ti/simplelink_cc13x0_sdk_1_30_00_06/examples/rtos/CC1310_LAUNCHXL/easylink/rfEasyLinkTx/tirtos/gcc make -n
    echo linking...
    "/home/tomer/gcc-arm-none-eabi-5_4-2016q3/bin/arm-none-eabi-gcc EasyLink.obj smartrf_settings.obj smartrf_settings_predefined.obj rfEasyLinkTx.obj CC1310_LAUNCHXL.obj -WL、-T、./../tirtos/gcc/CC1310_LAUNCHXL_TIRTOS.lds /home/tomer/ti/simplelink_cc13x0_sdk_1_30_00_06/source/ti/mw/lcd/lib/lcd.am3g /home/tomer/ti/simplelink_cc13x0_sdk_1_30_00_06/source/ti/drivers/lib/drivers_cc13x0.am3g /home/tomer/ti/simplelink_cc13x0_sdk_1_30_00_06/source/ti/devices/cc13x0/driverlib/bin/gcc/driverlib.lib "-WL、-Map、rfEasyLinkTx.map""-c、-tt、/home/tomer/ti/simplelink_cc13x0_sdk_1_30_00_06/kernel/tirtos/builds/CC1310_LAUNCHXL/release/gcc/linker.cmd /home/tomer/ti/simplelink_cc13x0_sdk_1_30_00_06/source/ti/grlib/lib/grlib.am3g /home/tomer/ti/simplelink_cc13x0_sdk_1_30_00_06/source/ti/drivers/pdm/lib/pdm_cc13x0.am3g "-l:vrfrom/latits/l"-une/clum-une/clum-ine-tex"-unt "e-tid/rink/rfrom-l"-unirom-tex"-l/rf-natic"/home/tomer/ti/simplelink_cc13x0_sdk_1_30_00_06/source/ti/display/lib/display.am3g /home/tomer/ti/simplelink_cc13x0_sdk_1_30_00_06/source/ti/drivers/rf/lib/rf_multiMode_cc13x0.am3g /home/tomer/ti/simplelink_cc13x0_sdk_1_30_00_06/kernel/tirtos/packages/ti/dpl/lib/dpl_cc13x0.am3g -rf-nots/rf-nest/rink/l/rf-nategot"-l"-rf-not"-l/vrf-nots/tids/tids/rf-nategrf-not"-rf-not"-l/rf-nots/tids/rf-nate-tids/rf-nateg"-rf-nots/l/rf-nate-tids/rf-nateg"-rf-nots/ 

    是否有任何想法、什么可能导致此问题?

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    我通常会看到-l:的语法似乎不正确
    /home/tomer/ti/simplelink_cc13x0_sdk_1_30_00_06/source/ti/display/lib/display.am3g

    l/home/tomer/ti/simplelink_cc13x0_sdk_1_30_00_06/source/ti/display/lib/display.am3g

    -l /home/tomer/ti/simplelink_cc13x0_sdk_1_30_00_06/source/ti/display/lib/display.am3g

    如果您使用的语法有效、并且不是问题的根源、您可能需要使用-debug 选项运行 gcc、并查看显示的内容:
    "/home/tomer/gcc-arm-none-eabi-5_4-2016q3/bin/arm-none-eabi-gcc -xlinker -debug -xlinker -v EasyLink.obj ...
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    它很有效! 我从路径中删除了所有"-l:"、并且编译得很好! 我建议大家也将其从示例文件夹中的 makefile 文件中删除。 由于这个问题、所有这些文件都不是编译的。

    谢谢!