PowerDNx GettingStarted RTX - FTP Directory Listing - United ...

gazecummingNetworking and Communications

Oct 26, 2013 (3 years and 7 months ago)

96 views



Getting Started with PowerDNx and RTX





1
















Getting Started with PowerDNx and RTX












Ju
ly

20
10

Edition




© Copyright 2010

United Electronic Industries, Inc. All rights reserved


No part of this publication may be reproduced, stored in a retrieval system, or
transmitted, in an
y form by any means, electronic, mechanical, by photocopying,
recording, or otherwise without prior written permission.



Getting Started with PowerDNx and RTX





2



Table of
C
ontents
1.

Introduction

................................
................................
............................

3

2.

Configuring the Network

................................
................................
......

3

2.1.

Steal the network adapter from Windows

................................
...........................

3

2.2.

Configure Network Settin
gs

................................
................................
.............

11

2.3.

Start RTX TCP/IP stack

................................
................................
....................

12

3.

Using the PowerDNA Driver

................................
..............................

15

3.1.

Loading the RTSS DLL

................................
................................
....................

15

4.

Run PowerDNA examples

................................
................................
...

16

4.1.

Modify existing Visual Studio project

................................
..............................

16

4.2.

Create a new project
................................
................................
..........................

19



Getting Started with PowerDNx and RTX





3

1.

Introduction

RTX is a real
-
time add
-
on for windows. It is sold by IntervalZero (formerly known as
Ardence)
http://www.intervalzero.com
.


RTX takes over control of the CPU from Windows Kernel (It patches the interrupt table
to get direct access to interrupts and only forward interrupts to Windows when there is
time to do it).

On multi
-
core machines, RTX can
also reserve one or more cores for real
-
time activities
and let Windows run on one core.

2.

Configuring the
N
etwork

Your PC should be equipped with two network adapters, one used by Windows to
connect to your company network and another used by RTX to conne
ct to
your
PowerDNx hardware
. RTX can't share a network adapter with Windows, it needs to have
exclusive access to it.

Make sure that the network adapter you intend to connect to
your PowerDNx hardware

is
compatible with RTX. You can find a list of compat
ible adapters at



http://www.intervalzero.com/pdfs/IZSupportedNIC.pdf


2.1.

Steal the network adapter from Windows

Launch
RTX Properties

panel and select the
Hardware tab
.




Getting Started with PowerDNx and RTX





4



Click on
Settings...

to open
Plug&play Device Settings

dialog
.


Find the network adap
ter that you want to use with

PowerDNA and right
-
click on it.



Getting Started with PowerDNx and RTX





5



Select the
Add RTX Inf Su
pport

option then click on
OK
.


Open windows device manager and find that same network adapter
.


Right
-
click on the adapter and select
Uninstall
.




Getting Started with PowerDNx and RTX





6



Select the
Action

menu then click on
Scan for hardware changes
.


The network adapter that was just un
-
installed will be detected again and the
New
Hardware Wizard

will pop up
.




Getting Started with PowerDNx and RTX





7



Select
Install from specific location

and click
Next
.




Getting Started with PowerDNx and RTX





8



Select
Don't search. I will choose the driver to install

and click
Next
.




Getting Started with PowerDNx and RTX





9



Select the
RTX Supported

driver and click
Next

then
Finish
.


Go back to windows Device Manager and verify that the network adapter is now listed
under
Rtx Drivers
.




Getting Started with PowerDNx and RTX





10



Verify that RTX
Pnp Device Settings

dialog list the adapter under
RTX
.




Getting Started with PowerDNx and RTX





11



2.2.

Configure Network
S
ettings

Navigate to
c:
\
program files
\
Ardence
\
RTX
\
RT
-
TCPIP
\
drivers

an
d find the
appropriate driver for the network adapter.



Getting Started with PowerDNx and RTX





12



In our case
,

the driver for the

Intel Pro/100 adapter is
Rt8255x.rtdll
.


Open the file
c:
\
program files
\
Ardence
\
RTX
\
RT
-
TCPIP
\
RtxTcpIp.ini

file in
N
otepad
.


Change the line that start
s

with
Driver=

to specify the network driver without extension
.

Change the line that start
s

with
IPAddr=

to specify the IP address assigned to that
network adapter
.


Change the line that start
s

with
Netmask=

to use the netmask 255.255.255.0
.


For example, to configure RTX to load the Inter PRO/100 driver and use the IP address
192.168.100.2, the RtxTcpIp.ini

file will look like


...


[rtnd0]


Driver=Rt8255x


IPAddr=192.168.100.2


Netmask=255.255.255.0


...

2.3.

Start RTX TCP/IP stack

Launch
RTX Properties

panel and select the
TCP/IP

tab
.


