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.

Socket Communication on TI's AM335x EVM

Hi All,

We have a host PC which is generating some continuous string data. This system is x86 based.

Whatever the continuous data is being generated on the system1, has to transfer to EVM board. Both the systems are connected either through Ethernet or Wi-Fi in peer-to-peer connection. To transfer the data from system1 to system2 (EVM), we are using simple Client-Server communication C code (socket programming).

Server code is already written at system1 side to send generated data. We have a simple Linux Client code which we want to put on EVM to establish the connection. Sample client code is written for x86 platform. We need to deploy the same on EVM board to establish the connection and exchanging of data.

Please see the link for client code that we want to deploy on EVM board: http://www.thegeekstuff.com/2011/12/c-socket-programming/

The board is ARM based we need to compile and build the same client code for ARM architecture either by using CCS or through command line. We have booted the board with Linux provided within SD card.

My queries are:

  1. How to compile sample Linux Client C code so that I can put the same on EVM to establish a connection between system1 and system2?
  2. After building arm-elf executable, would I able to deploy the same on EVM directly, which is running on Linux OS?
  3. Is there any additional drivers/packages needed while deploying the code on EVM (Running with Linux)?
  4. Are all the required headers and API readily available with the Linux OS which is on board?

Please provide me the above information. Thanks in advance.

Regards,

Nitin

  • Nitin,

    Its really simple. 

    1. Install codesourcery tool chain for ARM in your PC. 

    2. Compile your client program using the "arm-none-gnueabi-linux-gcc" compiler, similar to the way you compile it for your desktop. All the required header files and libraries will be available as part of the toolchain.

    3. Copy the executable to the target filesystem and run it exactly the same way you do on a desktop.

  • HI Renjit,

    Thanks for providing me the information. I have already done with the steps you cited above.

    We are going to deploy Linux client Ccode on EVM. Server code is going to stay at system1 side(host PC).

    We are done with compiling, building the client code and at the point just want to make sure that the generated elf-arm executable is going to run on EVM without causing any error ?

    Generally below header are come into play for linux client.c code.

    #include <sys/socket.h>
    #include <sys/types.h>
    #include <netinet/in.h>
    #include <netdb.h>
    #include <stdio.h>
    #include <string.h>
    #include <stdlib.h>
    #include <unistd.h>
    #include <errno.h>
    #include <arpa/inet.h>

    Hence while copying the executable to target filesystem, will it ask for some else ? or directly start running and taking the data from system1 through socket communication ?

    Final query is, what steps am supposed to take to establish the socket connection after deploying the executable on board. I mean how to run that executable on board?

    Please help me out on this. Thanks for your support.

    Regards,

    Nitin

     

     

  • Nitin,

    It should behave the exact same way as you use a PC. You can try to bootup the board and see the command line. From the command line you can run any executable the way you do on  a PC. No difference.