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.

Starterware build issue - include path - Windows - Cygwin

Other Parts Discussed in Thread: SYSBIOS

When building SYSBIOS Starterware for AM437x in the following environment, an issue with include paths occurs which prevents a successful build.

Host OS: Windows 7 64 bit

SYSBIOS: am437x_sysbios_ind_sdk_2.0.0.2

Toolchain: gcc-linaro-4.9-4.9-2015.01-3-2015.02-3

Cygwin: Cygwin x64 2.2.0

The problem occurs when gcc searches for the source file's include files and cannot find them because gcc cannot resolve include file paths relative to /cygdrive/c.

When gcc searches the list of include files for "types.h", this file cannot be found.

The makefile generated include path containing "types.h" is:

-I/cygdrive/c/ti/am437x_sysbios_ind_sdk_2.0.0.2/sdk/starterware/include

When this path is manually substituted with

-IC:/ti/am437x_sysbios_ind_sdk_2.0.0.2/sdk/starterware/include 

the problem is eliminated.

So, when include file paths are referenced with respect to 'C:' as opposed to '/cygdrive/c', the problem is mitigated. 

What is the solution to this problem?

The compilation step and resultant error is shown below. 

-------------------------------------------------------------------------------------

$ make -s PLATFORM=am43xx-evm PROFILE=debug
------------------------------------------------------
# Starterware 02.01.00.01
------------------------------------------------------
# Compiling am43xx-evm:a9host:debug:dal: i2c.c
i2c.c:48:19: fatal error: types.h: No such file or directory
#include "types.h"
^
compilation terminated.
/cygdrive/c/ti/am437x_sysbios_ind_sdk_2.0.0.2/sdk/starterware/build/makerules/rules_a9.mk:134: recipe for target '/cygdrive/c/ti/am437x_sysbios_ind_sdk_2.0.0.2/sdk/starterware/binary/dal/obj/am43xx-evm/a9/debug/gcc/i2c.o' failed
make[1]: *** [/cygdrive/c/ti/am437x_sysbios_ind_sdk_2.0.0.2/sdk/starterware/binary/dal/obj/am43xx-evm/a9/debug/gcc/i2c.o] Error 1
Makefile:130: recipe for target 'dal' failed
make: *** [dal] Error 2

------------------------------------------------------------------------------

The compilation script generated  by make is as follows.

------------------------------------------------------------------------------