Check
Enable RT
-
TCP/IP stack

and
Run in verbose mode
.




Getting Started with PowerDNx and RTX





13

Click on
Apply

and
the TCP/IP stack should automatically start
.


Verify that the stack is running by selecting the
Control

tab
.


The
RTX TCP/IP Stack

status should be
Running
. If not
,

s
elect
RTX TCP/IP Stack

and click on
Start
.




Open the
RtxServer

display to verify that the network adapter was properly initialized
.




Getting Started with PowerDNx and RTX





14



2.4.

Testing the Network



Connect an Ethernet

cable between the network adapter and your PowerDNx
hardware.



Run RTX’s launcher
RTSSRun



Type
rtssping <IP address>

in the command line argument field



Clock on
OK

to run RTX’s ping utility



Getting Started with PowerDNx and RTX





15




Verify that the PowerDNx hardware can be accessed at the specified IP address


3.

Using

the PowerDNA
D
river

The PowerDNA driver for RTX
ship
s

as

a static li
brary and an RTSS DLL.

You can select the one you want to use depending on your application requirements.

You need to use the RTSS DLL if you have multiple processes accessing the PowerDNx
hardware simultaneously.

Otherwise just use the static library whi
ch simplifies application startup and deployment.

3.1.

Loading the RTSS DLL

RTSS DLL
is the RTX equivalent of a Windows DLL that can be shared by multiple
processes. The difference is that you have to manually load an RTSS DLL
;

it doesn't load
on demand as Wind
ows DLLs do.

To load the PowerDNA driver, navigate to
C:
\
Program Files
\
UEI
\
PowerDNA
\
Shared

and double click on
PDNALib_RTX.rtss
.


You can verify that the PowerDNA driver is properly loaded with
RTSS Task Manager
.




Getting Started with PowerDNx and RTX





16



4.


Run PowerDNA examples

PowerDNA examples visual studio projects are configured to run as standard Windows
applications.

You ca
n either modify an existing project or create a new one from scratch to compile
each example as an RTX application.


4.1.

Modify existing Visual Studio project

For example, open
c:
\
Program Files
\
UEI
\
PowerDNA
\
SDK
\
Examples
\
Visual
C++
\
Sample207
\
Sample207.dsp

in V
isual Studio.



Open the project settings
.

Click on the
C++

tab and select the
Preprocessor

category
.




Add
UNDER_RTSS

to
Preprocessor definitions
.




Add
$(RtxSdkDir)
\
includes

to
Additional include directories
.




Getting Started with PowerDNx and RTX





17





Click on the
Link

tab and select the
General

category
.

Change the extension of
the
Output file name

to
rtss

.



Click on the
Link

tab and
select the
Input

category
.




Replace the
Object/library modules

content with:

startupCRT.obj
rtxtcpip.lib
rtxlibcmt.lib oldnames.lib
rtapi_rtss.lib rtx_rtss.lib PDNALib_RTX.lib



Check
Ignore all default libraries
.




Add
$(RtxSdkDir)
\
lib,$(PDNAROOT)
\
lib

to
Ad
ditional library path
.




Getting Started with PowerDNx and RTX





18





Select the
Output

category and set
Entry
-
point symbol

to
_RtapiPr
ocessEntryCRT@8
.




Getting Started with PowerDNx and RTX





19





Finally in the
Project Options

field, replace



/subsystem:console

wit
h


/driver /subsystem:native,4.00 /align:0x20



Click on
OK

and build the project. You can run the compiled example
Sample207.rtss

from Visual Studio or by double
-
clicking on it.


4.2.

Create a new project



Start Visual Studio and click on
File/New/Project…




Getting Started with PowerDNx and RTX





20




Select
Visual C++

then
Rtx Application



Type a name, select a Location to save your project and click on
OK
.



Getting Started with PowerDNx and RTX





21





Select
RTX application (.rtss)

and
Multithreaded C Run
-
time support

then
click on
Finish



Add the example source code you want to build. Right
-
cli
ck on

Source Files
,
select
Add/Existing Item...

and navigate to the location of the example you
want to build:
C:
\
Program Files
\
UEI
\
PowerDNA
\
SDK
\
examples
\
Samplexxx



Open the project Properties dialog and select the
C/C++/general

page.



Add
$(PDNAROOT)
\
includ
es

to the list of additional include directories.



Select the
Linker/general

page and add
$(PDNAROOT)
\
lib
to the
list

of
additional library directories.



Select the
Linker/input

page and add
pdnalib_static_
rtx
.lib
,

rtxtcpip.lib

to
additional dependencies.



Getting Started with PowerDNx and RTX





22




S
elect
Build/Build Solution

to build your project.



Select
Debug/Start Without Debugging

to run the program