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.

Writing a simple program in DM355 EVM



Hi,

I want to write a simple program to familiarize myself with getting access with the drivers, etc.  How do I proceed, I basically want to write a simple application that turns on a specific LED on the Evaluation Board.  And then send like a char string over the ethernet port to the computer.

Is there any tutorial or sample code that I can take a look at for this.

Thanks

 

  • In order to toggle LEDs, you will need to know your hardware well enough (see technical reference manual: http://c6000.spectrumdigital.com/evmdm355/revd/) to know how LEDs are controlled (e.g. via I2C bus at address 0x25); the you can go to the Linux documentation found under the kernel source tree

    .../lsp/ti-davinci/documentation

    where you will find documentation of all stadardized Linux drivers (e.g. i2c, ethernet...) APIs.  these documents will explain hot to control these peripherals thru user level applications.

     

  • I have taken a look at the documentation and have seen the folder, what is really confusing me though is the networking documentation.  If my understanding of the schematics are correct the DM355 is using the DM355 EMIF to drive the DM9000A ENET Controller, when I went into the documentation code pertaining to networking (/localhome/administrator/workdir/lsp/ti-davinci/Documentation/networking)  I see a whole lot of txt files, and dont know where to start.

    Which file should I be looking at to be able to begin writing some simple code to transfer say "Hello World" from the board to a sniffer program on a computer so that I can verify that the code that is running on the board is working?  I also just want to create a UDP connection, so nothing really fancy currently.

    Is the ethernet driver loaded when I boot the system up?  How do I check whether the drivers are currently running?

    Thanks

  • I think you may be looking into this a bit too deeply, once you have Linux booted up on the board than it works much like a regular PC would from a network standpoint. You can check your network status with ifconfig and use ping to prod other computers on your network to ensure that your connectivity is there. Aside from that for actually writing code that would send a 'hello world' over the network you would want to do some digging around in Linux networking literature as this is something that is not very specific to TI and is better documented elsewhere on the web (you can probably find some example sources out there that do this kind of thing), your best bet is probably google to start, or perhaps a Linux networking book.

  • Oh I see, I am familiar with sockets on the Linux side, so if I understand you correct, I can just start coding as if I am coding on a regular computer.

  • The attached ethernet program was written sometime ago for our DM6446 EVM Platform (based on really old DVSDK); it is probrably outdated but may serve as reference code for you.

    As Bernie suggested, this type of ethernet reference code is not specific to TI and is better addressed by open source community and resources.  FYI, the ethernet drivers are enabled by default and there are lots of ways to determine if they are working, you can learn about some of these via the Linux Device Driver book available for free here: http://lwn.net/Kernel/LDD3/.  Please note that this is a driver reference book and will not show you how to write a ethernet user space application.

    src.tgz
  • NeeravPatel said:
    I can just start coding as if I am coding on a regular computer.

    That is about right, the only area you may run into some trouble in may be porting some network applications to ARM, but largely if you are writing your own stuff at the sockets level you should be good to go.

  • NeeravPatel said:

    Oh I see, I am familiar with sockets on the Linux side, so if I understand you correct, I can just start coding as if I am coding on a regular computer.

    correct