Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge in MicroPython 1.13 #4720

Merged
merged 1,816 commits into from
May 8, 2021
Merged
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
1816 commits
Select commit Hold shift + click to select a range
f03d030
powerpc/uart: Choose which UART to use at build time, not runtime.
shenki May 26, 2020
5cfc09f
travis: For powerpc job, build both UART variants.
shenki May 26, 2020
8f64267
tools/codeformat.py: Add verbose option to pass to uncrustify and black.
dlech May 27, 2020
22806ed
extmod/vfs: Retain previous working directory if chdir fails.
dpgeorge May 28, 2020
8897134
stm32/machine_uart: Retain attached-to-repl setting when init'ing UART.
dpgeorge Jun 1, 2020
9ae50d2
stm32/machine_uart: Allow re-init'ing a static UART object.
dpgeorge Jun 1, 2020
68d053c
stm32/modmachine: Allow changing AHB and APB bus frequencies on STM32WB.
dpgeorge Jun 1, 2020
5210fc5
stm32/adc: Add support to pyb.ADC for STM32WB MCUs.
dpgeorge Jun 1, 2020
0f7b5cc
stm32/machine_adc: Make setting of ADC1_COMMON->CCR clearer on STM32WB.
dpgeorge Jun 1, 2020
c8985d5
stm32/dma: Add support for DMA on STM32WB, with SPI settings provided.
dpgeorge Jun 1, 2020
246f3f6
stm32/boards/xxx_WB55: Enable pyb.ADC and hardware SPI on WB55 boards.
dpgeorge Jun 1, 2020
a4086a2
qemu-arm/README: Update link to toolchain.
DavidSpickett May 29, 2020
da71f55
stm32/Makefile: Quote libgcc path so spaces are not an issue.
stinos May 29, 2020
203b107
py/modbuiltins: Fix getattr to work with class raising AttributeError.
dpgeorge May 29, 2020
b2030e1
lib/utils/pyexec: Add missing MP_ERROR_TEXT when compiler disabled.
dpgeorge May 29, 2020
8e591d4
minimal: Make build more flexible and work as 64-bit build.
dpgeorge May 29, 2020
e54626f
docs/reference: Add note about multiple exceptions when heap is locked.
andrewleech Jun 1, 2020
02cc446
mimxrt: Add initial impl of machine.LED class, and basic pin support.
alphaFred Apr 12, 2020
e6881f0
extmod/modbluetooth: Make modbluetooth event not a bitfield.
jimmo May 11, 2020
6a3c89d
extmod/modbluetooth: Add discover complete events for svc/char/desc.
jimmo May 11, 2020
919d640
extmod/modbluetooth: Allow discovery of svc/char by uuid.
jimmo May 12, 2020
c07ea3e
extmod/modbluetooth: Implement read done event.
jimmo Jun 2, 2020
9902ce1
tests/multi_bluetooth: Update to work with new BLE events.
jimmo May 13, 2020
9708fe8
docs/library: Update ubluetooth for new events and discover by uuid.
jimmo May 13, 2020
1cad63c
extmod/modbluetooth: Ensure status=0 always on success.
jimmo May 19, 2020
8b7ae4e
extmod/modbluetooth: Support bigger characteristic values.
jimmo May 28, 2020
834b482
examples/bluetooth: Fix incorrect value of BR/EDR flag in advertising.
jxltom May 9, 2020
596fb73
qemu-arm: Support building in debug mode with DEBUG=1.
dpgeorge Jun 2, 2020
621f40b
esp32/mpthreadport: Fix calculation of thread stack size.
dpgeorge Jun 2, 2020
eeca2c3
github: Add GitHub action to build docs.
dlech Jun 3, 2020
1e6d18c
docs: Fix Sphinx 3.x warnings, and enable warnings-as-errors on build.
dlech Jun 4, 2020
6ac05af
mimxrt/tusb_config.h: Preliminary fix for TinyUSB HS endpoint overflow.
alphaFred Jun 7, 2020
bd06c69
py/dynruntime.h: Make mp_obj_str_get_str raise if arg not a str/bytes.
dpgeorge Jun 8, 2020
51fd6c9
extmod/ure: Use single function for match/search/sub.
stinos Jun 3, 2020
8e8dcdd
esp32: Update IDF v4.0 supported hash to v4.0.1.
jimmo Apr 1, 2020
e0d539f
mimxrt/boards: Enable LED class for MIMXRT1060_EVK board.
Albort12138 Jun 7, 2020
29e2586
mimxrt/boards: Integrate support for MIMXRT1020_EVK board.
alphaFred Apr 14, 2020
28370c0
py/objtype: Add __dict__ attribute for class objects.
pi-anl Jun 10, 2020
95cbe6b
py/objtype: Use mp_obj_dict_copy() for creating obj.__dict__ attribute.
pi-anl Jun 10, 2020
f3062b5
py/obj.h: Clarify comments about mp_map_t is_fixed and is_ordered.
dpgeorge Jun 9, 2020
a4c96fb
extmod/uasyncio: Add asyncio.wait_for_ms function.
dpgeorge Jun 5, 2020
3705bc4
extmod/modbluetooth: Register default GATT service and fix esp32 init.
jp-96 Jun 8, 2020
c6fd6a0
examples/bluetooth: Fix event code in ble_temperature_central.py.
jimmo Jun 5, 2020
3f77f2c
unix/btstack_usb: Allow choosing adaptor via environment variable.
jimmo Jun 5, 2020
00c3e21
tests/run-multitests.py: Allow passing unique env vars to each instance.
jimmo Jun 5, 2020
2934e41
docs/esp8266: Add quickref documentation for UART on esp8266.
nickcrabtree Jun 7, 2020
05e5d41
mimxrt/boards: Set __heap_size__ to 0 in MIMXRT1011.ld.
Albort12138 Jun 10, 2020
38b4f15
zephyr: Fix and rename stacks_analyze function in zephyr module.
MaureenHelm May 2, 2020
8b061f2
zephyr: Fix floating point configuration.
MaureenHelm May 2, 2020
db02cb0
zephyr: Update for refactored zephyr device structures.
MaureenHelm May 14, 2020
6aff27a
zephyr: Update to new zephyr timeout API.
MaureenHelm May 14, 2020
4837b1c
zephyr: Convert DT_FLASH_AREA usages to new dts macros.
MaureenHelm Jun 9, 2020
b1651ff
zephyr: Increase minimum required cmake version to 3.13.1.
MaureenHelm Jun 9, 2020
1ae8618
zephyr: Use cmake find_package to locate zephyr.
MaureenHelm Jun 9, 2020
2b99003
stm32/boards/STM32F769DISC: Use macro instead of const for flash size.
dpgeorge Jun 12, 2020
5093597
top: Update contribution and commit guide to include optional sign-off.
dpgeorge Jun 12, 2020
bd7c92e
tools/uncrustify.cfg: Remove deprecated sp_word_brace option.
dlech Jun 13, 2020
ecd7826
tools/codeformat.py: Remove sizeof fixup.
dlech Jun 13, 2020
b4d0d7b
tools/uncrustify: Update config for v0.71.0.
dlech Jun 14, 2020
0fd91e3
py/compile: Convert scope test to SCOPE_IS_COMP_LIKE macro.
dpgeorge Jun 16, 2020
1783950
py/compile: Implement PEP 572, assignment expressions with := operator.
dpgeorge Jun 16, 2020
2c5993c
ports: Disable MICROPY_PY_ASSIGN_EXPR in bare-arm and minimal ports.
dpgeorge Jun 16, 2020
e0fe8ea
tests/basics: Add tests for assignment operator :=.
dpgeorge Jun 16, 2020
a3c89cf
tests/cpydiff: Add CPy diff test for assignment expression behaviour.
dpgeorge Jun 16, 2020
131b0de
py/grammar.h: Consolidate duplicate sub-rules for :test and =test.
dpgeorge Jun 16, 2020
f2e267d
py/compile: Implement PEP 526, syntax for variable annotations.
dpgeorge Jun 16, 2020
a51eef4
tests/basics: Add tests for variable annotations.
dpgeorge Jun 16, 2020
1678f41
esp32/esp32_rmt: Extend RMT to support carrier feature.
Jun 8, 2020
da99e0f
stm32/factoryreset: Provide empty create-FS function when FAT disabled.
dpgeorge Jun 16, 2020
289be6b
stm32/usb: Add support for 2xVCP on L0, L432 and WB MCUs.
dpgeorge Jun 16, 2020
4b5dd01
stm32/rfcore: Leave txpower level as default when initialising rfcore.
dpgeorge Jun 16, 2020
8d71cc2
nrf/bluetooth: Use MP_ERROR_TEXT for all error messages.
glennrub Jun 11, 2020
cba3e25
travis: Change nrf pca10056 board to build with soft-device enabled.
dpgeorge Jun 17, 2020
c521c17
github: Add FUNDING.yml file pointing to micropython GitHub sponsorship.
dpgeorge Jun 17, 2020
ce02d5e
stm32/boards/NUCLEO_WB55: Add more CPU pins and aliases to SW1/2/3.
dpgeorge Jun 18, 2020
026fda6
tools/codeformat.py: Include extmod/{btstack,nimble} in code formatting.
dpgeorge Jun 18, 2020
77ed6f6
tools/uncrustify: Enable more opts to remove space between func and '('.
dlech Jun 16, 2020
3a9d948
esp32/esp32_rmt: Call rmt_driver_install before rmt_config.
jonathanhogg Jun 18, 2020
6164c7e
py/misc.h: Add missing semi-colon in mp_float_union_t for big-endian.
dpgeorge Jun 18, 2020
f1ba2c9
qemu-arm/Makefile: Add CFLAGS_EXTRA to CFLAGS.
dpgeorge Jun 18, 2020
ac15be9
travis: Build qemu-arm with MP_ENDIANNESS_BIG=1 to test bigendian build.
dpgeorge Jun 18, 2020
5f3c2f1
stm32/irq: Clean up irq.h so it does not depend on core uPy defines.
dpgeorge Jun 18, 2020
ce32669
stm32/powerctrlboot: Include irq.h to get definitions of IRQ priorities.
dpgeorge Jun 18, 2020
afd47d5
stm32/flash: Make flash C-API reusable, and funcs return an error code.
dpgeorge Jun 18, 2020
4c8a68d
stm32/i2cslave: Add support for WB MCUs.
dpgeorge Jun 18, 2020
736daeb
stm32/flash: Add flash_is_valid_addr, and extend sectors for 2MB F7.
dpgeorge Jun 18, 2020
a8778c8
stm32/mboot: Use flash routines from main stm32 code rather than custom.
dpgeorge Jun 18, 2020
8675858
stm32/mboot: Use CMSIS system source code for SystemInit function.
dpgeorge Jun 18, 2020
7057283
stm32/mboot: Add support for using mboot with WB MCUs.
dpgeorge Jun 18, 2020
6f40e6e
stm32/boards: Add build-time option for NUCLEO_WB55 to use mboot.
dpgeorge Jun 18, 2020
13ad1a4
travis: In stm32 job, build mboot for NUCLEO_WB55.
dpgeorge Jun 18, 2020
81a7293
stm32/mboot: Set VTOR on start up to ensure it has the correct value.
dpgeorge Jun 23, 2020
b4dc4c5
stm32/mboot: Use additional CFLAGS to compile string0.c.
dpgeorge Jun 23, 2020
456a3ab
py/obj.h: Add public mp_obj_is_dict_or_ordereddict() helper macro.
dpgeorge Jun 21, 2020
7dd480a
extmod/moductypes: Use mp_obj_is_dict_or_ordereddict to simplify code.
dpgeorge Jun 21, 2020
457fdf6
py/objtype: Support passing in an OrderedDict to type() as the locals.
dpgeorge Jun 21, 2020
76faeed
tools/makemanifest.py: Support freezing a subdirectory recursively.
dpgeorge Jun 23, 2020
0c77668
extmod/vfs_lfs: Fix littlefs bindings to build in nan-box mode.
dpgeorge Jun 25, 2020
eb9850e
stm32/mpconfigport.h: Enable PY_IO_FILEIO when any VFS is enabled.
dpgeorge Jun 25, 2020
c5af321
stm32/timer: Support TIM1 on WB MCUs.
dpgeorge Jun 25, 2020
717b507
stm32/boards: Enable LFS2 on PYBD_SF3 and PYBD_SF6.
dpgeorge Jun 25, 2020
763bd44
stm32/mboot: Don't search for firmware on FS, just attempt to open it.
dpgeorge Jun 23, 2020
390f329
stm32/mboot: Decouple stream, filesystem and top-level loading code.
dpgeorge Jun 23, 2020
67fd58b
stm32/mboot: Add support for littlefs.
dpgeorge Jun 23, 2020
0a8ce0d
stm32/mboot: Update README to describe WB and littlefs support.
dpgeorge Jun 26, 2020
6475cdb
travis: Build mboot for PYBV10 with LFS2 enabled in stm32 job.
dpgeorge Jun 26, 2020
137df81
stm32/i2cslave: Pass I2C instance to callbacks to support multi I2Cs.
dpgeorge Jun 26, 2020
aa26fe6
py/asm: Add funcs/macros to emit machine code for logical-shift-right.
dpgeorge Jun 25, 2020
b3b8706
py/asm: Add condition codes for signed comparisons.
dpgeorge Jun 26, 2020
41fa8b5
py/emitnative: Implement binary operations for viper uint operands.
dpgeorge Jun 26, 2020
9f911d8
py/objcomplex: Add mp_obj_get_complex_maybe for use in complex bin-op.
dpgeorge Jun 22, 2020
e4fcd21
stm32/usbd_cdc_interface: Remove full==size-1 limitation on tx ringbuf.
pi-anl Jun 26, 2020
048a1d6
stm32/timer: Properly initialise timer deadtime/brk on WB MCUs.
dpgeorge Jun 29, 2020
4d6f60d
tools/pydfu.py: Respect longer timeouts requested by DFU device/mboot.
pi-anl Mar 5, 2020
8bbaa20
stm32/mboot: Implement DFU mass erase.
pi-anl Mar 5, 2020
4000681
stm32/flash: Update flash_get_sector_info to return -1 on invalid addr.
pi-anl Jun 30, 2020
65a7e00
stm32/mboot: Add DFU logic to respond to DFU_GETSTATE request.
dpgeorge Jun 30, 2020
cb9aafb
docs/library: Clarify that the arg to esp.deepsleep is in microseconds.
victorhook Jun 28, 2020
b572aa5
docs/esp32: Add info about PWM duty cycle range to esp32 quickref.
spacemanspiff2007 Jun 25, 2020
9d5edb3
lib/utils: Protect all of mpirq.c with MICROPY_ENABLE_SCHEDULER.
dpgeorge Jun 14, 2020
f84145b
zephyr: Implement machine.Pin.irq() for setting callbacks on pin change.
dpgeorge Jun 14, 2020
41b7734
zephyr/make-minimal: Disable FAT and LFS2 options to make it build.
dpgeorge Jun 14, 2020
d06ae1d
py/obj.h: Make existing MP_TYPE_FLAG_xxx macros sequential.
dpgeorge Jun 30, 2020
332d833
py: Rework mp_convert_member_lookup to properly handle built-ins.
dpgeorge Jun 27, 2020
95ec0de
stm32/mboot: Remove the use of timeout in DFU_GETSTATUS.
pi-anl Jul 1, 2020
494bcad
stm32/mboot: Disable polling mode by default and use IRQ mode instead.
pi-anl Jul 1, 2020
07f181a
Revert "tools/pydfu.py: Respect longer timeouts requested by DFU dev..."
pi-anl Jul 1, 2020
27abac9
unix: Make manifest selection match other ports.
jimmo Jun 9, 2020
4050281
unix: Enable uasyncio on dev variant.
jimmo Jun 9, 2020
9dfb4ae
nrf/bluetooth/ble_uart: Fix implicit declaration of function.
glennrub Jun 25, 2020
fc1f22a
nrf/bluetooth: Handle data length update request.
glennrub Jun 25, 2020
ab0c14d
nrf/bluetooth/ble_uart: Add mp_hal_stdio_poll function.
glennrub Jun 25, 2020
5996bf7
nrf/bluetooth/ble_uart: Fix random advertisement name.
glennrub Jun 25, 2020
f22f7b2
nrf/bluetooth/ble_uart: Swap end character on cooked strings.
glennrub Jun 25, 2020
c2317a3
nrf/Makefile: Disable ROM text compression when compiling for debug.
glennrub Jun 27, 2020
15574cd
nrf: Add support for time.ticks_xxx functions using RTC1.
hoihu Jul 2, 2020
59ed3bd
nrf: Enable nrf tick support on all boards by default.
hoihu Jul 2, 2020
f5dd46b
unix/variants: Enable VFS and all supported filesystems on dev variant.
dpgeorge Jul 2, 2020
8594389
stm32/fdcan: Use the right FIFO to calc element address in can_receive.
iabdalkader Jun 30, 2020
63b2eb2
stm32/fdcan: Use FDCAN_RXFxS_FxFL instead of hard-coded value.
iabdalkader Jun 30, 2020
d07073f
stm32/fdcan: Support maximum timeout of HAL_MAX_DELAY in can_receive.
iabdalkader Jun 30, 2020
c299cc9
stm32/pyb_can: Handle timeout arg for FDCAN in pyb_can_send.
iabdalkader Jun 30, 2020
b6146ca
extmod/nimble: Fix attr NULL ptr dereference in ble_gatt_attr_read_cb.
friebel Jul 5, 2020
f743bd3
nrf/boards: Add initial support for Actinius Icarus.
alextsam Jun 23, 2020
b776fe6
nrf/nrfx_config: Disable RTC2 for nRF9160 targets.
glennrub Jul 9, 2020
95d0d1c
nrf/boards: Enable RTCounter machine module for nrf9160 boards.
glennrub Jul 9, 2020
411e115
travis: Install newer toolchain for nrf job.
glennrub Jul 10, 2020
d9e8edc
travis: Add pca10090 build to nrf job.
glennrub Jul 10, 2020
486cb6d
nrf: Add board definition for nRF52840-MDK-USB-Dongle.
pi-mst May 18, 2020
342800c
travis: Change nrf pca10056 board to build with s140 SoftDevice.
glennrub Jul 16, 2020
5d0be97
unix: Make the MICROPY_xxx_ATOMIC_SECTION mutex recursive.
jimmo Jun 17, 2020
07aec46
examples/bluetooth: In ble_advertising.py, skip appearance if not set.
jimmo Jun 17, 2020
e152d0c
extmod/btstack: Schedule notify/indicate/write ops for bg completion.
jimmo Jun 16, 2020
89a95b7
examples/bluetooth: Add simple UART demo with central and peripheral.
jimmo Jun 17, 2020
b769884
docs/library: Add gatts_indicate() doc to ubluetooth.rst.
jimmo Jul 17, 2020
43ceada
extmod/modbluetooth: Ignore unused self_in in ble_gatts_indicate.
jimmo Jul 20, 2020
3c7ca20
extmod/modbluetooth: Fix so it builds in peripheral-only mode.
jimmo Jul 20, 2020
9d823a5
extmod/modbluetooth: Add event for "indicate acknowledgement".
jimmo Jul 20, 2020
c7f7c02
docs/library: For ubluetooth, add docs for _IRQ_GATTS_INDICATE_DONE.
jimmo Jul 20, 2020
9aa2140
extmod/modussl: Improve exception error messages.
tve Mar 27, 2020
98e5834
lib/libc: Add implementation of strncpy.
tve Jul 2, 2020
3e758ef
lib/mbedtls_errors: Add code to patch mbedtls for shortened error strs.
tve May 29, 2020
5264478
extmod/modussl_mbedtls: Integrate shorter error strings.
tve Jul 2, 2020
7dbef53
esp32/esp32_rmt: Properly fix looping behaviour of RMT.
jonathanhogg Jun 26, 2020
5f0e9d1
docs/library: Update documentation of esp32's RMT.
jonathanhogg Jul 3, 2020
76fefad
esp32/network_lan: Add support for IP101 PHY.
kennethryerson Apr 20, 2020
f80b1d8
lib/stm32lib: Update library for H7 v1.6.0 and WB v1.6.0.
dpgeorge Jul 19, 2020
895b1db
tests/basics: Split out memoryview slice-assign tests to separate file.
dpgeorge Jul 16, 2020
a853fff
py/obj.h: Fix mp_seq_replace_slice_no_grow to use memmove not memcpy.
dpgeorge Jul 16, 2020
27767aa
lib/libm_dbl: Add round.c source code.
v923z Feb 15, 2020
d9b7261
lib/libc: Fix string0's implementation of strncpy.
dpgeorge Jul 22, 2020
0a79e18
nrf: Split mpconfigport.h into multiple files.
glennrub Jul 19, 2020
caaaa2b
nrf: Enable more features for all targets.
glennrub Jul 19, 2020
cf9be20
docs/library: Update pyb.SPI init method to add descr about "ti" arg.
hlovatt Jul 2, 2020
4a7c273
docs/library: Update pyb.Timer to add missing args and defaults to init.
hlovatt Jul 2, 2020
47289f4
docs/library: Update pyb.UART to correct pyboard UART availability.
hlovatt Jul 3, 2020
fe7d479
docs/esp32: Fix machine.Timer quickref to specify HW timers.
nevercast Jul 19, 2020
37e1b5c
py/compile: Don't await __aiter__ special method in async-for.
jonathanhogg Jul 21, 2020
fd2ff86
stm32/usbdev: Fix calculation of SCSI LUN size with multiple LUNs.
dpgeorge Jul 22, 2020
441460d
extmod/uasyncio: Add StreamReader.readexactly(n) method.
dpgeorge Jul 25, 2020
952de5c
tools/makemanifest.py: Use errno.EEXIST instead of number 17.
dpgeorge Jul 26, 2020
0c0cef9
tests: Move .mpy import tests from import/ to micropython/ dir.
dpgeorge Jul 26, 2020
8da40ba
tests/micropython: Improve .mpy import tests to run on more targets.
dpgeorge Jul 26, 2020
9883d8e
py/persistentcode: Maintain root ptr list of imported native .mpy code.
dpgeorge Jul 27, 2020
b731bd0
tools/makemanifest.py: Print nicely formatted errors from mpy-cross.
dpgeorge Aug 8, 2020
60f5b94
extmod/vfs_reader: Fix mp_reader_new_file to open file in "rb" mode.
dpgeorge Aug 8, 2020
ac94e06
zephyr: Include storage/flash_map.h unconditionally.
MaureenHelm Aug 7, 2020
17689a7
travis: Add zephyr build to CI.
MaureenHelm Jul 27, 2020
e76c746
docs: Change `\*` to `*` in argument lists.
agniutkarsh Jul 11, 2020
8727c4e
stm32/pin_defs_stm32: Fix pin printing to show IN mode correctly.
davehylands Aug 11, 2020
60cf2c0
tools/pyboard.py: Replace eval() of received data with alternative.
mbuesch Aug 12, 2020
492cf34
tools/mpy-tool.py: Fix offset of line number info.
mmilata Aug 13, 2020
448319a
tools/makemanifest.py: Use os.makedirs to make path for generated files.
dpgeorge Aug 21, 2020
5f9b105
py/runtime: Fix builtin compile() in "single" mode so it prints exprs.
dpgeorge Aug 21, 2020
20948a3
tests/extmod: Add test for uasyncio.sleep of a negative time.
dpgeorge Aug 20, 2020
55c76ea
extmod/uasyncio: Truncate negative sleeps to 0.
dpgeorge Aug 20, 2020
9289935
unix/fatfs_port: Implement get_fattime.
dpgeorge Jul 28, 2020
badd351
lib/timeutils: Add helper functions to deal with nanosecs since 1970.
dpgeorge Aug 1, 2020
ee50a6e
py/mphal.h: Introduce mp_hal_time_ns and implement on various ports.
dpgeorge Aug 1, 2020
2acc087
extmod/vfs_lfs: Add mtime support to littlefs files.
dpgeorge Jul 28, 2020
3d9a7ed
extmod/btstack: Implement GAP scan duration_ms parameter.
jimmo Aug 14, 2020
0bc2c1c
extmod/modbluetooth: Fix race between READ_REQUEST and other IRQs.
jimmo Aug 17, 2020
a80a146
extmod/bluetooth: Support active scanning in BLE.gap_scan().
pi-anl Aug 14, 2020
5fb276d
tests/extmod: Make uasyncio_fair test more reliable by adjusting sleeps.
dpgeorge Aug 26, 2020
91c5d16
nrf/Makefile: Improve user C modules support.
rcolistete Aug 15, 2020
405893a
tests/run-tests: Use absolute paths where possible.
stinos Apr 8, 2020
0c3f9d5
tests/run-tests: Make test output directory configurable.
stinos Apr 7, 2020
cef678b
extmod/machine_i2c: Fix buffer overrun if 'addrsize' is bigger than 32.
mbuesch Aug 23, 2020
a93a378
zephyr/README: Update required Zephyr version and mention new features.
dpgeorge Aug 28, 2020
338b12d
LICENSE,docs: Update copyright year range to include 2020.
dpgeorge Aug 29, 2020
40d174a
stm32/powerctrl.h: Include stdbool.h to get definition of bool.
dpgeorge Aug 29, 2020
0c7354a
tests: Split out complex reverse-op tests to separate test file.
dpgeorge Aug 29, 2020
0665907
all: Update Python code to conform to latest black formatting.
dpgeorge Aug 29, 2020
d1995e5
extmod/modlwip: Fix error return for TCP recv when not connected.
dpgeorge Aug 30, 2020
836bca9
unix/variants: Fix fast and freedos variants so they build again.
dpgeorge Aug 30, 2020
40153b8
esp32/mphalport: Fix mp_hal_time_ns offset.
dpgeorge Aug 30, 2020
c70e599
extmod/vfs: Support larger integer range in VFS stat time fields.
dpgeorge Aug 31, 2020
0385b21
unix/modos: Support larger integer range in uos.stat fields.
dpgeorge Aug 31, 2020
2a72e90
extmod/vfs: Add option to use 1970 as Epoch.
dpgeorge Aug 31, 2020
a909c21
unix/fatfs_port: Fix month offset in timestamp calculation.
dpgeorge Aug 31, 2020
0e6ef40
tests/extmod: Add tests for verifying FAT and littlefs mtime values.
dpgeorge Aug 31, 2020
b0932fc
all: Bump version to 1.13.
dpgeorge Sep 2, 2020
f0bb26d
Merge MicroPython 1.13 into CircuitPython
tannewt May 4, 2021
92d63b4
tests: Restore memoryview1 test to micropython version
jepler May 5, 2021
2c0664e
slice: restore ability to construct a slice
jepler May 5, 2021
0bef554
Fix framebuf_subclass test
jepler May 5, 2021
d0f6b32
Update bytecode
jepler May 5, 2021
c174bc4
Update to match our bytecode style
jepler May 5, 2021
14e0bdb
Move mp_get_stream non-inline
jepler May 5, 2021
c3ce2ba
runtime: Remove unneeded includes
jepler May 5, 2021
8fae7d2
runtime.c: Fix reading properties
jepler May 5, 2021
cdf220b
Fix ure tests
jepler May 5, 2021
f21c2bd
Update native skips to match micropython
jepler May 5, 2021
607148b
Add frzqstr to coverage build
jepler May 5, 2021
4054860
Name the variant like micropython does
jepler May 5, 2021
68d4682
compile: Reserve labels for native await
jepler May 5, 2021
2bcfe21
Add natmod examples
jepler May 5, 2021
eb4cf7a
Add natmod "features0" example
jepler May 5, 2021
716a82b
set the coroutine generator for native generators
jepler May 5, 2021
3dad2cb
Merge pull request #9 from jepler/1.13_test_fixes
tannewt May 5, 2021
c34ddf1
Switch from recommonmark to myst-parser
tannewt May 5, 2021
d8701e5
Update binary path
tannewt May 5, 2021
7f2f8e2
Turn off CPython warnings in tests
tannewt May 6, 2021
3fda0c0
Fix board builds and use MP_ERROR_TEXT in py and extmod
tannewt May 6, 2021
59c2787
Fix esp32s2 build
tannewt May 6, 2021
71d2536
Build fixes thanks to jepler
tannewt May 6, 2021
42f4065
Merge remote-tracking branch 'adafruit/main' into merge_1.13
tannewt May 6, 2021
b19c1a3
mpy M -> C
tannewt May 6, 2021
cebb10d
Fixes from review
tannewt May 6, 2021
5c73683
Fix esp32s2 builds after AP changes
tannewt May 7, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
23 changes: 7 additions & 16 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,27 +71,18 @@ jobs:
run: make -C mpy-cross -j2
- name: Build unix port
run: |
make -C ports/unix deplibs -j2
make -C ports/unix -j2
make -C ports/unix coverage -j2
make -C ports/unix VARIANT=coverage -j2
- name: Test all
run: MICROPY_CPYTHON3=python3.8 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1
run: MICROPY_CPYTHON3=python3.8 MICROPY_MICROPYTHON=../ports/unix/micropython-coverage ./run-tests -j1
working-directory: tests
- name: Print failure info
run: |
shopt -s nullglob;
for exp in *.exp;
do testbase=$(basename $exp .exp);
echo -e "\nFAILURE $testbase";
diff -u $testbase.exp $testbase.out;
done
working-directory: tests
if: failure()
- name: Native Tests
run: MICROPY_CPYTHON3=python3.8 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1 --emit native
run: MICROPY_CPYTHON3=python3.8 MICROPY_MICROPYTHON=../ports/unix/micropython-coverage ./run-tests -j1 --emit native
working-directory: tests
- name: mpy Tests
run: MICROPY_CPYTHON3=python3.8 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1 --via-mpy -d basics float
run: MICROPY_CPYTHON3=python3.8 MICROPY_MICROPYTHON=../ports/unix/micropython-coverage ./run-tests -j1 --mpy-cross-flags='-mcache-lookup-bc' --via-mpy -d basics float micropython
working-directory: tests
- name: Native mpy Tests
run: MICROPY_CPYTHON3=python3.8 MICROPY_MICROPYTHON=../ports/unix/micropython-coverage ./run-tests -j1 --mpy-cross-flags='-mcache-lookup-bc' --via-mpy --emit native -d basics float micropython
working-directory: tests
- name: Build mpy-cross.static-aarch64
run: make -C mpy-cross -j2 -f Makefile.static-aarch64
Expand Down
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ build-*/

