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.

TIVA C

Other Parts Discussed in Thread: TM4C123GH6PM, LMFLASHPROGRAMMER

Hi, 

I am trying to compile lab4 from Tiva C series LaunchPad Workshop, and I am getting this  error:

CORTEX_M4_0: GEL: Encountered a problem loading file: C:\TM4C123G_LaunchPad_Workshop\lab4\project\Debug\lab4.out Could not open file.

 This file was there until I try to do debugger, so it  just disappears. 

I already tried to  reinstal  the workshop,code composer and create a new project,but now I don't know what else to do.

 Could Anyone help-me?

  • Hello Eva,

    If it could not open the file, then may be the design did not compile. Can you share the CCS Log file?

    Regards
    Amit
  • Sure,

    #include <stdint.h>
    #include <stdbool.h>
    #include "inc/tm4c123gh6pm.h"
    #include "inc/hw_memmap.h"
    #include "inc/hw_types.h"
    #include "driverlib/sysctl.h"
    #include "driverlib/interrupt.h"
    #include "driverlib/gpio.h"
    #include "driverlib/timer.h"


    int main(void)
    {
    uint32_t ui32Period;

    SysCtlClockSet(SYSCTL_SYSDIV_5|SYSCTL_USE_PLL|SYSCTL_XTAL_16MHZ|SYSCTL_OSC_MAIN);

    SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOF);
    GPIOPinTypeGPIOOutput(GPIO_PORTF_BASE, GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_3);

    SysCtlPeripheralEnable(SYSCTL_PERIPH_TIMER0);
    TimerConfigure(TIMER0_BASE, TIMER_CFG_PERIODIC);

    ui32Period = (SysCtlClockGet() / 10) / 2;
    TimerLoadSet(TIMER0_BASE, TIMER_A, ui32Period -1);

    IntEnable(INT_TIMER0A);
    TimerIntEnable(TIMER0_BASE, TIMER_TIMA_TIMEOUT);
    IntMasterEnable();

    TimerEnable(TIMER0_BASE, TIMER_A);

    while(1)
    {
    }
    }

    void Timer0IntHandler(void)
    {
    // Clear the timer interrupt
    TimerIntClear(TIMER0_BASE, TIMER_TIMA_TIMEOUT);

    // Read the current state of the GPIO pin and
    // write back the opposite state
    if(GPIOPinRead(GPIO_PORTF_BASE, GPIO_PIN_2))
    {
    GPIOPinWrite(GPIO_PORTF_BASE, GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_3, 0);
    }
    else
    {
    GPIOPinWrite(GPIO_PORTF_BASE, GPIO_PIN_2, 4);
    }
    }
  • Hello Eva,

    I said CCS Compilation Log. Also check after the compilation the file lab4.out is there in the path mentioned.

    Regards
    Amit
  •   Hello Amit,

    I am sorry, I am new on that. the case is that, when I try to debug this file , it just goes away, and it is deleted from the file folder, so my Code Composer generate a error saying that  the file was't there, but it was.

  • Hello Eva,

    I think this to be an issue in Code Composer. You can load the bin file via LMFlashProgrammer in the meantime while we see what the issue is.

    Chester Gillon may have an idea (he is our CCS expert on the TM4C forum and beyond)

    Regards
    Amit
  •  An then My file lab4.out is done

  • Hello Amit,

    It was also what I get , When I try to build it:

    **** Clean-only build of configuration Debug for project lab4 ****

    "C:\\ti\\ccsv5\\utils\\bin\\gmake" -k clean
    DEL /F "lab4.out"
    DEL /F "main.pp" "startup_ccs.pp"
    DEL /F "main.obj" "startup_ccs.obj"
    'Finished clean'
    ' '

    **** Build Finished ****

    **** Build of configuration Debug for project lab4 ****

    "C:\\ti\\ccsv5\\utils\\bin\\gmake" -k all
    'Building file: ../main.c'
    'Invoking: ARM Compiler'
    "C:/ti/ccsv5/tools/compiler/arm_5.0.4/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 --abi=eabi -me -g --include_path="C:/ti/ccsv5/tools/compiler/arm_5.0.4/include" --include_path="C:/ti/TivaWare_C_Series-2.1.0.12573" --define=PART_TM4C123GH6PM --diag_warning=225 --display_error_number --diag_wrap=off --preproc_with_compile --preproc_dependency="main.pp" "../main.c"
    'Finished building: ../main.c'
    ' '
    'Building file: ../startup_ccs.c'
    'Invoking: ARM Compiler'
    "C:/ti/ccsv5/tools/compiler/arm_5.0.4/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 --abi=eabi -me -g --include_path="C:/ti/ccsv5/tools/compiler/arm_5.0.4/include" --include_path="C:/ti/TivaWare_C_Series-2.1.0.12573" --define=PART_TM4C123GH6PM --diag_warning=225 --display_error_number --diag_wrap=off --preproc_with_compile --preproc_dependency="startup_ccs.pp" "../startup_ccs.c"
    'Finished building: ../startup_ccs.c'
    ' '
    'Building target: lab4.out'
    'Invoking: ARM Linker'
    "C:/ti/ccsv5/tools/compiler/arm_5.0.4/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 --abi=eabi -me -g --define=PART_TM4C123GH6PM --diag_warning=225 --display_error_number --diag_wrap=off -z --stack_size=512 -m"lab4.map" --heap_size=0 -i"C:/ti/ccsv5/tools/compiler/arm_5.0.4/lib" -i"C:/ti/ccsv5/tools/compiler/arm_5.0.4/include" --reread_libs --warn_sections --display_error_number --diag_wrap=off --xml_link_info="lab4_linkInfo.xml" --rom_model -o "lab4.out" "./startup_ccs.obj" "./main.obj" -l"libc.a" "C:/ti/TivaWare_C_Series-2.1.0.12573/driverlib/ccs/Debug/driverlib.lib" "../tm4c123gh6pm.cmd"
    <Linking>
    "C:\\Users\\jonas\\AppData\\Local\\Temp\\054043", line 19: fatal error #10004:

    >> Compilation failure
    unrecognized file:
    "C:/ti/TivaWare_C_Series-2.1.0.12573/driverlib/ccs/Debug/driverlib.lib"
    gmake: *** [lab4.out] Error 1
    gmake: Target `all' not remade because of errors.

    **** Build Finished ****
  • Hi Amit,
    I loaded the bin file via LMFlashProgrammer, and my tiva c just does't blink anymore, what is weird. I guess it got in a infinite loop to be that way.
  • Hello Eva,

    Looks similar to the issue you mentioned

    e2e.ti.com/.../965152

    I used the search string "fatal error #10004" in code composer studio forum.

    Regards
    Amit
  • Hello Amit,
    I already try to what they said there, I guess it is code composer 5.4 has some bugs. Thank you so much! ;)

    Regards,
    Eva
  • (infiltrate)
    You could try some of my guides that I have in my blog, they're bellow in my signature.

    Also you should learn more about CCS, I don't think that workshop does it well enough. It has very useful features that can elude beginners!
    www.youtube.com/.../videos
    processors.wiki.ti.com/.../Category:CCS_Training