Commit Graph

313 Commits

Author SHA1 Message Date
Paul Sokolovsky
0df20da4dd tools: Add upip 0.5.2 tarball.
So unix version, which now includes upip as a frozen module, can be built
without Internet connection.
2015-06-02 01:32:07 +03:00
Paul Sokolovsky
c02dc8b2c9 tools/make-frozen.py: Open files in binary mode. 2015-05-30 00:39:00 +03:00
Paul Sokolovsky
a8e7c03171 tools/make-frozen.py: Preserve directory hierarchy.
Currently, frozen packages are not supported, but eventually they should be,
so make sure to store complete directory hierarchy.
2015-05-30 00:23:46 +03:00
Paul Sokolovsky
f5ae384d4f bootstrap_upip.sh: Allow to install into a path given by argument. 2015-05-29 22:35:45 +03:00
Dave Hylands
669dbca959 tools: Allow pyboard constructor to take a baudrate parameter.
This allows pyboard.py to be used over a UART interface
rather than just over a USB serial interface.
2015-05-27 23:01:28 +01:00
Dave Hylands
97ce883217 tools: Add exec_raw_no_follow to pyboard.py. 2015-05-18 11:39:57 +01:00
Paul Sokolovsky
76abb2e623 tools: Add script to install "upip" package manager.
upip is a simple and light-weight package manager for MicroPython modules,
offering subset of pip functionality. upip is part of micropython-lib
project: https://github.com/micropython/micropython-lib/tree/master/upip
This script bootstraps upip by downloading and unpacking it directly from
PyPI repository, with all other packages to be installed with upip itself.
2015-05-07 16:00:40 +03:00
Damien George
4865a22f78 tools/pyboard.py: Add "--follow" option to wait for output indefinitely.
Also flush stdout so you can see output as it comes.
2015-05-07 10:14:51 +01:00
Damien George
23a2b11abf tools: Add STM32F4DISC and ESPRUINO_PICO to stmhal build script. 2015-04-21 13:16:41 +00:00
Damien George
2bb5f41611 tools/pyboard.py: Make it 8-bit clean, so it works with unicode chars.
Addresses issue #1190.
2015-04-19 21:31:28 +01:00
Damien George
d8475092d1 qemu-arm: Disable inline asm tests that use floating point. 2015-04-19 15:50:24 +01:00
Damien George
39ce2db181 stmhal: Add "CDC" option to pyb.usb_mode, for CDC device only. 2015-02-13 14:02:51 +00:00
Damien George
fb2006cc69 tools: Make gen-changelog.sh sort version strings correctly. 2015-02-13 13:31:02 +00:00
Damien George
2f8c409a4f qemu-arm: Disable try_finally1.py test (it fails randomly on Travis). 2015-01-25 18:48:03 +00:00
Paul Sokolovsky
640e0b221e py: Implement very simple frozen modules support.
Only modules (not packages) supported now. Source modules can be converted
to frozen module structures using tools/make-frozen.py script.
2015-01-20 11:52:12 +02:00
Damien George
b58da9420c qemu-arm: Disable basics/memoryerror.py test. 2015-01-12 16:32:14 +00:00
Damien George
99dde4ed1f qemu-arm: Enable GC and native code-gen; enable more tests. 2015-01-12 12:07:42 +00:00
Damien George
85e8e2ed5b qemu-arm: Add 'test' target to Makefile to run and verify test suite.
Replaces RUN_TEST=1 definition; now "make test" in qemu-arm directory
will run tests/basics/ and check that they all succeed.

This patch also enables the test on Travis CI.
2015-01-09 00:03:21 +00:00
Damien George
e3fa8278b4 tools: Add script to generate a ChangeLog file.
We don't have an explicit ChangeLog file, but don't really need one
because we use a good version control system.  This script is useful if
you need a pretty-printed ChangeLog for some reason.
2014-12-29 19:03:25 +00:00
Damien George
4fd7c1a2ac tools, pyboard.py: Write data to pyboard in chunks of 256 bytes.
This speeds up writes significantly.
2014-12-20 18:09:04 +00:00
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
7c4445afe1 tools: Make gendoc.py able to output RST format. 2014-10-31 01:36:11 +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
5fc42a6c97 tools, pydfu: Some fixes to support Python 3. 2014-10-22 20:27:43 +01:00
Dave Hylands
842210f53a Add pydfu.py to the micropython tree. Use dfu_util bgy default
You can do:

make USE_PYDFU=1 deploy

