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.

LAUNCHXL-F28P55X: Help with F28p55x compiling Debug and cannot open file

Part Number: LAUNCHXL-F28P55X
Other Parts Discussed in Thread: SYSCONFIG, C2000WARE

Tool/software:

Hello, I am having an error with trying to use this code for the PI controller example below, and it keeps giving me this error output in return due to a lack of an output file for the code. I tried running the LED blinky code to see if the LED would blink with the controller, but it is having debug XDS 100 issues, not being able to connect due to the drivers. I need help with just getting the code to recognize the controller and getting a clean debug with no issues. 

//#############################################################################
//! \file pi_test.c
//!
//!
//! This example demonstrates how to use DCL's PI controller along with SysConfig
//! setup
//
// Group: C2000
// Target Family: F28P55X
//
//#############################################################################
//
//
// $Copyright: Copyright (C) 2024 Texas Instruments Incorporated -
// http://www.ti.com/ ALL RIGHTS RESERVED $
//#############################################################################


//*****************************************************************************
// includes
//*****************************************************************************
#include "driverlib.h"
#include "device.h"
#include "board.h"
#include "c2000ware_libraries.h"
#include "stdio.h"

#include "pi_test.h"

//!
//! \addtogroup DCL_EXAMPLES PI controller example

// @{


uint16_t currIdx = 0;
uint16_t completed = 0;
int16_t errors = -1;

void Init_DCL_Logger(void)
{
//
// Initialize Log pointers to the data buffer
//
DCL_initLog(&rkLog, (float32_t*)rkLogArr, DATA_LENGTH);
DCL_initLog(&ykLog, (float32_t*)ykLogArr, DATA_LENGTH);
DCL_initLog(&ctlLog, (float32_t*)ctlLogArr, DATA_LENGTH);
DCL_initLog(&outLog, (float32_t*)outLogArr, DATA_LENGTH);

// Reset PI controller as well
DCL_resetPI(&myController0);
}

int Run_PI_Logger()
{


//
// rk = Target referenced value
// yk = Current feedback value
// uk = Output control effort
//
float32_t rk,yk,uk;

//
// Read the input data buffers
//
rk = DCL_freadLog(&rkLog);
yk = DCL_freadLog(&ykLog);

//
// Run the controller
// Equivalent to uk = DCL_runPI_series(ctrl_handle, rk, yk);
//
uk = DCL_runPI_C1(&myController0, rk, yk);

//
// Write the results to the output buffer
//
DCL_fwriteLog(&outLog, uk);

return 1;
}

int Compare_Results()
{
int i;

//
// Reset the log pointer so it starts from the beginning
//
DCL_resetLog(&outLog);

//
// Check output against expected output with tolerance (1e-06)
//
int errors = 0;
for (i = 0; i < NUM_ELEMENTS; i++)
{
float32_t output = DCL_freadLog(&outLog); // outLogArr[i]
float32_t expected = DCL_freadLog(&ctlLog); // ctlLogArr[i]
float32_t error = fabsf(output - expected);
if (error > EPSILON)
{
errors++;
printf("FAIL at sample %d, outputs %f, should be %f\n", i, output, expected);
}
}

return errors;
}

//
// Main
//
void main(void)
{
//
// Initialize device clock and peripherals
//
Device_init();

//
// Disable pin locks and enable internal pull-ups.
//
Device_initGPIO();

//
// Initialize PIE and clear PIE registers. Disables CPU interrupts.
//
Interrupt_initModule();

//
// Initialize the PIE vector table with pointers to the shell Interrupt
// Service Routines (ISR).
//
Interrupt_initVectorTable();

//
// PinMux and Peripheral Initialization
//
Board_init();

//
// C2000Ware Library initialization
//
C2000Ware_libraries_init();

//
// DCL Logger Initialization
//
Init_DCL_Logger();

//
// Enable Global Interrupt (INTM) and real time interrupt (DBGM)
//
EINT;
ERTM;

while(1)
{
if (completed)
{
errors = Compare_Results();
printf("PI test produced %d error\n",errors);
DCL_BREAK_POINT;
}
}
}

// initialize CPU timer0 in sysconfig
interrupt void control_Isr(void)
{
if (currIdx < NUM_ELEMENTS)
{
Run_PI_Logger();
currIdx++;
}
else
{
completed = 1;
Interrupt_disable(INT_myCPUTIMER0);
}

Interrupt_clearACKGroup(INT_myCPUTIMER0_INTERRUPT_ACK_GROUP);
}

// End of main

// @} //addtogroup

