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.

Encountered problem loading .out file

Other Parts Discussed in Thread: TM4C123GH6PM

Hi,

I have encountered this problem as shown above when trying to debug.

Can anyone help me solve this problem?

Thanks!

Eisen

PS: This is from the build console:

**** Build of configuration Debug for project TIVA_LEGITFINAL ****

"C:\\ti\\ccsv6\\utils\\bin\\gmake" -k all
'Building file: ../LCD_FYP1.c'
'Invoking: ARM Compiler'
"C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.7/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 --abi=eabi -me --include_path="C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.7/include" --include_path="C:/ti/TivaWare_C_Series-2.1.2.111" -g --gcc --define=ccs="ccs" --define=DEBUG --define=TARGET_IS_BLIZZARD_RB1 --define=PART_TM4C123GH6PM --diag_wrap=off --display_error_number --diag_warning=225 --preproc_with_compile --preproc_dependency="LCD_FYP1.pp" "../LCD_FYP1.c"
At end of source: error #68: expected a "}"
1 error detected in the compilation of "../LCD_FYP1.c".

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

**** Build Finished ****

And CCS did not show me any problems when building.

  • This is the LCD_FYP1 Code:



    #include <stdint.h>
    #include <stdbool.h>
    #include "inc/hw_memmap.h"
    #include "inc/hw_types.h"
    #include "driverlib/debug.h"
    #include "driverlib/sysctl.h"
    #include "grlib/grlib.h"
    #include "driverlib/timer.h"
    #include "Kentec320x240x16_ssd2119_8bit.h"
    #include "driverlib/gpio.h"
    #include "grlib/widget.h"
    #include "touch.h"
    #include "grlib/canvas.h"
    #include "grlib/pushbutton.h"


    #ifdef DEBUG
    void
    __error__(char *pcFilename, uint32_t ui32Line)
    {
    }
    #endif
    /*Error routine*/


    bool g_sStartButtonState = false;
    bool g_sStopButtonState = false;

    //Declaration
    tContext g_sContext;
    tRectangle g_sRect;

    extern tCanvasWidget g_sBackground;
    extern tCanvasWidget g_sBackground2 ;
    extern tCanvasWidget g_sHeader;
    extern tCanvasWidget g_sHeader2;
    extern tPushButtonWidget g_sStartButton;
    extern tPushButtonWidget g_sUpButton;
    extern tPushButtonWidget g_sDownButton;
    extern tPushButtonWidget g_sStopButton;

    void StopButtonPress(tWidget *pWidget);
    void UpButtonPress(tWidget *pWidget);
    void DownButtonPress(tWidget *pWidget);
    void StartButtonPress(tWidget *pWidget);
    void ClearScreen(void);
    void LCD_Init(void);
    void StartUpScreen(void);

    //-------------------------Widgets Settings--------------------------------
    tCanvasWidget g_sBackground = CanvasStruct(0, 0, &g_sHeader, //psParent, psNext, psChild,
    &g_sKentec320x240x16_SSD2119, 0, 0, 320, 240, //psDisplay, i32X, i32Y, i32Width, i32Height,
    (CANVAS_STYLE_FILL | CANVAS_STYLE_OUTLINE | CANVAS_STYLE_TEXT), //ui32Style-bit sets,
    ClrWhite, ClrWhite, ClrBlack, //ui32FillColor, ui32OutlineColor, ui32TextColor,
    &g_sFontCmtt14, 0, 0, 0); //psFont, pcText, pui8Image, pfnOnPaint

    tCanvasWidget g_sHeader = CanvasStruct(&g_sBackground, &g_sStartButton, 0, //psParent, psNext, psChild,
    &g_sKentec320x240x16_SSD2119, 3, 20, 320, 32, //psDisplay, i32X, i32Y, i32Width, i32Height,
    (CANVAS_STYLE_FILL | CANVAS_STYLE_OUTLINE | CANVAS_STYLE_TEXT), //ui32Style-bit sets,
    ClrWhite, ClrWhite, ClrBlack, //ui32FillColor, ui32OutlineColor, ui32TextColor,
    &g_sFontCmtt14, "Syringe Pump Settings", 0, 0); //psFont, pcText, pui8Image, pfnOnPaint

    tPushButtonWidget g_sStartButton = RectangularButtonStruct(&g_sBackground, 0, 0, //psParent, psNext, psChild
    &g_sKentec320x240x16_SSD2119, 70, 100, 180, 75, //PsDisplay, i32X, i32Y, i32Width, i32height,
    (PB_STYLE_OUTLINE | PB_STYLE_TEXT_OPAQUE | PB_STYLE_TEXT |PB_STYLE_FILL), //ui32Style-bit sets
    ClrWhite, ClrYellow, ClrBlack, ClrBlack, //ui32FillColor, ui32PressFillColor, ui32OutlineColor, ui32TextColor,
    &g_sFontCmtt18, "Start", 0, 0, //psFont, pcText, pui8Image, pui8PressImage,
    0, 0, StartButtonPress); //ui16AutoRepeatDelay, ui16AutoRepeatRate, pfnOnClick

    tPushButtonWidget g_sUpButton = RectangularButtonStruct(&g_sBackground, 0, 0, //psParent, psNext, psChild
    &g_sKentec320x240x16_SSD2119, 70, 100, 180, 75, //PsDisplay, i32X, i32Y, i32Width, i32height,
    (PB_STYLE_OUTLINE | PB_STYLE_TEXT_OPAQUE | PB_STYLE_TEXT |PB_STYLE_FILL), //ui32Style-bit sets
    ClrWhite, ClrYellow, ClrBlack, ClrBlack, //ui32FillColor, ui32PressFillColor, ui32OutlineColor, ui32TextColor,
    &g_sFontCmtt18, "Up", 0, 0, //psFont, pcText, pui8Image, pui8PressImage,
    0, 0, StartButtonPress); //ui16AutoRepeatDelay, ui16AutoRepeatRate, pfnOnClick

    tPushButtonWidget g_sDownButton = RectangularButtonStruct(&g_sBackground, 0, 0, //psParent, psNext, psChild
    &g_sKentec320x240x16_SSD2119, 70, 100, 180, 75, //PsDisplay, i32X, i32Y, i32Width, i32height,
    (PB_STYLE_OUTLINE | PB_STYLE_TEXT_OPAQUE | PB_STYLE_TEXT |PB_STYLE_FILL), //ui32Style-bit sets
    ClrWhite, ClrYellow, ClrBlack, ClrBlack, //ui32FillColor, ui32PressFillColor, ui32OutlineColor, ui32TextColor,
    &g_sFontCmtt18, "Down", 0, 0, //psFont, pcText, pui8Image, pui8PressImage,
    0, 0, StartButtonPress);

    tPushButtonWidget g_sStopButton = RectangularButtonStruct(&g_sBackground2, 0, 0, //psParent, psNext, psChild,
    &g_sKentec320x240x16_SSD2119, 240, 150, 70, 40, //psDisplay, i32X, i32Y, i32Width, i32Height,
    (PB_STYLE_OUTLINE | PB_STYLE_TEXT_OPAQUE | PB_STYLE_TEXT |PB_STYLE_FILL), //ui32Style-bit sets
    ClrWhite, ClrYellow, ClrBlack, ClrBlack, //ui32FillColor, ui32PressFillColor, ui32OutlineColor, ui32TextColor,
    &g_sFontCmtt14, "Stop", 0, 0, //psFont, pcText, pui8Image, pfnOnPaint
    0, 0, 0); //ui16AutoRepeatDelay, ui16AutoRepeatRate, pfnOnClick
    //-----------------------------------------------------------------------------

    void LCD_Init(void){
    Kentec320x240x16_SSD2119Init(); //initialise color LCD 320x240 pix,16 colors
    TouchScreenInit();
    GrContextInit(&g_sContext, &g_sKentec320x240x16_SSD2119);
    ClearScreen();

    GrContextForegroundSet(&g_sContext, ClrWhite);
    GrContextFontSet(&g_sContext, &g_sFontCmtt14);

    TouchScreenCallbackSet(WidgetPointerMessage);
    WidgetAdd(WIDGET_ROOT, (tWidget *)&g_sBackground);
    WidgetAdd(WIDGET_ROOT, (tWidget *)&g_sHeader);
    WidgetAdd(WIDGET_ROOT, (tWidget *)&g_sStartButton);
    WidgetPaint(WIDGET_ROOT);
    }
    //-----------------------------------------------------------------------------
    void StartUpScreen(void){
    //Start-Up Screen
    g_sRect.i16XMin = 1;
    g_sRect.i16YMin = 1;
    g_sRect.i16XMax = 318;
    g_sRect.i16YMax = 238;
    GrContextForegroundSet(&g_sContext, ClrCyan);
    GrContextFontSet(&g_sContext, &g_sFontCmss30b);
    GrStringDraw(&g_sContext, "Automatic", -1, 90, 10, 0); //string, x, y, 0
    GrStringDraw(&g_sContext, "Blood Pressure", -1, 60, 40, 0);
    GrStringDraw(&g_sContext, "Control System", -1, 50, 70, 0);
    GrStringDraw(&g_sContext, "Eisen and Samuel", -1, 40, 110, 0);
    GrStringDraw(&g_sContext, "Advisor:", -1, 100, 140, 0);
    GrStringDraw(&g_sContext, "Dr Zhu Kuanyi", -1, 60, 170, 0);
    GrStringDraw(&g_sContext, "Mr Foo Wan Juang", -1, 25, 200, 0);
    GrContextForegroundSet(&g_sContext, ClrWhite);
    GrRectDraw(&g_sContext, &g_sRect);
    GrFlush(&g_sContext);
    SysCtlDelay(50000000);
    ClearScreen();
    WidgetPaint(WIDGET_ROOT);
    }
    //-----------------------------------------------------------------------------
    void ClearScreen(void){
    g_sRect.i16XMin = 0;
    g_sRect.i16YMin = 0;
    g_sRect.i16XMax = 319;
    g_sRect.i16YMax = 239;
    GrContextForegroundSet(&g_sContext, ClrWhite);
    GrRectFill(&g_sContext, &g_sRect);
    GrFlush(&g_sContext);
    }
    //-----------------------------------------------------------------------------
    void StartButtonPress(tWidget *pWidget){
    g_sStartButtonState = !g_sStartButtonState; //change StartButtonState to True
    WidgetRemove((tWidget *)&g_sStartButton);
    WidgetAdd(WIDGET_ROOT, (tWidget *)&g_sStopButton);
    WidgetPaint(WIDGET_ROOT);
    }
    //-----------------------------------------------------------------------------
    void StopButtonPress(tWidget *pWidget){
    g_sStopButtonState = !g_sStopButtonState; //change StopButtonState to True
    WidgetRemove((tWidget *)&g_sStopButton);
    WidgetAdd(WIDGET_ROOT, (tWidget *)&g_sStartButton);
    WidgetPaint(WIDGET_ROOT);




    This is the build console:

    **** Build of configuration Debug for project LCD_FYP ****

    "C:\\ti\\ccsv6\\utils\\bin\\gmake" -k all
    'Building file: ../LCD_FYP1.c'
    'Invoking: ARM Compiler'
    "C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.7/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 --abi=eabi -me --include_path="C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.7/include" --include_path="C:/ti/TivaWare_C_Series-2.1.2.111" -g --gcc --define=ccs="ccs" --define=DEBUG --define=TARGET_IS_BLIZZARD_RB1 --define=PART_TM4C123GH6PM --diag_wrap=off --display_error_number --diag_warning=225 --preproc_with_compile --preproc_dependency="LCD_FYP1.pp" "../LCD_FYP1.c"
    At end of source: error #68: expected a "}"
    1 error detected in the compilation of "../LCD_FYP1.c".

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

    **** Build Finished ****
  • Hello,

    Eisen Mah said:
    And CCS did not show me any problems when building.

    Actually you had a build error:

    Eisen Mah said:
    At end of source: error #68: expected a "}"
    1 error detected in the compilation of "../LCD_FYP1.c".

    You need to resolve this syntax error in that source file.

    Because the build failed. No executable was generated. Hence when you tried to debug, you got the expected error of the debugger unable to load the program.

    Thanks

    ki

  • Eisen Mah said:
    At end of source: error #68: expected a "}"
    1 error detected in the compilation of "../LCD_FYP1.c".

    From your posted code, the terminating "}" is missing from the final function StopButtonPress in the LCD_FYP1.c source file.

  • Ah thks! I must be blind lol.

    But now i encountered another set of problems.

    This is the build error now after adding '}':

    **** Build of configuration Debug for project TIVA_LCD1 ****

    "C:\\ti\\ccsv6\\utils\\bin\\gmake" -k all
    'Building file: ../main.c'
    'Invoking: ARM Compiler'
    "C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.7/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 --abi=eabi -me --include_path="C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.7/include" --include_path="C:/ti/TivaWare_C_Series-2.1.2.111" -g --gcc --define=ccs="ccs" --define=TARGET_IS_BLIZZARD_RB1 --define=DEBUG --define=PART_TM4C123GH6PM --diag_wrap=off --display_error_number --diag_warning=225 --preproc_with_compile --preproc_dependency="main.pp" "../main.c"
    'Finished building: ../main.c'
    ' '
    'Building target: TIVA_LCD1.out'
    'Invoking: ARM Linker'
    "C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.7/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 --abi=eabi -me -g --gcc --define=ccs="ccs" --define=TARGET_IS_BLIZZARD_RB1 --define=DEBUG --define=PART_TM4C123GH6PM --diag_wrap=off --display_error_number --diag_warning=225 -z -m"TIVA_LCD1.map" --heap_size=0 --stack_size=512 -i"C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.7/lib" -i"C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.7/include" --reread_libs --display_error_number --diag_wrap=off --warn_sections --xml_link_info="TIVA_LCD1_linkInfo.xml" --rom_model -o "TIVA_LCD1.out" "./Kentec320x240x16_ssd2119_8bit.obj" "./main.obj" "./tm4c123gh6pm_startup_ccs.obj" "./touch.obj" "C:/ti/TivaWare_C_Series-2.1.2.111/driverlib/ccs/Debug/driverlib.lib" "C:/ti/TivaWare_C_Series-2.1.2.111/grlib/ccs/Debug/grlib.lib" "../tm4c123gh6pm.cmd" -l"libc.a"
    <Linking>

    undefined first referenced
    symbol in file
    --------- ----------------
    main C:\ti\ccsv6\tools\compiler\ti-cgt-arm_5.2.7\lib\rtsv7M4_T_le_v4SPD16_eabi.lib<args_main.obj>


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

    **** Build Finished ****
  • BTW this are the errors shown:

    1. #10010 errors encountered during linking; "TIVA_LCD1.out" not built TIVA_LCD1 C/C++ Problem

    2. <a href="file:/c:/ti/ccsv6/tools/compiler/dmed/HTML/10234.html">#10234-D</a> unresolved symbols remain TIVA_LCD1 C/C++ Problem

    3. unresolved symbol main, first referenced in C:\ti\ccsv6\tools\compiler\ti-cgt-arm_5.2.7\lib\rtsv7M4_T_le_v4SPD16_eabi.lib<args_main.obj> TIVA_LCD1 C/C++ Problem
  • Actually, It's alright, I managed to solve the problem thks!