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.

NDK program help

Other Parts Discussed in Thread: SYSBIOS

Hi, I am trying to write a program that uses the NDK to create a TCP IP Connection and send some data to a PC (server). I am using the C6748 DSP. I get the following errors:

Description Resource Path Location Type
unresolved symbol NIMUDeviceTable, first referenced in C:\ti\tirtos_c6000_2_00_01_23\products\ndk_2_23_01_01\packages\ti\ndk\stack\lib\stk.ae674<nimu.oe674> userMade C/C++ Problem

Description Resource Path Location Type
unresolved symbol NetworkOpen, first referenced in C:\Users\Lao\workspace_v6_1\userMade\Debug\configPkg\package\cfg\app_pe674.oe674 userMade C/C++ Problem

Description Resource Path Location Type
unresolved symbol NetworkClose, first referenced in C:\Users\Lao\workspace_v6_1\userMade\Debug\configPkg\package\cfg\app_pe674.oe674 userMade C/C++ Problem

Description Resource Path Location Type
unresolved symbol main, first referenced in C:\ti\ccsv6\tools\compiler\ti-cgt-c6000_8.1.0\lib\rts6740_elf.lib<args_main.obj> userMade C/C++ Problem

Description Resource Path Location Type
unresolved symbol IPAddr, first referenced in C:\Users\Lao\workspace_v6_1\userMade\Debug\configPkg\package\cfg\app_pe674.oe674 userMade C/C++ Problem

Description Resource Path Location Type
<a href="file:/c:/ti/ccsv6/tools/compiler/dmed/HTML/10234.html">#10234-D</a> unresolved symbols remain userMade C/C++ Problem

Description Resource Path Location Type
#10010 errors encountered during linking; "userMade.out" not built userMade C/C++ Problem

My program is:



#include <ti/sysbios/hal/Hwi.h>
#include <ti/sysbios/knl/Task.h>
#include <netmain.h>
#include <string.h>
#include <ti/sysbios/BIOS.h>
#include <ti/sysbios/hal/Timer.h>
#include <xdc/cfg/global.h>
#include <stdio.h>
#include <stdlib.h>

int main(void){
char *pBuf= 0;
struct sockaddr sin1;
struct timeval timeout;

fdOpenSession(TaskSelf());
SOCKET s= socket(AF_INET,SOCK_STREAM,IPPROTO_TCP;
if (s<0){
print("failed at socket %d \n", errno());
}

//setsockopt();
//bind();
bzero(&sin1, sizeof(struct sockaddr));
sin1.sin_family= AF_INET;
sin1.sin_addr.s_addr= 169.254.250.129;
sin1.sin_port= htons(7);

timeout.tv_sec=5;
timeout.tv_usec= 0;

setsockopt(s,SOL_SOCKET,SO_SNDTIMEO,&timeout,sizeof(timeout));

if (connect(s,(PSA)&sin1,sizeof(sin1))<0){
printf("failed at connect %d \n", errno());
}
//fdPoll();
if (!(pBuf= malloc(4096))){
print("failed at buffer allocation %d \n", errno());
}
for(i=0;i<4096;i++){
*(pBuf+1)=(char)I;
}

if (send(s,pBuf,4096,0)<0){
print("failed at send %d \n", errno());
}

fdCloseSession(TaskSelf());

TaskExit(TaskSelf());

}

I don't know what to do to get past this or where I have gone wrong. Any help or alternative code will be useful. Thanks

  • Dear Olaoluwapo,
    We have NSP package which has some ready made NDK examples, using that you can use TCP/UDP communicate (HTTP server etc.,)
    C:\ti\nsp_1_10_00_03\packages\ti\ndk\examples\ndk_evm6748_elf_helloWorld

    Download link:
    software-dl.ti.com/.../index_FDS.html


    Description Resource Path Location Type
    unresolved symbol NIMUDeviceTable, first referenced in C:\ti\tirtos_c6000_2_00_01_23\products\ndk_2_23_01_01\packages\ti\ndk\stack\lib\stk.ae674<nimu.oe674> userMade C/C++ Problem

    Description Resource Path Location Type
    unresolved symbol NetworkOpen, first referenced in C:\Users\Lao\workspace_v6_1\userMade\Debug\configPkg\package\cfg\app_pe674.oe674 userMade C/C++ Problem

    Sounds like you missed to define or use the EMAC driver in your project.
    BTW, to address this undefined error, you can add the NDK package to your CCS settings.

    Refer to the following TI e2e post.
    e2e.ti.com/.../863166
  • Hi,

    Thanks for the reply. I can run the example programs with the corresponding exe program just fine. For example running client.c with echoc.exe. Echoc.exe creates an array and then sends it to the DSP and receives it back (am i right?). This works fine but I'm looking for away to load an array into the ethernet buffer on the DSP and send it to the PC to be read from the cmd line(through a program like echo.exe) or preferably through MATLAB. The essential part is to generate the array in the DSP, load it into the buffer, and send it (or make available for retrieval). Btw when I open up an example program such as client.c, all I see is BIOS_Start(). I can't find any info about this function although I imagine it starts up SYS/BIOS on the board. Do I need this in my code?

    I have also already added the NDK package to my CCS Settings but still get the same errors. (btw the name of the program is userMade...just in case the error msg was misleading). 

    .

    Thanks,

    Ola