Damien George
a19b5a01ce
py/mpconfig.h: Move PY_BUILTINS_POW3 config option to diff part of file.
With so many config options it's good to (at least try to) keep them
grouped into logical sections.
8 years ago
Damien George
84fb292cd5
tests/basics/string_format_modulo: Add more tests for dict formatting.
8 years ago
Damien George
7317e34383
py/objstr: Give correct behaviour when passing a dict to %-formatting.
This patch fixes two main things:
- dicts can be printed directly using '%s' % dict
- %-formatting should not crash when passed a non-dict to, eg, '%(foo)s'
8 years ago
Paul Sokolovsky
87882e1708
tests: Split tests for 2- and 3-arg pow().
8 years ago
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.
8 years ago
Damien George
2486c4ff46
py/objset: Fix inplace binary ops so frozensets are not modified.
8 years ago
Damien George
8a39e18f5f
tests/float: Add tests for zero to a negative power.
8 years ago
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.
8 years ago
Damien George
4b8ec5256d
py/objfloat: Raise ZeroDivisionError for 0 to negative power.
8 years ago
Damien George
05c70fdfba
tests/basics/set_binop: Add tests for inplace set operations.
8 years ago
Damien George
30cf503e97
py/objset: Make inplace binary operators actually modify the set.
8 years ago
Paul Sokolovsky
b32880bd51
tests/heapalloc_bytesio: Test for BytesIO with preallocates space.
8 years ago
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.
8 years ago
Dave Hylands
aee74a1dae
unix: Make stack be non-executable
This PR is to address issue #2812 .
8 years ago
Paul Sokolovsky
00bd145398
zephyr/README: Describe many gotchas of networked builds.
8 years ago
Damien George
28185bb81b
tests/thread: Fix stack size test so tests run reliably on baremetal.
8 years ago
Andrew Gatt
9d3c0d423e
lib/oofatfs/ffconf.h: Add MICROPY_FATFS_NORTC option.
8 years ago
Damien George
8e00844929
stmhal: Fix build issue when MICROPY_PY_THREAD is disabled.
8 years ago
Damien George
00e7176624
stmhal/main: Use _estack value to initialise stack extents.
8 years ago
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.
8 years ago
Damien George
bebb3a6160
tests/thread: Make thread_exc2 runable on baremetal.
8 years ago
Damien George
a6386f74b8
stmhal/pendsv: Fill in comments about what the stack contains.
8 years ago
Damien George
7d8c79ab6d
stmhal/main: Guard init_sdcard_fs with MICROPY_HW_HAS_SDCARD.
8 years ago
Damien George
e0381424cc
stmhal/modmachine: Add machine.Signal type.
8 years ago
Damien George
e24e03b415
stmhal/pin: Add C-level pin ioctl method.
8 years ago
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
8 years ago
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.
8 years ago
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.
8 years ago
Damien George
326343feeb
stmhal/README: Add paragraph about building mpy-cross.
8 years ago
Paul Sokolovsky
33b8e65bc0
tests/basics/zip: Make skippable.
8 years ago
Paul Sokolovsky
aee723ed4c
tests/run-tests: Skip frozenset tests if set literal syntax is not available.
8 years ago
Paul Sokolovsky
d335904666
zephyr/Makefile.zephyr: Support and default to networked (SLIP) QEMU.
Also works for non-networked builds (like minimal).
8 years ago
Andrew Gatt
10dbf2383f
extmod/vfs_fat.c: Use explicit include path for timeutils.h.
8 years ago
Damien George
c30b308492
extmod/vfs_reader: Fix use of NLR by popping context.
8 years ago
Damien George
5ec5bfb0d3
docs/pyboard/tutorial/lcd160cr_skin: Fix typo, get_touched->get_touch.
8 years ago
Damien George
6b12934fec
stmhal: Fix stack pointer initialisation for F411 and F429 boards.
The stack pointer should start pointing 1 byte past the top of the end of
RAM.
8 years ago
Damien George
a526352454
stmhal: Set the FatFs partition number when initialising VFS object.
stmhal has MULTI_PARTITION enabled for FatFs and so these values need to be
initialised.
8 years ago
Damien George
220abca311
stmhal: Use LED constants from PYBv4 onwards.
8 years ago
Damien George
30beed119f
unix/modos: Remove VfsFat from uos module, it's now in uos_vfs module.
8 years ago
Damien George
0fb27888fc
extmod/vfs_fat: Remove unused function fat_vfs_listdir.
8 years ago
Damien George
196406e17a
extmod/vfs_fat: Remove unused fatfs_builtin_open function.
8 years ago
Damien George
b697c89009
extmod: Merge old fsusermount.h header into vfs.h and vfs_fat.h.
vfs.h is for generic VFS declarations, and vfs_fat.h is for VfsFat
specific things.
8 years ago
Damien George
9425bf5b2b
lib/fatfs: Remove old fatfs library component, it's replaced by oofatfs.
8 years ago
Damien George
0bd61d23b9
extmod/vfs_fat: Remove MICROPY_FATFS_OO config option.
Everyone should now be using the new ooFatFs library. The old one is no
longer supported and will be removed.
8 years ago
Damien George
95635ade8b
unix/mpconfigport.h: Remove obsolete MICROPY_FATFS_VOLUMES config.
8 years ago
Damien George
c95c583857
esp8266/mpconfigport.h: Remove obsolete MICROPY_FATFS_VOLUMES config.
8 years ago
Damien George
1808b2e8d5
extmod: Remove MICROPY_FSUSERMOUNT and related files.
Replaced by MICROPY_VFS and the VFS sub-system.
8 years ago
Damien George
3d6f957208
extmod/vfs_fat: Remove MICROPY_FSUSERMOUNT_ADHOC config option.
8 years ago
Damien George
8beba7310f
extmod/vfs_fat: Remove MICROPY_READER_FATFS component.
8 years ago
Damien George
56506fd64a
cc3200: Convert to use new VFS sub-system and new ooFatFs library.
8 years ago