Tool/software: TI-RTOS
Hello.
I am trying to build a simple, entry level, program using the NDK on the TM4C1294XL Launchpad. CCS 6.2, NDK 2 25 1 11
I'm NOT using XGCONF because 1) I've tried it out on the NDK, 2) It doesn't have the the server I want built in 3) I need to learn to use the NDK without it because: 4) when I use an example, it works, when I try to modify it, I still get the same linker problems I am describing below.
I have spent 5 days trying to solve this. I have read through the NdkApiUserGuide (spru523j) from end to end.
So far, I am just trying to call the initial function "NC_SystemOpen", and it has been a nightmare.
Given this simple call inside one simple SYS/BIOS task:
Void taskFxn(UArg a0, UArg a1) { System_printf("enter taskFxn()\n"); int result; HANDLE hCfg; result = NC_SystemOpen(NC_PRIORITY_LOW, NC_OPMODE_INTERRUPT);
NC_SystemClose(); System_printf("exit taskFxn()\n");
}
Naturally I get an undefined symbol. (What others call an unresolved external), which I would expect if I don't link to the lib. The NDK reference document DOES NOT tell me what lib to link to. But the User guide does give some hints.
I added "netctrl.aem4" to the linker, and went to 61 undefined symbols. ( NIMUInit, _llSerialInit , httpOpen, etc...) I start digging, and adding more libs to try to handle these. Adding os and os_sem drops it to 49 undefined symbols. I add nettool, and it goes up to 51. I add stk6 and I'm down to 11 undefined symbols. In the end, it just seems like you have to "dog pile" every lib in the linker to get it to resolve.
What's left are "low-level serial" functions, and "low level timer" functions, listed below. Where are they? What libs do I link to for them? "Timer" support is already added via XGCONF, so these function have to come from somewhere else. And I also have no idea where the low-level serial stuff will come from.
Also, there is an undefined "NIMUDeviceTable" which is not defined anywhere in the NDK API ref guide or the User Guide. It appears to have something to do with the NSP, which half the NDK doc tells you must be installed, and half the forums tell you are not needed.
undefined first referenced symbol in file --------- ---------------- NIMUDeviceTable C:/ti/ndk_2_25_01_11/packages/ti/ndk/stack/lib/stk6.aem4<nimu.oem4> _llSerialInit C:/ti/ndk_2_25_01_11/packages/ti/ndk/netctrl/lib/netctrl.aem4<netctrl.oem4> _llSerialServiceCheck C:/ti/ndk_2_25_01_11/packages/ti/ndk/netctrl/lib/netctrl.aem4<netctrl.oem4> _llSerialShutdown C:/ti/ndk_2_25_01_11/packages/ti/ndk/netctrl/lib/netctrl.aem4<netctrl.oem4> _llTimerInit C:/ti/ndk_2_25_01_11/packages/ti/ndk/netctrl/lib/netctrl.aem4<netctrl.oem4> _llTimerShutdown C:/ti/ndk_2_25_01_11/packages/ti/ndk/netctrl/lib/netctrl.aem4<netctrl.oem4> _llUserLedInit C:/ti/ndk_2_25_01_11/packages/ti/ndk/netctrl/lib/netctrl.aem4<netctrl.oem4> _llUserLedShutdown C:/ti/ndk_2_25_01_11/packages/ti/ndk/netctrl/lib/netctrl.aem4<netctrl.oem4> llSerialService C:/ti/ndk_2_25_01_11/packages/ti/ndk/netctrl/lib/netctrl.aem4<netctrl.oem4> llTimerGetStartTime C:/ti/ndk_2_25_01_11/packages/ti/ndk/os/lib/os.aem4<ossys.oem4> llTimerGetTime C:/ti/ndk_2_25_01_11/packages/ti/ndk/os/lib/os.aem4<ossys.oem4>
P.S. I also tried to rebuild the NDK based on the Wiki. However it failed, so I am using the original libs as they were compiled in the package.
I can post the entire project if someone would like to review it. However, this is such an entry level basic question, someone with some experience should be able to tell me what libs to link to.
Thanks.
-CSW
NC_SystemClose(); System_printf("exit taskFxn()\n");