Commit Graph

453 Commits

Author SHA1 Message Date
Paul Sokolovsky 2cbe997834 tools/pyboard: ProcessPtyToTerminal: Add workaround for PySerial bug.
When working with a "virtual" port, like PTY. The issue described in
http://stackoverflow.com/questions/34831131/pyserial-does-not-play-well-with-virtual-port
2017-04-05 12:30:39 +03:00
Paul Sokolovsky 546ef301a1 tools/pyboard: execpty: Use shell=False to workaround some curdir issues.
Without this, Zephyr's port "make test" doesn't work.
2017-04-05 00:46:12 +03:00
Paul Sokolovsky 647e72ca63 tools/pyboard: Add "exec" and "execpty" pseudo-devices support.
This allows to execute a command and communicate with its stdin/stdout
via pipes ("exec") or with command-created pseudo-terminal ("execpty"),
to emulate serial access. Immediate usecase is controlling a QEMU process
which emulates board's serial via normal console, but it could be used
e.g. with helper binaries to access real board over other hadware
protocols, etc.

An example of device specification for these cases is:

	--device exec:../zephyr/qemu.sh
	--device execpty:../zephyr/qemu2.sh

Where qemu.sh contains long-long qemu startup line, or calls another
command. There's a special support in this patch for running the command
in a new terminal session, to support shell wrappers like that (without
new terminal session, only wrapper script would be terminated, but its
child processes would continue to run).
2017-04-04 17:46:02 +03:00
Paul Sokolovsky 9b3f423c14 tools/pyboard: Tighten up Pyboard object closure on errors.
Some "device" implementations may be sensitive to this.
2017-04-02 20:48:53 +03:00
Scott Shawcroft be1ed7aae4 Change to official Feather M0 Express branding. 2017-03-27 19:45:44 +01:00
Paul Sokolovsky 320099aab9 tools/tinytest-codegen: Update for recent test renaming ("intbig" suffix). 2017-03-06 22:40:04 +01:00
Damien George e4be56a0ea qemu-arm: Enable machine module and associated tests. 2017-03-02 16:39:58 +11:00
Krzysztof Blazewicz 23ccb3e12e tools/gen-cpydiff.py: configurable CPython and micropython executables 2017-02-27 15:39:55 +11:00
Scott Shawcroft efd429464e atmel-samd: Switch to nano newlib and add size script to build. 2017-02-24 14:55:34 +01:00
Damien George 1034d9acc8 tools/gen-cpydiff.py: Set the Python import path to find test modules. 2017-02-22 15:50:58 +11:00
Rami Ali b7fa63c7ce tools: Add gen-cpydiff.py to generate docs differences.
This patch introduces the a small framework to track differences between
uPy and CPython.  The framework consists of:

- A set of "tests" which test for an individual feature that differs between
  uPy and CPy.  Each test is like a normal uPy test in the test suite, but
  has a special comment at the start with some meta-data: a category (eg
  syntax, core language), a human-readable description of the difference, a
  cause, and a workaround.  Following the meta-data there is a short code
  snippet which demonstrates the difference.  See tests/cpydiff directory
  for the initial set of tests.

- A program (this patch) which runs all the tests (on uPy and CPy) and
  generates nicely-formated .rst documenting the differences.

- Integration into the docs build so that everything is automatic, and the
  differences appear in a way that is easy for users to read/reference (see
  latter commits).

The idea with using this new framework is:

- When a new difference is found it's easy to write a short test for it,
  along with a description, and add it to the existing ones.  It's also easy
  for contributors to submit tests for differences they find.

- When something is no longer different the tool will give an error and
  difference can be removed (or promoted to a proper feature test).
2017-02-20 17:14:34 +11:00
Damien George 6a11048af1 py/persistentcode: Bump .mpy version due to change in bytecode. 2017-02-17 00:19:34 +11:00
Paul Sokolovsky aac2db9aaf tools/upip: Update to 1.1.5. Better and more user-friendly error handling. 2017-02-10 20:18:05 +03:00
Damien George f1db8a3097 qemu-arm: Don't compile tests in "REPL" mode.
Previous to this patch the qemu-arm tests were compiled with is_relp=true
meaning that the __repl_print__ function was called for all lines of code
in the outer scope.  This is not the right behaviour for scripts that are
executed as though they were a file (eg tests).

With this fix the micropython/heapalloc_str.py test now works so it is
removed from the test blacklist.
2017-01-27 12:35:46 +11:00
Paul Sokolovsky 4614403f63 tools/tinytest-codegen.py: Blacklist heapalloc_str.py test for qemu-arm. 2017-01-27 01:19:36 +03:00
Scott Shawcroft dfb61f01db Merge tag 'v1.8.7'
Support for Xtensa emitter and assembler, and upgraded F4 and F7 STM HAL

