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.

cannot open source file

Other Parts Discussed in Thread: OMAP-L138

Hello,

I have this error while running example project.

>> Compilation failure
gmake: *** [src/main_rmii_loopback.obj] Error 1
'Building file: ../src/test_rmii_loopback.c'
'Invoking: C6000 Compiler'
"C:/ti/ccsv6/tools/compiler/ti-cgt-c6000_8.1.0/bin/cl6x" -mv6740 -g -O2 --include_path="C:/ti/ccsv6/tools/compiler/ti-cgt-c6000_8.1.0/include" --diag_warning=225 --preproc_with_compile --preproc_dependency="src/test_rmii_loopback.pp" --obj_directory="src" "../src/test_rmii_loopback.c"
"../src/test_rmii_loopback.c", line 9: fatal error: cannot open source file "types.h"
1 catastrophic error detected in the compilation of "../src/test_rmii_loopback.c".
Compilation terminated.

>> Compilation failure
gmake: *** [src/test_rmii_loopback.obj] Error 1
gmake: Target `all' not remade because of errors.

**** Build Finished ****

I have included paths for the directory which includes all the headers in the ccs6  project_build_properties\c_c++general\paths and symbols.

It is not able to locate the types.h and apparently rest of all headers.

Any idea?

  • Axay Rana said:
    I have included paths for the directory which includes all the headers in the ccs6  project_build_properties\c_c++general\paths and symbols.

    For the TI compiler tools, the include paths should be added under Project Properties->Build->Compiler->Include Options, under the --include_path option. Please add the paths here and let us know if the errors persist.

  • When i add the path in the previous method, it automatically shows me in the section you're suggesting. However i added the path as you said and error persist!

    Any clues?
  • Hello Axay,

    Please post the newest compilation error.

    Also, how are you specifying your include path?

    Here's an example of an include path given that abc is located in the project directory and types.h is contained in directory abc.

    "${ProjDirPath}/abc"

    make sure all your include paths are above the "C:/ti/ccsv6/tools/compiler/ti-cgt-c6000_8.1.0/include" include path, i.e.


    "${ProjDirPath}/abc"

    "C:/ti/ccsv6/tools/compiler/ti-cgt-c6000_8.1.0/include"


    Stephen

  • Axay Rana said:
    However i added the path as you said and error persist!

    Please post the full output of the CCS build console (you can copy and paste it to a text file and attach it here). 
    Also please post a screenshot of your compiler include paths.

  • Hello Aarti,

    here is the build console output!

    **** Clean-only build of configuration Release for project OMAPL138EVM_Test_Emac_Loopback_RMII ****

    "C:\\ti\\ccsv6\\utils\\bin\\gmake" -k clean
    DEL /F "evmomapl138_test_emac_loopback_rmii.out"
    Could Not Find C:\ti\extra_projects_ti\CCSv4-2-4_with_SOM-M1_BSL_WS\OMAP-L138_GEL_BSL_Files\c6000_tests\evm\emac_loopback_rmii\Release\evmomapl138_test_emac_loopback_rmii.out
    DEL /F "src\main_rmii_loopback.pp" "src\test_rmii_loopback.pp"
    DEL /F "src\main_rmii_loopback.obj" "src\test_rmii_loopback.obj"
    Could Not Find C:\ti\extra_projects_ti\CCSv4-2-4_with_SOM-M1_BSL_WS\OMAP-L138_GEL_BSL_Files\c6000_tests\evm\emac_loopback_rmii\Release\src\main_rmii_loopback.obj
    'Finished clean'
    ' '

    **** Build Finished ****

    **** Build of configuration Release for project OMAPL138EVM_Test_Emac_Loopback_RMII ****

    "C:\\ti\\ccsv6\\utils\\bin\\gmake" -k all
    'Building file: ../src/main_rmii_loopback.c'
    'Invoking: C6000 Compiler'
    "C:/ti/ccsv6/tools/compiler/ti-cgt-c6000_8.1.0/bin/cl6x" -mv6740 -g -O2 --include_path="C:/ti/ccsv6/tools/compiler/ti-cgt-c6000_8.1.0/include" --diag_warning=225 --preproc_with_compile --preproc_dependency="src/main_rmii_loopback.pp" --obj_directory="src" "../src/main_rmii_loopback.c"
    "../src/main_rmii_loopback.c", line 7: fatal error: cannot open source file "types.h"
    1 catastrophic error detected in the compilation of "../src/main_rmii_loopback.c".
    Compilation terminated.

    >> Compilation failure
    gmake: *** [src/main_rmii_loopback.obj] Error 1
    'Building file: ../src/test_rmii_loopback.c'
    'Invoking: C6000 Compiler'
    "C:/ti/ccsv6/tools/compiler/ti-cgt-c6000_8.1.0/bin/cl6x" -mv6740 -g -O2 --include_path="C:/ti/ccsv6/tools/compiler/ti-cgt-c6000_8.1.0/include" --diag_warning=225 --preproc_with_compile --preproc_dependency="src/test_rmii_loopback.pp" --obj_directory="src" "../src/test_rmii_loopback.c"
    "../src/test_rmii_loopback.c", line 9: fatal error: cannot open source file "types.h"
    1 catastrophic error detected in the compilation of "../src/test_rmii_loopback.c".
    Compilation terminated.

    >> Compilation failure
    gmake: *** [src/test_rmii_loopback.obj] Error 1
    gmake: Target `all' not remade because of errors.

    **** Build Finished ****
  • Axay Rana said:
    "C:/ti/ccsv6/tools/compiler/ti-cgt-c6000_8.1.0/bin/cl6x" -mv6740 -g -O2 --include_path="C:/ti/ccsv6/tools/compiler/ti-cgt-c6000_8.1.0/include" --diag_warning=225 --preproc_with_compile --preproc_dependency="src/main_rmii_loopback.pp" --obj_directory="src" "../src/main_rmii_loopback.c"

    This command shows that the only include path being passed to the compiler is "C:/ti/ccsv6/tools/compiler/ti-cgt-c6000_8.1.0/include". 

    In the screenshot you attached, I can see a second include path but it shows that it is set for the Debug build configuration. What you seem to be building here is the Release build configuration as evidenced by this text: **** Build of configuration Release for project OMAPL138EVM_Test_Emac_Loopback_RMII **** 

    Since you are building the Release configuration, you would need to go to Project Properties, make sure the Configuration at the top is set to Release, and then go under Compiler->Include Paths and make sure your custom path is added there. The compiler options are independent for the different build configurations (that is its intended purpose), so setting them in one build configuration does not automatically carry it over to another build configuration.

  • I Tried it to set to release and included path in the include options however its similar.
    It fails. :(
  • Select Manage Configuration. After selecting Release from the list of configurations, click "Set Active" and then select Ok.

    Then, wait until the project explorer shows that your project is set to the release version, i.e. [Active - Release] in the project name.

    The project should now build as the release version.

    Stephen

  • Hello Stephen,

    I did it and i see the active-release configuration next to name however build fails with same errors!
  • Is types.h in either of the two directories specified by the release configuration?
  • The quickest way to solve the problem might be just to do the following:

    1. Create a file name types.h in your project folder and add the items shown below in it.

    2, Add your project folder as an include directory, i.e. "${ProjDirPath}"

    Stephen

    #ifndef _MY_TYPES_H_
    #define _MY_TYPES_H_
    
    typedef unsigned char       boolean;
    
    typedef unsigned char          uint8;
    typedef unsigned short         uint16;
    typedef unsigned int           uint32;
    typedef unsigned long long int uint64;
    
    typedef signed char          sint8;
    typedef signed short         sint16;
    typedef signed int           sint32;
    typedef signed long long int sint64;
    
    typedef unsigned int        uint8_least;
    typedef unsigned int        uint16_least;
    typedef unsigned int        uint32_least;
    
    typedef signed int          sint8_least;
    typedef signed int          sint16_least;
    typedef signed int          sint32_least;
    
    typedef float               float32;
    typedef double              float64;
    
    #endif

  • Ys, i tried it before already. But it asks for all the headers(emac.h and blah blah) after that and potential solution is to give compiler address of headers which it can't get it!
  • Where did you get the example project from.  Example project should have all the necessary files for you to build the project.

    Also, did you import (i.e. File->import) the example project into CCS?  You'll need to import the project into CCS.

  • I imported the project as ccs project from OMAP-L138 exampls codes from nsp!
  • I am not familiar with the nsp.  

    Use windows explorer to search for types.h in the root directory of that development environment.

  • I went to   and downloaded the NSP 1.10.03.15. 

    I didn't see any OMAPL138EVM_Test_Emac_Loopback_RMII example in the nsp.

  • Also, does your development environment meet the requirements given on the following webpage?

  • Guys,

    I'm facing the similar compiling error in linux environment setup!!! can someone help me with the error.

    /home/chethan/ti/ccsv6/tools/compiler/ti-cgt-c6000_8.1.0/bin/cl6x -c --strip_coff_underscore -mo -o3 -q -k -eo.o -Dnull -mv6600 --abi=eabi -DSOC_AM572x -I./src/intc -I. -Dti_targets_elf_C66 -DMAKEFILE_BUILD -eo.oe66 -ea.se66 -fr=lib/am572x//c66/obj/src/intc -fs=lib/am572x//c66/obj/src/intc -ppa -ppd=lib/am572x//c66/obj/src/intc/_csl_intcCombEventDispatcher.oe66.dep -I. -I/home/chethan/ti/xdctools_3_32_00_06_core/packages -I/home/chethan/ti/bios_6_45_01_29/packages -I/home/chethan/ti/pdk_am57xx_1_0_2/packages -I/home/chethan/ti/pdk_am57xx_1_0_2/packages -I/home/chethan/ti/pdk_am57xx_1_0_2/packages/ti/csl -I/home/chethan/ti/pdk_am57xx_1_0_2/packages/ti/csl/src/ip/i2c/V2 -I/home/chethan/ti/pdk_am57xx_1_0_2/packages/ti/csl/arch/m4 -I/home/chethan/ti/ccsv6/tools/compiler/ti-cgt-c6000_8.1.0/include -fc src/intc/_csl_intcCombEventDispatcher.c
    make[3]: /home/chethan/ti/ccsv6/tools/compiler/ti-cgt-c6000_8.1.0/bin/cl6x: Command not found
    make[3]: *** [lib/am572x//c66/obj/src/intc/_csl_intcCombEventDispatcher.oe66] Error 127
    make[3]: Leaving directory `/home/chethan/ti/pdk_am57xx_1_0_2/packages/ti/csl'
    make[2]: *** [lib/am572x/c66/ti.csl.intc.ae66] Error 2
    make[2]: Leaving directory `/home/chethan/ti/pdk_am57xx_1_0_2/packages/ti/csl'
    make[1]: *** [csl] Error 2
    make[1]: Leaving directory `/home/chethan/ti/pdk_am57xx_1_0_2/packages'
    make: *** [pdk] Error 2

    BR
    Chethan