C:/Linaro/Linaro_Toolchain_arm-none-eabi/bin/arm-eabi-gcc -c -mcpu=cortex-a9 -mtune=cortex-a9 -march=armv7-a -mfpu=neon -mfloat-abi=hard -eo.o -ea.o -mlong-calls -fdata-sections -funsigned-char -ffunction-sections -Wall -Dgcc -Darmv7a -D SUPPORT_UNALIGNED -MD -MF /cygdrive/c/ti/am437x_sysbios_ind_sdk_2.0.0.2/sdk/starterware/binary/dal/obj/am43xx-evm/a9/debug/gcc/.deps/i2c.P -D UART -D_DEBUG_=1 -g -DPLATFORM_EVM_SI -DAM43XX_FAMILY_BUILD -DBUILD_A9 -DUSE_STD_ASSERT -DTRACE_ENABLE -DDEBUG_BUILD -DASSERT_ENABLE -DPLATFORM_EVM_SI -DAM43XX_FAMILY_BUILD -DAM437X_BUILD -DBUILD_A9 -DUSE_STD_ASSERT -DTRACE_ENABLE -DDEBUG_BUILD -DASSERT_ENABLE -DBUILDCFG_MOD_UART -DBUILDCFG_MOD_I2C -DBUILDCFG_MOD_MCSPI -DBUILDCFG_MOD_ADC -DBUILDCFG_MOD_GPIO -DBUILDCFG_MOD_MMCSD -DBUILDCFG_MOD_DMTIMER -DBUILDCFG_MOD_EDMA3CC -DBUILDCFG_MOD_EDMA3TC -DBUILDCFG_MOD_PWMSS -DBUILDCFG_MOD_DSS -DBUILDCFG_MOD_QSPI -DBUILDCFG_MOD_WDT -DBUILDCFG_MOD_RTC -DBUILDCFG_MOD_LCDC -DBUILDCFG_MOD_DCAN -DBUILDCFG_MOD_VPFE -DBUILDCFG_MOD_CPSW -DBUILDCFG_MOD_GPMC -DPLATFORM_EVM_SI -DAM43XX_FAMILY_BUILD -DBUILD_A9 -DUSE_STD_ASSERT -DTRACE_ENABLE -DDEBUG_BUILD -DASSERT_ENABLE -DPLATFORM_EVM_SI -DAM43XX_FAMILY_BUILD -DAM437X_BUILD -DBUILD_A9 -DUSE_STD_ASSERT -DTRACE_ENABLE -DDEBUG_BUILD -DASSERT_ENABLE -IC:/Linaro/Linaro_Toolchain_arm-none-eabi/arm-eabi/include -I. -I/cygdrive/c/ti/am437x_sysbios_ind_sdk_2.0.0.2/sdk/starterware/include -I/cygdrive/c/ti/am437x_sysbios_ind_sdk_2.0.0.2/sdk/starterware/soc -I/cygdrive/c/ti/am437x_sysbios_ind_sdk_2.0.0.2/sdk/starterware/include/hw -I/cygdrive/c/ti/am437x_sysbios_ind_sdk_2.0.0.2/sdk/starterware/include/armv7a -I/cygdrive/c/ti/am437x_sysbios_ind_sdk_2.0.0.2/sdk/starterware/include/armv7a/am437x -I/cygdrive/c/ti/am437x_sysbios_ind_sdk_2.0.0.2/sdk/starterware/include/am43xx -I/cygdrive/c/ti/am437x_sysbios_ind_sdk_2.0.0.2/sdk/starterware/include/am43xx/am437x -I/cygdrive/c/ti/am437x_sysbios_ind_sdk_2.0.0.2/sdk/starterware/include/am437x -I/cygdrive/c/ti/am437x_sysbios_ind_sdk_2.0.0.2/sdk/starterware/include/utils/ -I/cygdrive/c/ti/am437x_sysbios_ind_sdk_2.0.0.2/sdk/starterware/utils -I/cygdrive/c/ti/am437x_sysbios_ind_sdk_2.0.0.2/sdk/starterware/library/usb_lib/include -I/cygdrive/c/ti/am437x_sysbios_ind_sdk_2.0.0.2/sdk/starterware/include -I/cygdrive/c/ti/am437x_sysbios_ind_sdk_2.0.0.2/sdk/starterware/include/hw -I/cygdrive/c/ti/am437x_sysbios_ind_sdk_2.0.0.2/sdk/starterware/include/armv7a -I/cygdrive/c/ti/am437x_sysbios_ind_sdk_2.0.0.2/sdk/starterware/include/am43xx -I/cygdrive/c/ti/am437x_sysbios_ind_sdk_2.0.0.2/sdk/starterware/include/am437x -I/cygdrive/c/ti/am437x_sysbios_ind_sdk_2.0.0.2/sdk/starterware/include/armv7a/am437x -I/cygdrive/c/ti/am437x_sysbios_ind_sdk_2.0.0.2/sdk/starterware/library/third_party/ff9b/src -I/cygdrive/c/ti/am437x_sysbios_ind_sdk_2.0.0.2/sdk/starterware/library/third_party/ff9b/port -x c -o /cygdrive/c/ti/am437x_sysbios_ind_sdk_2.0.0.2/sdk/starterware/binary/dal/obj/am43xx-evm/a9/debug/gcc/i2c.o i2c.c