This release adds support for the Xtensa architecture as a target for the
native emitter, as well as Xtensa inline assembler.  The int.from_bytes
and int.to_bytes methods now require a second argument (the byte order)
per CPython (only "little" is supported at this time).  The "readall"
method has been removed from all stream classes that used it; "read" with
no arguments should be used instead.  There is now support for importing
packages from compiled .mpy files.  Test coverage is increased to 96%.

The generic I2C driver has improvements: configurable clock stretching
timeout, "stop" argument added to readfrom/writeto methods, "nack"
argument added to readinto, and write[to] now returns num of ACKs
received.  The framebuf module now handles 16-bit depth (generic colour
format) and has hline, vline, rect, line methods.  A new utimeq module is
added for efficient queue ordering defined by modulo time (to be
compatible with time.ticks_xxx functions).  The pyboard.py script has been
modified so that the target board is not reset between scripts or commands
that are given on a single command line.

For the stmhal port the STM Cube HAL has been upgraded: Cube F4 HAL to
v1.13.1 (CMSIS 2.5.1, HAL v1.5.2) and Cube F7 HAL to v1.1.2.  There is a
more robust pyb.I2C implementation (DMA is now disabled by default, can be
enabled via an option), and there is an implementation of machine.I2C with
robust error handling and hardware acceleration on F4 MCUs.  It is now
recommended to use machine.I2C instead of pyb.I2C.  The UART class is now
more robust with better handling of errors/timeouts.  There is also more
accurate VBAT and VREFINT measurements for the ADC.  New boards that are
supported include: NUCLEO_F767ZI, STM32F769DISC and NUCLEO_L476RG.

For the esp8266 port select/poll is now supported for sockets using the
uselect module.  There is support for native and viper emitters, as well
as an inline assembler (with limited iRAM for storage of native functions,
or the option to store code to flash).  There is improved software I2C
with a slight API change: scl/sda pins can be specified as positional only
when "-1" is passed as the first argument to indicate the use of software
I2C.  It is recommended to use keyword arguments for scl/sda.  There is
very early support for over-the-air (OTA) updates using the yaota8266
project.

A detailed list of changes follows.

py core:
- emitnative: fix native import emitter when in viper mode
- remove readall() method, which is equivalent to read() w/o args
- objexcept: allow clearing traceback with 'exc.__traceback__ = None'
- runtime: mp_resume: handle exceptions in Python __next__()
- mkrules.mk: rework find command so it works on OSX
- *.mk: replace uses of 'sed' with $(SED)
- parse: move function to check for const parse node to parse.[ch]
- parse: make mp_parse_node_new_leaf an inline function
- parse: add code to fold logical constants in or/and/not operations
- factor persistent code load/save funcs into persistentcode.[ch]
- factor out persistent-code reader into separate files
- lexer: rewrite mp_lexer_new_from_str_len in terms of mp_reader_mem
- lexer: provide generic mp_lexer_new_from_file based on mp_reader
- lexer: rewrite mp_lexer_new_from_fd in terms of mp_reader
- lexer: make lexer use an mp_reader as its source
- objtype: implement __call__ handling for an instance w/o heap alloc
- factor out common code from assemblers into asmbase.[ch]
- stream: move ad-hoc ioctl constants to stream.h and rename them
- compile: simplify configuration of native emitter
- emit.h: remove long-obsolete declarations for cpython emitter
- move arch-specific assembler macros from emitnative to asmXXX.h
- asmbase: add MP_PLAT_COMMIT_EXEC option for handling exec code
- asmxtensa: add low-level Xtensa assembler
- integrate Xtensa assembler into native emitter
- allow inline-assembler emitter to be generic
- add inline Xtensa assembler
- emitinline: embed entire asm struct instead of a pointer to it
- emitinline: move inline-asm align and data methods to compiler
- emitinline: move common code for end of final pass to compiler
- asm: remove need for dummy_data when doing initial assembler passes
- objint: from_bytes, to_bytes: require byteorder arg, require "little"
- binary: do zero extension when storing a value larger than word size
- builtinimport: support importing packages from compiled .mpy files
- mpz: remove unreachable code in mpn_or_neg functions
- runtime: zero out fs_user_mount array in mp_init
- mpconfig.h: enable MICROPY_PY_SYS_EXIT by default
- add MICROPY_KBD_EXCEPTION config option to provide mp_kbd_exception
- compile: add an extra pass for Xtensa inline assembler
- modbuiltins: remove unreachable code
- objint: rename mp_obj_int_as_float to mp_obj_int_as_float_impl
- emitglue: refactor to remove assert(0), to improve coverage
- lexer: remove unreachable code in string tokeniser
- lexer: remove unnecessary check for EOF in lexer's next_char func
- lexer: permanently disable the mp_lexer_show_token function
- parsenum: simplify and generalise decoding of digit values
- mpz: fix assertion in mpz_set_from_str which checks value of base
- mpprint: add assertion for, and comment about, valid base values
- objint: simplify mp_int_format_size and remove unreachable code
- unicode: comment-out unused function unichar_isprint
- consistently update signatures of .make_new and .call methods
- mkrules.mk: add MPY_CROSS_FLAGS option to pass flags to mpy-cross
- builtinimport: fix bug when importing names from frozen packages

