Commit Graph

14 Commits

Author SHA1 Message Date
Damien George
17c5ce3727 tools: Make pyboard.py have infinite timeout when running script.
This makes pyboard.py much more useful for long running scripts.  When
running a script via pyboard.py, it now waits until the script finishes,
with no timeout.  CTRL-C can be used to break out of the waiting if
needed.
2014-11-30 21:30:53 +00:00
Damien George
bc1488a05f stmhal: Improve REPL control codes; improve pyboard.py script.
Improvements are:

2 ctrl-C's are now needed to truly kill running script on pyboard, so
make CDC interface allow multiple ctrl-C's through at once (ie sending
b'\x03\x03' to pyboard now counts as 2 ctrl-C's).

ctrl-C in friendly-repl can now stop multi-line input.

In raw-repl mode, use ctrl-D to indicate end of running script, and also
end of any error message.  Thus, output of raw-repl is always at least 2
ctrl-D's and it's much easier to parse.

pyboard.py is now a bit faster, handles exceptions from pyboard better
(prints them and exits with exit code 1), prints out the pyboard output
while the script is running (instead of waiting till the end), and
allows to follow the output of a previous script when run with no
arguments.
2014-10-26 15:39:22 +00:00
Damien George
9c9db3a7a1 tools, pyboard.py: Allow exec argument to be bytes or str. 2014-10-19 14:54:52 +01:00
blmorris
3b064370f8 Enable device keyword option when running pyboard.py --tests and run-tests --pyboard 2014-10-01 23:31:52 +01:00
Damien George
3244123031 tools: pyboard.py now acts as a command-line program to run scripts.
You can run a local script on the pyboard using:

    python pyboard.py test.py

where test.py is the local script you want to run.
2014-05-03 18:14:34 +01:00
Damien George
e88814a274 Merge pull request #543 from lurch/patch-4
Make pyboard.enter_raw_repl more robust
2014-05-03 13:09:16 +01:00
Craig Barnes
71a1e35206 Fix pyboard.py tests. 2014-05-02 21:36:07 +01:00
Andrew Scheller
1f740bdaf4 Make pyboard.enter_raw_repl more robust
In case there's a program in the microcontroller's main.py running in an infinite loop
2014-05-01 20:42:23 +01:00
Damien George
ca045d97b9 tools: Update pyboard.py to work with latest changes to RTC. 2014-04-21 20:18:37 +01:00
Damien George
48a9b3fd11 tools: Improve timout/reading of pyboard.py. 2014-04-14 01:47:36 +01:00
Damien George
b636d024d2 Make pyboard.py have its own exception; update run-tests for pyboard. 2014-04-13 13:48:33 +01:00
Damien George
d71fc37af7 tools: Improve reading back from pyboard. 2014-04-03 22:44:37 +01:00
Damien George
0e49642965 tools: pyboard.py can now execute a file remotely! 2014-04-03 22:12:01 +01:00
Damien George
41ea651839 Add tools/pyboard.py, a simple module to communicate with the pyboard.
Using pyboard.py you can use Python running on your PC to execute
commands on the connected pyboard.  See examples in that file.
2014-03-24 12:42:06 +00:00