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: Unable to Launch Debugger with a Generic ANSI C Project



Tool/software: Code Composer Studio

Hi all,

Why can't I debug a C Project?

I created a New Project...C/C++...C Project. 

/*
 ============================================================================
 Name        : hello.c
 Author      : 
 Version     :
 Copyright   : Your copyright notice
 Description : Hello World in C, Ansi-style
 ============================================================================
 */

#include <stdio.h>
#include <stdlib.h>

int main(void) {
	puts("!!!Hello World!!!"); /* prints !!!Hello World!!! */
	return EXIT_SUCCESS;
}

It complies fine using GCC:

07:38:48 **** Rebuild of configuration Debug for project hello ****
Info: Internal Builder is used for build
gcc -O0 -g3 -Wall -c -fmessage-length=0 -o "src\\hello.o" "..\\src\\hello.c" 
gcc -o hello.exe "src\\hello.o" 

07:38:48 Build Finished (took 549ms)

But when I try to run the debugger a window pops up: "Unable to Launch". The message is "The selection cannot be launched, and there are no recent launches".

thank you.

  • Scott,

    Try creating a CCS Project instead. Go to the Project Menu. Select "New CCS Project". Or if you are using the File menu and select New -> Project. Make sure to select CCS Project.

    If you create a generic C project it is going to assume that you are using GDB for debugging.

    Regards,
    John
  • Hi John,
    If I do that, it will ask me for a target device. I want to debug the program using GNU GCC, ie, the target device being my laptop. I just want to test out generic code before loading it on my device.
    thank you,
    Scott
  • Scott,

    It has been a while since I have done that.  

    You will need to enable the CDT GDB Debugging Capability.  Go to the preferences dialog and check the box here:

    Build your project.

    Then right click on the project and select to Debug As -> Local C/C++ Application

    I don't have all the necessary tools installed to test that out but that is what I recall.  

    Regards,

    John