aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-11-11stm32/boards/stm32f405_af.csv: Fix typo in ETH_RMII_REF_CLK on PA1.Mike Causer
2019-11-11esp32/boards/sdkconfig.base: Resize SSL output buffer from 16 to 4kiB.Jim Mussared
The IDF heap is more fragmented with IDF 4 and mbedtls cannot allocate enough RAM with 16+16kiB for both in and out buffers, so reduce output buffer size. Fixes issue #5303.
2019-11-11extmod: Consolidate FAT FS config to MICROPY_VFS_FAT across all ports.Damien George
This commit removes the Makefile-level MICROPY_FATFS config and moves the MICROPY_VFS_FAT config to the Makefile level to replace it. It also moves the include of the oofatfs source files in the build from each port to a central place in extmod/extmod.mk. For a port to enabled VFS FAT support it should now set MICROPY_VFS_FAT=1 at the level of the Makefile. This will include the relevant oofatfs files in the build and set MICROPY_VFS_FAT=1 at the C (preprocessor) level.
2019-11-11examples/embedding: Remove obsolete fatfs files from build.Damien George
2019-11-07py/emitnx86: Make mp_f_n_args table match order of mp_fun_kind_t.Damien George
2019-11-07esp8266/moduos: Add optional support for VfsLfs1 and VfsLfs2.Damien George
With this commit an esp8266-based board can now be built with littlefs support via, eg "make MICROPY_VFS_LFS2=1".
2019-11-07esp8266/modules/flashbdev.py: Support extended block protocol.Damien George
2019-11-07docs/library/machine.SDCard.rst: Fix various typos.Jim Mussared
2019-11-07docs/templates/topindex.html: Replace usage of deprecated defindex.html.Jim Mussared
defindex.html (used by topindex.html) is deprecated, but topindex.html was already identical other than setting the title, so just inherit directly from layout.html.
2019-11-07docs/conf.py: Fix path to favicon.ico.Jim Mussared
2019-11-07tools/makemanifest.py: Skip freezing unsupported files with warning.Andrew Leech
2019-11-07py/emitnative: Fix typo, REG_PARENT_ARG_RET should be REG_PARENT_RET.Thea Flowers
2019-11-06esp32/moduos: Enable uos.VfsLfs2 for littlefs filesystems.Damien George
This commit adds support for littlefs (v2) on all esp32 boards. The original FAT filesystem still works and any board with a preexisting FAT filesystem will still work as normal. It's possible to switch to littlefs by reformatting the block device using: import uos, flashbdev uos.VfsLfs2.mkfs(flashbdev.bdev) Then when the board reboots (soft or hard) the new littlefs filesystem will be mounted. It's possible to switch back to a FAT filesystem by formatting with uos.VfsFat.mkfs(flashbdev.bdev).
2019-11-06esp32/esp32_partition: Support extended block protocol.Damien George
2019-11-06extmod/vfs: Add autodetect of littlefs filesystem when mounting.Damien George
2019-11-06tools/makemanifest.py: Follow symlinks when freezing linked directories.Mirko Vogt
While the new manifest.py style got introduced for freezing python code into the resulting binary, the old way - where files and modules within ports/*/modules where baked into the resulting binary - was still supported via `freeze('$(PORT_DIR)/modules')` within manifest.py. However behaviour changed for symlinked directories (=modules), as those links weren't followed anymore. This commit restores the original behaviour by explicitly following symlinks within a modules/ directory
2019-11-06drivers/sdcard: Raise exception on timeout of readinto.Jeremy Herbert
Otherwise the code can get stuck in an infinite loop if the SD card fails to respond to a read.
2019-11-05esp32: Remove unused "esponewire.c" in favour of extmod/modonewire.Andreas Motl
2019-11-05stm32/mpthreadport: Include runtime.h to get defn of mp_raise_msg.Damien George
2019-11-05all: Convert nlr_raise(mp_obj_new_exception_msg(x)) to mp_raise_msg(x).Damien George
This helper function was added a while ago and these are the remaining cases to convert, to save a bit of code size.
2019-11-04py/modsys: Report .mpy version in sys.implementation.Damien George
This commit adds a sys.implementation.mpy entry when the system supports importing .mpy files. This entry is a 16-bit integer which encodes two bytes of information from the header of .mpy files that are supported by the system being run: the second and third bytes, .mpy version, and flags and native architecture. This allows determining the supported .mpy file dynamically by code, and also for the user to find it out by inspecting this value. It's further possible to dynamically detect if the system supports importing .mpy files by `hasattr(sys.implementation, 'mpy')`.
2019-11-04py/persistentcode: Move declarations for .mpy header from .c to .h file.Damien George
2019-11-04py/objgenerator: Allow pend_throw to an unstarted generator.Jim Mussared
Replace the is_running field with a tri-state variable to indicate running/not-running/pending-exception. Update tests to cover the various cases. This allows cancellation in uasyncio even if the coroutine hasn't been executed yet. Fixes #5242
2019-11-04py/objgenerator: Remove globals from mp_obj_gen_instance_t.Jim Mussared
This wasn't necessary as the wrapped function already has a reference to its globals. But it had a dual purpose of tracking whether the function was currently running, so replace it with a bool.
2019-11-04esp32/Makefile: Add correct arch to MPY_CROSS_FLAGS for native code.Damien George
2019-11-04tools/mpy-tool.py: Use "@progbits #" attribute for native xtensa code.Damien George
2019-11-01py/nativeglue: Remove unused mp_obj_new_cell from mp_fun_table.Damien George
It has been unused since 9988618e0e0f5c319e31b135d993e22efb593093
2019-11-01extmod/modbtree: Make FILEVTABLE const to put it in ROM.Damien George
2019-11-01stm32/boards: Enable support for bluetooth on WB55 boards.Damien George
2019-11-01stm32: Add support for RF coprocessor on WB55 MCUs.Damien George
This requires a BLE wireless stack firmware to be already programmed in the secure flash area of the device.
2019-11-01extmod/nimble: Factor out stm32-specific HCI UART RX/TX code.Damien George
2019-11-01extmod/nimble: Remove unneeded nimble_sprintf wrapper function.Damien George
2019-10-31stm32: Add machine.Timer with soft timer implementation.Damien George
This commit adds an implementation of machine.Timer backed by the soft timer mechanism. It allows an arbitrary number of timers with 1ms resolution, with an associated Python callback. The Python-level API matches existing ports that have a soft timer, and is used as: from machine import Timer t = Timer(freq=10, callback=lambda t:print(t)) ... t = Timer(mode=Timer.ONE_SHOT, period=2000, callback=lambda t:print(t)) ... t.deinit()
2019-10-31stm32: Add soft timer implementation, using SysTick at 1ms resolution.Damien George
This commit adds an implementation of a "software timer" with a 1ms resolution, using SysTick. It allows unlimited number of concurrent timers (limited only by memory needed for each timer entry). They can be one-shot or periodic, and associated with a Python callback. There is a very small overhead added to the SysTick IRQ, which could be further optimised in the future, eg by patching SysTick_Handler code dynamically.
2019-10-31tests/extmod: Add test for ussl when passing in key/cert params.Damien George
2019-10-31extmod/modussl_mbedtls: Check for invalid key/cert data.Damien George
2019-10-31extmod/modussl_mbedtls: Fix getpeercert to return None if no cert avail.Damien George
2019-10-31extmod/modlwip: Unconditionally return POLLHUP/POLLERR when polling.Damien George
POSIX poll should always return POLLERR and POLLHUP in revents, regardless of whether they were requested in the input events flags. See issues #4290 and #5172.
2019-10-31extmod/modlwip: Make socket poll return POLLNVAL in case of bad file.Damien George
2019-10-31py/stream.h: Add MP_STREAM_POLL_NVAL constant.Damien George
2019-10-31extmod/modlwip: Unconditionally return POLLHUP when polling new socket.Damien George
POSIX poll should always return POLLERR and POLLHUP in revents, regardless of whether they were requested in the input events flags. See issues #4290 and #5172.
2019-10-31stm32/timer: Fix Timer.freq() calc so mult doesn't overflow uint32_t.Damien George
Fixes issue #5280.
2019-10-30lib/libc/string0: Add simple implementations of strspn and strcspn.Damien George
They are needed for littlefs.
2019-10-30extmod/vfs_lfs: Allow compiling in VfsLfs1 and VfsLfs2 separately.Damien George
These classes are enabled via the config options MICROPY_VFS_LFS1 and MICROPY_VFS_LFS2, which are disabled by default.
2019-10-29py/runtime: Reorder some binary ops so they don't require conditionals.Damien George
runtime0.h is part of the MicroPython ABI so it's simpler if it's independent of config options, like MICROPY_PY_REVERSE_SPECIAL_METHODS. What's effectively done here is to move MP_BINARY_OP_DIVMOD and MP_BINARY_OP_CONTAINS up in the enum, then remove the #if MICROPY_PY_REVERSE_SPECIAL_METHODS conditional. Without this change .mpy files would need to have a feature flag for MICROPY_PY_REVERSE_SPECIAL_METHODS (when embedding native code that uses this enum). This commit has no effect when MICROPY_PY_REVERSE_SPECIAL_METHODS is disabled. With this option enabled this commit reduces code size by about 60 bytes.
2019-10-29examples/bluetooth/ble_uart_peripheral: Use append mode for RX char.Jim Mussared
2019-10-29docs/library/ubluetooth: Add docs for gatts_set_buffer.Jim Mussared
2019-10-29extmod/modbluetooth: Add gatts_set_buffer.Jim Mussared
- Adds an explicit way to set the size of a value's internal buffer, replacing `ble.gatts_write(handle, bytes(size))` (although that still works). - Add an "append" mode for values, which means that remote writes will append to the buffer.
2019-10-29zephyr/main: Use mp_stack API instead of local pointer for stack top.Kamil Klimek
The MP_STATE_THREAD(stack_top) is always available so use it instead of creating a separate variable. This also allows gc_collect() to be used as an independent function, without real_main() being called.
2019-10-29examples/embedding: Replace symlink of mpconfigport.h with real file.Damien George