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.

Debug error on Lab 2 of the Stellaris EK-LM4F120XL LaunchPad Workshop, need help!

Other Parts Discussed in Thread: TM4C123GH6PM

In Lab 2 of the Launchpad Workshop in step 7, when i try to run the code clicking on Debug i get 1 error:
CORTEX_M4_0: GEL: Encountered a problem loading file: C:\StellarisWare\boards\MyLaunchPadBoard\Lab2\ccs\Debug\Lab2.out Could not open file

Any one know what i need to do to fix? I checked all steps, i did everything right, checked the paths and putted the FCTJAG.dll and ftd2xx.dll on system 32 and drivers like they say to do in hints and tips but still giving this error, need help please!

  • Hi Eduardo, this might sound a bit odd, but I think what happened is your project had an error in the build and so no .out file was ever created.  Go back to the console after the debug fails and look through the errors (you might have to switch to one of the hidden console windows using the console button).

    If you see a bunch of errors relating to "driverlib-cm4f.lib" likely what happened is you didn't *quite* follow the instructions for the tutorial correctly and you may have added the .lib path to the compiler include options rather than to the linker file search path.

  • Hi,

    I just started with LM4F120. I finished Project 0 and Lab 2, but now I have problem with Lab 3. During debugging following error occurs:
    "CORTEX_M4_0: GEL: Encountered a problem loading file: C:\StellarisWare\boards\MyLaunchPadBoard\Lab3\ccs\Debug\Lab3.out Could not open file".
    Do you have any idea how to solve the problem?

    Regards,
    Adrian Orzechowski

    Ok, now I wanted to run again Lab2 project and occured the same problem. 

  •   Hi,

     Watch this video http://www.youtube.com/watch?feature=player_embedded&v=-FIq0KShy1U,

    around the minute 20 he solve that problem, you put ${PROJECT_ROOT}/../../../../driverlib/ccs-cm4f/Debug/driverlib-cm4f.lib in the wrong

    side or maybe ${PROJECT_ROOT}/../../../..

     

     

  • I am having the same issues with lab two. I followed the pdf to the dot and still the same issue. Please see the code and output, debug and build output:

    Code:

    #include "inc/hw_types.h"
    #include "inc/hw_memmap.h"
    #include "driverlib/sysctl.h"
    #include "driverlib/gpio.h"

    int main(void)
    {

    int LED = 2;

    SysCtlClockSet(SYSCTL_SYSDIV_4|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);

    while(1)

    {
    // Turn on the LED
    GPIOPinWrite(GPIO_PORTF_BASE, GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_3, LED);

    // Delay for a bit
    SysCtlDelay(2000000);

    // Cycle through Red, Green and Blue LEDs
    if (LED == 8) {LED = 2;} else {LED = LED*2;}
    }
    }

    Output-build:


    **** Build of configuration Debug for project Lab2 ****

    "C:\\ti\\ccsv5\\utils\\bin\\gmake" -k all
    'Building target: Lab2.out'
    'Invoking: ARM Linker'
    "C:/ti/ccsv5/tools/compiler/arm_5.1.1/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 --abi=eabi -me -g --diag_warning=225 --display_error_number --diag_wrap=off -z -m"Lab2.map" -i"C:/ti/ccsv5/tools/compiler/arm_5.1.1/lib" -i"C:/ti/ccsv5/tools/compiler/arm_5.1.1/include" --reread_libs --warn_sections --display_error_number --diag_wrap=off --xml_link_info="Lab2_linkInfo.xml" --rom_model -o "Lab2.out" "./startup_ccs.obj" "./main.obj" "./lm4f120h5qr_startup_ccs.obj" "../lm4f120h5qr.cmd" -l"libc.a" -l"C:/StellarisWare/boards/MyLaunchPadBoard/Lab2/ccs/../../../../driverlib/ccs-cm4f/Debug/driverlib-cm4f.lib"
    <Linking>
    error #10056: symbol "ResetISR" redefined: first defined in "./startup_ccs.obj"; redefined in "./lm4f120h5qr_startup_ccs.obj"
    error #10056: symbol "g_pfnVectors" redefined: first defined in "./startup_ccs.obj"; redefined in "./lm4f120h5qr_startup_ccs.obj"
    warning #10210-D: creating ".stack" section with default size of 0x800; use the -stack option to change the default size
    error #10010: errors encountered during linking; "Lab2.out" not built

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

    **** Build Finished ****

  • I have encountered the same problem. Did you ever find the solution?

  • In case you are still having this problem I did resolve it. For some reason by default, the TM4C123gh6pm_startup_ccs.c was being placed into the project. This was causing the conflict with the lab2 startup_ccs.c. This can be fixed by simply deleting the tm4c123gh6pm_startup_ccs.c.

    The .out file will then build and there should be no problem.

  • Thanks,

    Same issue with me, there was a second ...startup_ccs.c file added to the project directory, after deleting, things worked.

  • Hi,

    I'm having the same problem while performing lab2. I've verified all the steps in the workbook numerous times. Also there is no extra startup_ccs file in my project. I've read all the answers to this question none of them solve my problem. this is the error that keeps showing up when i build the project. please help

    **** Build of configuration Debug for project lab2 ****

    "c:\\ti\\ccsv6\\utils\\bin\\gmake" -k all 
    'Building file: ../lm4f120h5qr_startup_ccs.c'
    'Invoking: ARM Compiler'
    "c:/ti/ccsv6/tools/compiler/arm_5.1.5/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 --abi=eabi -me --include_path="c:/ti/ccsv6/tools/compiler/arm_5.1.5/include" --preinclude="c:/ti/ccsv6/tools/compiler/arm_5.1.5/include" --preinclude="C:/StellarisWare" -g --display_error_number --diag_warning=225 --diag_wrap=off --preproc_with_compile --preproc_dependency="lm4f120h5qr_startup_ccs.pp" "../lm4f120h5qr_startup_ccs.c"
    Fatal error #1966: cannot open source file "c:/ti/ccsv6/tools/compiler/arm_5.1.5/include": Invalid argument
    1 catastrophic error detected in the compilation of "../lm4f120h5qr_startup_ccs.c".
    Compilation terminated.

    >> Compilation failure
    gmake: *** [lm4f120h5qr_startup_ccs.obj] Error 1
    'Building file: ../main.c'
    'Invoking: ARM Compiler'
    "c:/ti/ccsv6/tools/compiler/arm_5.1.5/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 --abi=eabi -me --include_path="c:/ti/ccsv6/tools/compiler/arm_5.1.5/include" --preinclude="c:/ti/ccsv6/tools/compiler/arm_5.1.5/include" --preinclude="C:/StellarisWare" -g --display_error_number --diag_warning=225 --diag_wrap=off --preproc_with_compile --preproc_dependency="main.pp" "../main.c"
    Fatal error #1966: cannot open source file "c:/ti/ccsv6/tools/compiler/arm_5.1.5/include": Invalid argument
    1 catastrophic error detected in the compilation of "../main.c".
    Compilation terminated.

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

    **** Build Finished ****

  • Hi Mohammad,

         The current laboratory workshop for Tiva Launchpad, was made years ago. There was an update with the software package to the current version, making the workshop not very effective to beginners.

        If you download the latest Tivaware Package for your Tiva Launchpad, there are just some extra steps that need to made to make the lab2 compile for your Tiva Launchpad. Detail the steps that you made that arrive to this compile error. 

    - kel

  • i don't have the driverlib folder in my TivaWare folder. Because of which I am getting this error- 

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

    Description Resource Path Location Type
    #1965 cannot open source file "inc/hw_types.h" main.c /lab2 line 3 C/C++ Problem

    What should I do?

  • Zairah Sahaf said:
    Description Resource Path Location Type
    #1965 cannot open source file "inc/hw_types.h" main.c /lab2 line 3 C/C++ Problem

    This means you did not set the paths for that folder location. I believe how to do that is discussed in the Launchpad Workshop.

    Download the Tivaware for Tiva Launchpad and use the driverlib for lab2 exercise.

    - kel

  • im still having the error and cant find the exact solution
  • i am using lm4f120 for my graduation project and just get this error too, i deleted the second startup css file from the lab2 file then problem solved.