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.

[参考译文] 编译器/处理器 SDK-AM335X:编译错误

Guru**** 2589245 points
Other Parts Discussed in Thread: MATHLIB, TPS65910, TPS65217, TPS65218, AMIC110

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

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/637236/compiler-processor-sdk-am335x-compile-error

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

工具/软件:TI C/C++编译器

我安装了 ti-processor-sdk-rtos-am335x-evm-04.00.04-Windows-x86-Install.exe、gmake 编译错误: 

存档 AM335x-EVM:a8host:debug:dal 引导
编号
#编译 AM335x-EVM:a8host:debug:bootloader:./src/sbl_copy.c
#编译 AM335x-EVM:a8host:debug:bootloader:./src/sbl_main.c
/src/sbl_main.c:在函数'main'中:
/src/sbl_main.c:88:14:警告:已设置但未使用变量'status'[-Wunused_but -set-variable]
uint32_t status;
^μ A
#编译 AM335x-EVM:a8host:debug:bootloader:./examples/gpio/gpio_app.c
#编译 AM335x-EVM:a8host:debug:bootloader:./src/sbl_uart.c
#编译 AM335x-EVM:a8host:debug:bootloader:./src/am335x/sbl_am335x_platform.c
#编译 AM335x-EVM:a8host:debug:bootloader:./src/am335x/sbl_am335x_platform_ddr.c
#编译 AM335x-EVM:a8host:debug:bootloader:./src/am335x/sbl_am335x_platform_pll.c
链接到 C:/ti/PDK_AM~1/packages/ti/starterware/binary/bootloader/bin/AM335x-evm/gcc/bootloader_bootloader_boot_uart_a8host_debug.out...
编号
C:/ti/gcc-arm-none-eabi-4_9-2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/fpu libc.a (lib_a-sbrkr.o):在函数` sbrk_r'中:
sbrkr.c:(.text_sbrk_r+0x18):未`对 sbrk'的引用
C:/ti/gcc-arm-none-eabi-4_9-2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/fpu libc.a (lib_a-writer.o):在函数`写入_r'中

writer.c:(.text._WRITE_r+0x20):未`对写入'的引用
C:/ti/gcc-arm-none-eabi-4_9-2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/fpu libc.a (lib_a-close.o):在函数`_close_r'中

Close.c:(.text._close_r+0x18):未`对_close'的引用
C:/ti/gcc-arm-none-eabi-4_9-2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/fpu libc.a (lib_a-fstatr.o):在函数`_fstat_r'中

fstatr.c:(.text._fstat_r+0x1c):未`对 fstat'的引用
C:/ti/gcc-arm-none-eabi-4_9-2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/fpu libc.a (lib_a-isattyr.o):在函数`_isatty_中
R':
isattyr.c:(.text._isatty_r+0x18):未`对"_isatty"的引用
C:/ti/gcc-arm-none-eabi-4_9-2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/fpu libc.a (lib_a-lseekkr.o):在函数`_lseek_r'中

lseekr.c:(.text._lseek_r+0x20):未`对 lseek'的引用
C:/ti/gcc-arm-none-eabi-4_9-2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/fpu libc.a (lib_a-readr.o):在函数`读取_r'中:
readr.c:(.text._read_r+0x20):对`读取'的引用未定义
collect2.exe:错误:LD 返回1退出状态
gmake[2]:***[C:/ti/PDK_AM~1/packages/ti/starterware/binary/bootloader/bin/AM335x-evm/gcc/bootloader_bootloader_boot_uart_a8host_debug.out]错误1
gmaked[1]:***[bootloader]错误2.
gmake:***[starterware_boot]错误2.

