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.

TMS320C6657: Undefined symbols when including board_init() of the CSL

Part Number: TMS320C6657
Other Parts Discussed in Thread: SYSBIOS

I have been working on porting some code from a C6748 to the C6657.  I am working with a TMDSEVM6657LS evaluation module.  The new project is based on the SYS/BIOS "typical" example.  From here I started adding the required c665x PDK to the project and and the required include paths and header files to get the code to build.  However during linking the following errors are generated.

undefined first referenced
symbol in file
--------- ----------------
ti_sysbios_family_c66_tci66xx_CpIntc_dispatchPlug__E C:\ti\pdk_c665x_2_0_16\packages\ti\osal\lib\tirtos\c6657\c66\release\ti.osal.ae66<MuxIntcP_tirtos.oe66>
ti_sysbios_family_c66_tci66xx_CpIntc_dispatch__E C:\ti\pdk_c665x_2_0_16\packages\ti\osal\lib\tirtos\c6657\c66\release\ti.osal.ae66<MuxIntcP_tirtos.oe66>
ti_sysbios_family_c66_tci66xx_CpIntc_enableHostInt__E C:\ti\pdk_c665x_2_0_16\packages\ti\osal\lib\tirtos\c6657\c66\release\ti.osal.ae66<MuxIntcP_tirtos.oe66>
ti_sysbios_family_c66_tci66xx_CpIntc_getEventId__E C:\ti\pdk_c665x_2_0_16\packages\ti\osal\lib\tirtos\c6657\c66\release\ti.osal.ae66<MuxIntcP_tirtos.oe66>
ti_sysbios_family_c66_tci66xx_CpIntc_mapSysIntToHostInt__E C:\ti\pdk_c665x_2_0_16\packages\ti\osal\lib\tirtos\c6657\c66\release\ti.osal.ae66<MuxIntcP_tirtos.oe66>

I have been unable to locate where these symbols are defined to include them.  Any help would be appreciated.

main.c

/*
* ======== main.c ========
*/
//***** Header Files **********************************************************
// XDC module Header Files
#include <xdc/std.h> // XDC "base types" - must be included FIRST
#include <xdc/cfg/global.h> // For all BIOS instances created statically in RTOS .cfg file
#include <xdc/runtime/Error.h> // For error handling (e.g. Error block)
#include <xdc/runtime/Log.h> // Needed for any Log_info() call
#include <xdc/runtime/System.h> // XDC System functions (e.g. System_abort(), System_printf())
#include <xdc/runtime/Timestamp.h> // Needed when using Timestamp APIs (TSCL/H), 32bit, 64bit
#include <xdc/runtime/Types.h> // XDC constants/types used in xdc.runtime pkg

// TI-RTOS Kernel Header Files
#include <ti/sysbios/BIOS.h> // BIOS module API
#include <ti/sysbios/knl/Semaphore.h> // BIOS Semaphore API
#include <ti/sysbios/knl/Task.h> // BIOS Task API

// Standard C Header Files
#include <stdint.h> // Standard integer types
#include <stddef.h> // Standard variable types and macros
#include <stdio.h> // Standard I/O for printf()

// Peripheral Driver Header Files
#include <ti/board/board.h> // Board init enables C6748 modules (e.g. GPIO Module)
#include <ti/drv/uart/uart.h> // Uart Driver Init

/*
* ======== taskFxn ========
*/
Void taskFxn(UArg a0, UArg a1)
{
System_printf("enter taskFxn()\n");

Task_sleep(10);

System_printf("exit taskFxn()\n");

System_flush(); /* force SysMin output to console */
}

/*
* ======== main ========
*/
Int main()
{
Task_Handle task;
Error_Block eb;

System_printf("enter main()\n");

Board_init( 0
// BOARD_INIT_PINMUX_CONFIG |
// BOARD_INIT_MODULE_CLOCK |
// BOARD_INIT_UART_STDIO
// BOARD_INIT_PINMUX_CONFIG | // Initialize PinMux registers and GPIO Module/Clock
// BOARD_INIT_MODULE_CLOCK
);

// UART_init();

Error_init(&eb);
task = Task_create(taskFxn, NULL, &eb);
if (task == NULL) {
System_printf("Task_create() failed!\n");
BIOS_exit(0);
}

BIOS_start(); /* does not return */
return(0);
}

app.cfg

var BIOS = xdc.useModule('ti.sysbios.BIOS');
var EventCombiner = xdc.useModule('ti.sysbios.family.c64p.EventCombiner');
var Exception = xdc.useModule('ti.sysbios.family.c64p.Exception');
var Cache = xdc.useModule('ti.sysbios.family.c66.Cache');
var Clock = xdc.useModule('ti.sysbios.knl.Clock');
var Semaphore = xdc.useModule('ti.sysbios.knl.Semaphore');
var Swi = xdc.useModule('ti.sysbios.knl.Swi');
var Timer = xdc.useModule('ti.sysbios.hal.Timer');
var Hwi = xdc.useModule('ti.sysbios.hal.Hwi');
var HeapBuf = xdc.useModule('ti.sysbios.heaps.HeapBuf');
var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');