extmod:
- machine_i2c: make the clock stretching timeout configurable
- machine_i2c: raise an error when clock stretching times out
- machine_i2c: release SDA on bus error
- machine_i2c: add a C-level I2C-protocol, refactoring soft I2C
- machine_i2c: add argument to C funcs to control stop generation
- machine_i2c: rewrite i2c.scan in terms of C-level protocol
- machine_i2c: rewrite mem xfer funcs in terms of C-level protocol
- machine_i2c: remove unneeded i2c_write_mem/i2c_read_mem funcs
- machine_i2c: make C-level functions return -errno on I2C error
- machine_i2c: add 'nack' argument to i2c.readinto
- machine_i2c: make i2c.write[to] methods return num of ACKs recvd
- machine_i2c: add 'stop' argument to i2c readfrom/writeto meths
- machine_i2c: remove trivial function wrappers
- machine_i2c: expose soft I2C obj and readfrom/writeto funcs
- machine_i2c: add hook to constructor to call port-specific code
- modurandom: allow to build with float disabled
- modframebuf: make FrameBuffer handle 16bit depth
- modframebuf: add back legacy FrameBuffer1 "class"
- modframebuf: optimise fill and fill_rect methods
- vfs_fat: implement POSIX behaviour of rename, allow to overwrite
- moduselect: use stream helper function instead of ad-hoc code
- moduselect: use configurable EVENT_POLL_HOOK instead of WFI
- modlwip: add ioctl method to socket, with poll implementation
- vfs_fat_file: allow file obj to respond to ioctl flush request
- modbtree: add method to sync the database
- modbtree: rename "sync" method to "flush" for consistency
- modframebuf: add hline, vline, rect and line methods
- machine_spi: provide reusable software SPI class
- modframebuf: make framebuf implement the buffer protocol
- modframebuf: store underlying buffer object to prevent GC free
- modutimeq: copy of current moduheapq with timeq support for refactoring
- modutimeq: refactor into optimized class
- modutimeq: make time_less_than be actually "less than", not less/eq

lib:
- utils/interrupt_char: use core-provided mp_kbd_exception if enabled

drivers:
- display/ssd1306.py: update to use FrameBuffer not FrameBuffer1
- onewire: enable pull up on data pin
- onewire/ds18x20: fix negative temperature calc for DS18B20

tools:
- tinytest-codegen: blacklist recently added uheapq_timeq test (qemu-arm)
- pyboard.py: refactor so target is not reset between scripts/cmd
- mpy-tool.py: add support for OPT_CACHE_MAP_LOOKUP_IN_BYTECODE

tests:
- micropython: add test for import from within viper function
- use read() instead of readall()
- basics: add test for logical constant folding
- micropython: add test for creating traceback without allocation
- micropython: move alloc-less traceback test to separate test file
- extmod: improve ujson coverage
- basics: improve user class coverage
- basics: add test for dict.fromkeys where arg is a generator
- basics: add tests for if-expressions
- basics: change dict_fromkeys test so it doesn't use generators
- basics: enable tests for list slice getting with 3rd arg
- extmod/vfs_fat_fileio: add test for constructor of FileIO type
- extmod/btree1: exercise btree.flush()
- extmod/framebuf1: add basics tests for hline, vline, rect, line
- update for required byteorder arg for int.from_bytes()/to_bytes()
- extmod: improve moductypes test coverage
- extmod: improve modframebuf test coverage
- micropython: get heapalloc_traceback test running on baremetal
- struct*: make skippable
- basics: improve mpz test coverage
- float/builtin_float_round: test round() with second arg
- basics/builtin_dir: add test for dir() of a type
- basics: add test for builtin locals()
- basics/set_pop: improve coverage of set functions
- run-tests: for REPL tests make sure the REPL is exited at the end
- basics: improve test coverage for generators
- import: add a test which uses ... in from-import statement
- add tests to improve coverage of runtime.c
- add tests to improve coverage of objarray.c
- extmod: add test for utimeq module
- basics/lexer: add a test for newline-escaping within a string
- add a coverage test for printing the parse-tree
- utimeq_stable: test for partial stability of utimeq queuing
- heapalloc_inst_call: test for no alloc for simple object calls
- basics: add tests for parsing of ints with base 36
- basics: add tests to improve coverage of binary.c
- micropython: add test for micropython.stack_use() function
- extmod: improve ubinascii.c test coverage
- thread: improve modthread.c test coverage
- cmdline: improve repl.c autocomplete test coverage
- unix: improve runtime_utils.c test coverage
- pyb/uart: update test to match recent change to UART timeout_char
- run-tests: allow to skip set tests
- improve warning.c test coverage
- float: improve formatfloat.c test coverage using Python
- unix: improve formatfloat.c test coverage using C
- unix/extra_coverage: add basic tests to import frozen str and mpy
- types1: split out set type test to set_types
- array: allow to skip test if "array" is unavailable
- unix/extra_coverage: add tests for importing frozen packages

