aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-06-22py/compile: Combine or_test and and_test compile functions.Damien George
2018-06-22py/compile: Combine global and nonlocal statement compile functions.Damien George
2018-06-22py/compile: Combine subscript_2 and subscript_3 into one function.Damien George
2018-06-22py/compile: Combine break and continue compile functions.Damien George
2018-06-22stm32/boards: Add .ld and af.csv files for STM32F722.Damien George
These files can also be used for F723, F732 and F733 MCUs.
2018-06-22tools/pydfu.py: Add support for multiple memory segments.Damien George
Segments are separated by / and begin with the memory address. This follows how the ST DFU tool works.
2018-06-22stm32/mboot: Add support for erase/read/write of external SPI flash.Damien George
This patch adds support to mboot for programming external SPI flash. It allows SPI flash to be programmed via a USB DFU utility in the same way that internal MCU flash is programmed.
2018-06-22stm32/qspi: Don't require data reads and writes to be a multiple of 4.Damien George
Prior to this patch the QSPI driver assumed that the length of all data reads and writes was a multiple of 4. This patch allows any length. Reads are optimised for speed by using 32-bit transfers when possible, but writes always use a byte transfer because they only use a single data IO line and are relatively slow.
2018-06-20py/stream: Remove stray empty line at start of file.Damien George
This was accidentally added in 6abede2ca9e221b6aefcaccbda0c89e367507df1
2018-06-20tests: Add tests using "file" argument in print and sys.print_exception.Damien George
2018-06-20py: Add checks for stream objects in print() and sys.print_exception().Damien George
2018-06-20py/stream: Update comment for mp_stream_write_adaptor.Damien George
2018-06-20stm32/boards/NUCLEO_F091RC: Fix TICK_INT_PRIORITY so it is highest prio.Damien George
Fixes issue #3880.
2018-06-19stm32/mboot: Define constants for reset mode cycling and timeout.Damien George
And fix timeout value so that it does actually finish with reset_mode=1.
2018-06-18tests/import: Add test for importing invalid .mpy file.Damien George
2018-06-18stm32/spi: Fix SPI driver so it can send/recv more than 65535 bytes.Damien George
The DMA peripheral is limited to transferring 65535 elements at a time so in order to send more than that the SPI driver must split the transfers up. The user must be aware of this limit if they are relying on precise timing of the entire SPI transfer, because there might be a small delay between the split transfers. Fixes issue #3851, and thanks to @kwagyeman for the original fix.
2018-06-18stm32/can: Use MP_OBJ_ARRAY_TYPECODE_FLAG_RW where appropriate.Damien George
2018-06-18py/objarray: Replace 0x80 with new MP_OBJ_ARRAY_TYPECODE_FLAG_RW macro.Damien George
2018-06-18stm32/boards/NUCLEO_F091RC: Add Arduino-named pins and rename CPU pins.rolandvs
To match pin labels on other NUCLEO 64 boards.
2018-06-18stm32/boards/stm32f091_af.csv: Split labels that are multiple funcs.rolandvs
2018-06-18tests/extmod: Add test for ujson.dump writing to a user IOBase object.Damien George
2018-06-18tests/extmod/ujson_dump.py: Add test for dump to non-stream object.Damien George
2018-06-18tests/unix/extra_coverage: Don't test stream objs with NULL write fun.Damien George
This behaviour of a NULL write C method on a stream that uses the write adaptor objects is no longer supported. It was only ever used by the coverage build for testing the fail path of mp_get_stream_raise().
2018-06-18extmod: Update to use new mp_get_stream helper.Damien George
With this patch objects are only checked that they have the stream protocol at the start of their use as a stream, and afterwards the efficient mp_get_stream() helper is used to extract the stream protocol C methods.
2018-06-18py/stream: Introduce and use efficient mp_get_stream to access stream_p.Damien George
The existing mp_get_stream_raise() helper does explicit checks that the input object is a real pointer object, has a non-NULL stream protocol, and has the desired stream C method (read/write/ioctl). In most cases it is not necessary to do these checks because it is guaranteed that the input object has the stream protocol and desired C methods. For example, native objects that use the stream wrappers (eg mp_stream_readinto_obj) in their locals dict always have the stream protocol (or else they shouldn't have these wrappers in their locals dict). This patch introduces an efficient mp_get_stream() which doesn't do any checks and just extracts the stream protocol struct. This should be used in all cases where the argument object is known to be a stream. The existing mp_get_stream_raise() should be used primarily to verify that an object does have the correct stream protocol methods. All uses of mp_get_stream_raise() in py/stream.c have been converted to use mp_get_stream() because the argument is guaranteed to be a proper stream object. This patch improves efficiency of stream operations and reduces code size.
2018-06-18examples/embedding: Add code markup and fix typo in README.md.Damien George
2018-06-18stm32/mboot: Adjust user-reset-mode timeout so it ends with mode=1.Damien George
If the user button is held down indefinitely (eg unintenionally, or because the GPIO signal of the user button is connected to some external device) then it makes sense to end the reset mode cycle with the default mode of 1, which executes code as normal.
2018-06-16extmod/vfs_fat_diskio: Factor disk ioctl code to reduce code size.Damien George
Functionality is unchanged.
2018-06-15drivers/sdcard: Fix bug in computing number of sectors on SD Card.Damien George
This was a typo from the very first commit of this file.
2018-06-15drivers/sdcard: Change driver to use new block-device protocol.Damien George
2018-06-15esp32/modules: Include umqtt library in frozen modules.Damien George
2018-06-15esp32: Update to latest ESP IDF.Damien George
2018-06-15stm32/i2cslave: Fix ordering of event callbacks in slave IRQ handler.Damien George
It's possible (at least on F4 MCU's) to have RXNE and STOPF set at the same time during a call to the slave IRQ handler. In such cases RXNE should be handled before STOPF so that all bytes are processed before i2c_slave_process_rx_end() is called.
2018-06-15stm32/i2c: Fix num_acks calculation in i2c_write for F0 and F7 MCU's.Damien George
Due to buffering of outgoing bytes on the I2C bus, detection of a NACK using the ISR_NACKF flag needs to account for the case where ISR_NACKF corresponds to the previous-to-previous byte.
2018-06-15stm32/timer: Support TIM1 on F0 MCUs.Damien George
2018-06-14drivers/memory/spiflash: Add functions for direct erase/read/write.Damien George
These new API functions do not use the cache.
2018-06-14drivers/memory/spiflash: Rename functions to indicate they use cache.Damien George
This patch renames the existing SPI flash API functions to reflect the fact that the go through the cache: mp_spiflash_flush -> mp_spiflash_cache_flush mp_spiflash_read -> mp_spiflash_cached_read mp_spiflash_write -> mp_spiflash_cached_write
2018-06-14stm32/boards/STM32L476DISC: Update SPI flash config for cache change.Damien George
2018-06-14drivers/memory/spiflash: Move cache buffer to user-provided config.Damien George
This patch removes the global cache variables from the SPI flash driver and now requires the user to provide the cache memory themselves, via the SPI flash configuration struct. This allows to either have a shared cache for multiple SPI flash devices (by sharing a mp_spiflash_cache_t struct), or have a single cache per device (or a mix of these options). To configure the cache use: mp_spiflash_cache_t spi_bdev_cache; const mp_spiflash_config_t spiflash_config = // any bus options .cache = &spi_bdev_cache, };
2018-06-13esp32/fatfs_port: Implement get_fattime so FAT files have a timestamp.Damien George
Fixes issue #3859.
2018-06-13extmod/modussl_axtls: Fix __del__ to point to mp_stream_close_obj.Damien George
2018-06-12extmod/uos_dupterm: Use native C stream methods on dupterm object.Damien George
This patch changes dupterm to call the native C stream methods on the connected stream objects, instead of calling the Python readinto/write methods. This is much more efficient for native stream objects like UART and webrepl and doesn't require allocating a special dupterm array. This change is a minor breaking change from the user's perspective because dupterm no longer accepts pure user stream objects to duplicate on. But with the recent addition of uio.IOBase it is possible to still create such classes just by inheriting from uio.IOBase, for example: import uio, uos class MyStream(uio.IOBase): def write(self, buf): # existing write implementation def readinto(self, buf): # existing readinto implementation uos.dupterm(MyStream())
2018-06-12stm32/Makefile: Rebuild all qstrs when any board configuration changes.Damien George
2018-06-12py/mkrules.mk: Regenerate all qstrs when config files change.Damien George
A port can define QSTR_GLOBAL_DEPENDENCIES to add extra files.
2018-06-12esp32: Remove port-specific uhashlib implementation and use common one.Damien George
Now that the common module has mbedtls support for both SHA1 and SHA256 it can now be used on this port.
2018-06-12extmod/moduhashlib: Make function objects STATIC.Yonatan Goldschmidt
These are not exported to anyone anyway.
2018-06-12extmod/moduhashlib: Allow using the sha256 implementation of mbedTLS.Yonatan Goldschmidt
2018-06-12extmod/moduhashlib: Allow to disable the sha256 class.Yonatan Goldschmidt
Via the config value MICROPY_PY_UHASHLIB_SHA256. Default to enabled to keep backwards compatibility. Also add default value for the sha1 class, to at least document its existence.
2018-06-12extmod/moduhashlib: Reorder funcs so that they are grouped by hash type.Yonatan Goldschmidt
Makes the code much more readable by reducing the number of #ifdefs and keeping related functions close.
2018-06-12extmod/moduhashlib: Prefix all Python methods and objects with uhashlib.Yonatan Goldschmidt
For consistency with other modules, and to help avoid clashes with the actual underlying functions that do the hashing (eg crypto-algorithms/sha256.c:sha256_update).