|
|
(98 intermediate revisions by 4 users not shown) |
Line 1: |
Line 1: |
| == Overview ==
| | #REDIRECT [[STRIDE Off-Target Environment]] |
| The STRIDE SDK is provided to be used primarily as an off-target evaluation or development sandbox. This allows you to use STRIDE in a small, controlled environment without needing to make changes to your target build. In addition, the SDK Makefile can serve as an example of the steps needed to add STRIDE instrumentation to your target build.
| |
| | |
| Each SDK package has identical functionality, but targets a specific operating system. The SDK contains the following items:
| |
| | |
| * STRIDE runtime source
| |
| * PAL source for interface with the Target OS
| |
| * Makefile to build STRIDE runtime library, test and sample applications
| |
| * Compiler setting file for target processor
| |
| | |
| == Evaluation Steps ==
| |
| To simplify the evalution, we recommend using a single Windows or Linux computer for both the target and host systems. Host and target code will run in separate processes and communicate via TCP/IP, thus simulating an embedded target with host computer configuration. All code and techniques used in the sandbox evaluation are directly transferrable to a production environment.
| |
| | |
| The recommended evaluation steps are as follows:
| |
| | |
| # Build the STRIDE runtime library
| |
| # Build and test the target app with S2 diagnostic tests
| |
| # Build and test the target app with the TestIntro sample
| |
| # Explore other sample tests
| |
| | |
| ==Building the STRIDE Runtime Library==
| |
| '''Note:''' all Makefiles must be run with [http://www.gnu.org/software/make/ gnu make]. For SDKs targeting OS's where this is not the standard make utility, an executable is supplied in the SDK's bin directory.
| |
| | |
| ===Linux===
| |
| The Makefile assumes a gnu toolchain. (Other toolchains can be used; see the comments in the Makefile.)
| |
| # cd to <tt>~/stride/SDK/Linux/src</tt>
| |
| # Build the library
| |
| #: <source lang="bash">make library</source>
| |
| # The file <tt>~/stride/SDK/Linux/out/lib/libstride.a</tt> will be produced
| |
| | |
| ===Windows===
| |
| The Makefile assumes a Visual Studio toolchain. (Other toolchains can be used; see the comments in the Makefile.)
| |
| | |
| # If using Microsoft Visual Studio, open a Visual Studio command prompt to ensure that the compiler and linker are on your PATH.<ref>You can get a VS command prompt via the Start menu. Choose: Start -> All Programs -> Microsoft Visual Studio 200X -> Visual Studio Tools -> Visual Studio 200X Command Prompt</ref>
| |
| # cd to <tt>stride\SDK\Windows\src</tt>
| |
| # build the library using the supplied gnu make. (You will get Makefile errors if you use the default make.)
| |
| #:<source lang="dos">..\bin\make library</source>
| |
| # The file <tt>stride\SDK\Windows\out\lib\stride.lib</tt> will be produced | |
| | |
| == Building the TargetApp ==
| |
| This step builds the first version of an instrumented target application. This application links with the STRIDE runtime library and includes the S2 diagnostic tests.
| |
| | |
| This step requires an installation of the STRIDE build tools. If not installed, please see [[Package_Installation#Build_Tools|Package Installation]] for more information.
| |
| | |
| ===Linux===
| |
| # cd to <tt>~/stride/SDK/Linux/src</tt>
| |
| # Build the test app
| |
| #: <source lang="bash">make testapp</source>
| |
| # The file <tt>~/stride/SDK/Linux/out/bin/TestApp</tt> will be produced
| |
| # Note also that the STRIDE database file <tt>~/stride/SDK/Linux/out/TestApp.sidb</tt> is also produced
| |
|
| |
| ===Windows===
| |
| | |
| # If using Microsoft Visual Studio, open a Visual Studio command prompt to ensure that the compiler and linker are on your PATH.
| |
| # cd to <tt>stride\SDK\Windows\src</tt>
| |
| # build the test app using the supplied gnu make. (You will get Makefile errors if you use the default make.)
| |
| #:<source lang="dos">..\bin\make testapp</source>
| |
| # The file <tt>stride\SDK\Windows\out\bin\TestApp.exe</tt> will be produced
| |
| # Note also that the STRIDE database file <tt>stride\SDK\Linux\out\TestApp.sidb</tt> is also produced
| |
| | |
| [[SDK Target Application Details]]
| |
| | |
| === Running the S2 Diagnostic Tests ===
| |
| In this step, we will use the stride executable to run the S2 diagnostic tests.
| |
| | |
| This step requires an installation of the STRIDE host tools. If not installed, please see [[Package_Installation#Host_Tools|Package Installation]] for more information.
| |
| <ol>
| |
| <li>Invoke the TestApp.
| |
| * '''Windows''': TestApp.exe will open and run in a new console window
| |
| * '''Linux''': In order to see TestApp's output, we recommend that you manually open a new console and invoke TestApp from there</li>
| |
| <li> Note TestApp's output upon startup. Under Linux, the following is shown
| |
| <pre>[tim@s2centos01 bin]$ ./TestApp
| |
| starting up...
| |
| "_srThread" thread started.
| |
| "stride" thread started.
| |
| Listening on TCP port 8000
| |
| </pre>
| |
| </li>
| |
| <li>From a console window, invoke stride as follows, to verify connectivity with the target app:
| |
| <pre>stride --diagnostic --database ~/stride/SDK/Linux/out/TestApp.sidb --device TCP:localhost:8000</pre>
| |
| | |
| As the tests run you will see output in both the TestApp (target) and stride (host) windows.
| |
| | |
| The host window output running under Linux is shown here:
| |
| <pre>
| |
| Loading database...
| |
| Connecting to device...
| |
| runtime version: 4.1.01
| |
| Diagnosing target application...
| |
| link
| |
| payload fragmentation
| |
| runtime configuration
| |
| stub-proxy deadlock
| |
| target characteristics
| |
| Summary: 52 passed, 0 failed, 0 in progress, 12 not in use.
| |
| Disconnecting from device...
| |
| Saving result file...
| |
| </pre>
| |
| </li>
| |
| <li>Note the Summary results shown in the host output.
| |
| </li>
| |
| </ol>
| |
| ==== Viewing Detailed Test Results ====
| |
| If you now list the files in the directory from which you ran stride, you will see the files TestApp.xml and--if you were connected to the Internet when you ran the tests--TestApp.xsl.
| |
| | |
| By opening TestApp.xml in a web browser, the xsl is automatically applied to create html in the browser.
| |
| | |
| === Building TestApp to Include the TestIntro Samples ===
| |
| | |
| == Makefile Targets ==
| |
| | |
| ;all
| |
| : Builds the ''library'' target
| |
| ;library
| |
| : Builds STRIDE runtime, producing stride.lib
| |
| ;clean
| |
| : Deletes intermediate and target files
| |
| ;testapp
| |
| : Builds an instrumented test application, TestApp.exe, using sources found in the sample_src directory
| |
| | |
| ;database
| |
| :
| |
| ;im
| |
| :
| |
| ;daemon
| |
| :
| |
| | |
| ==Instrumenting Multiple Processes==
| |
| | |
| | |
| ===Notes===
| |
| <references/>
| |
| [[Category:Deployment]]
| |