Hi,
I am using EVM6678 board. The Big_time project and MCSDK example 1: led_play both correctly run. The linker does know the library path. I would like to combine the LED function to big_time project. Of course, I use the same library path as the separate projects above. Unfortunately, there is a linker error. See below please:
.........
'Invoking: C6000 Linker'
"C:/Program Files (x86)/Texas Instruments/C6000 Code Generation Tools 7.4.2/bin/cl6x" -mv6600 --abi=eabi -g --display_error_number --diag_warning=225 --diag_wrap=off -z --stack_size=0x8000 -m"big_time_LED.map" --heap_size=0x8000 -i"C:/Program Files (x86)/Texas Instruments/C6000 Code Generation Tools 7.4.2/lib" -i"C:/ti/pdk_C6678_1_1_2_5/packages/ti/platform/evmc6678l/platform_lib/lib/debug" -i"C:/Program Files (x86)/Texas Instruments/C6000 Code Generation Tools 7.4.2/include" --reread_libs --warn_sections --display_error_number --diag_wrap=off --rom_model -o "big_time_LED.out" -l"./configPkg/linker.cmd" "./bigtime.obj" -l"libc.a" -lti.platform.evm6678l.ae66 "../big_time.cmd"
<Linking>
undefined first referenced
symbol in file
--------- ----------------
platform_led(unsigned int, PLATFORM_LED_OP, LED_CLASS_E) ./bigtime.obj
platform_delay(unsigned int) ./bigtime.obj
ti_sysbios_BIOS_start__E ./bigtime.obj
ti_sysbios_family_c64p_TimestampProvider_Module_startup__F C:\Users\Jeff\workspace_v5_1_C6678\big_time_LED\Debug\configPkg\package\cfg\bigtime_pe66.oe66
error #10234-D: unresolved symbols remain
error #10010: errors encountered during linking; "big_time_LED.out" not built
....................
Even I reduce the big_time project to a simple idle task after removing all other stuff, the same error exists.
Is this related to name mangling? But after I include platform_led and platform_delay declaration to:
extern "C" {
/* Wrapper functions to call Clock::tick() */
void clockIdle(void);
Platform_STATUS platform_led(uint32_t led_id, PLATFORM_LED_OP operation, LED_CLASS_E led_class);
Platform_STATUS platform_delay(uint32_t usecs);
}
// end extern "C"
The errors are:
........
"../bigtime.cpp", line 103: error #339: linkage specification is incompatible with previous "platform_led" (declared at line 995 of "C:\ti\pdk_C6678_1_1_2_5\packages\ti\platform\platform.h")
"../bigtime.cpp", line 104: error #339: linkage specification is incompatible with previous "platform_delay" (declared at line 1007 of "C:\ti\pdk_C6678_1_1_2_5\packages\ti\platform\platform.h")
2 errors detected in the compilation of "../bigtime.cpp".
.............
The compiler complains the incompatibility.
I create another C (not C++ project) with one idle task. It succeeds the building with platform_led function calling. Thus, it seems the problem is with C++ call the C platform library: ti.platform.evm6678l.ae66 even though the library path is correctly set.
I don't know how to solve this problem.
Thanks,