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.

Missing identifiers from Example during Build

Other Parts Discussed in Thread: TMS320C6678

Hi,

I am a Code Composer and TI newbie trying to learn the different abilities of the TMS320C6678 Evaluation Board. I am trying to follow the first example in the BIOS MCSDK 2.0 User Guide, creating Blink LED lights. I have tried other projects but always seem to encounter the same error with the library missing some Macro defines. I have created a source file as specified in the guide shown below. I have Code Composer 6.2.0 installed and PDK 3.0.0.

led_play.c

#include <cerrno>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "ti\platform\platform.h"
#include "ti\platform\resource_mgr.h"

/* OSAL functions for Platform Library */
uint8_t *Osal_platformMalloc (uint32_t num_bytes, uint32_t alignment) {
	return malloc(num_bytes);
}

void Osal_platformFree (uint8_t *dataPtr, uint32_t num_bytes) {
	/* Free up the memory */
	if (dataPtr) {
		free(dataPtr);
	}
}

void Osal_platformSpiCsEnter(void) {
	/* Get the hardware semaphore.
	 * Acquire Multi core CPPI synchronization lock
	 */
	while ((CSL_semAcquireDirect (PLATFORM_SPI_HW_SEM)) == 0);
		return;
}

void Osal_platformSpiCsExit (void) {
	/* Release the hardware semaphore
	 * Release multi-core lock.
	 */
	CSL_semReleaseSemaphore (PLATFORM_SPI_HW_SEM);
	return;
}

void main(void) {

	platform_init_flags init_flags;
	platform_init_config init_config;
	platform_info p_info;
	uint32_t led_no = 0;
	char message[] = "\r\nHello World.....\r\n";
	uint32_t length = strlen((char *)message);
	uint32_t i;

	/* Initialize platform with default values */
	memset(&init_flags, 0x01, sizeof(platform_init_flags));
	memset(&init_config, 0, sizeof(platform_init_config));

	if (platform_init(&init_flags, &init_config) != Platform_EOK) {
		return;
	}

	platform_uart_init();
	platform_uart_set_baudrate(115200);
	platform_get_info(&p_info);

	/* Write to the UART */
	for (i = 0; i < length; i++) {
		if (platform_uart_write(message[i]) != Platform_EOK) {
			return;
		}
	}

	/* Play forever */
	while(1) {
		platform_led(led_no, PLATFORM_LED_ON, PLATFORM_USER_LED_CLASS);
		platform_delay(30000);
		platform_led(led_no, PLATFORM_LED_OFF, PLATFORM_USER_LED_CLASS);
		led_no = (++led_no) % p_info.led[PLATFORM_USER_LED_CLASS].count;
	}
}
led_play.cmd

-c -heap 0x41000 -stack 0xa000
/* Memory Map */
MEMORY {
	L1PSRAM (RWX) 		: org = 0x0E00000, len = 0x7FFF
	L1DSRAM (RWX) 		: org = 0x0F00000, len = 0x7FFF
	L2SRAM (RWX) 		: org = 0x0800000, len = 0x080000
	MSMCSRAM (RWX) 		: org = 0xc000000, len = 0x200000
	DDR3 (RWX) 			: org = 0x80000000,len = 0x10000000
}

SECTIONS {
	.csl_vect 			> MSMCSRAM
	.text 				> MSMCSRAM
	GROUP (NEAR_DP) {
		.neardata
		.rodata
		.bss
	}
	load 				> MSMCSRAM
	.stack 				> MSMCSRAM
	.cinit 				> MSMCSRAM
	.cio 				> MSMCSRAM
	.const 				> MSMCSRAM
	.data 				> MSMCSRAM
	.switch 			> MSMCSRAM
	.sysmem 			> MSMCSRAM
	.far 				> MSMCSRAM
	.testMem 			> MSMCSRAM
	.fardata 			> MSMCSRAM
	platform_lib 		> MSMCSRAM
}

I have the following screen shots of my project properties


The console error I get seem to indicate it cannot find the macro header during building though it appears to be setup perfectly from the example document.

Console:


**** Clean-only build of configuration Debug for project led_play ****

"C:\\ti\\ccsv6\\utils\\bin\\gmake" -k clean 
DEL /F  "led_play.out"  "led_play.hex" 
DEL /F "led_play.d" 
DEL /F "led_play.obj" 
Could Not Find D:\MarkRoberts\led_play\Debug\led_play.out
Could Not Find D:\MarkRoberts\led_play\Debug\led_play.obj
'Finished clean'
' '

**** Build Finished ****

**** Build of configuration Debug for project led_play ****

