Installing the SDK: 3 Launching NT GEOS and Swat

Up: GEOS SDK TechDocs | Up | Prev: 2 Installation and Setup | Next: 4 Compiling GEOS Applications

You will find example shortcuts for launching the NT GEOS demo in the GEOS SDK Program Group. You can define additional shortcuts to launch NT GEOS by right-clicking on the root window (NT 4.0) or selecting the menu item File -> New on the Program Manager (NT 3.51). Specify a command such as
c:\pcgeos\target\n9000.nc\swat.exe /s loader.exe (modified as desired); you must also specify a working directory (under target\ ) corresponding to the simulation you wish this icon to run. For command examples, refer to the batch files described below.

To launch a target device window from the command line, change-directory to your target area (for example, \pcgeos\target\n9000.ec\ ) and type start s at the prompt. ( s.bat is supplied in the target directory templates, and start tells NT to run the command in a new window.) s.bat is a batch file which executes the Swat stub; ss.bat forces the demo to wait for a host Swat debugger to attach. Execute start s (or ss ) in your non-EC directory to run the non-EC version of the Swat stub. To run the non-Swat demo, use start geos , which executes loader{ec}.exe without the Swat stub.

In summary, each of these demos is available in both the EC and non-EC target directories:

ss.bat		Demo with Swat stub, wait for host Swat
s.bat		Demo with Swat stub, do not wait
geos.bat		Demo without Swat

Launch the host Swat debugger from an icon in the GEOS SDK Program Group or from the command line with swat (or start swat ). (Be careful not to run a Swat stub if your current directory is a target directory; you want to run swat.exe from pcgeos\bin\ .) Debugging with Swat in the NT environment is the same as that in the old DOS one; use ^ C and c to interrupt and continue execution, att and det to attach and detach, and so forth.

The Swat window size may be increased by modifying the window-size property of your command windows in general or your Swat shortcut in particular. Any change made to a window after Swat is launched will not be recognized.

You can instruct Swat to attach to an external Communicator device or PC emulator by running GEOS Setup prior to launching Swat and selecting the serial Communication Mode and an appropriate Comm port .

You can stop NT GEOS by entering detach or quit when Swat is attached. Otherwise, you can stop the demo by clicking the kill (X) button on the right of the titlebar, double-clicking the top-left titlebar menu, or using NT's task manager.

.swat: Automating Swat

If you have a file called . swat in the root of your private directory and run the GEOS Setup program to change the "Swat Init File" field to point to that file, Swat will execute Swat commands in that directory when it starts up. Below is a short example of a .swat file:

srcwin 15
sd hello

The srcwin command sets up a source-code window at the bottom of the screen. The sd command changes the symbolic default to be the "hello" thread. Any time Swat does not recognize a name in the current thread, it will see if the name has meaning in the hello thread.


Up: GEOS SDK TechDocs | Up | Prev: 2 Installation and Setup | Next: 4 Compiling GEOS Applications