unix port:
- rename define for unix moduselect to MICROPY_PY_USELECT_POSIX
- Makefile: update freedos target for change of USELECT config name
- enable utimeq module
- main: allow to print the parse tree in coverage build
- Makefile: make "coverage_test" target mirror Travis test actions
- moduselect: if file object passed to .register(), return it in .poll()
- Makefile: split long line for coverage target, easier to modify
- enable and add basic frozen str and frozen mpy in coverage build
- Makefile: allow cache-map-lookup optimisation with frozen bytecode

windows port:
- enable READER_POSIX to get access to lexer_new_from_file

stmhal port:
- dma: de-init the DMA peripheral properly before initialising
- i2c: add option to I2C to enable/disable use of DMA transfers
- i2c: reset the I2C peripheral if there was an error on the bus
- rename mp_hal_pin_set_af to _config_alt, to simplify alt config
- upgrade to STM32CubeF4 v1.13.0 - CMSIS/Device 2.5.1
- upgrade to STM32CubeF4 v1.13.0 - HAL v1.5.1
- apply STM32CubeF4 v1.13.1 patch - upgrade HAL driver to v1.5.2
- hal/i2c: reapply HAL commit ea040a4 for f4
- hal/sd: reapply HAL commit 1d7fb82 for f4
- hal: reapply HAL commit 9db719b for f4
- hal/rcc: reapply HAL commit c568a2b for f4
- hal/sd: reapply HAL commit 09de030 for f4
- boards: configure all F4 boards to work with new HAL
- make-stmconst.py: fix regex's to work with current CMSIS
- i2c: handle I2C IRQs
- dma: precalculate register base and bitshift on handle init
- dma: mark DMA sate as READY even if HAL_DMA_Init is skipped
- can: clear FIFO flags in IRQ handler
- i2c: provide custom IRQ handlers
- hal: do not include <stdio.h> in HAL headers
- mphalport.h: use single GPIOx->BSRR register
- make-stmconst.py: add support for files with invalid utf8 bytes
- update HALCOMMITS due to change to hal
- make-stmconst.py: restore Python 2 compatibility
- update HALCOMMITS due to change to hal
- moduselect: move to extmod/ for reuse by other ports
- i2c: use the HAL's I2C IRQ handler for F7 and L4 MCUs
- updates to get F411 MCUs compiling with latest ST HAL
- i2c: remove use of legacy I2C_NOSTRETCH_DISABLED option
- add beginnings of port-specific machine.I2C implementation
- i2c: add support for I2C4 hardware block on F7 MCUs
- i2c: expose the pyb_i2c_obj_t struct and some relevant functions
- machine_i2c: provide HW implementation of I2C peripherals for F4
- add support for flash storage on STM32F415
- add back GPIO_BSRRL and GPIO_BSRRH constants to stm module
- add OpenOCD configuration for STM32L4
- add address parameters to openocd config files
- adc: add "mask" selection parameter to pyb.ADCAll constructor
- adc: provide more accurate measure of VBAT and VREFINT
- adc: make ADCAll.read_core_temp return accurate float value
- adc: add ADCAll.read_vref method, returning "3.3v" value
- adc: add support for F767 MCU
- adc: make channel "16" always map to the temperature sensor
- sdcard: clean/invalidate cache before DMA transfers with SD card
- moduos: implement POSIX behaviour of rename, allow to overwrite
- adc: use constants from new HAL version
- refactor UART configuration to use pin objects
- uart: add support for UART7 and UART8 on F7 MCUs
- uart: add check that UART id is valid for the given board
- cmsis: update STM32F7 CMSIS device include files to V1.1.2
- hal: update ST32CubeF7 HAL files to V1.1.2
- port of f4 hal commit c568a2b to updated f7 hal
- port of f4 hal commit 09de030 to updated f7 hal
- port of f4 hal commit 1d7fb82 to updated f7 hal
- declare and initialise PrescTables for F7 MCUs
- boards/STM32F7DISC: define LSE_STARTUP_TIMEOUT
- hal: update HALCOMMITS due to change in f7 hal files
- refactor to use extmod implementation of software SPI class
- cmsis: add CMSIS file stm32f767xx.h, V1.1.2
- add NUCLEO_F767ZI board, with openocd config for stm32f7
- cmsis: add CMSIS file stm32f769xx.h, V1.1.2
- add STM32F769DISC board files
- move PY_SYS_PLATFORM config from board to general config file
- mpconfigport: add weak-module links for io, collections, random
- rename mp_const_vcp_interrupt to mp_kbd_exception
- usb: always use the mp_kbd_exception object for VCP interrupt
- use core-provided keyboard exception object
- led: properly initialise timer handle to zero before using it
- mphalport.h: explicitly use HAL's GPIO constants for pull modes
- usrsw: use mp_hal_pin_config function instead of HAL_GPIO_Init
- led: use mp_hal_pin_config function instead of HAL_GPIO_Init
- sdcard: use mp_hal_pin_config function instead of HAL_GPIO_Init
- add support for STM32 Nucleo64 L476RG
- uart: provide a custom function to transmit over UART
- uart: increase inter-character timeout by 1ms
- enable utimeq module

