Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Document Type: Tutorial
NI Supported: Yes
Publish Date: Sep 6, 2006


Feedback


Yes No

Related Categories

Related Links - Developer Zone

Related Links - Products and Services

Creating the MPC566EVB, VxWorks Module Target for the LabVIEW Embedded Development Module

1 ratings | 3.00 out of 5
Print

Overview

This tutorial walks you through the process of creating an MPC566EVB target for use with the LabVIEW Embedded Development Module. Refer to the Related Links section for hardware configuration instructions.

Creating the New Target

1. Launch LabVIEW 7.1 Embedded Edition.

2. Select Tools»Create Embedded Target to display the Create Embedded Target window.

3. Complete the window with the following data:

Template target\..\National Instruments\LabVIEW 7.1 Embedded\resource\LabVIEW Targets\Embedded\vxworks\cmd565
Target nameMPC566EVB, VxWorks Module
Target folder path\..\LabVIEW 7.1 Embedded\resource\LabVIEW Targets\Embedded\vxworks\MPC566EVB

4. Click the Create Target button and save any VIs when prompted. This might take a few moments.

5. Navigate to the top-level target folder located in the following directory:

\..\National Instruments\LabVIEW 7.1 Embedded\resource\LabVIEW Targets\Embedded\vxworks\MPC566EVB

6. Delete the folders ram and rom. These are artifacts of the copy utility and are unusable in the new target.

7. Open the vxworks_MPC566EVB_LEP_TargetPlugin folder and open LEP_vxworks_MPC566EVB_Build.vi.

8. Modify the string constants to the left of the block diagram so that the constants are MPC566EVB instead of cmd565.

[+] Enlarge Image
9. Save the VI and restart LabVIEW 7.1 Embedded Edition.

10. Select MPC566EVB, VxWorks Module from the Execution Target drop-down list. If the target is in the list, it was created correctly.

Implementing TCP/IP Download and Run



1. First, examine the existing code that spawns the VxWorks Target Server. Most of the work is done by LEP_vxworks_cmd565_GetTSConfig.vi and LEP_vxworks_cmd565_TSConfigDlg.vi ., which are located in the following directory:

\..\Embedded\resource\LabVIEW Targets\Embedded
\vxworks\MPC566EVB\vxworks_MPC566EVB_LEP_TargetPlugin

Open these two VIs and note that they are specific to serial communication.

2. To modify the MPC566EVB so that it uses TCP/IP for downloading and running, you must modify the code that launches the VxWorks Target Server. If you spawn the VxWorks Target Server with different options, you can use the same basic framework that already exists.

The IXDP425 target already uses TCP/IP for downloading and debugging, so you can use that target as an example.

Navigate to the LEP_Plugin directory for the Intel IXDP425 VxWorks Module, which is located in the following directory:

\..\Embedded\resource\LabVIEW Targets\Embedded\vxworks\ixdp425\vxworks_ixdp425_LEP_TargetPlugin

Open and examine LEP_vxworks_ixdp425_GetTSConfig.vi and LEP_vxworks_ixdp425_TSConfigDlg.vi. These VIs implement the same functionality over the network.

3. Copy the following VIs from the ixdp425 folder and replace the corresponding VIs in the MPC566EVB folder.

LEP_vxworks_X_GetTSConfig.vi
LEP_vxworks_X_LaunchTS.vi
LEP_vxworks_X_TSConfigDlg.vi

4. Open LEP_vxworks_MPC566EVB_Run.vi and delete the broken wire that resulted from copying and renaming. No additional changes are needed for now.

5. You must configure your network settings to use a static IP address so you can use the PC while it is directly connected to the board through a crossover cable. To configure your network settings to use a static IP Address, select Start»Settings»Network Connections. Edit the properties of your TCP/IP connection to use the appropriate settings for the target.
6. Verify that you can ping the board.

7. Edit TargetServer.ini in the folder to read:

