aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
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.Damien 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
2016-11-08docs/*/quickref.rst: Use new semantics of ticks_diff()puuu
2016-11-08esp8266: Include upip as a standard frozen bytecode module.Paul Sokolovsky
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).
2016-11-07tools, unix: Replace upip tarball with just source files.Paul Sokolovsky
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.
2016-11-07esp8266/espneopixel.c: Solve glitching LED issues with cpu at 80MHz.Olivier Ortigues
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.
2016-11-07stmhal: enable SD power save (disable CLK on idle)Ryan Shaw
2016-11-06examples/hwapi: Example showing best practices for HW API usage in apps.Paul Sokolovsky
Showing and providing detailed instructions and motivation.
2016-11-06docs/esp8266: Update for new WebREPL setup procedure.Paul Sokolovsky
2016-11-06esp8266: Rework webrepl_setup to run over wired REPL.Paul Sokolovsky
2016-11-06tests/vfs_fat_oldproto: Skip for ports not supporting "oldproto".Paul Sokolovsky
Otherwise this broke esp8266 testsuite.
2016-11-06esp8266: Rename "machine" module implementation to use contemporary naming.Paul Sokolovsky
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).
2016-11-05zephyr/Makefile: Add -fomit-frame-pointer.Paul Sokolovsky
Somehow, Zephyr uses -fno-omit-frame-pointer, whch bloats code size considerably (+5K for minimal ARM Thumb2 build).
2016-11-05zephyr/Makefile: Add minimal port.Paul Sokolovsky
2016-11-04zephyr/Makefile: Allow to override Zephyr config from make command line.Paul Sokolovsky
2016-11-04zephyr/Makefile: Update comments to the current state of affairs.Paul Sokolovsky
2016-11-04zephyr/Makefile: Allow to adjust heap size from make command line.Paul Sokolovsky
2016-11-04zephyr/mpconfigport.h: Move less important params to the bottom.Paul Sokolovsky
2016-11-03extmod/utime_mphal: ticks_diff/ticks_add: Don't hardcode 32-bit types.Paul Sokolovsky
Use normal mp_int_t/mp_uint_t types, algorithms (hm, formulas) can work with any type width.
2016-11-03windows: Implement mp_hal_ticks_cpu in terms of QueryPerformanceCounterstijn
2016-11-03windows: Fix utime_mphal compilation for msvcstijn
2016-11-03drivers: Add "from micropython import const" when const is used.Damien George
Following best-practice use of the const feature, to make it compatible with Python.
2016-11-03py: Add MICROPY_FLOAT_CONST macro for defining float constants.Damien George
All float constants in the core should use this macro to prevent unnecessary creation of double-precision floats, which makes code less efficient.
2016-11-03qemu-arm: Enable software floating point support, and float tests.Damien George
This helps to test floating point code on Cortex-M hardware. As part of this patch the link-time-optimisation was disabled because it wasn't compatible with software FP support. In particular, the linker could not find the __aeabi_f2d, __aeabi_d2f etc functions even though they were provided by lib/libm/math.c.
2016-11-03lib/libm: Move Thumb-specific sqrtf function to separate file.Damien George
This allows it to be used only when the hardware supports VFP instructions, preventing compile errors.