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.

TMS320F280049C: Code Composer Studio - How to debug when in release mode?

Part Number: TMS320F280049C

Code Composer Studio - How to debug when in release mode?

I have a project that works fine in debug mode, however when run in release mode it is doing strange things. If the problem would occur while in debug mode it would be easy to track down.

What if any debugging capabilities are available while running in release mode?  I tried the lowly printf but that does not seem to work in release mode.

  • Jeff,

    You can add debug symbols for one file.

    You can create a global variable, and then update the state in global variable. That way you can narrow the debug to a file. Then add the debug symbol just for that file. Select the file, then open Build Setting and add Debug Symbol from compiler option.

    Let me know if it helps.

    Thanks & Regards,

    Santosh

  • Santosh,

    Can you please elaborate.

    When operating in debug mode I sometimes add Global variables to make it easier to inspect local variables, I'm not sure how that would apply when in release mode ie. running from FLASH mode?

    A simple example would be helpful.

    I also tried using the real time debug mode, however i get connection errors when attempting as per this quick tips video: www.youtube.com/watch

  • Jeff,

    I do not have a simple example handy which I can share. 

    Even in release mode (Flash boot mode), you can create a variable in RAM. Some fixed location.  for example in linker command file:

       MY_STATE_FLAG    :> RAMGS3,     PAGE = 1

    in the c file, create a variable in that data section 

    #pragma DATA_SECTION(my_status_variable, "MY_STATE_FLAG")

    int my_status_variable = 0;

    Then in the code, I change the code:

        my_status_variable = 1;

        //

        // Initialize device clock and peripherals

        //

        Device_init();

        //

        // Initialize GPIO and configure the GPIO pin as a push-pull output

        //

        my_status_variable = 2;

        Device_initGPIO();

        GPIO_setPadConfig(DEVICE_GPIO_PIN_LED1, GPIO_PIN_TYPE_STD);

        GPIO_setDirectionMode(DEVICE_GPIO_PIN_LED1, GPIO_DIR_MODE_OUT);

        //

        // Initialize PIE and clear PIE registers. Disables CPU interrupts.

        //

        my_status_variable = 3;

        Interrupt_initModule();

        //

        // Initialize the PIE vector table with pointers to the shell Interrupt

        // Service Routines (ISR).

        //

        my_status_variable = 4;

        Interrupt_initVectorTable();

    Before you connect the CCS, modify the GEL file, just comment GEL_Reset() function and then you can look at the memory location.

    Thanks & Regards,

    Santosh