"C:\\ti\\ccsv6\\utils\\bin\\gmake" -k all 
'Building file: ../led_play.c'
'Invoking: C6000 Compiler'
"C:/ti/ccsv6/tools/compiler/ti-cgt-c6000_8.1.1/bin/cl6x" -mv6600 --include_path="C:/ti/ccsv6/tools/compiler/ti-cgt-c6000_8.1.1/include" --include_path="C:/ti/pdk_c667x_2_0_2/packages" -g --diag_wrap=off --diag_warning=225 --display_error_number --preproc_with_compile --preproc_dependency="led_play.d"  "../led_play.c"

>> Compilation failure
subdir_rules.mk:7: recipe for target 'led_play.obj' failed
"C:/ti/ccsv6/tools/compiler/ti-cgt-c6000_8.1.1/include/s_c_features.h", line 439: warning #48-D: incompatible redefinition of macro "_STLP_VENDOR_CSTD" (declared at line 112 of "C:/ti/ccsv6/tools/compiler/ti-cgt-c6000_8.1.1/include/s_c__ti.h")
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_semAux.h", line 89: error #20: identifier "CSL_SEMAPHORE_REGS" is undefined
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_semAux.h", line 130: error #20: identifier "CSL_SEMAPHORE_REGS" is undefined
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_semAux.h", line 168: error #20: identifier "CSL_SEMAPHORE_REGS" is undefined
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_semAux.h", line 209: error #20: identifier "CSL_SEMAPHORE_REGS" is undefined
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_semAux.h", line 252: error #20: identifier "CSL_SEMAPHORE_REGS" is undefined
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_semAux.h", line 293: error #20: identifier "CSL_SEMAPHORE_REGS" is undefined
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_semAux.h", line 335: error #20: identifier "CSL_SEMAPHORE_REGS" is undefined
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_semAux.h", line 384: error #20: identifier "CSL_SEMAPHORE_REGS" is undefined
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_semAux.h", line 425: error #20: identifier "CSL_SEMAPHORE_REGS" is undefined
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_semAux.h", line 469: error #20: identifier "CSL_SEMAPHORE_REGS" is undefined
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_semAux.h", line 517: error #20: identifier "CSL_SEMAPHORE_REGS" is undefined
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_semAux.h", line 568: error #20: identifier "CSL_SEMAPHORE_REGS" is undefined
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_xmcAux.h", line 110: error #20: identifier "CSL_DSP_DSP_XMC_CTRL_REGS" is undefined
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_xmcAux.h", line 184: error #20: identifier "CSL_DSP_DSP_XMC_CTRL_REGS" is undefined
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_xmcAux.h", line 232: error #20: identifier "CSL_DSP_DSP_XMC_CTRL_REGS" is undefined
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_xmcAux.h", line 289: error #20: identifier "CSL_DSP_DSP_XMC_CTRL_REGS" is undefined
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_xmcAux.h", line 332: error #20: identifier "CSL_DSP_DSP_XMC_CTRL_REGS" is undefined
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_xmcAux.h", line 375: error #20: identifier "CSL_DSP_DSP_XMC_CTRL_REGS" is undefined
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_xmcAux.h", line 418: error #20: identifier "CSL_DSP_DSP_XMC_CTRL_REGS" is undefined
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_xmcAux.h", line 467: error #20: identifier "CSL_DSP_DSP_XMC_CTRL_REGS" is undefined
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_xmcAux.h", line 507: error #20: identifier "CSL_DSP_DSP_XMC_CTRL_REGS" is undefined
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_xmcAux.h", line 551: error #20: identifier "CSL_DSP_DSP_XMC_CTRL_REGS" is undefined
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_xmcAux.h", line 594: error #20: identifier "CSL_DSP_DSP_XMC_CTRL_REGS" is undefined
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_xmcAux.h", line 652: error #20: identifier "CSL_DSP_DSP_XMC_CTRL_REGS" is undefined
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_xmcAux.h", line 695: error #20: identifier "CSL_DSP_DSP_XMC_CTRL_REGS" is undefined
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_xmcAux.h", line 731: error #20: identifier "CSL_DSP_DSP_XMC_CTRL_REGS" is undefined
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_xmcAux.h", line 768: error #20: identifier "CSL_DSP_DSP_XMC_CTRL_REGS" is undefined
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_xmcAux.h", line 804: error #20: identifier "CSL_DSP_DSP_XMC_CTRL_REGS" is undefined
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_xmcAux.h", line 841: error #20: identifier "CSL_DSP_DSP_XMC_CTRL_REGS" is undefined
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_xmcAux.h", line 892: error #20: identifier "CSL_DSP_DSP_XMC_CTRL_REGS" is undefined
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_xmcAux.h", line 939: error #20: identifier "CSL_DSP_DSP_XMC_CTRL_REGS" is undefined
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_xmcAux.h", line 974: error #20: identifier "CSL_DSP_DSP_XMC_CTRL_REGS" is undefined
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_cacheAux.h", line 92: error #20: identifier "CSL_C66X_COREPAC_REG_BASE_ADDRESS_REGS" is undefined
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_cacheAux.h", line 130: error #20: identifier "CSL_C66X_COREPAC_REG_BASE_ADDRESS_REGS" is undefined
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_cacheAux.h", line 168: error #20: identifier "CSL_C66X_COREPAC_REG_BASE_ADDRESS_REGS" is undefined
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_cacheAux.h", line 203: error #20: identifier "CSL_C66X_COREPAC_REG_BASE_ADDRESS_REGS" is undefined
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_cacheAux.h", line 245: error #20: identifier "CSL_C66X_COREPAC_REG_BASE_ADDRESS_REGS" is undefined
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_cacheAux.h", line 292: error #20: identifier "CSL_C66X_COREPAC_REG_BASE_ADDRESS_REGS" is undefined
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_cacheAux.h", line 329: error #20: identifier "CSL_C66X_COREPAC_REG_BASE_ADDRESS_REGS" is undefined
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_cacheAux.h", line 364: error #20: identifier "CSL_C66X_COREPAC_REG_BASE_ADDRESS_REGS" is undefined
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_cacheAux.h", line 399: error #20: identifier "CSL_C66X_COREPAC_REG_BASE_ADDRESS_REGS" is undefined
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_cacheAux.h", line 434: error #20: identifier "CSL_C66X_COREPAC_REG_BASE_ADDRESS_REGS" is undefined
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_cacheAux.h", line 469: error #20: identifier "CSL_C66X_COREPAC_REG_BASE_ADDRESS_REGS" is undefined
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_cacheAux.h", line 508: error #20: identifier "CSL_C66X_COREPAC_REG_BASE_ADDRESS_REGS" is undefined
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_cacheAux.h", line 560: error #20: identifier "CSL_C66X_COREPAC_REG_BASE_ADDRESS_REGS" is undefined
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_cacheAux.h", line 612: error #20: identifier "CSL_C66X_COREPAC_REG_BASE_ADDRESS_REGS" is undefined
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_cacheAux.h", line 663: error #20: identifier "CSL_C66X_COREPAC_REG_BASE_ADDRESS_REGS" is undefined
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_cacheAux.h", line 715: error #20: identifier "CSL_C66X_COREPAC_REG_BASE_ADDRESS_REGS" is undefined
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_cacheAux.h", line 768: error #20: identifier "CSL_C66X_COREPAC_REG_BASE_ADDRESS_REGS" is undefined
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_cacheAux.h", line 820: error #20: identifier "CSL_C66X_COREPAC_REG_BASE_ADDRESS_REGS" is undefined
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_cacheAux.h", line 886: error #20: identifier "CSL_C66X_COREPAC_REG_BASE_ADDRESS_REGS" is undefined
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_cacheAux.h", line 943: error #20: identifier "CSL_C66X_COREPAC_REG_BASE_ADDRESS_REGS" is undefined
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_cacheAux.h", line 1008: error #20: identifier "CSL_C66X_COREPAC_REG_BASE_ADDRESS_REGS" is undefined
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_cacheAux.h", line 1066: error #20: identifier "CSL_C66X_COREPAC_REG_BASE_ADDRESS_REGS" is undefined
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_cacheAux.h", line 1133: error #20: identifier "CSL_C66X_COREPAC_REG_BASE_ADDRESS_REGS" is undefined
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_cacheAux.h", line 1187: error #20: identifier "CSL_C66X_COREPAC_REG_BASE_ADDRESS_REGS" is undefined
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_cacheAux.h", line 1222: error #20: identifier "CSL_C66X_COREPAC_REG_BASE_ADDRESS_REGS" is undefined
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_cacheAux.h", line 1257: error #20: identifier "CSL_C66X_COREPAC_REG_BASE_ADDRESS_REGS" is undefined
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_cacheAux.h", line 1292: error #20: identifier "CSL_C66X_COREPAC_REG_BASE_ADDRESS_REGS" is undefined
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_cacheAux.h", line 1327: error #20: identifier "CSL_C66X_COREPAC_REG_BASE_ADDRESS_REGS" is undefined
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_cacheAux.h", line 1366: error #20: identifier "CSL_C66X_COREPAC_REG_BASE_ADDRESS_REGS" is undefined
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_cacheAux.h", line 1415: error #20: identifier "CSL_C66X_COREPAC_REG_BASE_ADDRESS_REGS" is undefined
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_cacheAux.h", line 1461: error #20: identifier "CSL_C66X_COREPAC_REG_BASE_ADDRESS_REGS" is undefined
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_cacheAux.h", line 1498: error #20: identifier "CSL_C66X_COREPAC_REG_BASE_ADDRESS_REGS" is undefined
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_cacheAux.h", line 1539: error #20: identifier "CSL_C66X_COREPAC_REG_BASE_ADDRESS_REGS" is undefined
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_cacheAux.h", line 1574: error #20: identifier "CSL_C66X_COREPAC_REG_BASE_ADDRESS_REGS" is undefined
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_cacheAux.h", line 1607: error #20: identifier "CSL_C66X_COREPAC_REG_BASE_ADDRESS_REGS" is undefined
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_cacheAux.h", line 1640: error #20: identifier "CSL_C66X_COREPAC_REG_BASE_ADDRESS_REGS" is undefined
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_cacheAux.h", line 1679: error #20: identifier "CSL_C66X_COREPAC_REG_BASE_ADDRESS_REGS" is undefined
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_cacheAux.h", line 1743: error #20: identifier "CSL_C66X_COREPAC_REG_BASE_ADDRESS_REGS" is undefined
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_cacheAux.h", line 1800: error #20: identifier "CSL_C66X_COREPAC_REG_BASE_ADDRESS_REGS" is undefined
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_cacheAux.h", line 1865: error #20: identifier "CSL_C66X_COREPAC_REG_BASE_ADDRESS_REGS" is undefined
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_cacheAux.h", line 1922: error #20: identifier "CSL_C66X_COREPAC_REG_BASE_ADDRESS_REGS" is undefined
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_cacheAux.h", line 1986: error #20: identifier "CSL_C66X_COREPAC_REG_BASE_ADDRESS_REGS" is undefined
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_cacheAux.h", line 2045: error #20: identifier "CSL_C66X_COREPAC_REG_BASE_ADDRESS_REGS" is undefined
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_cacheAux.h", line 2096: error #20: identifier "CSL_C66X_COREPAC_REG_BASE_ADDRESS_REGS" is undefined
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_cacheAux.h", line 2150: error #20: identifier "CSL_C66X_COREPAC_REG_BASE_ADDRESS_REGS" is undefined
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_cacheAux.h", line 2202: error #20: identifier "CSL_C66X_COREPAC_REG_BASE_ADDRESS_REGS" is undefined
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_cacheAux.h", line 2256: error #20: identifier "CSL_C66X_COREPAC_REG_BASE_ADDRESS_REGS" is undefined
"C:/ti/pdk_c667x_2_0_2/packages/ti/csl/csl_cacheAux.h", line 2308: error #20: identifier "CSL_C66X_COREPAC_REG_BASE_ADDRESS_REGS" is undefined
80 errors detected in the compilation of "../led_play.c".
gmake: *** [led_play.obj] Error 1
gmake: Target 'all' not remade because of errors.

