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/TMS320C6748: How to add Processor SDK libraries to the project?

Part Number: TMS320C6748
Other Parts Discussed in Thread: OMAPL138

Tool/software: Code Composer Studio

Hi, Recently I purchased LCDK C6748 evaluation board for evaluating the DSP using the latest processor SDK. I installed CCS v10 and processor SDK for C6748/OMAP_L138. I configured the CCS to detect the processor SDK and this is done successfully. 

I created a new CCS project for target C6748. 

Below is the code in the main.c

#include <stdio.h>
#include <ti/board/board.h>

static void initBoard();

/**
* main.c
*/
int main(void)
{

initBoard();

printf("Hello world\n");
return 0;
}

void initBoard()
{
Board_initCfg boardCfg;
boardCfg = BOARD_INIT_PINMUX_CONFIG|BOARD_INIT_MODULE_CLOCK|BOARD_INIT_UART_STDIO;

Board_init(boardCfg);

}

In the main code, I am using the Board_init function. This is a function from board library of C6748. When I tried to build this, linker was complaining that Board_init could not be resolved.
To resolve this, I added the library "C:\ti\pdk_omapl138_1_0_11\packages\ti\board\lib\lcdkOMAPL138\c674\release\ti.board.ae674" to the library file path in Linker options.

But the linker is now complaining missing definitions of other SDK  related functions from other libraries.

Is there any standard way to link all the required libraries to the project. In a sample project by TI, I noticed that libraries are linked as

${COM_TI_BIOS_LIBRARIES}
${COM_TI_PDK_LIBRARIES}
${COM_TI_EDMA3_LLD_LIBRARIES}
${COM_TI_IPC_LIBRARIES}
${COM_TI_NDK_LIBRARIES}
${COM_TI_UIA_LIBRARIES}

in linker options. Adding these variables in my project doesn't make any difference.

Could you please guide me in using the Processor SDK libraries in the right way?

  • Hello,

    Is your application bare-metal or running TI-RTOS? Depending on which, the method to link libraries will be different. I will provide examples of both below. If you have any questions please let me know. 

    Bare-metal

    Please note the order of the libraries, they need to match.

    There are "debug" and "release" versions of each driver library. As you can see from the above screenshot, for SPI the release lib is being linked, while for GPIO the debug lib is being linked. The SDK ships with the release version of the driver libraries. For debugging, I recommend using the debug version of the libraries to be able to step through the code better. To build the debug version, you would run the following commands:

    cd {PDK_INSTALL_PATH}/packages
    pdksetupenv.bat
    gmake all LIMIT_SOC=omapl138 LIMIT_BOARDS=LCDKOMAPL138 LIMIT_CORES=c674x BUILD_PROFILE=debug
    

    TI-RTOS


    For TI-RTOS projects, XDCtools is used to load the driver "packages," which automatically links the driver libraries. This is done in the project's *.cfg file, please refer to the code snippet below for an example.

    var devType = "omapl138"
    
    /* Load the OSAL package */ 
    var osType = "tirtos"
    var Osal = xdc.useModule('ti.osal.Settings');
    Osal.osType = osType;
    Osal.socType = devType;
    
    /*use CSL package*/
    var Csl = xdc.loadPackage('ti.csl');
    Csl.Settings.deviceType = devType;
    
    /* Load the Board package and set the board name */
    var Board = xdc.loadPackage('ti.board');
    Board.Settings.boardName = "lcdkOMAPL138";
    
    
    /* Load the gpio package */
    var Gpio = xdc.loadPackage('ti.drv.gpio');
    Gpio.Settings.enableProfiling = false;
    Gpio.Settings.socType = devType;
    
    /* Load the uart package */
    var Uart = xdc.useModule('ti.drv.uart.Settings');
    Uart.socType = devType;


    Regards,
    Sahin

  • Thanks Sahin, I am planning to use TI RTOS. Now I am able to compile and run the RTOS based application using XDCtools. Previously, the configuration file was missing.