cc3200 port:
- tools/smoke.py: change readall() to read()
- pybspi: remove static mode=SPI.MASTER parameter for latest HW API
- mods/pybspi: remove SPI.MASTER constant, it's no longer needed
- update for moduselect moved to extmod/
- re-add support for UART REPL (MICROPY_STDIO_UART setting)
- enable UART REPL by default
- README: (re)add information about accessing REPL on serial
- make: rename "deploy" target to "deploy-ota"
- add targets to erase flash, deploy firmware using cc3200tool
- README: reorganize and update to the current state of affairs
- modwlan: add network.WLAN.print_ver() diagnostic function

esp8266 port:
- enable uselect module
- move websocket_helper.py from scripts to modules for frozen BC
- refactor to use extmod implementation of software SPI class
- mpconfigport_512k: disable framebuf module for 512k build
- enable native emitter for Xtensa arch
- enable inline Xtensa assembler
- add "ota" target to produce firmware binary for use with yaota8266
- use core-provided keyboard exception object
- add "erase" target to Makefile, to erase entire flash
- when doing GC be sure to trace the memory holding native code
- modesp: flash_user_start(): support configuration with yaota8266
- force relinking OTA firmware image if built after normal one
- scripts/inisetup: dump FS starting sector/size on error
- Makefile: produce OTA firmware as firmware-ota.bin
- modesp: make check_fw() work with OTA firmware
- enable utimeq module
- Makefile: put firmware-ota.bin in build/, for consistency
- modules/flashbdev: add RESERVED_SECS before the filesystem
- modules/flashbdev: remove code to patch bootloader flash size
- modules/flashbdev: remove now-unused function set_bl_flash_size
- modules/flashbdev: change RESERVED_SECS to 0

zephyr port:
- add .gitignore to ignore Zephyr's "outdir" directory
- zephyr_getchar: update to Zephyr 1.6 unified kernel API
- switch to Zephyr 1.6 unified kernel API
- support raw REPL
- implement soft reset feature
- main: initialize sys.path and sys.argv
- use core-provided keyboard exception object
- uart_core: access console UART directly instead of printk() hack
- enable slice subscription

docs:
- remove references to readall() and update stream read() docs
- library/index: elaborate on u-modules
- library/machine.I2C: refine definitions of I2C methods
- library/pyb.Accel: add hardware note about pins used by accel
- library/pyb.UART: added clarification about timeouts
- library/pyb.UART: moved writechar doc to sit with other writes
- esp8266/tutorial: update intro to add Getting the firmware section
- library/machine.I2C: fix I2C constructor docs to match impl
- esp8266/tutorial: close socket after reading page content
- esp8266/general: add "Scarcity of runtime resources" section
- library/esp: document esp.set_native_code_location() function
- library/esp: remove para and add further warning about flash
- usocket: clarify that socket timeout raises OSError exception

travis:
- build STM32 F7 and L4 boards under Travis CI
- include persistent bytecode with floats in coverage tests

examples:
- hwapi: button_led: Add GPIO pin read example
- hwapi: add soft_pwm example converted to uasyncio
- http_client: use read() instead of readall()
- hwapi: add uasyncio example of fading 2 LEDs in parallel
- hwapi: add example for machine.time_pulse_us()
- hwapi: add hwconfig for console tracing of LED operations
- accellog.py: change 1: to /sd/, and update comment about FS
- hwapi/hwconfig_console: don't alloc memory in value()
2017-01-10 09:56:09 -08:00
Scott Shawcroft d05adc89fa Add arduino zero to default builder and change name to circuitpython. 2017-01-09 12:55:23 -08:00
Damien George 98458a46ec tools/mpy-tool.py: Add support for OPT_CACHE_MAP_LOOKUP_IN_BYTECODE.
With caching of map lookups in the bytecode, frozen bytecode can still
work but must be stored in RAM, not ROM.  This patch allows mpy-tool.py to
generate code that works with this optimisation, but it's not recommended
to use it on embedded targets (because of lack of RAM).
2017-01-05 15:52:52 +11:00
Damien George 29b5879613 tools/pyboard.py: Refactor so target is not reset between scripts/cmd.
Previous to this patch pyboard.py would open a new serial connection to
the target for each script that was run, and for any command that was run.
Apart from being inefficient, this meant that the board was soft-reset
between scripts/commands, which precludes scripts from accessing variables
set in a previous one.