**** Build Finished ****

At this point I'm lost as to what to do. I've looked over the examples I could find in this forum and haven't had much luck. Anyone have any insight on what I may be missing? Thanks in advance.

  • Hi Mark,

    Please include the CSL libraries to your project(last screenshot). This may solve the above issue.

    PATH: ~\ti\pdk_c667x_2_0_x\packages\ti\csl\lib\c6678\c66\release

    Thank you.
  • Hi, thank you for your response. Unfortunately your suggestion did not work. I had the exact same errors while compiling. Perhaps the directory suggested is missing some library files? See below for directory contents.

    I did find one solution that worked from my co-worker. I installed bio_mcsdk (2.01.02.06 setup and patch). After doing so I pointed the include directories to the (~/ti/pdk_C6678_1_1_2_6) instead of the (~/ti/pdk_C6678_2_xxxxx) variant. See screen shots.

    My understanding was that the MCSDK was depreciated and no longer used and to instead install and use the Processor SDK. While setting up my environment I installed Processor SDK 3.00 and Code Composer 6.2.0, are these not versions I should be using? Or do I need the older MCSDK just for the examples I am going through. Thanks.

  • Can you please import the following project into CCS and build then run.
    C:\ti\pdk_c667x_2_0_3\packages\ti\platform\evmc6678l\platform_test

    This example perform the LED blink and do much more tests.
    Also refer this project settings and make it in your project.
    Like what we need to include the library, headers, predefined symbols etc.,