var Defaults = xdc.useModule('xdc.runtime.Defaults');
var Diags = xdc.useModule('xdc.runtime.Diags');
var Error = xdc.useModule('xdc.runtime.Error');
var Log = xdc.useModule('xdc.runtime.Log');
var Main = xdc.useModule('xdc.runtime.Main');
var Memory = xdc.useModule('xdc.runtime.Memory')
var Text = xdc.useModule('xdc.runtime.Text');
var Timestamp = xdc.useModule('xdc.runtime.Timestamp');
var ti_sysbios_timers_timer64_Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');


/*
* Uncomment this line to globally disable Asserts.
* All modules inherit the default from the 'Defaults' module. You
* can override these defaults on a per-module basis using Module.common$.
* Disabling Asserts will save code space and improve runtime performance.
Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF;
*/

/*
* Uncomment this line to keep module names from being loaded on the target.
* The module name strings are placed in the .const section. Setting this
* parameter to false will save space in the .const section. Error and
* Assert messages will contain an "unknown module" prefix instead
* of the actual module name.
Defaults.common$.namedModule = false;
*/

/*
* Minimize exit handler array in System. The System module includes
* an array of functions that are registered with System_atexit() to be
* called by System_exit().
*/
//System.maxAtexitHandlers = 4;

/*
* Uncomment this line to disable the Error print function.
* We lose error information when this is disabled since the errors are
* not printed. Disabling the raiseHook will save some code space if
* your app is not using System_printf() since the Error_print() function
* calls System_printf().
Error.raiseHook = null;
*/

/*
* Uncomment this line to keep Error, Assert, and Log strings from being
* loaded on the target. These strings are placed in the .const section.
* Setting this parameter to false will save space in the .const section.
* Error, Assert and Log message will print raw ids and args instead of
* a formatted message.
Text.isLoaded = false;
*/

/*
* Uncomment this line to disable the output of characters by SysMin
* when the program exits. SysMin writes characters to a circular buffer.
* This buffer can be viewed using the SysMin Output view in ROV.
SysMin.flushAtExit = false;
*/


// ============================================================================

// ================ BIOS Module Setup =========================================

BIOS.taskEnabled = true; // Enable BIOS Task Scheduler
BIOS.heapSize = 0x1000; /* Specify the size of the default heap. */
BIOS.libType = BIOS.LibType_Custom; /* Build a custom SYS/BIOS library from sources. */
BIOS.assertsEnabled = true;
BIOS.logsEnabled = true;
Program.stack = 0x2000;/* System stack size (used by ISRs and Swis) */
var SysMin = xdc.useModule('xdc.runtime.SysMin');
var System = xdc.useModule('xdc.runtime.System');
SysMin.bufSize = 0x200;/* Circular buffer size for System_printf() */
System.SupportProxy = SysMin;

// ================ Create Logger for Whole System ============================
//var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');
//var loggerBufParams = new LoggerBuf.Params();
//loggerBufParams.numEntries = 16;
//var logger0 = LoggerBuf.create(loggerBufParams);
//Defaults.common$.logger = logger0;
//Main.common$.diags_INFO = Diags.ALWAYS_ON;

// ================ LoggingSetup configuration ================================
// NOTE: Need to include UIA package to use
var LoggingSetup = xdc.useModule('ti.uia.sysbios.LoggingSetup');
LoggingSetup.loadLoggerSize = 8192;
LoggingSetup.sysbiosLoggerSize = 8192;
LoggingSetup.mainLoggerSize = 8192;
LoggingSetup.loggerType = LoggingSetup.LoggerType_STOPMODE;
LoggingSetup.loadTaskLogging = true;
LoggingSetup.loadSwiLogging = true;
LoggingSetup.loadHwiLogging = false;
LoggingSetup.sysbiosSemaphoreLogging = true;
LoggingSetup.countingAndGraphingLogging = true;

// ================ Task configuration ========================================
var Task = xdc.useModule('ti.sysbios.knl.Task');
Task.checkStackFlag = false; // No runtime stack checking is performed
Task.numPriorities = 4; // Reduce the number of task priorities

// ================ Mailbox configuration =====================================
var Mailbox = xdc.useModule('ti.sysbios.knl.Mailbox');

// ================ Idle configuration ========================================
var Idle = xdc.useModule('ti.sysbios.knl.Idle');
Idle.addFunc("&myIdleFxn");

// ================ SOC and Core specific configuration ================
var devType = "c6657"
var osType = "tirtos"


// ================ Low level drivers configuration ================
// Load the OSAL package
var Osal = xdc.useModule('ti.osal.Settings');
Osal.osType = osType;
Osal.socType = devType;

// Load and use the CSL packages
var Csl = xdc.useModule('ti.csl.Settings');
Csl.deviceType = devType;