// End of file

  • Hello,

    Which version of CCS are you using?

    it keeps giving me this error output in return due to a lack of an output file for the code.

    Are you able to build the project successfully? Does the .out file exist in the CPU1_RAM output folder?

    I tried running the LED blinky code to see if the LED would blink with the controller, but it is having debug XDS 100 issues, not being able to connect due to the drivers.

    Which target configuration file are you using? If you're using the on-board XDS110 on the LaunchPad, please make sure you use "TMS320F28P550SJ9_LaunchPad.ccxml" (with cJTAG mode).

    Please also check the following:

    1. Check the target configuration file to make sure that the correct debug probe is selected. 

    2. Check to see if debug probe is visible in PC device manager.

    3. Try replacing the USB cable, or try a different debug probe to make sure the probe in use is not damaged.

    Best,

    Matt

  • I am using CCS 12.7 version for the PI controller. I wasn't able to find the CPU out file do I need a newer version 

  • I ran a connection with the JTAG to see if the target configuration was to notice my board, which it does, so I just don't know why it is not debugging

  • I downloaded CCS 20.2 just to see what would happen if I tried to debug a code. I have been trying to use the PI out example and modifying it, and it is still giving me the same issue. 

  • Hi,

    That's good to know that the JTAG connection is stable.

    Are you able to build the example successfully before attempting to load the example? Please try right clicking the project and selecting "Rebuild Project". Please let me know if any build errors occur in the CCS output console.

    Best,

    Matt

  • //#############################################################################
    //! \file pi_test.c
    //!
    //!
    //! This example demonstrates how to use DCL's PI controller along with SysConfig
    //! setup
    //
    //  Group:             C2000
    //  Target Family:     F28P55X
    //
    //#############################################################################
    //
    //
    // $Copyright: Copyright (C) 2024 Texas Instruments Incorporated -
    //             http://www.ti.com/ ALL RIGHTS RESERVED $
    //#############################################################################


    //*****************************************************************************
    // includes
    //*****************************************************************************
    #include "driverlib.h"
    #include "device.h"
    #include "board.h"
    #include "c2000ware_libraries.h"
    #include "stdio.h"

    #include "pi_test.h"

    //!
    //! \addtogroup DCL_EXAMPLES PI controller example

    // @{


    uint16_t currIdx = 0;
    uint16_t completed = 0;
    int16_t errors = -1;

    void Init_DCL_Logger(void)
    {
        //
        // Initialize Log pointers to the data buffer
        //
        DCL_initLog(&rkLog, (float32_t*)rkLogArr, DATA_LENGTH);
        DCL_initLog(&ykLog, (float32_t*)ykLogArr, DATA_LENGTH);
        DCL_initLog(&ctlLog, (float32_t*)ctlLogArr, DATA_LENGTH);
        DCL_initLog(&outLog, (float32_t*)outLogArr, DATA_LENGTH);

        // Reset PI controller as well
        DCL_resetPI(&myController0);
    }

    int Run_PI_Logger()
    {


        //
        // rk = Target referenced value
        // yk = Current feedback value
        // uk = Output control effort
        //
        float32_t rk,yk,uk;

        //
        // Read the input data buffers
        //
        rk = DCL_freadLog(&rkLog);
        yk = DCL_freadLog(&ykLog);

        //
        // Run the controller
        // Equivalent to uk = DCL_runPI_series(ctrl_handle, rk, yk);
        //
        uk = DCL_runPI_C1(&myController0, rk, yk);

        //
        // Write the results to the output buffer
        //
        DCL_fwriteLog(&outLog, uk);

        return 1;
    }

    int Compare_Results()
    {
        int i;

        //
        // Reset the log pointer so it starts from the beginning
        //
        DCL_resetLog(&outLog);

        //
        // Check output against expected output with tolerance (1e-06)
        //
        int errors = 0;
        for (i = 0; i < NUM_ELEMENTS; i++)
        {
            float32_t output = DCL_freadLog(&outLog);   // outLogArr[i]
            float32_t expected = DCL_freadLog(&ctlLog); // ctlLogArr[i]
            float32_t error = fabsf(output - expected);
            if (error > EPSILON)
            {
                errors++;
                printf("FAIL at sample %d, outputs %f, should be %f\n", i, output, expected);
            }
        }

        return errors;
    }

    //
    // Main
    //
    void main(void)
    {
        //
        // Initialize device clock and peripherals
        //
        Device_init();

        //
        // Disable pin locks and enable internal pull-ups.
        //
        Device_initGPIO();

        //
        // Initialize PIE and clear PIE registers. Disables CPU interrupts.
        //
        Interrupt_initModule();

        //
        // Initialize the PIE vector table with pointers to the shell Interrupt
        // Service Routines (ISR).
        //
        Interrupt_initVectorTable();

        //
        // PinMux and Peripheral Initialization
        //
        Board_init();

        //
        // C2000Ware Library initialization
        //
        C2000Ware_libraries_init();

        //
        // DCL Logger Initialization
        //
        Init_DCL_Logger();

        //
        // Enable Global Interrupt (INTM) and real time interrupt (DBGM)
        //
        EINT;
        ERTM;

        while(1)
        {
            if (completed)
            {
                errors = Compare_Results();
                printf("PI test produced %d error\n",errors);
                DCL_BREAK_POINT;
            }
        }
    }

    // initialize CPU timer0 in sysconfig
    interrupt void control_Isr(void)
    {
        if (currIdx < NUM_ELEMENTS)
        {
            Run_PI_Logger();
            currIdx++;
        }
        else
        {
            completed = 1;
            Interrupt_disable(INT_myCPUTIMER0);
        }

        Interrupt_clearACKGroup(INT_myCPUTIMER0_INTERRUPT_ACK_GROUP);
    }

    // End of main

    // @} //addtogroup

    // End of file 
    I rebuild the project and it came back with no errors however I am trying to find a code that takes pid  parameter inputs and produces a pwm signal as the output is there any for the f28p55x cause I been looking througout the examples and not getting anywhere with it?
  • Hello,

    however I am trying to find a code that takes pid  parameter inputs and produces a pwm signal as the output is there any for the f28p55x cause I been looking througout the examples and not getting anywhere with it?

    Is your initial problem resolved i.e. are you able to load a program onto the device with CCS? If so, please open a new thread with this new topic so the correct expert can assist you.

    Best,

    Matt