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.

How do I modify NDK NSP examples?

Other Parts Discussed in Thread: SYSBIOS

I am a DSP programmer (as opposed to a network programmer) developing a data acquisition produce using the LCDK6748 Development Board.  My goal is to capture data from an A/D converter and transfer the raw data to a host PC using the TI Network Development Kit (NDK).

I have successfully installed and tested the ndk_evm6748_coff_client example from NSP 1.10.2.9 using NDK 2.23.1.1.  I have also developed a SysBios application that acquires samples from the ADC and stores them to a double buffer.

When one buffer is filled, I would like to transfer it's contents to a PC using the client example's Data Server, while the other buffer is filling. 

When I exercise the ndk_evm6748_coff_client Data Server using the winapp application recv.exe, it appears that the DSP is simply looping back data sent from the PC.  I can't find any hooks in the DSP-side NSP source code that would tell me how to "send()" the buffered data.

I found a document entitled "Getting Started With the C6000 Network Development Kit" (spraa4x.pdf) that describes adding a DSP/BIOS  task  "sender.c". to transfer data from the TI C6455 EVM sound card via the CCS 3.3/DSP/BIOS client example used in the Getting Started workshop.  Unfortunately, it appears that the source code .zip file associated with the Workshop is no longer available.

Can anyone direct me to some code examples  (or advice)  on how modify the ndk_evm6748_coff_client example from NSP 1.10.2.9  to send my buffer? 

Thanks!

Bob

  • Hi Bob,

    I've notified the NDK team. Their feedback will be posted directly here.

    In the mean tima can you post the RTOS version you're using?

    Best Regards,
    Yordan
  • Hi Yordan,

    My system is configured as follows:

    CCS6.1.0.00104
    NDK 2.23.1.01
    NSP 1.10.2.09
    Sys/Bios 6.35.1.29
    XDC Tools 3.25.0.48

    I think that I've found the hooks for attaching an external buffer. client.prj has a file called netHooks.c that instantiates a variety of servers through calls to DaemonNew(). The specific server I'm looking for is called with a function pointer to a callback function dtask_tcp_datasrv.

    However, dtask_tcp_datasrv allocates and inits it's buffer memory locally, so in order to copy my global ADC buffer to allocated local memory, I would have to modify this function and either rename it or modify the library entry.

    I also found another function, void datasrv(void) in a separate file, datasrv.c, that is exactly what I'm looking for, including an external global buf[1024]. However, when I replaced dtask_tcp_datasrv with datasrv, it compiled but produced an argument mismatch warning since datasrv's arguments are void and dtask_tcp_datasrv's arguments are (SOCKET s, UINT32 unused).

    Since it's just a warning, I'm going to try it on the hardware and see what happens.

    But I'd like to know how to use datasrv() properly (if it can be used at all). Therefore, I was wondering if you could ask the NDK team for guidance on the use of datasrv().

    Thanks
    Bob
  • Hi,

    Both datasrv() and dtask_tcp_datasrv() are implemented under ti\ndk\tools\servers. The former open a socket itself, the latter uses socket as input argument. You may look the code to see which fits your need.

    Regards, Eric