# Test failure outputs
######################
tests/*.exp
tests/*.out
tests/results/*

# Python cache files
######################
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2013-2019 Damien P. George
Copyright (c) 2013-2020 Damien P. George

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

# You can set these variables from the command line.
PYTHON = python3
SPHINXOPTS =
SPHINXOPTS = -W --keep-going
SPHINXBUILD = sphinx-build
PAPER =
# path to build the generated docs
Expand Down Expand Up @@ -223,7 +223,7 @@ pseudoxml:
all-source:

locale/circuitpython.pot: all-source
find $(TRANSLATE_SOURCES) -type d \( $(TRANSLATE_SOURCES_EXC) \) -prune -o -type f \( -iname "*.c" -o -iname "*.h" \) -print | (LC_ALL=C sort) | xgettext -f- -L C -s --add-location=file --keyword=translate -o - | sed -e '/"POT-Creation-Date: /d' > $@
find $(TRANSLATE_SOURCES) -type d \( $(TRANSLATE_SOURCES_EXC) \) -prune -o -type f \( -iname "*.c" -o -iname "*.h" \) -print | (LC_ALL=C sort) | xgettext -f- -L C -s --add-location=file --keyword=translate --keyword=MP_ERROR_TEXT -o - | sed -e '/"POT-Creation-Date: /d' > $@

# Historically, `make translate` updated the .pot file and ran msgmerge.
# However, this was a frequent source of merge conflicts. Weblate can perform
Expand All @@ -248,7 +248,7 @@ merge-translate:

.PHONY: check-translate
check-translate:
find $(TRANSLATE_SOURCES) -type d \( $(TRANSLATE_SOURCES_EXC) \) -prune -o -type f \( -iname "*.c" -o -iname "*.h" \) -print | (LC_ALL=C sort) | xgettext -f- -L C -s --add-location=file --keyword=translate -o circuitpython.pot.tmp -p locale
find $(TRANSLATE_SOURCES) -type d \( $(TRANSLATE_SOURCES_EXC) \) -prune -o -type f \( -iname "*.c" -o -iname "*.h" \) -print | (LC_ALL=C sort) | xgettext -f- -L C -s --add-location=file --keyword=translate --keyword=MP_ERROR_TEXT -o circuitpython.pot.tmp -p locale
$(PYTHON) tools/check_translations.py locale/circuitpython.pot.tmp locale/circuitpython.pot; status=$$?; rm -f locale/circuitpython.pot.tmp; exit $$status

stubs:
Expand Down
4 changes: 2 additions & 2 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import urllib.parse
import time

import recommonmark
from sphinx.transforms import SphinxTransform
from docutils import nodes
from sphinx import addnodes
Expand Down Expand Up @@ -68,8 +67,9 @@
'sphinx.ext.intersphinx',
'sphinx.ext.todo',
'sphinx.ext.coverage',
'sphinx_search.extension',
'rstjinja',
'recommonmark',
'myst_parser',
]

# Add any paths that contain templates here, relative to this directory.
Expand Down
8 changes: 4 additions & 4 deletions docs/design_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -587,10 +587,10 @@ object instead of the pins themselves. This allows the calling code to provide
any object with the appropriate methods such as an I2C expansion board.

Another example is to expect a :py:class:`~digitalio.DigitalInOut` for a pin to
toggle instead of a :py:class:`~microcontroller.Pin` from `board`. Taking in the
:py:class:`~microcontroller.Pin` object alone would limit the driver to pins on
the actual microcontroller instead of pins provided by another driver such as an
IO expander.
toggle instead of a :py:class:`~microcontroller.Pin` from :py:mod:`board`.
Taking in the :py:class:`~microcontroller.Pin` object alone would limit the
driver to pins on the actual microcontroller instead of pins provided by another
driver such as an IO expander.

Lots of small modules
--------------------------------------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Full Table of Contents
:caption: MicroPython specific

library/index.rst
reference/glossary.rst

.. toctree::
:maxdepth: 1
Expand Down
4 changes: 2 additions & 2 deletions docs/library/btree.rst
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ Example::
Functions
---------

.. function:: open(stream, \*, flags=0, pagesize=0, cachesize=0, minkeypage=0)
.. function:: open(stream, *, flags=0, pagesize=0, cachesize=0, minkeypage=0)

Open a database from a random-access ``stream`` (like an open file). All
other parameters are optional and keyword-only, and allow to tweak advanced
Expand Down Expand Up @@ -118,7 +118,7 @@ Methods
Flush any data in cache to the underlying stream.

.. method:: btree.__getitem__(key)
btree.get(key, default=None)
btree.get(key, default=None, /)
btree.__setitem__(key, val)
btree.__detitem__(key)
btree.__contains__(key)
Expand Down
16 changes: 9 additions & 7 deletions docs/library/errno.rst
Original file line number Diff line number Diff line change
@@ -1,32 +1,34 @@
:mod:`errno` -- system error codes
:mod:`uerrno` -- system error codes
tannewt marked this conversation as resolved.
Show resolved Hide resolved
===================================

.. module:: errno
.. module:: uerrno
tannewt marked this conversation as resolved.
Show resolved Hide resolved
:synopsis: system error codes

|see_cpython_module| :mod:`cpython:errno`.
|see_cpython_module| :mod:`python:errno`.
tannewt marked this conversation as resolved.
Show resolved Hide resolved

This module provides access to symbolic error codes for `OSError` exception.
A particular inventory of codes depends on :term:`MicroPython port`.

Constants
---------

.. data:: EEXIST, EAGAIN, etc.

Error codes, based on ANSI C/POSIX standard. All error codes start with
"E". Errors are usually accessible as ``exc.args[0]``
"E". As mentioned above, inventory of the codes depends on
:term:`MicroPython port`. Errors are usually accessible as ``exc.args[0]``
where ``exc`` is an instance of `OSError`. Usage example::

try:
os.mkdir("my_dir")
uos.mkdir("my_dir")
tannewt marked this conversation as resolved.
Show resolved Hide resolved
except OSError as exc:
if exc.args[0] == errno.EEXIST:
if exc.args[0] == uerrno.EEXIST:
tannewt marked this conversation as resolved.
Show resolved Hide resolved
print("Directory already exists")

.. data:: errorcode

Dictionary mapping numeric error codes to strings with symbolic error
code (see above)::

>>> print(errno.errorcode[uerrno.EEXIST])
>>> print(uerrno.errorcode[uerrno.EEXIST])
tannewt marked this conversation as resolved.
Show resolved Hide resolved
EEXIST
8 changes: 4 additions & 4 deletions docs/library/framebuf.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
:mod:`framebuf` --- Frame buffer manipulation
:mod:`framebuf` --- frame buffer manipulation
=============================================

.. include:: ../templates/unsupported_in_circuitpython.inc
Expand Down Expand Up @@ -30,7 +30,7 @@ For example::
Constructors
------------

.. class:: FrameBuffer(buffer, width, height, format, stride=width)
.. class:: FrameBuffer(buffer, width, height, format, stride=width, /)

Construct a FrameBuffer object. The parameters are:

Expand Down Expand Up @@ -132,7 +132,7 @@ Constants

Monochrome (1-bit) color format
This defines a mapping where the bits in a byte are horizontally mapped.
Each byte occupies 8 horizontal pixels with bit 0 being the leftmost.
Each byte occupies 8 horizontal pixels with bit 7 being the leftmost.
Subsequent bytes appear at successive horizontal locations until the
rightmost edge is reached. Further bytes are rendered on the next row, one
pixel lower.
Expand All @@ -141,7 +141,7 @@ Constants

Monochrome (1-bit) color format
This defines a mapping where the bits in a byte are horizontally mapped.
Each byte occupies 8 horizontal pixels with bit 7 being the leftmost.
Each byte occupies 8 horizontal pixels with bit 0 being the leftmost.
Subsequent bytes appear at successive horizontal locations until the
rightmost edge is reached. Further bytes are rendered on the next row, one
pixel lower.
Expand Down
1 change: 1 addition & 0 deletions docs/library/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ with the ``u`` prefix dropped:
json.rst
re.rst
sys.rst
uasyncio.rst
uctypes.rst
uselect.rst
uzlib.rst
Expand Down
9 changes: 9 additions & 0 deletions docs/library/micropython.rst
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,26 @@ Functions

.. function:: heap_lock()
.. function:: heap_unlock()
.. function:: heap_locked()

Lock or unlock the heap. When locked no memory allocation can occur and a
`MemoryError` will be raised if any heap allocation is attempted.
`heap_locked()` returns a true value if the heap is currently locked.

These functions can be nested, ie `heap_lock()` can be called multiple times
in a row and the lock-depth will increase, and then `heap_unlock()` must be
called the same number of times to make the heap available again.

Both `heap_unlock()` and `heap_locked()` return the current lock depth
(after unlocking for the former) as a non-negative integer, with 0 meaning
the heap is not locked.

If the REPL becomes active with the heap locked then it will be forcefully
unlocked.

Note: `heap_locked()` is not enabled on most ports by default,
requires ``MICROPY_PY_MICROPYTHON_HEAP_LOCKED``.

.. function:: kbd_intr(chr)

Set the character that will raise a `KeyboardInterrupt` exception. By
Expand Down
15 changes: 8 additions & 7 deletions docs/library/re.rst
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ Functions
string for first position which matches regex (which still may be
0 if regex is anchored).

.. function:: sub(regex_str, replace, string, count=0, flags=0)
.. function:: sub(regex_str, replace, string, count=0, flags=0, /)

Compile *regex_str* and search for it in *string*, replacing all matches
with *replace*, and returning the new string.
Expand All @@ -138,11 +138,12 @@ Functions
If *count* is specified and non-zero then substitution will stop after
this many substitutions are made. The *flags* argument is ignored.

Note: availability of this function depends on MicroPython port.
Note: availability of this function depends on :term:`MicroPython port`.

.. data:: DEBUG

Flag value, display debug information about compiled expression.
(Availability depends on :term:`MicroPython port`.)


.. _regex:
Expand All @@ -155,14 +156,14 @@ Compiled regular expression. Instances of this class are created using

.. method:: regex.match(string)
regex.search(string)
regex.sub(replace, string, count=0, flags=0)
regex.sub(replace, string, count=0, flags=0, /)

Similar to the module-level functions :meth:`match`, :meth:`search`
and :meth:`sub`.
Using methods is (much) more efficient if the same regex is applied to
multiple strings.

.. method:: regex.split(string, max_split=-1)
.. method:: regex.split(string, max_split=-1, /)

Split a *string* using regex. If *max_split* is given, it specifies
maximum number of splits to perform. Returns list of strings (there
Expand All @@ -183,7 +184,7 @@ to the replacement function in `sub()`.

Return a tuple containing all the substrings of the groups of the match.

Note: availability of this method depends on MicroPython port.
Note: availability of this method depends on :term:`MicroPython port`.

.. method:: match.start([index])
match.end([index])
Expand All @@ -192,10 +193,10 @@ to the replacement function in `sub()`.
substring group that was matched. *index* defaults to the entire
group, otherwise it will select a group.

Note: availability of these methods depends on MicroPython port.
Note: availability of these methods depends on :term:`MicroPython port`.

.. method:: match.span([index])

Returns the 2-tuple ``(match.start(index), match.end(index))``.

Note: availability of this method depends on MicroPython port.
Note: availability of this method depends on :term:`MicroPython port`.
2 changes: 1 addition & 1 deletion docs/library/sys.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
Functions
---------

.. function:: exit(retval=0)
.. function:: exit(retval=0, /)

Terminate current program with a given exit code. Underlyingly, this
function raise as `SystemExit` exception. If an argument is given, its
Expand Down
Loading