summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-11-16stmhal/hal/i2c: reapply HAL commit ea040a4 for f4Krzysztof Blazewicz
2016-11-16stmhal: apply STM32CubeF4 v1.13.1 patch - upgrade HAL driver to v1.5.2Krzysztof Blazewicz
2016-11-16stmhal: upgrade to STM32CubeF4 v1.13.0 - HAL v1.5.1Krzysztof Blazewicz
2016-11-16stmhal: upgrade to STM32CubeF4 v1.13.0 - CMSIS/Device 2.5.1Krzysztof Blazewicz
2016-11-16windows: Enable READER_POSIX to get access to lexer_new_from_file.Damien George
2016-11-16mpy-cross: Get compiling after recent persistent code refactors.Damien George
2016-11-16py/lexer: Make lexer use an mp_reader as its source.Damien George
2016-11-16py/lexer: Rewrite mp_lexer_new_from_fd in terms of mp_reader.Damien George
2016-11-16py/lexer: Provide generic mp_lexer_new_from_file based on mp_reader.Damien George
If a port defines MICROPY_READER_POSIX or MICROPY_READER_FATFS then lexer.c now provides an implementation of mp_lexer_new_from_file using the mp_reader_new_file function.
2016-11-16py/lexer: Rewrite mp_lexer_new_from_str_len in terms of mp_reader_mem.Damien George
2016-11-16py: Factor out persistent-code reader into separate files.Damien George
Implementations of persistent-code reader are provided for POSIX systems and systems using FatFS. Macros to use these are MICROPY_READER_POSIX and MICROPY_READER_FATFS respectively. If an alternative implementation is needed then a port can define the function mp_reader_new_file.
2016-11-16py: Factor persistent code load/save funcs into persistentcode.[ch].Damien George
2016-11-16docs/library/index: Elaborate on u-modules.Paul Sokolovsky
Also, remove an "only" directive in u-modules description.
2016-11-15tests/basics: Add test for logical constant folding.Damien George
2016-11-15py/parse: Add code to fold logical constants in or/and/not operations.Damien George
Adds about 200 bytes to the code size when constant folding is enabled.
2016-11-15py/parse: Make mp_parse_node_new_leaf an inline function.Damien George
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.
2016-11-15py/parse: Move function to check for const parse node to parse.[ch].Damien George
2016-11-15cc3200/mods/pybspi: Remove SPI.MASTER constant, it's no longer needed.Damien George
2016-11-15cc3200/pybspi: Remove static mode=SPI.MASTER parameter for latest HW API.Paul Sokolovsky
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".
2016-11-15py/*.mk: Replace uses of 'sed' with $(SED).Damien George
2016-11-15py/mkrules.mk: Rework find command so it works on OSX.Dave Hylands
The Mac version of find doesn't support -printf, so this changes things to use sed to strip off the leading path element instead.
2016-11-15py/runtime: mp_resume: Fix exception handling for nanbox port.Paul Sokolovsky
2016-11-15py/runtime: mp_resume: Handle exceptions in Python __next__().Paul Sokolovsky
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.
2016-11-14docs: Remove references to readall() and update stream read() docs.Damien George
2016-11-14cc3200/tools/smoke.py: Change readall() to read().Damien George
2016-11-14py/objexcept: Allow clearing traceback with 'exc.__traceback__ = None'.Paul Sokolovsky
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).
2016-11-14examples/hwapi: Add uasyncio example of fading 2 LEDs in parallel.Paul Sokolovsky
2016-11-14tests: Use read() instead of readall().Paul Sokolovsky
2016-11-14examples/http_client: Use read() instead of readall().Paul Sokolovsky
2016-11-14all: Remove readall() method, which is equivalent to read() w/o args.Paul Sokolovsky
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.
2016-11-13examples/hwapi: Add soft_pwm example converted to uasyncio.Paul Sokolovsky
2016-11-12tools/tinytest-codegen: Blacklist recently added uheapq_timeq test (qemu-arm).Paul Sokolovsky
2016-11-12extmod/moduheapq: Adhoc changes to support ordering by utime.ticks_ms().Paul Sokolovsky
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.
2016-11-12examples/hwapi: button_led: Add GPIO pin read example.Paul Sokolovsky
Requires BUTTON defined in hwconfig, so far tested on DragonBoard 410c.
2016-11-11stmhal: Rename mp_hal_pin_set_af to _config_alt, to simplify alt config.Damien George
This way the caller doesn't need to initialise a big GPIO_InitTypeDef struct, and HAL_GPIO_Init is no longer called.
2016-11-11stmhal/i2c: Reset the I2C peripheral if there was an error on the bus.Damien George
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.
2016-11-11stmhal/i2c: Add option to I2C to enable/disable use of DMA transfers.Damien George
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).
2016-11-11stmhal/dma: De-init the DMA peripheral properly before initialising.Damien George
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.
2016-11-10tests/micropython: Add test for import from within viper function.Damien George
2016-11-10py/emitnative: Fix native import emitter when in viper mode.Damien George
2016-11-10docs: Bump version to 1.8.6.v1.8.6Damien George
2016-11-10examples/hwapi: Add hwconfig for DragonBoard 410c.Paul Sokolovsky
This requires recently added implementation of machine.Pin from micropython-lib.
2016-11-09esp8266: Update 512k linker script, renaming modpyb to machine.Damien George
2016-11-09docs/library/machine.Pin: Update Pin docs to align with new HW API.Damien George
2016-11-09esp8266/modnetwork.c: Expose configuration for station DHCP hostname.Chris Popp
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.
2016-11-09zephyr/mphalport.h: Update for new "unified" kernal API (sleep functions).Paul Sokolovsky
2016-11-08unix: Add symlinks for upip to make it frozen into binary.Damien George
2016-11-08py: Strip leading dirs from frozen mpy files, so any path can be used.Damien George
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/.
2016-11-08py: Move frozen bytecode Makefile rules from ports to common mk files.Damien George
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.
2016-11-08esp8266: Update docs for esptool 1.2.1/SDK 2.0 (--flash_size=detect).Paul Sokolovsky