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.

#1965 cannot open source file "display.h"

Other Parts Discussed in Thread: TM4C123GH6PM

Hello, I am new with ccs and launchpad .

My Os is Windows 10 and using ccsv6 for my launchpad tm4c123gxl

while trying to compile a simple example project for display, I am getting the error " #1965 cannot open source file "display.h"

Even though I have the header file for display in C:\ti\TivaWare_C_Series-2.1.3.156\driverlib

what might be the reason for the error?

**** Console Build of configuration Debug for project Display_example ****

"C:\\ti\\ccsv6\\utils\\bin\\gmake" -k all
'Building file: ../main.c'
'Invoking: ARM Compiler'
"C:/ti/ccsv6/tools/compiler/arm_15.12.3.LTS/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 -me --include_path="C:/ti/ccsv6/tools/compiler/arm_15.12.3.LTS/include" --include_path="C:/ti/ccsv6/tools/compiler/arm_15.12.3.LTS/include" --include_path="C:/ti/TivaWare_C_Series-2.1.3.156" -g --gcc --define=ccs="ccs" --define=PART_TM4C123GH6PM --diag_wrap=off --diag_warning=225 --display_error_number --abi=eabi --preproc_with_compile --preproc_dependency="main.d" "../main.c"

>> Compilation failure
subdir_rules.mk:7: recipe for target 'main.obj' failed
"../main.c", line 51: fatal error #1965: cannot open source file "display.h"
1 catastrophic error detected in the compilation of "../main.c".
Compilation terminated.
gmake: *** [main.obj] Error 1
gmake: Target 'all' not remade because of errors.

**** Build Finished ****

Best regards 

John

  • Hello John,

    Sijo John said:

    while trying to compile a simple example project for display, I am getting the error " #1965 cannot open source file "display.h"

    Even though I have the header file for display in C:\ti\TivaWare_C_Series-2.1.3.156\driverlib

    Sijo John said:
    --include_path="C:/ti/ccsv6/tools/compiler/arm_15.12.3.LTS/include" --include_path="C:/ti/ccsv6/tools/compiler/arm_15.12.3.LTS/include" --include_path="C:/ti/TivaWare_C_Series-2.1.3.156"

    You will need to add "C:\ti\TivaWare_C_Series-2.1.3.156\driverlib" to the list of include search paths.

    Did you create display.h and copy it to C:\ti\TivaWare_C_Series-2.1.3.156\driverlib? I do not see it with my installation.

    Thanks

    ki

  • Hi Ki,

    still with new errors

    error #10234-D: unresolved symbols remain
    error #10010: errors encountered during linking; "Display_example.out" not built
    gmake: *** [Display_example.out] Error 1
    gmake: Target 'all' not remade because of errors.

    **** Build of configuration Debug for project Display_example ****

    "C:\\ti\\ccsv6\\utils\\bin\\gmake" -k all
    'Building target: Display_example.out'
    'Invoking: ARM Linker'
    "C:/ti/ccsv6/tools/compiler/arm_15.12.3.LTS/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 -me -g --gcc --define=ccs="ccs" --define=PART_TM4C123GH6PM --diag_wrap=off --diag_warning=225 --display_error_number --abi=eabi -z -m"Display_example.map" --stack_size=512 --heap_size=0 -i"C:/ti/ccsv6/tools/compiler/arm_15.12.3.LTS/lib" -i"C:/ti/ccsv6/tools/compiler/arm_15.12.3.LTS/include" --reread_libs --diag_wrap=off --warn_sections --display_error_number --xml_link_info="Display_example_linkInfo.xml" --rom_model -o "Display_example.out" "./main.obj" "./tm4c123gh6pm_startup_ccs.obj" "../tm4c123gh6pm.cmd" -llibc.a -l"C:/ti/TivaWare_C_Series-2.1.3.156/driverlib/ccs/Debug/driverlib.lib"
    <Linking>

    undefined first referenced
    symbol in file
    --------- ----------------
    clearLCD ./main.obj
    initLCD ./main.obj
    printLCD ./main.obj

    setCursorPositionLCD ./main.obj
    >> Compilation failure
    makefile:142: recipe for target 'Display_example.out' failed

    I wish to add the .h and .c file here display.h

    display.c
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    /*
    * LCD Library for Stellaris/Tiva launchpads
    * All rights reserved.
    * Distributed under the BSD License
    * Copyright (c) 2015, Manolis Kiagias
    *
    * Based on ideas and code of the MSP430 Launchpad LCD Library
    * published in Co-Random thoughts blog:
    * http://cacheattack.blogspot.gr/2011/06/quick-overview-on-interfacing-msp430.html
    *
    * Redistribution and use in source and binary forms, with or without
    * modification, are permitted provided that the following conditions
    * are met:
    *
    * * Redistributions of source code must retain the above copyright
    * notice, this list of conditions and the following disclaimer.
    *
    * * Redistributions in binary form must reproduce the above copyright
    * notice, this list of conditions and the following disclaimer in the
    * documentation and/or other materials provided with the distribution.
    *
    * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
    * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
    * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
    * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
    * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
    * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
    * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
    * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
    * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
    * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    * --/COPYRIGHT--*/
    /*******************************************************************************/
    #include "display.h"
    //
    // Pulse the EN bit LOW - HIGH - LOW
    // To signal the LCD to accept the data/cmd
    //
    void pulseLCD()
    {
    // Go Low -> High -> Low
    GPIOPinWrite(CMD_PORT_BASE, EN, 0);
    GPIOPinWrite(CMD_PORT_BASE, EN, EN);
    GPIOPinWrite(CMD_PORT_BASE, EN, 0);
    }
    //
    // Set the RS to LOW
    // Indicating incoming command
    //
    void setCmd() {
    GPIOPinWrite(CMD_PORT_BASE, RS,0);
    }
    //
    // Set the RS to HIGH
    // Indicating incoming data
    //
    void setData() {
    GPIOPinWrite(CMD_PORT_BASE, RS,RS);
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • Hello,

    Sijo John said:
    undefined first referenced
    symbol in file
    --------- ----------------
    clearLCD ./main.obj
    initLCD ./main.obj
    printLCD ./main.obj

    This error is documented in the link below:

    http://processors.wiki.ti.com/index.php/Build_Errors_in_CCS#Error:_unresolved_symbols_remain

    In you case, you need to find where those unresolved symbols (clearLCD, initLCD, printLCD) are defined and make sure the source or library for it is included into your project.

    I'm not familiar with TivaWare to know myself. Perhaps you need grlib, so you can try including that. Someone in the Tiva forums would know best.

    Thanks

    ki