summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-04-05py: Raise a ValueError if range() step is zero.Damien George
Following CPython. Otherwise one gets either an infinite loop (if code is optimised by the uPy compiler) or possibly a divide-by-zero CPU exception.
2017-04-05tools/pyboard: execpty: Use shell=False to workaround some curdir issues.Paul Sokolovsky
Without this, Zephyr's port "make test" doesn't work.
2017-04-05zephyr/Makefile: Add "test" target, runs testsuite in QEMU.Paul Sokolovsky
2017-04-04tools/pyboard: Add "exec" and "execpty" pseudo-devices support.Paul Sokolovsky
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-04zephyr/zephyr_getchar: Explicitly yield to other threads on char availability.Paul Sokolovsky
Without this, if there's a large chunk of data coming from hardware (e.g. clipboard paste, or fed programmatically from the other side of the console), there's a behavior of initial mass fill-in of the buffer without any consumption, which starts much later and doesn't catch up with further filling, leading to buffer overflow.
2017-04-04extmod/modframebuf: Make monochrome bitmap formats start with MONO_.Peter Hinch
MONO_xxx is much easier to read if you're not familiar with the code. MVLSB is deprecated but kept for backwards compatibility, for the time being. This patch also updates the associated docs and tests.
2017-04-04py/objint: Consolidate mp_obj_new_int_from_float to one implementation.Damien George
This reduces code duplication and allows to make mp_classify_fp_as_int static, which reduces code size.
2017-04-04stmhal/usbd_cdc_interface: Change CDC RX to use a circular buffer.Damien George
This should be a little more efficient (since we anyway scan the input packet for the interrupt char), and it should also fix any non-atomic read issues with the buffer state being changed during an interrupt. Throughput tests show that RX rate is unchanged by this patch.
2017-04-04stmhal/usbd_cdc_interface: Increase in-endpoint timeout to 500ms.Damien George
The previous timeout value of 150ms could lead to data being lost (ie never received by the host) in some rare cases, eg when the host is under load. A value of 500ms is quite conservative and allows the host plenty of time to read our data.
2017-04-04zephyr/modusocket: Factor out socket_new() function.Paul Sokolovsky
It will be reused e.g. for accept() implementation.
2017-04-04zephyr/modusocket: Be sure to use MP_OBJ_FROM_PTR.Paul Sokolovsky
2017-04-04tests/run-tests: Update names of tests that may need skipping.Damien George
2017-04-04tests/float: Add tests for hashing float and complex numbers.Damien George
2017-04-04py: Add very simple but correct hashing for float and complex numbers.Damien George
Hashing of float and complex numbers that are exact (real) integers should return the same integer hash value as hashing the corresponding integer value. Eg hash(1), hash(1.0) and hash(1+0j) should all be the same (this is how Python is specified: if x==y then hash(x)==hash(y)). This patch implements the simplest way of doing float/complex hashing by just converting the value to int and returning that value.
2017-04-04docs/library/btree: Add btree module docs.Paul Sokolovsky
2017-04-03zephyr/prj_base.conf: Add config for net_buf logging.Paul Sokolovsky
Disabled by default.
2017-04-03tests/run-tests: Introduce generic "minimal" target.Paul Sokolovsky
Used e.g. by Zephyr port.
2017-04-03esp8266: Remove unused entry in port root pointers.Damien George
2017-04-03tests/micropython/heapalloc_iter: Improve skippability.Paul Sokolovsky
2017-04-03tests/float/byte*_construct: Skip on missing array module.Paul Sokolovsky
2017-04-03tests/extmod/vfs_fat_fileio*: Improve skippability.Paul Sokolovsky
Should be skipped on missing uso, uerrno modules.
2017-04-02run-tests: Add feature check for "const" keyword and skip related tests.Paul Sokolovsky
2017-04-02tests: vfs_fat_fileio.py is too big to be parsed in 16K heap, split in 2.Paul Sokolovsky
This restores ability to run testsuite with 16K heap.
2017-04-02py/objstr: Use MICROPY_FULL_CHECKS for range checking when constructing bytes.Paul Sokolovsky
Split this setting from MICROPY_CPYTHON_COMPAT. The idea is to be able to keep MICROPY_CPYTHON_COMPAT disabled, but still pass more of regression testsuite. In particular, this fixes last failing test in basics/ for Zephyr port.
2017-04-02tests/run-tests: Be sure to close Pyboard object on completion.Paul Sokolovsky
So underlying device was properly closed too.
2017-04-02tools/pyboard: Tighten up Pyboard object closure on errors.Paul Sokolovsky
Some "device" implementations may be sensitive to this.
2017-04-02zephyr/modusocket: Implement recv() for TCP sockets.Paul Sokolovsky
Short read approach is taken - at most, the remaining data in the current fragment will be returned.
2017-04-02tests/basics: Add tests for list and bytearray growing using themselves.Damien George
2017-04-02py/obj.h: Make sequence grow more efficient and support overlapping.Damien George
The first memmove now copies less bytes in some cases (because len_adj <= slice_len), and the memcpy is replaced with memmove to support the possibility that dest and slice regions are overlapping.
2017-04-01zephyr/modusocket: Implement recv() for UDP sockets.Paul Sokolovsky
The foundation of recv() support is per-socket queue of incoming packets, implemented using Zephyr FIFO object. This patch implements just recv() for UDP, because TCP recv() requires much more fine-grained control of network fragments and handling other issues, like EOF condition, etc.
2017-04-01all: Move BYTES_PER_WORD definition from ports to py/mpconfig.hDamien George
It can still be overwritten by a port in mpconfigport.h but for almost all cases one can use the provided default.
2017-03-31zephyr/modusocket: Implement send().Paul Sokolovsky
2017-03-31zephyr/modusocket: Implement bind() and connect().Paul Sokolovsky
2017-03-31all: Use full path name when including mp-readline/timeutils/netutils.Damien George
This follows the pattern of how all other headers are now included, and makes it explicit where the header file comes from. This patch also removes -I options from Makefile's that specify the mp-readline/timeutils/ netutils directories, which are no longer needed.
2017-03-31unix: Convert mp_uint_t to size_t in alloc.c.Pavol Rusnak
2017-03-31stmhal/i2c: Clean the cache so that I2C DMA works on F7 MCUs.Damien George
2017-03-31stmhal: Move L4/F7 I2C timing constants from mpconfigboard.h to i2c.c.Damien George
Such constants are MCU specific so shouldn't be specified in the board config file (else it leads to too much duplication of code). This patch also adds I2C timing values for the F767/F769 for 100k, 400k and 1MHz I2C bus frequencies.
2017-03-31zephyr: Integrate modusocket into build.Paul Sokolovsky
2017-03-31zephyr/modusocket: Initial version of usocket module for Zephyr.Paul Sokolovsky
So far, socket creation and closure is implemented.
2017-03-30zephyr: Fix NLR segfault in minimal build.Paul Sokolovsky
Requires inclusion of zephyr.h to properly detect that we're building for Zephyr.
2017-03-30zephyr/Makefile: Add workaround (fix?) for broken builds for DTS targets.Paul Sokolovsky
2017-03-30py/objzip: Convert mp_uint_t to size_t.Damien George
2017-03-30stmhal/dma: Don't include SDMMC2 struct if SDMMC2 is not available.Damien George
Not all F7 MCUs have SDMMC2.
2017-03-30stmhal/boards: Remove F769 alt function table, it's same as for F767.Damien George
2017-03-30stmhal/boards/STM32F769DISC: Fix user switch pin, and document stlink.Damien George
2017-03-30stmhal/boards/STM32F769DISC: Get SD card working by using SDMMC2.Damien George
2017-03-30stmhal/boards: Update F76x alternate function table to add SDMMC2.Damien George
2017-03-30stmhal/sdcard: Add support for SDMMC2 on F7 MCUs.Damien George
By default the SDIO (F4) or SDMMC1 (L4, F7) is used as the SD card peripheral, but if a board config defines MICROPY_HW_SDMMC2_CK and other pins then the SD card driver will use SDMMC2.
2017-03-30stmhal: Support SDMMC alternate functions in pin generation.Damien George
2017-03-30zephyr/Makefile: Rework to use modern, official build integration.Paul Sokolovsky
Build happens in 3 stages: 1. Zephyr config header and make vars are generated from prj.conf. 2. libmicropython is built using them. 3. Zephyr is built and final link happens.