Commits

Anonymous committed f52dc4e

#192 mainlined directly

  • Participants
  • Parent commits 50b6b60

Comments (0)

Files changed (2)

docs/src/InteractivePyMite.txt

 PyMite includes the Python program, ``src/tools/ipm.py``, that is a
 cross-platform implementation of ipm-host that runs from a command prompt.
 
+``src/tools/ipm.py`` requires the `pySerial package`_ that can be installed
+like this::
 
-Runnin ipm on the Desktop
--------------------------
+    easy_install pyserial
+
+If you are running on a Win32 host, pySerial, in turn, requires the
+`pywin32 package`_.
+
+.. _`pySerial package`: http://pyserial.wiki.sourceforge.net/pySerial
+.. _`pywin32 package`: http://sourceforge.net/projects/pywin32/
+
+
+Running ipm on the Desktop
+--------------------------
 
 The sample project in ``src/platform/desktop/`` was created to build PyMite
 for the desktop target. The output of this project is used by ipm-host when it
     ['3', '7', ';', '?', 'C', 'G', 'K', 'O', 'S', 'W', '[', '_']
     ipm> ^D
 
+To manually start ipm-host, first cd to ``src/tools``.
+To run both ipm-host and ipm-target on the desktop::
+
+    $ ./ipm -d
+
+Or to connect to a target device runing ipm via a serial port::
+
+    $ ./ipm -s <port> <baud>
+
+or, more verbosely::
+
+    $ ./ipm --serial=<port> --baud=<baud>
+
+where *<port>* is ``comX`` (and X is a number of the com port) on a Cygwin host
+or the serial device filename on a Mac or Linux host (e.g. ``/dev/cu.usbmodem1912``);
+and *<baud>* should correspond to the target's configured baud rate for the
+serial port you are connecting to, 19200 by default.
+
 
 Running ipm on an embedded target
 ---------------------------------
     --desktop   to/from the target, which is the vm also running on the desktop.
                 ipm spawns the vm and runs ipm-desktop as a subprocess.
 
-    -s <d> [<r>]  Specifies a serial connection over character device, <d>;
-                  optional argument baud rate, <r> (default=19200)
+    -s <port> [<baud>] Specifies the port (device) for a serial connection.
+                <port> resembles `com5` on Win32 or `/dev/cu.usbmodem1912`.
+                Optional argument, <baud>, defaults to 19200.
 
-    --serial=<d> Specifies a serial connection over character device, <d>.
+    --serial=<port> Specifies the port (device) for a serial connection.
 
-    --baud=<r>  Specifies the baud rate for a serial connection (default=19200)
+    --baud=<baud>   Specifies the baud rate for a serial connection.
+
+REQUIREMENTS:
+
+    - pySerial package from http://pyserial.wiki.sourceforge.net/pySerial
+    - Win32 platforms require pywin32 package from
+      http://sourceforge.net/projects/pywin32/
     """
 
 PMVM_EXE = "../platform/desktop/main.out"
     baud = 19200
     Conn = PipeConnection
     serdev = None
-    
+
     try:
         opts, args = getopt.getopt(sys.argv[1:], "ds",
             ["desktop", "serial=", "baud="])