This patch changes the behaviour of pyboard.py so that the connection to
the target is created only once, and it's not reset between scripts or any
command that is sent with the -c option.
2016-12-15 11:29:33 +11:00
Scott Shawcroft 2042aad126 tools: Use a for loop to build all board variants. 2016-11-29 10:47:11 -08:00
Scott Shawcroft b8bf15de16 atmel-samd: Add Circuit Playground M0 board. Its experimental. 2016-11-28 19:21:40 -08:00
Scott Shawcroft a8fbad5d8b Add heap analysis scripts based on GDB breakpoint logs. 2016-11-23 17:31:53 -08:00
Scott Shawcroft cc412a80ad atmel-samd: Support Trinket and Gemma M0 prototypes. 2016-11-22 12:03:42 -08:00
Scott Shawcroft 8d5c90b0d0 Add script to build bins for Adafruit boards. 2016-11-21 14:40:28 -08:00
Paul Sokolovsky 30cfdc29ed tools/tinytest-codegen: Blacklist recently added uheapq_timeq test (qemu-arm). 2016-11-12 03:24:36 +03:00
Paul Sokolovsky 61d74fdef8 tools, unix: Replace upip tarball with just source files.
To make its inclusion as frozen modules in multiple ports less magic.
Ports are just expected to symlink 2 files into their scripts/modules
subdirs.

Unix port updated to use this and in general follow frozen modules setup
tested and tried on baremetal ports, where there's "scripts" predefined
dir (overridable with FROZEN_DIR make var), and a user just drops Python
files there.
2016-11-07 18:39:41 +03:00
Damien George ca973bd308 qemu-arm: Enable software floating point support, and float tests.
This helps to test floating point code on Cortex-M hardware.

