Paul Sokolovsky
87882e1708
tests: Split tests for 2- and 3-arg pow().
2017-02-02 23:34:52 +03:00
Nicko van Someren
df0117c8ae
py: Added optimised support for 3-argument calls to builtin.pow()
...
Updated modbuiltin.c to add conditional support for 3-arg calls to
pow() using MICROPY_PY_BUILTINS_POW3 config parameter. Added support in
objint_mpz.c for for optimised implementation.
2017-02-02 22:23:10 +03:00
Damien George
2486c4ff46
py/objset: Fix inplace binary ops so frozensets are not modified.
2017-02-03 00:27:56 +11:00
Damien George
8a39e18f5f
tests/float: Add tests for zero to a negative power.
2017-02-03 00:04:13 +11:00
Damien George
3ed0e5e5d4
py/objcomplex: Correctly handle case of 0j to power of something.
...
0j to the power of negative now raises ZeroDivisionError, and 0j to the
power of positive returns 0.
2017-02-03 00:01:45 +11:00
Damien George
4b8ec5256d
py/objfloat: Raise ZeroDivisionError for 0 to negative power.
2017-02-03 00:01:37 +11:00
Damien George
05c70fdfba
tests/basics/set_binop: Add tests for inplace set operations.
2017-02-02 23:36:53 +11:00
Damien George
30cf503e97
py/objset: Make inplace binary operators actually modify the set.
2017-02-02 23:33:49 +11:00
Paul Sokolovsky
b32880bd51
tests/heapalloc_bytesio: Test for BytesIO with preallocates space.
2017-02-02 00:38:38 +03:00
Paul Sokolovsky
50d3a9df67
py/objstringio: Allow to specify initial capacity by passing numeric argument.
...
E.g. uio.BytesIO(100) will allocate buffer with 100 bytes of space.
2017-02-02 00:33:43 +03:00
Dave Hylands
aee74a1dae
unix: Make stack be non-executable
...
This PR is to address issue #2812 .
2017-02-01 23:03:10 +03:00
Paul Sokolovsky
00bd145398
zephyr/README: Describe many gotchas of networked builds.
2017-02-01 21:28:11 +03:00
Damien George
28185bb81b
tests/thread: Fix stack size test so tests run reliably on baremetal.
2017-02-01 17:21:35 +11:00
Andrew Gatt
9d3c0d423e
lib/oofatfs/ffconf.h: Add MICROPY_FATFS_NORTC option.
2017-01-31 19:54:20 +11:00
Damien George
8e00844929
stmhal: Fix build issue when MICROPY_PY_THREAD is disabled.
2017-01-31 19:52:50 +11:00
Damien George
00e7176624
stmhal/main: Use _estack value to initialise stack extents.
2017-01-31 18:43:46 +11:00
Damien George
882ec01e42
stmhal: Initial implementation of multithreading, currently disabled.
...
This patch brings the _thread module to stmhal/pyboard. There is a very
simple round-robin thread scheduler, which is disabled if there is only
one thread (for efficiency when threading is not used).
The scheduler currently switches threads at a rate of 250Hz using the
systick timer and the pend-SV interrupt.
The GIL is disabled so one must be careful to use lock objects to prevent
concurrent access of objects.
The threading is disabled by default, one can enabled it with the config
option MICROPY_PY_THREAD to test it out.
2017-01-31 18:42:35 +11:00
Damien George
bebb3a6160
tests/thread: Make thread_exc2 runable on baremetal.
2017-01-31 13:59:20 +11:00
Damien George
a6386f74b8
stmhal/pendsv: Fill in comments about what the stack contains.
2017-01-31 13:58:34 +11:00
Damien George
7d8c79ab6d
stmhal/main: Guard init_sdcard_fs with MICROPY_HW_HAS_SDCARD.
2017-01-31 13:04:32 +11:00
Damien George
e0381424cc
stmhal/modmachine: Add machine.Signal type.
2017-01-31 12:36:20 +11:00
Damien George
e24e03b415
stmhal/pin: Add C-level pin ioctl method.
2017-01-31 12:36:04 +11:00
Damien George
b039d93d7e
lib/oofatfs/ffconf.h: Allow to configure FS_EXFAT option.
...
Using MICROPY_FATFS_EXFAT. Enabling this has licensing implications;
see https://www.microsoft.com/en-us/legal/intellectualproperty/mtl/exfat-licensing.aspx
2017-01-31 12:32:24 +11:00
Damien George
80dfd65090
stmhal/main: Put /sd directory before /flash in sys.path.
...
If the SD card is mounted then its libraries (ie those that are imported)
should override any in /flash.
2017-01-31 12:30:18 +11:00
Damien George
3667ee1b88
stmhal: On boot, mount all available partitions of the SD card.
...
The first partition is mounted as "/sd" and subsequent partitions are
mounted as "/sd<part_num>". This is backwards compatible with the previous
behaviour, which just mounted the first partition on "/sd".
At this point, only FatFs filesystems are mounted.
2017-01-31 12:18:08 +11:00