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.

CCS/TM4C1290NCPDT: Where to correct: fatal error #1965: cannot open source file "xdc/runtime/System.h".

Part Number: TM4C1290NCPDT
Other Parts Discussed in Thread: TM4C129ENCPDT, SYSBIOS

Tool/software: Code Composer Studio

I'm trying to run the "Hello World" example that uses XDC and System_printf().  When compiled I get the error:  fatal error #1965: cannot open source file "xdc/runtime/System.h".

I see "${XDC_INCLUDE_PATH}" in the compiler #include search path, but I cannot find where it gets set and how to correct it.

Thanks

Doug

  • The file System.h is typically in the <xdctools_install_dir>/packages/xdc/runtime directory.

    Are you importing and building the Hello World example (under Instrumentation Examples) included with TI-RTOS for TivaC? With that example I do not see the XDC_INCLUDE_PATH variable, but it should not require any modifications for it to build successfully.

    Which version of CCS, XDCtools and TI-RTOS are you using? To check the version of XDCtools used for the project build, go into Project Properties->General->Products tab.

  • SYS/BIOS 6.50.1.12, TI_RTOS for TivaC 2.16.0.08, XDCtools 3.51.1.18, CCS 8.3.1.00004. I'm not sure where I found the example, I thought it was in Resource Explorer but now I don't find it.
  • Doug,

    I just tried this out with CCS 8.3 and TI_RTOS for TivaC 2.16.0.08. Imported the "hello" example from Resource Explorer and built it without any errors (see screenshots below).

    The XDCtools version defaulted to 3.32.2.25.



    Could you try opening a new workspace and import and build this example again?  If you still experience errors please save the build log to a text file and attach it here.

  • OK, I imported that project, changed the CPU to mine (TM4C1290NCPDT), and my JTAG interface (Segger). When I compile it I get 2 lines of error:

    "../EK_TM4C129EXL.c", line 260: error #20: identifier "GPIO_PF0_EN0LED0" is undefined
    "../EK_TM4C129EXL.c", line 261: error #20: identifier "GPIO_PF4_EN0LED1" is undefined

    Doug
  • Here's the build log:


    **** Build of configuration Debug for project hello_EK_TM4C129EXL_TI ****

    "C:\\ti\\ccs830\\ccsv8\\utils\\bin\\gmake" -k -j 8 all -O

    Building file: "../hello.cfg"
    Invoking: XDCtools
    "C:/ti/xdctools_3_32_00_06_core/xs" --xdcpath="C:/ti/tirtos_tivac_2_16_00_08/packages;C:/ti/tirtos_tivac_2_16_00_08/products/tidrivers_tivac_2_16_00_08/packages;C:/ti/tirtos_tivac_2_16_00_08/products/bios_6_45_01_29/packages;C:/ti/tirtos_tivac_2_16_00_08/products/ndk_2_25_00_09/packages;C:/ti/tirtos_tivac_2_16_00_08/products/uia_2_00_05_50/packages;C:/ti/tirtos_tivac_2_16_00_08/products/ns_1_11_00_10/packages;" xdc.tools.configuro -o configPkg -t ti.targets.arm.elf.M4F -p ti.platforms.tiva:TM4C129ENCPDT -r release -c "C:/ti/ccs830/ccsv8/tools/compiler/ti-cgt-arm_18.1.5.LTS" --compileOptions "-mv7M4 --code_state=16 --float_support=FPv4SPD16 -me --include_path=\"C:/ti/CCS_V8_Workspace/hello_EK_TM4C129EXL_TI\" --include_path=\"C:/ti/CCS_V8_Workspace/hello_EK_TM4C129EXL_TI\" --include_path=\"C:/ti/tirtos_tivac_2_16_00_08/products/TivaWare_C_Series-2.1.1.71b\" --include_path=\"C:/ti/tirtos_tivac_2_16_00_08/products/bios_6_45_01_29/packages/ti/sysbios/posix\" --include_path=\"C:/ti/ccs830/ccsv8/tools/compiler/ti-cgt-arm_18.1.5.LTS/include\" --define=ccs=\"ccs\" --define=ccs --define=TIVAWARE --define=PART_TM4C1290NCPDT -g --gcc --diag_warning=225 --diag_warning=255 --diag_wrap=off --display_error_number --gen_func_subsections=on --abi=eabi " "../hello.cfg"
    making package.mak (because of package.bld) ...
    generating interfaces for package configPkg (because package/package.xdc.inc is older than package.xdc) ...
    configuring hello.xem4f from package/cfg/hello_pem4f.cfg ...
    generating custom ti.sysbios library makefile ...
    Starting build of library sources ...
    making C:/ti/CCS_V8_Workspace/hello_EK_TM4C129EXL_TI/src/sysbios/sysbios.aem4f ...
    gmake[1]: Entering directory `C:/ti/CCS_V8_Workspace/hello_EK_TM4C129EXL_TI/src/sysbios'
    clem4f C:/ti/tirtos_tivac_2_16_00_08/products/bios_6_45_01_29/packages/ti/sysbios/BIOS.c ...
    asmem4f C:/ti/tirtos_tivac_2_16_00_08/products/bios_6_45_01_29/packages/ti/sysbios/family/arm/m3/Hwi_asm.sv7M ...
    asmem4f C:/ti/tirtos_tivac_2_16_00_08/products/bios_6_45_01_29/packages/ti/sysbios/family/arm/m3/Hwi_asm_switch.sv7M ...
    asmem4f C:/ti/tirtos_tivac_2_16_00_08/products/bios_6_45_01_29/packages/ti/sysbios/family/arm/m3/IntrinsicsSupport_asm.sv7M ...
    asmem4f C:/ti/tirtos_tivac_2_16_00_08/products/bios_6_45_01_29/packages/ti/sysbios/family/arm/m3/TaskSupport_asm.sv7M ...
    arem4f BIOS.obj m3_Hwi_asm.obj m3_Hwi_asm_switch.obj m3_IntrinsicsSupport_asm.obj m3_TaskSupport_asm.obj ...
    gmake[1]: Leaving directory `C:/ti/CCS_V8_Workspace/hello_EK_TM4C129EXL_TI/src/sysbios'
    Build of libraries done.
    clem4f package/cfg/hello_pem4f.c ...
    "package/cfg/hello_pem4f.c", line 15109: warning #112-D: statement is unreachable
    "package/cfg/hello_pem4f.c", line 15595: warning #112-D: statement is unreachable
    "package/cfg/hello_pem4f.c", line 15869: warning #112-D: statement is unreachable
    "package/cfg/hello_pem4f.c", line 16050: warning #112-D: statement is unreachable
    Finished building: "../hello.cfg"

    1 file(s) copied.
    making ../src/sysbios/sysbios.aem4f ...
    gmake[1]: Nothing to be done for 'all'.
    Building file: "../EK_TM4C129EXL.c"
    Invoking: ARM Compiler
    "C:/ti/ccs830/ccsv8/tools/compiler/ti-cgt-arm_18.1.5.LTS/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 -me --include_path="C:/ti/CCS_V8_Workspace/hello_EK_TM4C129EXL_TI" --include_path="C:/ti/CCS_V8_Workspace/hello_EK_TM4C129EXL_TI" --include_path="C:/ti/tirtos_tivac_2_16_00_08/products/TivaWare_C_Series-2.1.1.71b" --include_path="C:/ti/tirtos_tivac_2_16_00_08/products/bios_6_45_01_29/packages/ti/sysbios/posix" --include_path="C:/ti/ccs830/ccsv8/tools/compiler/ti-cgt-arm_18.1.5.LTS/include" --define=ccs="ccs" --define=ccs --define=TIVAWARE --define=PART_TM4C1290NCPDT -g --gcc --diag_warning=225 --diag_warning=255 --diag_wrap=off --display_error_number --gen_func_subsections=on --abi=eabi --preproc_with_compile --preproc_dependency="EK_TM4C129EXL.d_raw" --cmd_file="configPkg/compiler.opt" "../EK_TM4C129EXL.c"

    >> Compilation failure
    subdir_rules.mk:9: recipe for target 'EK_TM4C129EXL.obj' failed
    "../EK_TM4C129EXL.c", line 260: error #20: identifier "GPIO_PF0_EN0LED0" is undefined
    "../EK_TM4C129EXL.c", line 261: error #20: identifier "GPIO_PF4_EN0LED1" is undefined
    2 errors detected in the compilation of "../EK_TM4C129EXL.c".
    gmake: *** [EK_TM4C129EXL.obj] Error 1
    Building file: "../hello.c"
    Invoking: ARM Compiler
    "C:/ti/ccs830/ccsv8/tools/compiler/ti-cgt-arm_18.1.5.LTS/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 -me --include_path="C:/ti/CCS_V8_Workspace/hello_EK_TM4C129EXL_TI" --include_path="C:/ti/CCS_V8_Workspace/hello_EK_TM4C129EXL_TI" --include_path="C:/ti/tirtos_tivac_2_16_00_08/products/TivaWare_C_Series-2.1.1.71b" --include_path="C:/ti/tirtos_tivac_2_16_00_08/products/bios_6_45_01_29/packages/ti/sysbios/posix" --include_path="C:/ti/ccs830/ccsv8/tools/compiler/ti-cgt-arm_18.1.5.LTS/include" --define=ccs="ccs" --define=ccs --define=TIVAWARE --define=PART_TM4C1290NCPDT -g --gcc --diag_warning=225 --diag_warning=255 --diag_wrap=off --display_error_number --gen_func_subsections=on --abi=eabi --preproc_with_compile --preproc_dependency="hello.d_raw" --cmd_file="configPkg/compiler.opt" "../hello.c"
    Finished building: "../hello.c"

    gmake: Target 'all' not remade because of errors.

    **** Build Finished ****
  • When I created this project, here's the configuration I used and how the system variables are set:

  • Oops, sent these to the wrong question.
  • Nope, wrong again, this is the correct thread.
    %-)
  • Hello Doug,
    you cannot change the CPU version for an existing project.
    You should create a new existing project for an MCU you wish and than copy needed sources.
  • Doug,

    When you changed the device to TM4C1290NCPDT notice that the --define compiler options for the part number also changed from what it was previously to --define=PART_TM4C1290NCPDT.

    The pin map definitions (that are triggering the errors) are determined by this pre-defined symbol. In EK_TM4C129EXL.c, if you highlight GPIO_PF0_EN0LED0 (at line 260) and click F3 it should take you to the definition in pin_map.h.
    In that file you will see that the identifiers mentioned in the error message are defined for certain TM4C parts but not all. They are not applicable to your device hence the error message when you refer to them in the code.

    The examples in TI-RTOS are intended to be a baseline to help users get started and are designed for the Launchpads.
    When moving to a custom device/board, some modifications of the source and other settings will typically be required to cater to the specific device. 

    Hope this helps explain the error.