[MPC566EVB, VxWorks Module]
TargetAddress= ENTER YOUR TARGET IP ADDRESS HERE
ToolName=MPC566EVB
CoreFile=bin/vxWorks
HostAddress= ADD YOUR HOST IP ADDRESS HERE

8. Open the Embedded Project Manager and select Target»Target Server Configuration. You must change the Core file to point to your vxworks_RomResident file.

9. Use Hyperterminal to open a terminal connection on COM1. Set the baud rate to 9600 bps.

10. Reset the board using the HARD RESET switch just below the 4 green LEDs. Verify that your target is running VxWorks through the terminal connection. The screen reads:

Attached TCP/IP interface to esmc unit 0
Attaching interface lo0...done


VxWorks

Copyright 1984-2002 Wind River Systems, Inc.

CPU: Motorola MPC566EVB - PowerPC 566
Runtime Name: VxWorks
Runtime Version: 5.5.1
BSP version: 2.2/1
Created: Feb 1 2005, 15:16:42
WDB Comm Type: WDB_COMM_END
WDB: Ready.

Implementing TCP/IP Debug



1. Open LEP_vxworks_MPC566EVB_Debug.vi located in the following directory:

\..\Embedded\resource\LabVIEW Targets\Embedded
\vxworks\MPC566EVB\vxworks_MPC566EVB_LEP_TargetPlugin

2. Delete the Case structure in the instrumented case that contains all of the serial communication debug setup.

3. Place a Flat Sequence structure in place of the Case structure. Right-click the Flat Sequence structure and select Add Frame from the shortcut menu so you have two frames. Move Run.vi into the second frame of the Flat Sequence structure and delete the remaining Case structure.



[+] Enlarge Image

4. In the first frame of the Flat Sequence structure, insert nitargetStartTCPDebug.vi located in the following directory:

\..\Embedded\vi.lib\LabVIEW Targets\TargetShared

5. Connect the Path output of LoadProjectInfo.vi to the Path input of nitargetStartSerialDebug.vi.

6. Save the VI.

7. Double-click Run.vi to open it and view the block diagram.

8. Expand the Case structures downward so you can add more code. Insert LEP_vxworks_MPC566EVB_LoadBuildConfig.vi.

9. Add the following code to pass the debug connection information to the Run Button VI as an argument.






10. Save and close the VI.

11. Save and close LEP_vxworks_MPC566EVB_Debug.vi.

12. Open compiled.bat with Notepad. compiled.bat is located in the following directory:

\..\Embedded\resource\LabVIEW Targets\Embedded\vxworks\MPC566EVB\utils

13. Change –DUsesSerialDebugger to –DUsesTCPDebugger. Also, delete the text -DDBGBAUD=57600.

14. Save the file. Make the same changes to compiler.bat, which is located in the same directory as compiled.bat. The target is now ready to debug over TCP/IP.

15. Select Target»Build Options in the Embedded Project Manager and verify that the build options are as follows:



16. Build a simple VI.

17. Reset the board and shut down the Target Server.

18. Save the embedded project. Click the Debug button in the Embedded Project Manager. The embedded VI is built into an embedded application begins running. The front panel on the host computer is live. Change the front panel control values and note the similar behavior to LabVIEW on the desktop.
Related Links:
KnowledgeBase 3M7CS2HD - Downloading the VxWorks Image for the Axiom MPC566EVB VxWorks Module
KnowledgeBase - Building a VxWorks Image for the Axiom MPC566EVB Board
Product Manuals - LabVIEW Embedded Development Module Release Notes
Product Manuals - LabVIEW Embedded Development Module Porting Guide
1 ratings | 3.00 out of 5
Print

Reader Comments | Submit a comment »

 

Legal
This tutorial (this "tutorial") was developed by National Instruments ("NI"). Although technical support of this tutorial may be made available by National Instruments, the content in this tutorial may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this content with each new revision of related products and drivers. THIS TUTORIAL IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).