Many thanks for your assistance.

  • wbutner,
    I don't know how Starterware is built, but I am guessing that you have XDCtools somewhere in the path at the time when that command line is executed. Can you print that path? XDCtools has its own version of the Cygwin DLL, which is probably older than the version used to build your compiler and that caused problems before. Also, what's the gmake command line that runs the makefile that includes the gcc command line?
  • Sasha,

    Thank you for your response.

    It appears that XDCtools is not in the path, which is provided below using 'printenv' and 'set' from within the Cygwin bash shell.

    There is a buiild environment variable contained in Rules.make in the root directory of Starterware which points to the Cygwin DLL, as follows.

    UTILS_INSTALL_DIR = C:/ti/ccsv6/utils/cygwin

    It is most likely that this Cygwin directory is out of sync with Cygwin x64 2.2.0 installed which is used for the build process bash shell. 

    The gmake command line that runs the makefile that includes the command line is:

    $ make PLATFORM=am43xx-evm PROFILE=debug

    The compiler was prebuilt and downloaded from Linaro, rather than being built on the Windows host used for the Starterware build.

    -------------

    Path:

    From within the Cygwin bash shell:

    $ printenv
    HOMEPATH=\Users\wbutner
    APPDATA=C:\Users\wbutner\AppData\Roaming
    ProgramW6432=C:\Program Files
    HOSTNAME=van-wmb-w7-2
    SHELL=/bin/bash
    TERM=xterm
    PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 60 Stepping 3, GenuineIntel
    PROFILEREAD=true
    WINDIR=C:\Windows
    PUBLIC=C:\Users\Public
    OLDPWD=/cygdrive/c/ti/am437x_sysbios_ind_sdk_2.0.0.2/sdk
    ORIGINAL_PATH=/cygdrive/c/ProgramData/Oracle/Java/javapath:/cygdrive/c/Program Files (x86)/Intel/iCLS Client:/cygdrive/c/Program Files/Intel/iCLS Client:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program Files/Intel/WiFi/bin:/cygdrive/c/Program Files/Common Files/Intel/WirelessCommon:/cygdrive/c/Program Files (x86)/ATI Technologies/ATI.ACE/Core-Static:/cygdrive/c/Program Files/Intel/Intel(R) Management Engine Components/DAL:/cygdrive/c/Program Files/Intel/Intel(R) Management Engine Components/IPT:/cygdrive/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/DAL:/cygdrive/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/IPT:/cygdrive/c/Windows/system32/gs/gs8.71/bin:/cygdrive/c/Program Files (x86)/Skype/Phone
    USERDOMAIN=van-wmb-w7-2
    CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files
    OS=Windows_NT
    ALLUSERSPROFILE=C:\ProgramData
    windows_tracing_flags=3
    USER=wbutner
    windows_tracing_logfile=C:\BVTBin\Tests\installpackage\csilogfile.log
    SMARTRFSTUDIO7PATH=C:\Program Files (x86)\Texas Instruments\SmartRF Tools\SmartRF Studio 7
    TEMP=/tmp
    CYGPATH=cygpath
    COMMONPROGRAMFILES=C:\Program Files\Common Files
    USERNAME=wbutner
    PROCESSOR_LEVEL=6
    IA_SDK_HOME=C:\ti\am437x_sysbios_ind_sdk_2.0.0.2\sdk
    ProgramFiles(x86)=C:\Program Files (x86)
    PATH=/usr/local/bin:/usr/bin:/cygdrive/c/ProgramData/Oracle/Java/javapath:/cygdrive/c/Program Files (x86)/Intel/iCLS Client:/cygdrive/c/Program Files/Intel/iCLS Client:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program Files/Intel/WiFi/bin:/cygdrive/c/Program Files/Common Files/Intel/WirelessCommon:/cygdrive/c/Program Files (x86)/ATI Technologies/ATI.ACE/Core-Static:/cygdrive/c/Program Files/Intel/Intel(R) Management Engine Components/DAL:/cygdrive/c/Program Files/Intel/Intel(R) Management Engine Components/IPT:/cygdrive/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/DAL:/cygdrive/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/IPT:/cygdrive/c/Windows/system32/gs/gs8.71/bin:/cygdrive/c/Program Files (x86)/Skype/Phone
    PSModulePath=C:\Windows\system32\WindowsPowerShell\v1.0\Modules\
    FP_NO_HOST_CHECK=NO
    PWD=/cygdrive/c/ti/am437x_sysbios_ind_sdk_2.0.0.2/sdk/starterware
    SYSTEMDRIVE=C:
    LANG=en_US.UTF-8
    USERPROFILE=C:\Users\wbutner
    TZ=America/Vancouver
    PS1=\[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[33m\]\w\[\e[0m\]\n\$
    LOGONSERVER=\\VAN-WMB-W7-2
    CommonProgramW6432=C:\Program Files\Common Files
    PROCESSOR_ARCHITECTURE=AMD64
    LOCALAPPDATA=C:\Users\wbutner\AppData\Local
    ProgramData=C:\ProgramData
    EXECIGNORE=*.dll
    SHLVL=1
    HOME=/home/wbutner
    PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
    HOMEDRIVE=C:
    DellClientSystemUpdatePath=C:\Program Files (x86)\Dell\ClientSystemUpdate\
    COMSPEC=C:\Windows\system32\cmd.exe
    TMP=/tmp
    SYSTEMROOT=C:\Windows
    PRINTER=HP Color LaserJet 5550 PCL 5
    PROCESSOR_REVISION=3c03
    INFOPATH=/usr/local/info:/usr/share/info:/usr/info
    PROGRAMFILES=C:\Program Files
    NUMBER_OF_PROCESSORS=4
    SESSIONNAME=Console
    COMPUTERNAME=VAN-WMB-W7-2
    _=/usr/bin/printenv

    $ set
    ALLUSERSPROFILE='C:\ProgramData'
    APPDATA='C:\Users\wbutner\AppData\Roaming'
    BASH=/bin/bash
    BASHOPTS=cmdhist:complete_fullquote:expand_aliases:extquote:force_fignore:hostcomplete:interactive_comments:login_shell:progcomp:promptvars:sourcepath
    BASH_ALIASES=()
    BASH_ARGC=()
    BASH_ARGV=()
    BASH_CMDS=()
    BASH_LINENO=()
    BASH_SOURCE=()
    BASH_VERSINFO=([0]="4" [1]="3" [2]="39" [3]="2" [4]="release" [5]="x86_64-unknown-cygwin")
    BASH_VERSION='4.3.39(2)-release'
    COMMONPROGRAMFILES='C:\Program Files\Common Files'
    COMPUTERNAME=VAN-WMB-W7-2
    COMSPEC='C:\Windows\system32\cmd.exe'
    CYGPATH=cygpath
    CYG_SYS_BASHRC=1
    CommonProgramW6432='C:\Program Files\Common Files'
    DIRSTACK=()
    DellClientSystemUpdatePath='C:\Program Files (x86)\Dell\ClientSystemUpdate\'
    EUID=197608
    EXECIGNORE='*.dll'
    FP_NO_HOST_CHECK=NO
    GROUPS=()
    HISTFILE=/home/wbutner/.bash_history
    HISTFILESIZE=500
    HISTSIZE=500
    HOME=/home/wbutner
    HOMEDRIVE=C:
    HOMEPATH='\Users\wbutner'
    HOSTNAME=van-wmb-w7-2
    HOSTTYPE=x86_64
    IA_SDK_HOME='C:\ti\am437x_sysbios_ind_sdk_2.0.0.2\sdk'
    IFS=$' \t\n'
    INFOPATH=/usr/local/info:/usr/share/info:/usr/info
    LANG=en_US.UTF-8
    LOCALAPPDATA='C:\Users\wbutner\AppData\Local'
    LOGONSERVER='\\VAN-WMB-W7-2'
    MACHTYPE=x86_64-unknown-cygwin
    MAILCHECK=60
    NUMBER_OF_PROCESSORS=4
    OLDPWD=/cygdrive/c/ti/am437x_sysbios_ind_sdk_2.0.0.2/sdk
    OPTERR=1
    OPTIND=1
    ORIGINAL_PATH='/cygdrive/c/ProgramData/Oracle/Java/javapath:/cygdrive/c/Program Files (x86)/Intel/iCLS Client:/cygdrive/c/Program Files/Intel/iCLS Client:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program Files/Intel/WiFi/bin:/cygdrive/c/Program Files/Common Files/Intel/WirelessCommon:/cygdrive/c/Program Files (x86)/ATI Technologies/ATI.ACE/Core-Static:/cygdrive/c/Program Files/Intel/Intel(R) Management Engine Components/DAL:/cygdrive/c/Program Files/Intel/Intel(R) Management Engine Components/IPT:/cygdrive/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/DAL:/cygdrive/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/IPT:/cygdrive/c/Windows/system32/gs/gs8.71/bin:/cygdrive/c/Program Files (x86)/Skype/Phone'
    OS=Windows_NT
    OSTYPE=cygwin
    PATH='/usr/local/bin:/usr/bin:/cygdrive/c/ProgramData/Oracle/Java/javapath:/cygdrive/c/Program Files (x86)/Intel/iCLS Client:/cygdrive/c/Program Files/Intel/iCLS Client:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program Files/Intel/WiFi/bin:/cygdrive/c/Program Files/Common Files/Intel/WirelessCommon:/cygdrive/c/Program Files (x86)/ATI Technologies/ATI.ACE/Core-Static:/cygdrive/c/Program Files/Intel/Intel(R) Management Engine Components/DAL:/cygdrive/c/Program Files/Intel/Intel(R) Management Engine Components/IPT:/cygdrive/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/DAL:/cygdrive/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/IPT:/cygdrive/c/Windows/system32/gs/gs8.71/bin:/cygdrive/c/Program Files (x86)/Skype/Phone'
    PATHEXT='.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC'
    PIPESTATUS=([0]="0")
    PPID=860
    PRINTER='HP Color LaserJet 5550 PCL 5'
    PROCESSOR_ARCHITECTURE=AMD64
    PROCESSOR_IDENTIFIER='Intel64 Family 6 Model 60 Stepping 3, GenuineIntel'
    PROCESSOR_LEVEL=6
    PROCESSOR_REVISION=3c03
    PROFILEREAD=true
    PROGRAMFILES='C:\Program Files'
    PS1='\[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[33m\]\w\[\e[0m\]\n\$ '
    PS2='> '
    PS4='+ '
    PSModulePath='C:\Windows\system32\WindowsPowerShell\v1.0\Modules\'
    PUBLIC='C:\Users\Public'
    PWD=/cygdrive/c/ti/am437x_sysbios_ind_sdk_2.0.0.2/sdk/starterware
    ProgramData='C:\ProgramData'
    ProgramW6432='C:\Program Files'
    SESSIONNAME=Console
    SHELL=/bin/bash
    SHELLOPTS=braceexpand:emacs:hashall:histexpand:history:interactive-comments:monitor
    SHLVL=1
    SMARTRFSTUDIO7PATH='C:\Program Files (x86)\Texas Instruments\SmartRF Tools\SmartRF Studio 7'
    SYSTEMDRIVE=C:
    SYSTEMROOT='C:\Windows'
    TEMP=/tmp
    TERM=xterm
    TMP=/tmp
    TZ=America/Vancouver
    UID=197608
    USER=wbutner
    USERDOMAIN=van-wmb-w7-2
    USERNAME=wbutner
    USERPROFILE='C:\Users\wbutner'
    WINDIR='C:\Windows'
    _=printenv
    windows_tracing_flags=3
    windows_tracing_logfile='C:\BVTBin\Tests\installpackage\csilogfile.log'
    profile_d ()
    {
    _LC_ALL_SET_="${LC_ALL+set}";
    _LC_SAVE_="${LC_ALL-null}";
    LC_ALL=C;
    if [ "${_LC_SAVE_}" = "null" ]; then
    for file in /etc/profile.d/*.$1;
    do
    [ -e "${file}" ] && . "${file}";
    done;
    unset LC_ALL;
    else
    for file in /etc/profile.d/*.$1;
    do
    [ -e "${file}" ] && LC_ALL="${_LC_SAVE_}" . "${file}";
    done;
    LC_ALL="${_LC_SAVE_}";
    fi;
    unset file;
    unset _LC_ALL_SET_;
    unset _LC_SAVE_
    }

    -------------

     

  • It's possible UTILS_INSTALL_DIR is used somewhere in the make file to specify the shell to use when executing command lines, which would then mean that sh.exe and cygwin1.dll from UTILS_INSTALL_DIR are used when executing commands. Unfortunately, I don't know much about either Starterware or Cygwin to dig deeper into that, but I can ask around to see where to direct your post. For the benefit of anyone who can help, can you check how is the environment variable UTILS_INSTALL_DIR used?
    Also, information from these two links might be useful to debug the problem, in addition to any Cygwin docs from the Web:
     http://www.eclipse.org/forums/index.php?t=msg&th=152071&start=0&S=e354daba09d135def6f299c20307ab0f
    www.gnu.org/.../Choosing-the-Shell.html

  • Thank you for your reply.

    UTILS_INSTALL_DIR is used to specify the location of Cygwin utilities like 'mkdir' for example, called during the build process.

    UTILS_INSTALL_DIR was just changed to point to the Cygwin64\bin, the location of the utilities associated with the Cygwin x64 installation. Invocations of these utilities during the make process work just fine.

    However, this change did not solve the problem regarding gcc locating include paths relative to '/cygdrive/c' as opposed to 'C:'.

    In this build process, gcc can resolve include directories referenced to 'C:' but not to '/cygdrive/c', i.e. '-IC:...' works but '-I/cycgdrive/c....' does not.

    As you suggest, perhaps someone familiar with Cygwin, gcc and Starterware can provide some input.

    Many thanks again.
  • I went ahead and moved this thread over to the device forum in hopes that one of the StarterWare experts there can add something more.