summaryrefslogtreecommitdiffstatshomepage
Commit message (Collapse)AuthorAge
* docs/uos: Remove mention of uos.sep.Paul Sokolovsky2017-02-14
| | | | | | MicroPython guarantees '/' to be a path separator, so extra constant taking precious ROM space are not needed. MicroPython never had such constant, only one vendor port had it (now unmaintained).
* examples/hwapi/soft_pwm: Use Signal on()/off() methods.Paul Sokolovsky2017-02-14
| | | | | | Just one sample is updated with on()/off() for now, there should be remaining sample(s) showing .value() use (but more can be converted later, as long as 1 or so good samples of .value() remains).
* py/objtype: Replace non-ASCII single-quote char with ASCII version.Damien George2017-02-14
|
* docs/library/machine: Make separate TOC for WiPy vs non-WiPy.Damien George2017-02-13
| | | | | WiPy is the only port with ADC and SD, so they shouldn't be included in other ports' documentation.
* extmod/vfs: Allow to stat the root directory.Damien George2017-02-13
| | | | | os.stat('/') now works and returns a mostly-empty tuple. Really all that is useful is the mode which tells that it's a directory.
* docs/library/pyb.Pin: Minor typo fix, B6 should be A0.Dave Hylands2017-02-13
| | | | On the PYBv1.0, X1 maps to A0, not B6.
* esp8266/moduos: Populate release field of uname in case it was GC'd.Damien George2017-02-13
|
* stmhal/boards: For STM32F411DISC, change I2C pin according to datasheet.Johannes Wågen2017-02-13
| | | | The pin had to be changed to get the I2C sensors on board to work.
* unix/moduselect: Implement ipoll() method with no-allocation policy.Paul Sokolovsky2017-02-13
| | | | | | | | | ipoll() allows to poll streams without allocating any memory: this method returns an iterator (a poll object itself), and the iterator yields preallocated "callee-owned tuple" with polling results for each active stream. The only operation a caller is allowed to do with this tuple is extracting values from it (storing the tuple as a whole somewhere is not allowed).
* tools/upip: Update to 1.1.5. Better and more user-friendly error handling.Paul Sokolovsky2017-02-10
|
* tests/misc: Add test for line number printing with large bytecode chunk.Damien George2017-02-10
|
* py/emitbc: Produce correct line number info for large bytecode chunks.Damien George2017-02-10
| | | | | | | | | | | | | | | Previous to this patch, for large chunks of bytecode that originated from a single source-code line, the bytecode-line mapping would generate something like (for 42 bytecode bytes and 1 line): BC_SKIP=31 LINE_SKIP=1 BC_SKIP=11 LINE_SKIP=0 This would mean that any errors in the last 11 bytecode bytes would be reported on the following line. This patch fixes it to generate instead: BC_SKIP=31 LINE_SKIP=0 BC_SKIP=11 LINE_SKIP=1
* extmod/vfs: Raise OSError(EEXIST) on attempt to mkdir a mount point.Damien George2017-02-09
|
* examples/hwapi: Be sure to import Signal when it's used.Damien George2017-02-09
|
* examples/hwapi: Add hwconfig_pyboard.py for pyboard.Kai Fricke2017-02-09
|
* py/objtype: Implement __delattr__ and __setattr__.dmazzella2017-02-09
| | | | | | This patch implements support for class methods __delattr__ and __setattr__ for customising attribute access. It is controlled by the config option MICROPY_PY_DELATTR_SETATTR and is disabled by default.
* extmod/vfs: Allow to mount a block device, not just a VFS object.Damien George2017-02-09
| | | | | | | If the mounted object doesn't have a "mount" method then assume it's a block device and try to detect the filesystem. Since we currently only support FAT filesystems, the behaviour is to just try and create a VfsFat object automatically, using the given block device.
* extmod/machine_signal: Implement Signal .on() and .off() methods.Paul Sokolovsky2017-02-08
| | | | | | | Each method asserts and deasserts signal respectively. They are equivalent to .value(1) and .value(0) but conceptually simpler (and may help to avoid confusion with inverted signals, where "asserted" state means logical 0 output).
* stmhal/Makefile: Drop use of -mabi=aapcs-linux; link libgcc by default.Damien George2017-02-08
| | | | | | | | | | The aapcs-linux ABI is not required, instead the default aapcs ABI is enough. And using the default ABI means that the provided libgcc will now link with the firmware without warnings about variable vs fixed enums. Although the binary size increases by about 1k, RAM usage is slightly decreased. And libgcc may prove useful in the future for things like long-long division.
* py/nlr: Fix execstack builds for ARM.Dave Hylands2017-02-08
| | | | | | | | | | It seems that the gcc toolchain on the RaspberryPi likes %progbits instead of @progbits. I verified that %progbits also works under x86, so this should fix #2848 and fix #2842 I verified that unix and mpy-cross both compile on my RaspberryPi and on my x64 machine.
* py/map: Change mp_uint_t to size_t where appropriate.Damien George2017-02-08
| | | | | | | | The internal map/set functions now use size_t exclusively for computing addresses. size_t is enough to reach all of available memory when computing addresses so is the right type to use. In particular, for nanbox builds it saves quite a bit of code size and RAM compared to the original use of mp_uint_t (which is 64-bits on nanbox builds).
* py/asmxtensa.h: Explicitly cast args to 32-bits so left-shift is legal.Damien George2017-02-08
| | | | | | | For archs that have 16-bit pointers, the asmxtensa.h file can give compiler warnings about left-shift being greater than the width of the type (due to the inline functions in this header file). Explicitly casting the constants to uint32_t stops these warnings.
* docs: Add M-logo as favicon.Damien George2017-02-07
|
* docs/esp8266/tutorial: Specify the baudrate in picocom example command.Damien George2017-02-07
|
* stmhal: Add ability to skip booting from SD card via /flash/SKIPSD file.Damien George2017-02-07
|
* unix/main: Properly handle MICROPYPATH starting with ':'.Paul Sokolovsky2017-02-07
| | | | In other words, where first path component is an empty string.
* unix: Fix freedos port build problems.Nikita Melentev2017-02-06
|
* stmhal: Use MICROPY_EVENT_POLL_HOOK instead of __WFI where appropriate.Damien George2017-02-06
|
* extmod/machine_spi: Remove EVENT_POLL_HOOK from soft-SPI transfer func.Damien George2017-02-06
| | | | | | | | | | | SPI needs to be fast, and calling the EVENT_POLL_HOOK every byte makes it unusable for ports that need to do non-trivial work in the EVENT_POLL_HOOK call. And individual SPI transfers should be short enough in time that EVENT_POLL_HOOK doesn't need to be called. If something like this proves to be needed in practice then we will need to introduce separate event hook macros, one for "slow" loops (eg select/poll) and one for "fast" loops (eg software I2C, SPI).
* tests/pyb: Adjust tests so they can run on PYB and PYBLITE.Damien George2017-02-06
| | | | | | A few tests still fail on PYBLITE, and that's due to differences in the available peripheral block numbers on the different MCUs (eg I2C(2) exists on one, but it's I2C(3) on the other).
* stmhal: Add pyb.fault_debug() function, to control hard-fault behaviour.Damien George2017-02-06
| | | | | | | | | This new function controls what happens on a hard-fault: - debugging disabled: board will do a reset - debugging enabled: board will print registers and stack and flash LEDs The default is disabled, ie to do a reset. This is different to previous behaviour which flashed the LEDs and waited indefinitely.
* stmhal: On HardFault, print stack pointer and do a stack dump.Damien George2017-02-06
|
* cc3200: Refactor "ticks" functions to use common extmod implementation.Damien George2017-02-06
| | | | | | | | | | | | The port now uses the common mp_utime_ticks_{ms,us,cpu,add,diff} functions from extmod/utime_mphal.c. The mp_utime_sleep_XXX functions are still cc3200-specific because they handle the GIL differently to the ones in extmod. The files misc/mpsystick.[ch] have been removed because they contain 2 unused functions, and the other remaining function is renamed to mp_hal_ticks_us and moved to hal/cc3200_hal.c.
* examples/button_reaction: Update for time_pulse_us() no longer raising exc.Paul Sokolovsky2017-02-05
|
* extmod/machine_pulse: Make time_pulse_us() not throw exceptions.Paul Sokolovsky2017-02-05
| | | | | | | | | | | | machine.time_pulse_us() is intended to provide very fine timing, including while working with signal bursts, where each transition is tracked in row. Throwing and handling an exception may take too much time and "signal loss". So instead, in case of a timeout, just return negative value. Cases of timeout while waiting for initial signal stabilization, and during actual timing, are recognized. The documentation is updated accordingly, and rewritten somewhat to clarify the function behavior.
* py/objcomplex: Fix typo in ternary expression.Damien George2017-02-04
| | | | | This typo actually did the correct thing, but it was very obscure (came about from think in terms of Python's "x if cond else y" expression).
* esp8266/uart: Add support for polling uart device.marc hoffman2017-02-03
|
* py/objstr: Convert some instances of mp_uint_t to size_t.Damien George2017-02-03
|
* docs: For LCD160CR driver and tutorial, add link to positioning image.Damien George2017-02-03
|
* stmhal/mpconfigport.h: Enable MICROPY_PY_BUILTINS_POW3 option.Damien George2017-02-03
|
* qemu-arm/mpconfigport.h: Enable MICROPY_PY_BUILTINS_POW3 option.Damien George2017-02-03
|
* py/mpconfig.h: Move PY_BUILTINS_POW3 config option to diff part of file.Damien George2017-02-03
| | | | | With so many config options it's good to (at least try to) keep them grouped into logical sections.
* tests/basics/string_format_modulo: Add more tests for dict formatting.Damien George2017-02-03
|
* py/objstr: Give correct behaviour when passing a dict to %-formatting.Damien George2017-02-03
| | | | | | 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'
* tests: Split tests for 2- and 3-arg pow().Paul Sokolovsky2017-02-02
|
* py: Added optimised support for 3-argument calls to builtin.pow()Nicko van Someren2017-02-02
| | | | | | 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.
* py/objset: Fix inplace binary ops so frozensets are not modified.Damien George2017-02-03
|
* tests/float: Add tests for zero to a negative power.Damien George2017-02-03
|
* py/objcomplex: Correctly handle case of 0j to power of something.Damien George2017-02-03
| | | | | 0j to the power of negative now raises ZeroDivisionError, and 0j to the power of positive returns 0.
* py/objfloat: Raise ZeroDivisionError for 0 to negative power.Damien George2017-02-03
|