但是、无论我如何卸载、都将编译安装。 
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    RTOS 团队已收到通知。 他们将在这里作出回应。
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您能否指出您使用了什么命令行选项来调用编译? 另外、请提供 pdksetupenv.sh 脚本的日志以供我们参考。  我无法在我的设置中重现此问题、因此怀疑您有安装问题。

    为了构建和测试这个、我使用了以下步骤。

    设置 sdk_install_path= //如果已安装在默认位置,则不需要。
    
    cd processor_sdk_rtos_am335x_4_00_00_00_04
    
    setupenv.bat //确保所有路径
    
    都是有效的 CD ./pdk_am335x_1_0_7/packages/ti/starterrm
    
    -rf 二进制
    gmake clean -s _build=no
    gmake bootloader BUILDKW=boot mode=mcspi=v3kw=am3k=v_bot-platform 调试配置文件 

    希望这对您有所帮助。

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

    C:\ti>set sdk_install_path=C:\ti

    C:\ti>CD processor_sdk_rtos_am335x_4_00_00_04

    C:\ti\processor_sdk_rtos_am335x_4_00_00_04>setupenv.bat
    未配置可选参数:CG_XML_bin_install_path
    XDC 版本构建所需
    示例:设置 CG_XML_bin_install_path=C:/ti/cg_xml/bin
    未配置可选参数:DOXYGEN_INSTALL_PATH
    XDC 版本构建所需
    示例:设置 DOXYGEN_INSTALL_PATH=C:/ti/Doxygen/doxygen/1.5.1-p1/bin
    (二
    环境配置:
    limit_SoC:AM335x
    limit_boards:evmAM335x icev2AM335x bbbAM335x skAM335x
    pdk_install_path:/ti/PDK_AM~1/软件包
    C6X_GEN_INSTALL_PATH:C:/ti/ti-cgt-c6000_8.1.3
    toolchain_path_gcc:C:/ti/gcc-arm-none-eabi-4_9-2015q3
    toolchain_path_a15:C:/ti/gcc-arm-none-eabi-4_9-2015q3
    toolchain_path_A8:C:/ti/gcc-arm-none-eabi-4_9-2015q3
    toolchain_path_A9:C:/ti/gcc-arm-none-eabi-4_9-2015q3
    toolchain_path_M4:C:/ti/ti-cgt-arm_16.9.2.LTS
    toolchain_path_arm9:C:/ti/ti-cgt-arm_16.9.2.LTS
    toolchain_path_EVE:C:/ti/arp32_1.0.8
    CL_PRU_INSTALL_PATH:C:/ti/ti-cgt-pru_2.1.5
    utils_install_DIR:C:/ti/xdctools_3_32_01_22_core/bin
    FPULIB_PATH:C:/ti/gcc-arm-none-eabi-4_9-2015q3/lib/gcc/arm-none-eabi/4.9.3/fpu
    cross_tool_PRFX:arm-none-eabi-
    XDC_INSTALL_PATH:C:/ti/xdctools_3_32_01_22_core
    BIOS_install_path:C:/ti/bios_6_46_05_55
    IPC_INSTALL_PATH:C:/ti/ipc_3_46_00_02
    EDMA3LLD_BIOS6_INSTALLDIR:C:/ti/edma3_lld_2_12_04_28
    NDK_INSTALL_PATH:C:/ti/ndk_2_25_01_11
    IMGLIB_INSTALL_PATH:C:/ti/imglib_c66x_3_1_1_0
    DSPLIB_INSTALL_PATH:C:/ti/dsplib_c66x_3_4_0_0
    MATHLIB_INSTALL_PATH:C:/ti/mathlib_c66x_3_1_1_0
    UIA_INSTALL_PATH:C:/ti/uia_2_00_06_52
    IPC_platform:未知
    IPC_ALT_platform:
    PROC_SDK_INSTALL_PATH:C:/ti/processor_sdk_rtos_am335x_4_00_00_04
    (二
    更改为短名称以支持包含空格的目录名称
    当前目录:C:/ti/processor_sdk_rtos_am335x_4_00_00_04
    已配置处理器 SDK 构建环境
    (二

    C:\ti\processor_sdk_rtos_am335x_4_00_00_04>cd ..

    C:\ti>CD pdk_am335x_1_0_7

    C:\ti\pdk_am335x_1_0_7>CD 软件包

    C:\ti\pdk_am335x_1_0_7\packages/cd ti

    C:\ti\pdk_am335x_1_0_7\packages/ti>cd starterware

    C:\ti\pdk_am335x_1_0_7\packages/ti\starterware>rm -RF 二进制文件

    C:\ti\pdk_am335x_1_0_7\packages/ti\starterware>gmake clean -s KW_build=no

    C:\ti\pdk_am335x_1_0_7\packages/ti\starterware>gmake bootloader BUILDCFG=boot bootmode=mcspi platform=am335x-evm profile=debug -s KW_build=no
    #生成 AM335x-EVM:a8host:debug:device...
    #编译 AM335x-EVM:a8host:debug:device:qspi_flash.c
    #编译 AM335x-EVM:a8host:debug:device:lcd_device.c
    #编译 AM335x-EVM:a8host:debug:device:pixcir_tsc.c
    #编译 AM335x-EVM:a8host:debug:device:camera_device.c
    #编译 AM335x-EVM:a8host:debug:device:enet_phy_device.c
    #编译 AM335x-EVM:a8host:debug:device:NAND_DEVICE.c
    #编译 AM335x-EVM:a8host:debug:device:PMIC_DEVICE.c
    #编译 AM335x-EVM:a8host:debug:device:PMIC_DEVICE_tps65910.c
    #编译 AM335x-EVM:a8host:debug:device:PMIC_DEVICE_tps65217.c
    #编译 AM335x-EVM:a8host:debug:device:PMIC_DEVICE_tps65218.c
    #编译 AM335x-EVM:a8host:debug:device:clock_syn合成 器.c
    编号
    #存档 AM335x-EVM:a8host:debug:device_boot
    编号
    #生成 AM335x-EVM:a8host:debug:board...
    #编译 AM335x-EVM:a8host:debug:board:board.c
    #编译 AM335x-EVM:a8host:debug:board:dcard.c
    #编译 AM335x-EVM:a8host:debug:board:platform.c
    #编译 AM335x-EVM:a8host:debug:board:pinmux.c
    #编译 AM335x-EVM:a8host:debug:board:AM335x/board_AM335x.c
    #编译 AM335x-EVM:a8host:debug:board:AM335x/dcard_AM335x.c
    #编译 AM335x-EVM:a8host:debug:board:AM335x/AM335x_gpevm.c
    #编译 AM335x-EVM:a8host:debug:board:AM335x/AM335x_evmsk.c
    #编译 AM335x-EVM:a8host:debug:board:AM335x/AM335x_BeagleBone.c
    #编译 AM335x-EVM:a8host:debug:board:AM335x/AM335x_beagleboneblue.c
    #编译 AM335x-EVM:a8host:debug:board:AM335x/AM335x_icev1.c
    #编译 AM335x-EVM:a8host:debug:board:AM335x/AM335x_icev2.c
    #编译 AM335x-EVM:a8host:debug:board:AM335x/AM335x_amic110.c
    #编译 AM335x-EVM:a8host:debug:board:AM335x/AM335x_custom.c
    #编译 AM335x-EVM:a8host:debug:board:AM335x/AM335x_gpevm_pinmux_data.c
    #编译 AM335x-EVM:a8host:debug:board:AM335x/AM335x_evmsk_pinmux_data.c
    #编译 AM335x-EVM:a8host:debug:board:AM335x/AM335x_BeagleBone_pinmux_data.c
    #编译 AM335x-EVM:a8host:debug:board:AM335x/AM335x_beagleboneblack_pinmux_data.c
    #编译 AM335x-EVM:a8host:debug:board:AM335x/AM335x_icev1_pinmux_data.c
    #编译 AM335x-EVM:a8host:debug:board:AM335x/AM335x_icev2_pinmux_data.c
    #编译 AM335x-EVM:a8host:debug:board:AM335x/AM335x_amic11x_pinmux_data.c
    #编译 AM335x-EVM:a8host:debug:board:AM335x/AM335x_LCD4_dcard.c
    编号
    #存档 AM335x-EVM:a8host:debug:board_boot
    编号
    #正在制作 AM335x-EVM:a8host:debug:utils...
    #编译 AM335x-EVM:a8host:debug:utils:console_utils_uart.c
    #编译 AM335x-EVM:a8host:debug:utils:console_utils.c
    #编译 AM335x-EVM:a8host:debug:utils:agraph.c
    #编译 AM335x-EVM:a8host:debug:utils:I2C_utils.c
    #编译 AM335x-EVM:a8host:debug:utils:ascii_utils.c
    #编译 AM335x-EVM:a8host:debug:utils:ramdiskutils.c
    #编译 AM335x-EVM:a8host:debug:utils:time_utils.c
    #编译 AM335x-EVM:a8host:debug:utils:dmtimer_utils.c
    #编译 AM335x-EVM:a8host:debug:utils:display_utils.c
    Display_utils.c:在函数'DISPLAYUtilsConfig'中:
    display_utils.c:97:14:警告:指针和整数之间的比较
    if (NULL!= frmBufAddr)
    ^μ A
    #编译 AM335x-EVM:a8host:debug:utils:display_utils_lcdc.c
    编号
    #存档 AM335x-EVM:a8host:debug:utils_boot
    编号
    #生成 AM335x-EVM:a8host:debug:SoC...
    #编译 AM335x-EVM:a8host:debug:soc:armv7a/gcc/cp15.S
    #编译 AM335x-EVM:a8host:debug:soc:armv7a/gcc/exceptionhandler.s
    #编译 AM335x-EVM:a8host:debug:soc:armv7a/gcc/SBL_init.S
    #编译 AM335x-EVM:a8host:debug:soc:soc.c
    #编译 AM335x-EVM:a8host:debug:soc:armv7a/startup.c
    #编译 AM335x-EVM:a8host:debug:soc:armv7a/gcc/CPU
    #编译 AM335x-EVM:a8host:debug:soc:AM335x/AM335x_chipdb.c
    #编译 AM335x-EVM:a8host:debug:soc:AM335x/HW_AM335x_chipdb.c
    #编译 AM335x-EVM:a8host:debug:soc:AM335x/HW_AM335x_chipdb_baseaddr.c
    #编译 AM335x-EVM:a8host:debug:soc:AM335x/HW_AM335x_chipdb_interrupt.c
    #编译 AM335x-EVM:a8host:debug:soc:AM335x/INTC.c
    #编译 AM335x-EVM:a8host:debug:soc:cache_arm.c
    #编译 AM335x-EVM:a8host:debug:soc:MMU_ARM.c
    #编译 AM335x-EVM:a8host:debug:soc:AM335x/AM335x_control.c
    #编译 AM335x-EVM:a8host:debug:soc:AM335x/AM335x_prcm.c
    编号
    #存档 AM335x-EVM:a8host:debug:SoC_boot
    编号
    #正在制作 AM335x-EVM:a8host:debug:dal...
    #编译 AM335x-EVM:a8host:debug:dal:I2C.c
    #编译 AM335x-EVM:a8host:debug:dal:uart.c
    #编译 AM335x-EVM:a8host:debug:dal:gpio.c
    #编译 AM335x-EVM:a8host:debug:dal:mcspi.c
    #编译 AM335x-EVM:a8host:debug:dal:gpmc.c
    #编译 AM335x-EVM:a8host:debug:dal:Elm.c
    #编译 AM335x-EVM:a8host:debug:dal:QSPI.c
    #编译 AM335x-EVM:a8host:debug:dal:edma.c
    #编译 AM335x-EVM:a8host:debug:dal:hs_mmcsd.c
    #编译 AM335x-EVM:a8host:debug:dal:dmtimer.c
    #编译 AM335x-EVM:a8host:debug:dal:ePWM.c
    #编译 AM335x-EVM:a8host:debug:dal:vpfe.c
    #编译 AM335x-EVM:a8host:debug:dal:dss.c
    #编译 AM335x-EVM:a8host:debug:dal:dss_coeffics.c
    #编译 AM335x-EVM:a8host:debug:dal:WDT.c
    #编译 AM335x-EVM:a8host:debug:dal:ecap.c
    #编译 AM335x-EVM:a8host:debug:dal:TSC_ADC_ss.c
    #编译 AM335x-EVM:a8host:debug:dal:rtc.c
    #编译 AM335x-EVM:a8host:debug:dal:dal:misc.c
    #编译 AM335x-EVM:a8host:debug:dal:dCAN.c
    #编译 AM335x-EVM:a8host:debug:dal:cpsw.c
    #编译 AM335x-EVM:a8host:debug:dal:cpsw_ale.c
    #编译 AM335x-EVM:a8host:debug:dal:mdio.c
    #编译 AM335x-EVM:a8host:debug:dal:mailbox.c
    #编译 AM335x-EVM:a8host:debug:dal:pruss.c
    #编译 AM335x-EVM:a8host:debug:dal:lcdc.c
    编号
    #存档 AM335x-EVM:a8host:debug:dL_boot
    编号
    #编译 AM335x-EVM:a8host:debug:bootloader:./src/sbl_copy.c
    #编译 AM335x-EVM:a8host:debug:bootloader:./src/sbl_main.c
    /src/sbl_main.c:在函数'main'中:
    /src/sbl_main.c:88:14:警告:已设置但未使用变量'status'[-Wunused_but -set-variable]
    uint32_t status;
    ^μ A
    #编译 AM335x-EVM:a8host:debug:bootloader:./examples/gpio/gpio_app.c
    #编译 AM335x-EVM:a8host:debug:bootloader:./src/sbl_mcspi.c
    #编译 AM335x-EVM:a8host:debug:bootloader:./src/am335x/sbl_am335x_platform.c
    #编译 AM335x-EVM:a8host:debug:bootloader:./src/am335x/sbl_am335x_platform_ddr.c
    #编译 AM335x-EVM:a8host:debug:bootloader:./src/am335x/sbl_am335x_platform_pll.c
    链接到 C:/ti/pdk_am335x_1_0_7/packages/ti/starterware/binary/bootloader/bin/am335x-evm/gcc/bootloader_boot_mcspi_a8host_debug.out...
    编号
    C:/ti/gcc-arm-none-eabi-4_9-2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/fpu libc.a (lib_a-sbrkr.o):在函数` sbrk_r'中:
    sbrkr.c:(.text_sbrk_r+0x18):未`对 sbrk'的引用
    C:/ti/gcc-arm-none-eabi-4_9-2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/fpu libc.a (lib_a-writer.o):在函数`写入_r'中

    writer.c:(.text._WRITE_r+0x20):未`对写入'的引用
    C:/ti/gcc-arm-none-eabi-4_9-2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/fpu libc.a (lib_a-close.o):在函数`_close_r'中

    Close.c:(.text._close_r+0x18):未`对_close'的引用
    C:/ti/gcc-arm-none-eabi-4_9-2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/fpu libc.a (lib_a-fstatr.o):在函数`_fstat_r'中

    fstatr.c:(.text._fstat_r+0x1c):未`对 fstat'的引用
    C:/ti/gcc-arm-none-eabi-4_9-2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/fpu libc.a (lib_a-isattyr.o):在函数`_isatty_中
    R':
    isattyr.c:(.text._isatty_r+0x18):未`对"_isatty"的引用
    C:/ti/gcc-arm-none-eabi-4_9-2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/fpu libc.a (lib_a-lseekkr.o):在函数`_lseek_r'中

    lseekr.c:(.text._lseek_r+0x20):未`对 lseek'的引用
    C:/ti/gcc-arm-none-eabi-4_9-2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/fpu libc.a (lib_a-readr.o):在函数`读取_r'中:
    readr.c:(.text._read_r+0x20):对`读取'的引用未定义
    collect2.exe:错误:LD 返回1退出状态
    gmake[1]:***[C:/ti/pdk_am335x_1_0_7/packages/ti/starterware/binary/bootloader/bin/am335x-evm/gcc/bootloader_boot_mcspi_a8host_debug.out 错误1.
    gmake:***[bootloader]错误2.

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    这似乎是 GNU GCC 编译器的一个问题、某些 Linux 论坛上已经报告了这一问题:
    bbs.archlinux.org/viewtopic.php

    我不知道为什么在我的环境中会发生这种情况、但 SDK 是在夜间进行测试的、并且没有遇到此问题、因此您的环境和系统变量中存在导致链接步骤构建方式不同的内容。 我将尝试找出是否有其他人遇到此问题。

    此致、
    Rahul