to use pydfu.py
2014-10-22 20:18:38 +01: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
c737086e1c tools: Add network build to auto-build script. 2014-09-30 23:04:08 +00:00
Damien George
2842945e76 stmhal: Fix bugs in documentation so it compiles. 2014-09-17 23:27:42 +00:00
Paul Sokolovsky
f3c3010ffc pip-micropython: Revert to using PIP_MICROPY_DEST environment var.
-t/--target is a pip option. Trying to use pip options for different meanings
in pip-micropython may lead to big confusion. That's why the original passed
any extra parameters using environment variables. "All options belong to pip."
2014-08-27 02:53:06 +03:00
Damien George
db63660c19 Add pip-micropython to unix make install.
Also add -t/--target option to pip-micropython to allowing installing to
the pyboard.

Thanks to turbinenreiter/Sebastian Plamauer for the patch.
2014-08-26 16:03:57 +01:00
Damien George
c4ee39dd63 tools, gendoc: Output small descr about module TOC. 2014-08-10 16:51:26 +01:00
Damien George
590b2abdfc tools, gendoc: Put module TOC/index in module/ directory. 2014-08-08 23:34:39 +01:00
Damien George
ef7a066c9c tools, gendoc: Allow constants at module level; gen module index.
Addresses some issues from #585.
2014-08-08 23:29:05 +01:00
Paul Sokolovsky
c10a4405cd gendoc.py: Support modules w/o functions and/or classes.
I.e. don't assume that both are always present.
2014-06-29 15:48:30 +03:00
Damien George
3793830ed9 tools: Move gendoc.py to tools, and make it a little more generic. 2014-05-10 19:12:47 +01:00
Ilya Dmitrichenko
be86596bb9 tools: inline test suite generator. 2014-05-08 01:41:22 +03:00
Ilya Dmitrichenko
b1442e04d1 tools: check-in errordeveloper/tinytest@eb2dbc858f 2014-05-08 01:41:21 +03:00
Damien George
37936bebbf tools: In build-stm-latest, replace git hash with git tag. 2014-05-04 00:11:09 +00: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
aad1204b8e stmhal: Change names: flash to firmware, flashboard to deploy.
Since firmware lives in a build directory which already specifies the
board name, no real reason to also have the firmware have the board
name.
2014-05-03 17:46:45 +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
Damien George
d9f4deef8c Merge pull request #547 from cjbarnes18/pyboard_module_fixes
Fix pyboard.py tests.
2014-05-03 00:11:43 +01:00
Craig Barnes
71a1e35206 Fix pyboard.py tests. 2014-05-02 21:36:07 +01:00
Damien George
ba742ed639 Add shell script to automatically build stmhal/ for all pyboards. 2014-05-02 13:49:44 +00: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
ecdf6cdc5b tools: Fix up pybcdc.inf generation: new lines and hex digits.
Using Python's file open in 'r' mode opens it for text reading, which
converts all new lines to \n.  Could use 'rb' binary mode, but then
don't have access to the string Template replacement functions.  Thus,
force the output to have '\\r\\n' ending.

Also fix regex to match hex digits.
2014-04-16 11:45:52 +01:00
Andrew Scheller
1452221aca Auto-generate the stmhal/pybcdc_inf header file from static files
The USB VID&PID are automatically extracted from usbd_desc_cdc_msc.c
and inserted into pybcdc_inf.template, ensuring that the same USB
IDs get used everywhere
2014-04-16 02:41:26 +01:00
Paul Sokolovsky
cc8c0882a0 pip-micropython: Fix inverted condition. 2014-04-15 02:32:41 +03:00
Andrew Scheller
6fc40cc3da pip-micropython: revert $HOME back to ~ 2014-04-14 22:26:34 +01:00
Damien George
a7239b2fc2 Merge pull request #480 from lurch/patch-2
Make pip-micropython more portable
2014-04-14 21:39:31 +01:00
Andrew Scheller
0aac7ba344 Make pip-micropython more portable
Replace /tmp with a $TMPDIR variable
Replace multiple occurrences of /tmp/pip-micropy-venv with a $TMPVENV variable
Replace ~ with $HOME
2014-04-14 12:26:12 +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
Paul Sokolovsky
06526e7ccc pip-micropython: Apply more workarounds for setuptools, pip, etc misfeatures. 2014-04-12 23:33:14 +03:00
Paul Sokolovsky
9f043da5c3 pip-micropython: Require command verb, but restrict to "install" only.
So, pip-micropython can/should be run as normal pip:

    pip-micropython install micropython-unittest
2014-04-07 02:53:41 +03: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
Paul Sokolovsky
802d505756 tools: Add pip-micropython to install packages in MicroPython-friendly way. 2014-04-02 12:49:07 +03: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
mux
1a1ba4d555 Change dfu.py to be Python 2/3 compatible
* Chane dfu.py to use Python 3 syntax to avoid dependency on Python 2.
* Update Makefile to call python instead of python2
* Fix #33
2014-01-03 08:51:02 +02:00
Damien
f0d0940638 Add tools/dfu.py, and use it in stm/Makefile. 2013-12-20 12:07:50 +00:00