As part of this patch the link-time-optimisation was disabled because it
wasn't compatible with software FP support.  In particular, the linker
could not find the __aeabi_f2d, __aeabi_d2f etc functions even though they
were provided by lib/libm/math.c.
2016-11-03 12:28:31 +11:00
Paul Sokolovsky 796b720dbc tools/tinytest-codegen: Exclude ticks_diff test for qemu-arm port. 2016-10-30 22:24:07 +03:00
Alex March 52aa532050 qemu-arm: Exclude new vfs_fat tests. 2016-10-27 12:25:28 +11:00
Paul Sokolovsky f7aa692093 tools/check_code_size.sh: Code size validation script for CI. 2016-10-25 11:43:55 +03:00
Paul Sokolovsky b78144c64d tools/pip-micropython: Remove deprecated wrapper tool.
Deprecated for long time, pip-micropython now can't install packages
optimized for low-heap ports (like whole of micropython-lib).
2016-10-24 16:52:15 +03:00
Alex March 06e7032906 qemu-arm: Exclude extmod/vfs_fat_fileio.py test. 2016-10-24 12:49:19 +11:00
Paul Sokolovsky 197a5724d8 tools: Upgrade upip to 1.1.4.
Fix error on unix when installing to non-existing absolute path.
2016-10-22 21:14:58 +03:00
Damien George b0a15aa735 qemu-arm: Enable lots of extmods and enable tests for them.
The qemu-arm port is used for testing of ARM Thumb architecture on a
desktop so should have many features enabled.
2016-10-14 00:08:19 +11:00
Paul Sokolovsky cdbeee0c50 tools: Upgrade upip to 1.1.3.
Initial support for running on a baremetal, low-heap systems (like esp8266),
using Python module interface.
2016-10-12 18:55:31 +03:00
Paul Sokolovsky cecf6bee97 tools: Upgrade upip to 1.0.
Fully self-hosted release (without fallbacks), and uses stream gzip
decompression (step towards support for limited-heap baremetal systems).
2016-10-05 00:34:09 +03:00
Paul Sokolovsky 4c63986101 tools: Update upip to 0.8. Fixes IPv6 support. 2016-09-23 15:35:06 +03:00
Damien George 7df9291b6c py: Update opcode format table because 3 opcodes were removed, 1 added.
LIST_APPEND, MAP_ADD and SET_ADD have been removed, and STORE_COMP has
been added in adaf0d865c.
2016-09-23 12:48:57 +10:00
Damien George c51c883cc8 tools/mpy-tool.py: Support freezing of complex numbers. 2016-09-03 00:19:02 +10:00
Damien George b6bdf18deb tools/mpy-tool.py: Compute the hash value for str/bytes objects.
This makes it more efficient at runtime to hash str/bytes objects.
2016-09-02 15:10:45 +10:00
Damien George b4790afdaf tools/mpy-tool.py: Store qstr config values in global config object.
Makes it easier to access them without passing around another dict of the
config values.
2016-09-02 15:09:21 +10:00
Damien George 72ae3c72c7 tools/mpy-tool.py: Support freezing float literals with obj-repr C.
The tool now generates code for freezing floats in obj-repr A, B or C,
with the specific representation detected at compile time using macros.
2016-08-10 13:26:11 +10:00
Paul Sokolovsky cbe544a76d tools: Upgrade upip to 0.7.
SSL certificate warning, switch to uerrno, and better usage message.
2016-05-28 02:57:53 +03:00
Damien George 25a42fb6ef tools/mpy-tool.py: Don't strip directories from the frozen source name.
Directories are now supported by the frozen import system (to implement
frozen packages) so we should keep them.
2016-05-23 13:29:03 +01:00
Damien George 9b4c013823 tools/mpy-tool.py: Include .py extension in frozen filename.
So that it can be correctly stat'd when looking for frozen files.
2016-05-23 12:46:02 +01:00
Paul Sokolovsky daa4793578 tools/make-frozen: Update for latest changes in frozen modules support.
Frozen modules are now stored with extensions and with '/' as path
separator. In other words, frozen modules paths stored as they are
in normal filesystem.
2016-05-21 21:39:27 +03:00
Damien George 99b4719357 tools/mpy-tool.py: Add checks for critical configuration vars.
When an mpy file is frozen it must know the values of certain
configuration variables.  This patch provides an explicit check in the
generated C file that the configuration variables are what they are
supposed to be.
2016-05-16 23:13:30 +01:00
Paul Sokolovsky 7b1bf0c308 tools/make-frozen.py: Quick fix to support package-modules.
It allows to "import foo.bar", but not "from foo import bar".
2016-05-14 16:30:02 +03:00
Damien George 5985e41afc tools/make-frozen.py: Properly escape hex chars when making C strings. 2016-05-13 13:12:01 +01:00
Damien George 02fd83bcbc tools/mpy-tool: Make sure that all C-level variables are unique.
Fixes issue #2023.
2016-05-03 12:24:39 +01:00
Damien George c3beb16db3 tools/mpy-tool.py: Add support for Python 2.7. 2016-04-15 11:56:10 +01:00
Damien George 0a2e9650f5 py: Add ability to have frozen persistent bytecode from .mpy files.
The config variable MICROPY_MODULE_FROZEN is now made of two separate
parts: MICROPY_MODULE_FROZEN_STR and MICROPY_MODULE_FROZEN_MPY.  This
allows to have none, either or both of frozen strings and frozen mpy
files (aka frozen bytecode).
2016-04-13 16:07:47 +01:00
Damien George 0699c6bf9e tools: Add mpy-tool.py, to work with .mpy files.
Currently it can freeze .mpy files.
2016-04-13 16:05:43 +01:00
Damien George be989be861 qemu-arm: Enable builtin override feature, and enable more tests.
Hopefully these tests run reliably on Travis.
2016-03-15 13:45:32 +00:00
Paul Sokolovsky 17f324b836 py/frozenmod: Store frozen module names together, to quickly scan them. 2016-01-03 18:08:45 +02:00
Paul Sokolovsky 0992588811 py/frozenmod: Make frozen module content be 0-terminated.
To allow simple zero-terminated lexers.
2016-01-01 07:51:07 +02:00
Damien George 4bd95f8b44 tools: Add C middle-processor to make builtin tables proper hash tables. 2015-12-31 00:24:33 +00:00
Paul Sokolovsky bb7f5b5501 tools: Upgrade upip to 0.6.3.
Updated for _os -> uos builtin module rename.
2015-12-12 00:20:10 +02:00
Damien George bbe2e22fcb tools: Fix pyboard.py to work under Python 3. 2015-12-08 12:55:28 +00:00
Peter Hinch f4fcc14cfb tools: Add option to pyboard.py to wait for serial device to be ready.
Also prints a nicer error message if the serial connection could not be
established.
2015-12-08 11:10:09 +00:00
Dave Hylands 519cef813e tools: Allow pyboard.py to work when boot.py prints things. 2015-12-06 21:45:10 +00:00
Paul Sokolovsky f8bc3f6964 tools: Update to upip 0.6.2. Fixes issue due to MacOSX undocumented behavior. 2015-11-15 00:04:18 +02:00
Paul Sokolovsky 3862ef9a9f tools: Update upip to 0.6.1. Fixes normal installs without -p switch. 2015-11-14 17:54:30 +02:00
Paul Sokolovsky 0aff87b808 tools: Update upip to 0.6.
Removes FFI dependency, instead uses builtin os module. Thus can work on
systems where dynamic library loading is not available.
2015-11-14 00:05:24 +02:00
Paul Sokolovsky 89f2ddd2d0 tools/pyboard.py: Don't add terminating \x04 character to stdout output. 2015-11-07 13:48:35 +00:00
Paul Sokolovsky e6dccaf18e tools/pyboard.py: Make -c (inline Python code) option compatible with python2. 2015-11-07 12:16:11 +03:00
Tom Soulanille a787467569 tools/pyboard: Add -c argument to run a program passed as a string. 2015-10-19 23:20:59 +01:00
Paul Sokolovsky 6a515b95a8 tools/upip: Update to 0.5.9.
MICROPYPATH environment variable is now honored, package are installed to
first path specified in it.
2015-10-17 20:16:41 +03:00
Damien George 0334058fa4 Rename "Micro Python" to "MicroPython" in REPL, help, readme's and misc. 2015-10-12 00:06:25 +01:00
Dave Hylands 01d64914c5 stmhal: Fix USB CDC-only mode under Windows.
This fix adds PIDs 9801 and 9802 to the pybcdc.inf file.