// Load the Board package and set the board name
var Board = xdc.loadPackage('ti.board');
Board.Settings.boardName = "evmC6657";

// 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;

// Load the I2C package - required by board
var I2c = xdc.loadPackage('ti.drv.i2c');
I2c.Settings.socType = devType;

// Load the SPI package
var Spi = xdc.loadPackage('ti.drv.spi');
Spi.Settings.socType = devType;

  • I probably should have included the linker output also...

    Building file: "../main.c"
    Invoking: C6000 Compiler
    "C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-c6000_8.3.11/bin/cl6x" -mv6600 --include_path="C:/Users/sut71568/workspace/C6657/ExampleC6657" --include_path="C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-c6000_8.3.11/include" --include_path="C:/ti/bios_6_76_03_01/packages/ti/posix/ccs" --define=c6657 --define=USE_BIOS --define=evmC6657 -g --diag_warning=225 --diag_wrap=off --display_error_number --preproc_with_compile --preproc_dependency="main.d_raw" --cmd_file="configPkg/compiler.opt" "../main.c"
    Finished building: "../main.c"

    making ../src/sysbios/sysbios.ae66 ...
    gmake[2]: Nothing to be done for 'all'.
    Building target: "ExampleC6657.out"
    Invoking: C6000 Linker
    "C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-c6000_8.3.11/bin/cl6x" -mv6600 --define=c6657 --define=USE_BIOS --define=evmC6657 -g --diag_warning=225 --diag_wrap=off --display_error_number -z -m"ExampleC6657.map" -i"C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-c6000_8.3.11/lib" -i"C:/ti/ccs1040/ccs/tools/compiler/ti-cgt-c6000_8.3.11/include" -i"C:/ti/pdk_c665x_2_0_16/packages/ti/board/lib/evmC6657/c66/release" -i"C:/ti/pdk_c665x_2_0_16/packages/ti/csl/lib/c6657/c66/release" -i"C:/ti/pdk_c665x_2_0_16/packages/ti/drv/i2c/lib/c6657/c66/release" -i"C:/ti/pdk_c665x_2_0_16/packages/ti/drv/gpio/lib/c6657/c66/release" -i"C:/ti/pdk_c665x_2_0_16/packages/ti/drv/spi/lib/c6657/c66/release" -i"C:/ti/pdk_c665x_2_0_16/packages/ti/drv/uart/lib/c6657/c66/release" -i"C:/ti/pdk_c665x_2_0_16/packages/ti/osal/lib/tirtos/c6657/c66/release" --reread_libs --diag_wrap=off --display_error_number --warn_sections --xml_link_info="ExampleC6657_linkInfo.xml" --rom_model -o "ExampleC6657.out" "./main.obj" "./myIdleFxn.obj" -l"configPkg/linker.cmd" -llibc.a -lti.board.ae66 -lti.csl.ae66 -lti.csl.intc.ae66 -lti.drv.i2c.ae66 -lti.drv.gpio.ae66 -lti.drv.spi.ae66 -lti.drv.uart.ae66 -lti.osal.ae66
    <Linking>

  • HI Brads,

    The compatible version of CCS is 9.3 for ---- "Processor SDK 6.3-C665x"

    ---

    In your log, I could understand, you used CCS 10.4. 

    1. Please try building using the CCS 9.3 version.

    2. If you build for the first time, please do clean using the command " C:\ti\processor_sdk_rtos_c665x_6_03_00_106>gmake clean -j4"

    And then build again.

    --

    I am able to build both the PDK and the SDK of "Processor SDK 6.3-C665x" successfully without any errors.

    Please refer to the FAQ page on how to rebuild the PDK and the SDK for C6657, https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1048039/faq-processor-sdk-c665x-how-to-re-build-the-pdk-and-sdk-of-processor-sdk-c665x-6-3-for-c6657

    Regards

    Shankari

  • Shankari,

    Thankyou for the response.  However, the building of the PDK and SDK is not my current issue.  A couple of weeks ago I realized that the development kit's build scrips were not compatible with CCS10.4, so I installed CCS9.3 and was able to successfully build the libraries(I thought). 

    Are you stating that the compiled libraries are not compatible with CCS10.4 and that I need to use CCS9.3 to develop code for the C6657? 
    Or are you stating that you believe that the libraries did not complete correctly?

    My issue, as I saw it, was trying to find what to include to get my simple project to build.

     Brad

  • Hi 

    What I meant is, if you are using any of the elements such as PDK, CSL libraries, demo-examples of Processor-SDK 6.3,

    first build them separately using CCS 9.3. And then use-it/link it to your project.

    ---

    There are 48 examples in the PDK. You can directly import them and use it in CCS and run it on C6657 EVM.

    You can generate lot of example projects using this link which I have created recently : https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1040872/faq-tms320c6657-how-to-generate-the-ccs-pdk-examples-for-c6657/3849031#3849031

    --

    You can refer all these examples and conclude what-to and how-to include for your project.

    Hope this helps!

    Regards

    Shankari