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.

Compiler/PROCESSOR-SDK-AM335X: Compile error

Part Number: PROCESSOR-SDK-AM335X
Other Parts Discussed in Thread: MATHLIB, TPS65910, TPS65217, TPS65218, AMIC110

Tool/software: TI C/C++ Compiler

I installed ti-processor-sdk-rtos-am335x-evm-04.00.00.04-Windows-x86-Install.exe, gmake compile error:

Archiving am335x-evm:a8host:debug:dal_boot
#
# Compiling am335x-evm:a8host:debug:bootloader: ./src/sbl_copy.c
# Compiling am335x-evm:a8host:debug:bootloader: ./src/sbl_main.c
./src/sbl_main.c: In function 'main':
./src/sbl_main.c:88:14: warning: variable 'status' set but not used [-Wunused-but-set-variable]
uint32_t status;
^
# Compiling am335x-evm:a8host:debug:bootloader: ../examples/gpio/gpio_app.c
# Compiling am335x-evm:a8host:debug:bootloader: ./src/sbl_uart.c
# Compiling am335x-evm:a8host:debug:bootloader: ./src/am335x/sbl_am335x_platform.c
# Compiling am335x-evm:a8host:debug:bootloader: ./src/am335x/sbl_am335x_platform_ddr.c
# Compiling am335x-evm:a8host:debug:bootloader: ./src/am335x/sbl_am335x_platform_pll.c
# Linking into C:/ti/PDK_AM~1/packages/ti/starterware/binary/bootloader/bin/am335x-evm/gcc/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): In function `_sbrk_r':
sbrkr.c:(.text._sbrk_r+0x18): undefined reference to `_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): In function `_write_r'
:
writer.c:(.text._write_r+0x20): undefined reference to `_write'
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-closer.o): In function `_close_r'
:
closer.c:(.text._close_r+0x18): undefined reference to `_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): In function `_fstat_r'
:
fstatr.c:(.text._fstat_r+0x1c): undefined reference to `_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): In function `_isatty_
r':
isattyr.c:(.text._isatty_r+0x18): undefined reference to `_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-lseekr.o): In function `_lseek_r'
:
lseekr.c:(.text._lseek_r+0x20): undefined reference to `_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): In function `_read_r':
readr.c:(.text._read_r+0x20): undefined reference to `_read'
collect2.exe: error: ld returned 1 exit status
gmake[2]: *** [C:/ti/PDK_AM~1/packages/ti/starterware/binary/bootloader/bin/am335x-evm/gcc/bootloader_boot_uart_a8host_debug.out] Error 1
gmake[1]: *** [bootloader] Error 2
gmake: *** [starterware_boot] Error 2

No matter how I uninstall the installation are compiled however.
  • The RTOS team have been notified. They will respond here.
  • Can you indicate what command line option did you use to invoke the build ? Also please provide the log of the pdksetupenv.sh script for our reference.  I am unable to reproduce this issue in my setup so suspect that you have a setup issue.

    To build and test this, here are the steps that I used.

    set SDK_INSTALL_PATH= <Directory where SDK is installed>     //Not required if you have installed in default location.
    
    cd processor_sdk_rtos_am335x_4_00_00_04
    
    setupenv.bat    //Ensure all paths are valid
    
    cd ../pdk_am335x_1_0_7/packages/ti/starterware
    
    rm -rf binary
    gmake clean -s KW_BUILD=no
    gmake bootloader BUILDCFG=boot BOOTMODE=mcspi PLATFORM=am335x-evm PROFILE=debug -s KW_BUILD=no

    Hope this helps.

  • This is my compilation process:

    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
    Optional parameter not configured : CG_XML_BIN_INSTALL_PATH
    REQUIRED for xdc release build
    Example: set CG_XML_BIN_INSTALL_PATH=C:/ti/cg_xml/bin
    Optional parameter not configured : DOXYGEN_INSTALL_PATH
    REQUIRED for xdc release build
    Example: set DOXYGEN_INSTALL_PATH=C:/ti/Doxygen/doxygen/1.5.1-p1/bin
    **************************************************************************
    Environment Configuration:
    LIMIT_SOCS : am335x
    LIMIT_BOARDS : evmAM335x icev2AM335x bbbAM335x skAM335x
    PDK_INSTALL_PATH : /ti/PDK_AM~1/packages
    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: UNKNOWN
    IPC_ALT_PLATFORM:
    PROC_SDK_INSTALL_PATH : C:/ti/processor_sdk_rtos_am335x_4_00_00_04
    **************************************************************************
    Changing to short name to support directory names containing spaces
    current directory: C:/ti/processor_sdk_rtos_am335x_4_00_00_04
    PROCESSOR SDK BUILD ENVIRONMENT CONFIGURED
    **************************************************************************

    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 packages

    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 binary

    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
    # Making am335x-evm:a8host:debug:device...
    # Compiling am335x-evm:a8host:debug:device: qspi_flash.c
    # Compiling am335x-evm:a8host:debug:device: lcd_device.c
    # Compiling am335x-evm:a8host:debug:device: pixcir_tsc.c
    # Compiling am335x-evm:a8host:debug:device: camera_device.c
    # Compiling am335x-evm:a8host:debug:device: enet_phy_device.c
    # Compiling am335x-evm:a8host:debug:device: nand_device.c
    # Compiling am335x-evm:a8host:debug:device: pmic_device.c
    # Compiling am335x-evm:a8host:debug:device: pmic_device_tps65910.c
    # Compiling am335x-evm:a8host:debug:device: pmic_device_tps65217.c
    # Compiling am335x-evm:a8host:debug:device: pmic_device_tps65218.c
    # Compiling am335x-evm:a8host:debug:device: clock_synthesizer.c
    #
    # Archiving am335x-evm:a8host:debug:device_boot
    #
    # Making am335x-evm:a8host:debug:board...
    # Compiling am335x-evm:a8host:debug:board: board.c
    # Compiling am335x-evm:a8host:debug:board: dcard.c
    # Compiling am335x-evm:a8host:debug:board: platform.c
    # Compiling am335x-evm:a8host:debug:board: pinmux.c
    # Compiling am335x-evm:a8host:debug:board: am335x/board_am335x.c
    # Compiling am335x-evm:a8host:debug:board: am335x/dcard_am335x.c
    # Compiling am335x-evm:a8host:debug:board: am335x/am335x_gpevm.c
    # Compiling am335x-evm:a8host:debug:board: am335x/am335x_evmsk.c
    # Compiling am335x-evm:a8host:debug:board: am335x/am335x_beaglebone.c
    # Compiling am335x-evm:a8host:debug:board: am335x/am335x_beagleboneblack.c
    # Compiling am335x-evm:a8host:debug:board: am335x/am335x_icev1.c
    # Compiling am335x-evm:a8host:debug:board: am335x/am335x_icev2.c
    # Compiling am335x-evm:a8host:debug:board: am335x/am335x_amic110.c
    # Compiling am335x-evm:a8host:debug:board: am335x/am335x_custom.c
    # Compiling am335x-evm:a8host:debug:board: am335x/am335x_gpevm_pinmux_data.c
    # Compiling am335x-evm:a8host:debug:board: am335x/am335x_evmsk_pinmux_data.c
    # Compiling am335x-evm:a8host:debug:board: am335x/am335x_beaglebone_pinmux_data.c
    # Compiling am335x-evm:a8host:debug:board: am335x/am335x_beagleboneblack_pinmux_data.c
    # Compiling am335x-evm:a8host:debug:board: am335x/am335x_icev1_pinmux_data.c
    # Compiling am335x-evm:a8host:debug:board: am335x/am335x_icev2_pinmux_data.c
    # Compiling am335x-evm:a8host:debug:board: am335x/am335x_amic11x_pinmux_data.c
    # Compiling am335x-evm:a8host:debug:board: am335x/am335x_lcd4_dcard.c
    #
    # Archiving am335x-evm:a8host:debug:board_boot
    #
    # Making am335x-evm:a8host:debug:utils...
    # Compiling am335x-evm:a8host:debug:utils: console_utils_uart.c
    # Compiling am335x-evm:a8host:debug:utils: console_utils.c
    # Compiling am335x-evm:a8host:debug:utils: agraph.c
    # Compiling am335x-evm:a8host:debug:utils: i2c_utils.c
    # Compiling am335x-evm:a8host:debug:utils: ascii_utils.c
    # Compiling am335x-evm:a8host:debug:utils: ramdiskutils.c
    # Compiling am335x-evm:a8host:debug:utils: time_utils.c
    # Compiling am335x-evm:a8host:debug:utils: dmtimer_utils.c
    # Compiling am335x-evm:a8host:debug:utils: display_utils.c
    display_utils.c: In function 'DISPLAYUtilsConfig':
    display_utils.c:97:14: warning: comparison between pointer and integer
    if (NULL != frmBufAddr)
    ^
    # Compiling am335x-evm:a8host:debug:utils: display_utils_lcdc.c
    #
    # Archiving am335x-evm:a8host:debug:utils_boot
    #
    # Making am335x-evm:a8host:debug:soc...
    # Compiling am335x-evm:a8host:debug:soc: armv7a/gcc/cp15.S
    # Compiling am335x-evm:a8host:debug:soc: armv7a/gcc/exceptionhandler.S
    # Compiling am335x-evm:a8host:debug:soc: armv7a/gcc/sbl_init.S
    # Compiling am335x-evm:a8host:debug:soc: soc.c
    # Compiling am335x-evm:a8host:debug:soc: armv7a/startup.c
    # Compiling am335x-evm:a8host:debug:soc: armv7a/gcc/cpu.c
    # Compiling am335x-evm:a8host:debug:soc: am335x/am335x_chipdb.c
    # Compiling am335x-evm:a8host:debug:soc: am335x/hw_am335x_chipdb.c
    # Compiling am335x-evm:a8host:debug:soc: am335x/hw_am335x_chipdb_baseaddr.c
    # Compiling am335x-evm:a8host:debug:soc: am335x/hw_am335x_chipdb_interrupt.c
    # Compiling am335x-evm:a8host:debug:soc: am335x/intc.c
    # Compiling am335x-evm:a8host:debug:soc: cache_arm.c
    # Compiling am335x-evm:a8host:debug:soc: mmu_arm.c
    # Compiling am335x-evm:a8host:debug:soc: am335x/am335x_control.c
    # Compiling am335x-evm:a8host:debug:soc: am335x/am335x_prcm.c
    #
    # Archiving am335x-evm:a8host:debug:soc_boot
    #
    # Making am335x-evm:a8host:debug:dal...
    # Compiling am335x-evm:a8host:debug:dal: i2c.c
    # Compiling am335x-evm:a8host:debug:dal: uart.c
    # Compiling am335x-evm:a8host:debug:dal: gpio.c
    # Compiling am335x-evm:a8host:debug:dal: mcspi.c
    # Compiling am335x-evm:a8host:debug:dal: gpmc.c
    # Compiling am335x-evm:a8host:debug:dal: elm.c
    # Compiling am335x-evm:a8host:debug:dal: qspi.c
    # Compiling am335x-evm:a8host:debug:dal: edma.c
    # Compiling am335x-evm:a8host:debug:dal: hs_mmcsd.c
    # Compiling am335x-evm:a8host:debug:dal: dmtimer.c
    # Compiling am335x-evm:a8host:debug:dal: epwm.c
    # Compiling am335x-evm:a8host:debug:dal: vpfe.c
    # Compiling am335x-evm:a8host:debug:dal: dss.c
    # Compiling am335x-evm:a8host:debug:dal: dss_coefficients.c
    # Compiling am335x-evm:a8host:debug:dal: wdt.c
    # Compiling am335x-evm:a8host:debug:dal: ecap.c
    # Compiling am335x-evm:a8host:debug:dal: tsc_adc_ss.c
    # Compiling am335x-evm:a8host:debug:dal: rtc.c
    # Compiling am335x-evm:a8host:debug:dal: dal_misc.c
    # Compiling am335x-evm:a8host:debug:dal: dcan.c
    # Compiling am335x-evm:a8host:debug:dal: cpsw.c
    # Compiling am335x-evm:a8host:debug:dal: cpsw_ale.c
    # Compiling am335x-evm:a8host:debug:dal: mdio.c
    # Compiling am335x-evm:a8host:debug:dal: mailbox.c
    # Compiling am335x-evm:a8host:debug:dal: pruss.c
    # Compiling am335x-evm:a8host:debug:dal: lcdc.c
    #
    # Archiving am335x-evm:a8host:debug:dal_boot
    #
    # Compiling am335x-evm:a8host:debug:bootloader: ./src/sbl_copy.c
    # Compiling am335x-evm:a8host:debug:bootloader: ./src/sbl_main.c
    ./src/sbl_main.c: In function 'main':
    ./src/sbl_main.c:88:14: warning: variable 'status' set but not used [-Wunused-but-set-variable]
    uint32_t status;
    ^
    # Compiling am335x-evm:a8host:debug:bootloader: ../examples/gpio/gpio_app.c
    # Compiling am335x-evm:a8host:debug:bootloader: ./src/sbl_mcspi.c
    # Compiling am335x-evm:a8host:debug:bootloader: ./src/am335x/sbl_am335x_platform.c
    # Compiling am335x-evm:a8host:debug:bootloader: ./src/am335x/sbl_am335x_platform_ddr.c
    # Compiling am335x-evm:a8host:debug:bootloader: ./src/am335x/sbl_am335x_platform_pll.c
    # Linking into 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): In function `_sbrk_r':
    sbrkr.c:(.text._sbrk_r+0x18): undefined reference to `_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): In function `_write_r'
    :
    writer.c:(.text._write_r+0x20): undefined reference to `_write'
    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-closer.o): In function `_close_r'
    :
    closer.c:(.text._close_r+0x18): undefined reference to `_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): In function `_fstat_r'
    :
    fstatr.c:(.text._fstat_r+0x1c): undefined reference to `_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): In function `_isatty_
    r':
    isattyr.c:(.text._isatty_r+0x18): undefined reference to `_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-lseekr.o): In function `_lseek_r'
    :
    lseekr.c:(.text._lseek_r+0x20): undefined reference to `_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): In function `_read_r':
    readr.c:(.text._read_r+0x20): undefined reference to `_read'
    collect2.exe: error: ld returned 1 exit status
    gmake[1]: *** [C:/ti/pdk_am335x_1_0_7/packages/ti/starterware/binary/bootloader/bin/am335x-evm/gcc/bootloader_boot_mcspi_a8host_debug.out] Error 1
    gmake: *** [bootloader] Error 2

  • this seems to be an issue with the GNU GCC compiler that has been reported on some Linux forums:
    bbs.archlinux.org/viewtopic.php

    I am not sure why this occur in my environment but the SDK is tested on nightly basis and has not run into this issue so there is something in your environment and system variables that is causing the link step to build differently. I will try to find out if any one else has run into this issue.

    Regards,
    Rahul