When in CDC only mode, it presents itself as a Communcations
device rather than as a composite device. Presenting as a
composite device with only the CDC interface seems to confuse
windows.

To test and make sure that the correct pybcdc.inf was being used,
I used USBDeview from http://www.nirsoft.net/utils/usb_devices_view.html
to uninstall any old pyboard drivers (Use Control-F and search
for pyboard). I found running USBDeview as administrator worked best.

Installing the driver in CDC+MSC mode first is recommended (since the
pybcdc.inf file in on the internal flash drive). Then when you switch
modes everything seems to work properly.

I used https://github.com/dhylands/upy-examples/blob/master/boot_switch.py
to easily switch the pyboard between the various USB modes for testing.
2015-10-09 00:18:01 +01:00
Paul Sokolovsky a5deadf082 tools: Upgrade upip to 0.5.8.
Adds support for ussl module (which is experimental and not fully
implemented yet itself).
2015-09-13 09:49:09 +03:00
Paul Sokolovsky e8ad47a6ca tools: Upgrade to upip 0.5.7.
Just dependent micropython-lib modules update for upip, no new
functionality.
2015-08-30 11:04:38 +03:00
Damien George b7d59060e2 tools: Make gen-changelog.sh print more lines from the tag annotation. 2015-08-11 13:50:40 +01:00
Damien George e86b47175f tools: Make pyboard.py Python2 compatible. 2015-08-08 13:03:08 +01:00
Damien George 7ccdf8be77 tools/pyboard.py: Fix read timeout calc to work with shorter sleep. 2015-07-29 00:21:22 +01:00
Daniel Campora cd14188bc8 tools: Add telnet support to pyboard.py.
The adapter class "TelnetToSerial" is used to access the Telnet
connection using the same API as with the serial connection. The
function pyboard.run-test() has been removed to made the module
generic and because this small test is no longer needed.
2015-07-26 14:02:34 +01:00
Damien George db109ca0fc tools/pyboard.py: Speed up reading of chars by decreasing sleep period. 2015-07-25 22:49:25 +01:00
Damien George f1236734bb tools/pyboard.py: Make enter_raw_repl stricter and more reliable.
When looking for chars to indicate raw repl is active, look for the full
string of chars to improve reliability of entering raw repl correctly.

Previous to this patch there was the possibility that raw repl was
entered in a dirty state, where not all input chars from previous
invocation were drained.
2015-07-25 22:46:07 +01:00
Damien George 9de53bf788 tools/pyboard.py: Fix parsing of returned error so last chr is not lost. 2015-07-25 22:44:56 +01:00
Dave Hylands c91727b75a tools: Fix pydfu.py to work with old and new versions of PyUSB
Update pydfu.py to match with the version from openmv.

I just updated the openmv version to work with both of the
PyUSB 1.0.0.b1 and 1.0.0.b2

See: https://github.com/walac/pyusb/blob/master/ReleaseNotes.rst
2015-07-06 09:56:12 -07:00
Paul Sokolovsky 6ab8b63bdd tools/make-frozen.py: Use Python2-compatible shebang. 2015-07-06 14:48:29 +03:00
Paul Sokolovsky de575c80b9 tools/make-frozen.py: Actually make Python2-compatible. 2015-07-06 14:27:57 +03:00
Paul Sokolovsky 3a2e9f20f6 tools/make-frozen.py: Add Python2 compatibility. 2015-07-06 14:09:16 +03:00
Paul Sokolovsky 484adac0bb tools: Update upip to 0.5.4.
Recognize and handle "package not found" error.
2015-06-25 15:32:14 +03:00
Damien George d59ca4efdb tools/pyboard.py: Change logic for when raw ">" prompt is parsed.
In raw REPL ">" indicates the prompt.  We originally read this character
upon entering the raw REPL, and after reading the last bit of the
output.  This patch changes the logic so the ">" is read only just
before trying to send the next command.  To make this work (and as an
added feature) the input buffer is now flushed upon entering raw REPL.

The main reason for this change is so that pyboard.py recognises the EOF
when sys.exit() is called on the pyboard.  Ie, if you run pyboard.py
with a script that calls sys.exit(), then pyboard.py will exit after
the sys.exit() is called.
2015-06-15 23:28:04 +01:00
Paul Sokolovsky dd0e24f4b0 pip-micropython: Add deprecation notice, but still leave for reference. 2015-06-13 21:39:57 +03:00
Paul Sokolovsky 098f5ae221 micropython-upip: Mark as binary file and re-commit. 2015-06-06 23:09:23 +03:00
Paul Sokolovsky 1406d9ccde upip: Upgrade to 0.5.3 to follow uctypes.struct() signature change. 2015-06-06 23:03:28 +03:00
Paul Sokolovsky f8a39e3bb1 tools/make-frozen.py: Handle trailing slash in argument more reliably. 2015-06-03 19:28:31 +03:00
Damien George 0e6c89a5c8 tools: Add codestats.sh to compute code statistics such as size, speed. 2015-06-03 15:38:43 +00:00
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