summaryrefslogtreecommitdiffstatshomepage
Commit message (Collapse)AuthorAge
* py/parse: Add code to fold logical constants in or/and/not operations.Damien George2016-11-15
| | | | Adds about 200 bytes to the code size when constant folding is enabled.
* py/parse: Make mp_parse_node_new_leaf an inline function.Damien George2016-11-15
| | | | | | It is split into 2 functions, one to make small ints and the other to make a non-small-int leaf node. This reduces code size by 32 bytes on bare-arm, 64 bytes on unix (x64-64) and 144 bytes on stmhal.
* py/parse: Move function to check for const parse node to parse.[ch].Damien George2016-11-15
|
* cc3200/mods/pybspi: Remove SPI.MASTER constant, it's no longer needed.Damien George2016-11-15
|
* cc3200/pybspi: Remove static mode=SPI.MASTER parameter for latest HW API.Paul Sokolovsky2016-11-15
| | | | | | | Per the latest HW API, "SPI" class implements only master side of the protocol, so mode=SPI.MASTER (which was static for WiPy anyway) is not required (or allowed). This change is required to correspond to updated documentation of machine.SPI class which no longer lists "mode".
* py/*.mk: Replace uses of 'sed' with $(SED).Damien George2016-11-15
|
* py/mkrules.mk: Rework find command so it works on OSX.Dave Hylands2016-11-15
| | | | | The Mac version of find doesn't support -printf, so this changes things to use sed to strip off the leading path element instead.
* py/runtime: mp_resume: Fix exception handling for nanbox port.Paul Sokolovsky2016-11-15
|
* py/runtime: mp_resume: Handle exceptions in Python __next__().Paul Sokolovsky2016-11-15
| | | | | | | | This includes StopIteration and thus are important to make Python-coded iterables work with yield from/await. Exceptions in Python send() are still not handled and left for future consideration and optimization.
* docs: Remove references to readall() and update stream read() docs.Damien George2016-11-14
|
* cc3200/tools/smoke.py: Change readall() to read().Damien George2016-11-14
|
* py/objexcept: Allow clearing traceback with 'exc.__traceback__ = None'.Paul Sokolovsky2016-11-14
| | | | | | | | | | | | | We allow 'exc.__traceback__ = None' assignment as a low-level optimization of pre-allocating exception instance and raising it repeatedly - this avoids memory allocation during raise. However, uPy will keep adding traceback entries to such exception instance, so before throwing it, traceback should be cleared like above. 'exc.__traceback__ = None' syntax is CPython compatible. However, unlike it, reading that attribute or setting it to any other value is not supported (and not intended to be supported, again, the only reason for adding this feature is to allow zero-memalloc exception raising).
* examples/hwapi: Add uasyncio example of fading 2 LEDs in parallel.Paul Sokolovsky2016-11-14
|
* tests: Use read() instead of readall().Paul Sokolovsky2016-11-14
|
* examples/http_client: Use read() instead of readall().Paul Sokolovsky2016-11-14
|
* all: Remove readall() method, which is equivalent to read() w/o args.Paul Sokolovsky2016-11-14
| | | | | | Its addition was due to an early exploration on how to add CPython-like stream interface. It's clear that it's not needed and just takes up bytes in all ports.
* examples/hwapi: Add soft_pwm example converted to uasyncio.Paul Sokolovsky2016-11-13
|
* tools/tinytest-codegen: Blacklist recently added uheapq_timeq test (qemu-arm).Paul Sokolovsky2016-11-12
|
* extmod/moduheapq: Adhoc changes to support ordering by utime.ticks_ms().Paul Sokolovsky2016-11-12
| | | | | | As required for further elaboration of uasyncio, like supporting baremetal systems with wraparound timesources. This is not intended to be public interface, and likely will be further refactored in the future.
* examples/hwapi: button_led: Add GPIO pin read example.Paul Sokolovsky2016-11-12
| | | | Requires BUTTON defined in hwconfig, so far tested on DragonBoard 410c.
* stmhal: Rename mp_hal_pin_set_af to _config_alt, to simplify alt config.Damien George2016-11-11
| | | | | This way the caller doesn't need to initialise a big GPIO_InitTypeDef struct, and HAL_GPIO_Init is no longer called.
* stmhal/i2c: Reset the I2C peripheral if there was an error on the bus.Damien George2016-11-11
| | | | | | | | | If an I2C send/recv fails then the peripheral is now checked to see if it's in a "stuck" state waiting for the stop bit, and if so then it is reset so that the next I2C transaction can proceed. This patch also de-inits the I2C peripheral in the init() method, before init'ing it again.
* stmhal/i2c: Add option to I2C to enable/disable use of DMA transfers.Damien George2016-11-11
| | | | | | | New keyword option in constructor and init() method is "dma=<bool>". DMA is now disabled by default for I2C transfers because it currently does not handle I2C bus errors very well (eg if slave device doesn't ACK or NACK correctly during a transfer).
* stmhal/dma: De-init the DMA peripheral properly before initialising.Damien George2016-11-11
| | | | | | The DMA state is always HAL_DMA_STATE_RESET because of the memset clearing all the data, so prior to this patch HAL_DMA_DeInit was never called. Now it is always called to make sure the DMA is properly reset.
* tests/micropython: Add test for import from within viper function.Damien George2016-11-10
|
* py/emitnative: Fix native import emitter when in viper mode.Damien George2016-11-10
|
* docs: Bump version to 1.8.6.v1.8.6Damien George2016-11-10
|
* examples/hwapi: Add hwconfig for DragonBoard 410c.Paul Sokolovsky2016-11-10
| | | | | This requires recently added implementation of machine.Pin from micropython-lib.
* esp8266: Update 512k linker script, renaming modpyb to machine.Damien George2016-11-09
|
* docs/library/machine.Pin: Update Pin docs to align with new HW API.Damien George2016-11-09
|
* esp8266/modnetwork.c: Expose configuration for station DHCP hostname.Chris Popp2016-11-09
| | | | | | | The ESP SDK supports configuring the hostname that is reported when doing a DHCP request in station mode. This commit exposes that under network.WLAN(network.STA_IF).config('dhcp_hostname') as a read/write value similar to other parameters.
* zephyr/mphalport.h: Update for new "unified" kernal API (sleep functions).Paul Sokolovsky2016-11-09
|
* unix: Add symlinks for upip to make it frozen into binary.Damien George2016-11-08
|
* py: Strip leading dirs from frozen mpy files, so any path can be used.Damien George2016-11-08
| | | | | | | | With this patch one can now do "make FROZEN_MPY_DIR=../../frozen" to specify a directory containing scripts to be frozen (as well as absolute paths). The compiled .mpy files are now stored in $(BUILD)/frozen_mpy/.
* py: Move frozen bytecode Makefile rules from ports to common mk files.Damien George2016-11-08
| | | | | | Now, to use frozen bytecode all a port needs to do is define FROZEN_MPY_DIR to the directory containing the .py files to freeze, and define MICROPY_MODULE_FROZEN_MPY and MICROPY_QSTR_EXTRA_POOL.
* esp8266: Update docs for esptool 1.2.1/SDK 2.0 (--flash_size=detect).Paul Sokolovsky2016-11-08
|
* docs/*/quickref.rst: Use new semantics of ticks_diff()puuu2016-11-08
|
* esp8266: Include upip as a standard frozen bytecode module.Paul Sokolovsky2016-11-08
| | | | | | Previously, it was included only in release builds, but it's important tool which should be always at the fingertips to be useful (and to pump up its usage).
* tools, unix: Replace upip tarball with just source files.Paul Sokolovsky2016-11-07
| | | | | | | | | | | 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.
* esp8266/espneopixel.c: Solve glitching LED issues with cpu at 80MHz.Olivier Ortigues2016-11-07
| | | | | | | | At the WS2812 driver level, a 400ns value was used for T0H (time high to send a 0 bit) but LED specification says it should be 350ns +- 150ns. Due to loop overhead the 400ns value could lead to T0H close to 500ns which is too close from the limit value and gave glitches (bad data to pixels) in some cases. This patch makes the calculated T0H value 350ns.
* stmhal: enable SD power save (disable CLK on idle)Ryan Shaw2016-11-07
|
* examples/hwapi: Example showing best practices for HW API usage in apps.Paul Sokolovsky2016-11-06
| | | | Showing and providing detailed instructions and motivation.
* docs/esp8266: Update for new WebREPL setup procedure.Paul Sokolovsky2016-11-06
|
* esp8266: Rework webrepl_setup to run over wired REPL.Paul Sokolovsky2016-11-06
|
* tests/vfs_fat_oldproto: Skip for ports not supporting "oldproto".Paul Sokolovsky2016-11-06
| | | | Otherwise this broke esp8266 testsuite.
* esp8266: Rename "machine" module implementation to use contemporary naming.Paul Sokolovsky2016-11-06
| | | | | | | Previously they used historical "pyb" affix causing confusion and inconsistency (there's no "pyb" module in modern ports; but people took esp8266 port as an example, and "pyb" naming kept proliferating, while other people complained that source structure is not clear).
* zephyr/Makefile: Add -fomit-frame-pointer.Paul Sokolovsky2016-11-05
| | | | | Somehow, Zephyr uses -fno-omit-frame-pointer, whch bloats code size considerably (+5K for minimal ARM Thumb2 build).
* zephyr/Makefile: Add minimal port.Paul Sokolovsky2016-11-05
|
* zephyr/Makefile: Allow to override Zephyr config from make command line.Paul Sokolovsky2016-11-04
|
* zephyr/Makefile: Update comments to the current state of affairs.Paul Sokolovsky2016-11-04
|