Texas Instruments TMS320C6000 User Manual

Network developer’s kit (ndk) support package for evmdm642
Hide thumbs Also See for TMS320C6000:

Advertisement

TMS320C6000
Network Developer's Kit (NDK) Support
Package for EVMDM642
User's Guide
Literature Number: SPRUES5A
January 2007 – Revised June 2008

Advertisement

Table of Contents
loading

Summary of Contents for Texas Instruments TMS320C6000

  • Page 1 TMS320C6000 Network Developer’s Kit (NDK) Support Package for EVMDM642 User's Guide Literature Number: SPRUES5A January 2007 – Revised June 2008...
  • Page 2 SPRUES5A – January 2007 – Revised June 2008 Submit Documentation Feedback...
  • Page 3: Table Of Contents

    Contents ............................Preface ........................Getting Started ........................ Introduction ..................Installing the Support Package ....................Rebuilding HAL Libraries ..................Required Terms and Concepts ......................... User LED Driver ........................Timer Driver ........................Serial Driver ....................... Introduction ......................Serial Port Driver ....................Serial Port Mini-Driver ........................
  • Page 4 www.ti.com List of Figures ..............BlackHawk560M Configuration to Connect to DM642 ......................DM642 Gel Load ............HelloWorld Project Open in Code Composer Studio Window ............Configuring Build Options Through Code Composer Studio ............Enabling NIMU for Build Through Code Composer Studio ....................
  • Page 5: Preface

    The following books describe the TMS320C6x™ devices and related support tools. To obtain a copy of any of these TI documents, call the Texas Instruments Literature Response Center at (800) 477–8924. When ordering, please identify the book by its title and literature number. Many of these documents can be found on the Internet at http://www.ti.com.
  • Page 6 SPRU523 — TMS320C6000 Network Developer’s Kit (NDK) Software User’s Guide. Describes how to use the NDK libraries, how to develop networking applications on TMS320C6000™ platforms, and ways to tune the NDK to fit a particular software environment. SPRU524 —...
  • Page 7: Getting Started

    NIMU/LL is required and rename the library to just <lib_name>.lib for using it with any example projects. For example, If an application requires NIMU little endian HAL ethernet driver, rename <lib/hal/evmdm642/hal_eth_dm642_nimu.lib> to <lib/hal/evmdm642/hal_eth_dm642.lib>. SPRUES5A – January 2007 – Revised June 2008 TMS320C6000 Network Developer’s Kit (NDK) Support Package for EVMDM642 Submit Documentation Feedback...
  • Page 8 For more details on choosing and building in appropriate NDK libraries, see the NDK Libraries and Building in NIMU sections in TMS320C6000 Network Developer's Kit (NDK) User's Reference Guide (SPRU523). 7. Configure the environment variables; for DM642, the following variables should be configured: NDK_INSTALL_DIR = <ndk_1_94 installation directory>...
  • Page 9: Blackhawk560M Configuration To Connect To Dm642

    10. Make sure that the Blackhawk USB560M – DM640,1,2,3 emulator is selected. Remove any other existing platforms, if any, already configured. Click on Save & Quit to start Code Composer Studio. SPRUES5A – January 2007 – Revised June 2008 TMS320C6000 Network Developer’s Kit (NDK) Support Package for EVMDM642 Submit Documentation Feedback...
  • Page 10: Dm642 Gel Load

    12. Select the EVMDM642.gel and click Open. The GEL file is downloaded and the board is ready to use. Steps 11 and 12 need to be done every time the DM642 board is powered off and turned back on. TMS320C6000 Network Developer’s Kit (NDK) Support Package for EVMDM642 SPRUES5A – January 2007 – Revised June 2008...
  • Page 11: Helloworld Project Open In Code Composer Studio Window

    It should open up the project as shown in Figure Figure 3. HelloWorld Project Open in Code Composer Studio Window SPRUES5A – January 2007 – Revised June 2008 TMS320C6000 Network Developer’s Kit (NDK) Support Package for EVMDM642 Submit Documentation Feedback...
  • Page 12: Configuring Build Options Through Code Composer Studio

    Open the application project in Code Composer Studio IDE. Go to Project → Build Options and click on it as shown in Figure Figure 4. Configuring Build Options Through Code Composer Studio TMS320C6000 Network Developer’s Kit (NDK) Support Package for EVMDM642 SPRUES5A – January 2007 – Revised June 2008 Submit Documentation Feedback...
  • Page 13: Enabling Nimu For Build Through Code Composer Studio

    Build the application project according to the following the steps to make sure the NIMU is built into the final executable. SPRUES5A – January 2007 – Revised June 2008 TMS320C6000 Network Developer’s Kit (NDK) Support Package for EVMDM642 Submit Documentation Feedback...
  • Page 14: Dm642 Connect Procedure

    15. Connect to DM642 by entering Alt + C or by clicking on Debug → Connect if not already connected to the debugger on the DM642, as shown in Figure Figure 6. DM642 Connect Procedure TMS320C6000 Network Developer’s Kit (NDK) Support Package for EVMDM642 SPRUES5A – January 2007 – Revised June 2008 Submit Documentation Feedback...
  • Page 15: Dm642 Connect

    Figure 7 shows up displaying that the Code Composer Studio debugger is now connected to the target. Figure 7. DM642 Connect SPRUES5A – January 2007 – Revised June 2008 TMS320C6000 Network Developer’s Kit (NDK) Support Package for EVMDM642 Submit Documentation Feedback...
  • Page 16: Helloworld Project Running Successfully On Dm642

    Run to start the helloWorld application on the target as shown in Figure 8 Figure 8. helloWorld Project Running Successfully on DM642 TMS320C6000 Network Developer’s Kit (NDK) Support Package for EVMDM642 SPRUES5A – January 2007 – Revised June 2008 Submit Documentation Feedback...
  • Page 17: Rebuilding Hal Libraries

    HAL sources directory and select the appropriate source code files to add them. Figure 9. Source File Addition to Existing Project SPRUES5A – January 2007 – Revised June 2008 TMS320C6000 Network Developer’s Kit (NDK) Support Package for EVMDM642 Submit Documentation Feedback...
  • Page 18: Ethernet Hal Build From Sources

    To rebuild the DM642 user LED driver from sources ensure the following file is added to project: <NDK_INSTALL_DIR>/packages/ti/ndk/src/hal/evmdm642/userled_dm642/llled.c> To rebuild DM642 serial URT driver from sources ensure the following files are added to project: <NDK_INSTALL_DIR>/packages/ti/ndk/src/hal/evmdm642/ser_ti752/ti752.c> <NDK_INSTALL_DIR>/packages/ti/ndk/src/hal/evmdm642/ser_ti752/lllserial.c> TMS320C6000 Network Developer’s Kit (NDK) Support Package for EVMDM642 SPRUES5A – January 2007 – Revised June 2008 Submit Documentation Feedback...
  • Page 19: Required Terms And Concepts

    Therefore, the serial port and Ethernet drivers both make use of this module. The PBM object and its related API are described in the TMS320C6000 Network Developer's Kit (NDK) Software Programmer's Reference Guide (SPRU524). The TMS320C6000 Network Developer's Kit (NDK) Software User's Guide (SPRU523) also includes a section on adapting the PBM to a particular included software.
  • Page 20: Serial Driver

    There are two types of serial modules included in the NDK: a stub driver used in a system where a serial port is not required, and a driver for the Texas Instruments TL16C750 and TL16C752 UART. The directories for the two types of device drivers are as follows: Table 1.
  • Page 21: Serial Port Driver

    Note that this module is purely optional. A valid serial port driver can be developed by directly implementing the llSerial API described in the TMS320C6000 Network Developer's Kit (NDK) Software Programmer's Reference Guide (SPRU524). Even if the mini-driver is used, you may change any of the internal data structures as long as the llSerial interface remains unchanged.
  • Page 22: Structure Entries

    In HDLC mode, the event is fired when a good HDLC packet is received. TMS320C6000 Network Developer’s Kit (NDK) Support Package for EVMDM642 SPRUES5A – January 2007 – Revised June 2008...
  • Page 23: Structure Entries

    When a new packet is received, the mini-driver adds it to this queue, and fires a serial event to the STKEVENT handle. PBMQ object is a queue of PBM packet buffers and it is operated on by the PBMQ functions defined in the TMS320C6000 Network Developer's Kit (NDK) Software Programmer's Reference Guide (SPRU524).
  • Page 24 - most likely an AT command set modem state machine, but it could also be a serial console program. The size of this buffer is set by CHAR_MAX. TMS320C6000 Network Developer’s Kit (NDK) Support Package for EVMDM642 SPRUES5A – January 2007 – Revised June 2008...
  • Page 25 Also, the CRC code in the example driver is based on a 4 bit algorithm. This allows for the use of a 16 entry lookup table instead of a 256 entry table. SPRUES5A – January 2007 – Revised June 2008 TMS320C6000 Network Developer’s Kit (NDK) Support Package for EVMDM642 Submit Documentation Feedback...
  • Page 26 (PBMQ_tx) contained in the device instance structure, and LLSERIAL.C believes the transmitter to be free (TxFree set to 1). The mini-driver uses this function to start the transmission sequence. TMS320C6000 Network Developer’s Kit (NDK) Support Package for EVMDM642 SPRUES5A – January 2007 – Revised June 2008 Submit Documentation Feedback...
  • Page 27: Ethernet Driver

    Unit (NIMU) section of TMS320C6000 Network Developer’s Kit (NDK) Programmer’s Reference Guide (SPRU524). Also, the NIMU NDK core stack changes and build instructions can be found in the Stack Library Design and Building in NIMU sections of TMS320C6000 Network Developer’s Kit (NDK) User’s Guide (SPRU523), respectively.
  • Page 28: Ethernet Driver

    The NDK LL packet driver API and the NIMU API are discussed in the Hardware Adaptation Layer (HAL) and Network Interface Management Unit (NIMU) sections of the TMS320C6000 Network Developer's Kit (NDK) Programmer's Reference Guide (SPRU524), respectively, which includes how to implement the individual API functions.
  • Page 29: Ethernet Packet Mini-Driver

    Note that this module is purely optional. A valid packet driver can be developed by directly implementing the llPacket/NIMU API described in the TMS320C6000 Network Developer's Kit (NDK) Programmer's Reference Guide (SPRU524). Even if the mini-driver is used, you can change any of the internal data structures as long as the llPacket/NIMU interface remains unchanged.
  • Page 30 The mini-driver receives packets when the device is open. When an Ethernet packet is received, it is placed in a PBM packet buffer. Empty packet buffers are allocated by calling PBM_alloc(). TMS320C6000 Network Developer’s Kit (NDK) Support Package for EVMDM642 SPRUES5A – January 2007 – Revised June 2008...
  • Page 31 Syntax None Parameters None Return Value Called to indicate that the packet driver environment should be completely shut down. Description SPRUES5A – January 2007 – Revised June 2008 TMS320C6000 Network Developer’s Kit (NDK) Support Package for EVMDM642 Submit Documentation Feedback...
  • Page 32 Called when the values contained in the PDINFO instance structure for the Rx filter or Description multicast list are altered. The mini-driver should update its filter settings at this time. TMS320C6000 Network Developer’s Kit (NDK) Support Package for EVMDM642 SPRUES5A – January 2007 – Revised June 2008 Submit Documentation Feedback...
  • Page 33 Note that this function is not called in kernel mode, hence, the underscore in the name. This is the only mini-driver function called from outside the kernel mode (done to support polling drivers). SPRUES5A – January 2007 – Revised June 2008 TMS320C6000 Network Developer’s Kit (NDK) Support Package for EVMDM642 Submit Documentation Feedback...
  • Page 34: Appendix A Revision History

    Appendix A www.ti.com Appendix A Revision History Table A-1 lists the changes made since the previous version of this document. Table A-1. Document Revision History Reference Additions/Modifications/Deletions Section 1.2 Replaced contents with new source Section 1.3 Replaced contents with new source Section 5.1 Replaced contents with new source Table 3...

Table of Contents