Skip to content

Merge from MicroPython v1.20.0 #8481

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

Merged
merged 1,185 commits into from
Oct 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1185 commits
Select commit Hold shift + click to select a range
8b3f1d4
stm32/powerctrlboot: Provide custom SystemInit for WB55.
dpgeorge Mar 6, 2023
211859b
tests/run-multitests.py: Add ability to test instance over reboot.
pi-anl Jun 28, 2022
0359aac
tests/multi_bluetooth: Add bluetooth multi-test for deepsleep.
pi-anl Mar 7, 2022
a234aa4
stm32/powerctrl: Don't compile WB helpers on WL MCUs.
dpgeorge Mar 8, 2023
8307046
stm32/boards: Include "senml" in manifest for ARDUINO boards.
iabdalkader Mar 8, 2023
dc2186c
rp2/boards/ARDUINO_NANO_RP2040_CONNECT: Include "senml" in manifest.
iabdalkader Mar 8, 2023
673957b
rp2/modrp2: Support reading the BOOTSEL button on the Pico board.
GitHub30 Aug 30, 2022
f80d040
rp2/modrp2: Disable other core, shorten delay to 8us in bootsel_button.
DavidEGrayson Mar 3, 2023
c80e7c1
rp2: Allocate GC heap from unused RAM.
cpottle9 Mar 7, 2023
7c1584a
py/compile: Fix scope of assignment expression target in comprehensions.
dpgeorge Mar 2, 2023
b9dad0a
stm32: Remove commented-out printf's and debugging code.
dpgeorge Mar 9, 2023
b981e37
stm32/main: Use mp_printf instead of printf for MPY start-up messages.
dpgeorge Mar 9, 2023
98937dc
stm32/i2c: Return error code and raise exception if I2C init fails.
dpgeorge Mar 9, 2023
6c8b19c
stm32/spi: Return error code and raise exception if SPI init fails.
dpgeorge Mar 9, 2023
f6a35f7
stm32/modmachine: Make machine.info print using mp_printf.
dpgeorge Mar 9, 2023
f43c4df
stm32/extint: Make ExtInt.regs print using mp_printf.
dpgeorge Mar 9, 2023
067c7cd
stm32/pin: Make pin_find debug output use mp_printf.
dpgeorge Mar 9, 2023
b336b6b
stm32/pybthread: Make pyb_thread_dump take a printer as its argument.
dpgeorge Mar 9, 2023
cf43df4
nrf/modules/machine/pwm: Add paramter checks and error messages.
robert-hh Mar 4, 2023
a1f838c
nrf/modules/machine/pwm: Use extmod/machine_pwm.c for PWM module.
robert-hh Mar 4, 2023
e3b8778
nrf/modules/machine/soft_pwm: Add PWM for nrf51x boards using soft PWM.
robert-hh Mar 5, 2023
ed1f42c
nrf/modules/machine/pwm: Support using all 4 channels of a PWM module.
robert-hh Mar 8, 2023
f450e94
ports: Rename remaining "Micro Python" to "MicroPython".
dpgeorge Mar 9, 2023
b3c8ab3
py/gc: Make gc_dump_info/gc_dump_alloc_table take a printer as argument.
dpgeorge Mar 9, 2023
78dc2db
py/mpconfig: Provide config option for internal printf printer.
dpgeorge Mar 9, 2023
f3a596d
py/builtinimport: Fix unix port build with external imports disabled.
laurensvalk Mar 9, 2023
4376c96
all: Fix Python comparison to None and True, and use "not in".
cclauss Mar 8, 2023
668a7bd
py/makeversionhdr.py: Always add micro to version string even if it's 0.
dpgeorge Mar 10, 2023
416707e
esp32/machine_pin: Use const for size of machine_pin_irq_handler array.
IhorNehrutsa Oct 31, 2022
d5c45a8
embed: Fix arguments to mp_raw_code_load_mem.
pmendham Mar 12, 2023
05bb260
samd: Always provide the machine.RTC class.
robert-hh Mar 10, 2023
fa8ebb1
py/obj: Add MP_NOINLINE to mp_obj_malloc_helper.
dlech Mar 17, 2023
44ec57f
examples/usercmodule/cexample: Use mp_obj_malloc().
dlech Mar 17, 2023
a197823
ports: Fix MCU tags in Arduino board.json files.
iabdalkader Mar 13, 2023
42511b5
stm32/boards/NUCLEO_H743ZI2: Fix MCU tag in board.json file.
dpgeorge Mar 20, 2023
7ea192a
nrf/modules/machine/uart: Add timeout keyword options and "any" method.
robert-hh Sep 12, 2022
2cd3a7b
nrf/nrfx_config: Use the UARTE definitions and drivers for the NRF52xx.
robert-hh Mar 19, 2023
3bbf2ef
nrf/modules/machine: Use a dedicated function for machine.idle().
robert-hh Mar 19, 2023
a2b31f9
nrf/modules/machine: Support the freq=n argument for machine.I2C.
robert-hh Mar 10, 2023
be686e6
rp2: Allow disabling USB via MICROPY_HW_ENABLE_USBDEV config.
robert-hh Mar 18, 2023
711bac5
rp2/main: Keep UART REPL with DEBUG=1 and MICROPY_HW_ENABLE_UART_REPL=1.
robert-hh Mar 18, 2023
2e5f071
lib/stm32lib: Update library to get H7 v1.11.0.
dpgeorge Dec 21, 2022
3187e4c
stm32/mphalport: Update HAL version to 1.11.0 to match stm32lib.
dpgeorge Dec 21, 2022
13fcd84
stm32: Add support for STM32H723 MCUs.
dpgeorge Dec 20, 2022
d995c01
stm32/boards: Add ld and af.csv for H723.
dpgeorge Dec 20, 2022
051e290
stm32/boards/NUCLEO_H723ZG: Add new H723 board.
dpgeorge Dec 20, 2022
d677023
extmod/vfs_posix: Do not filter '..*' in ilistdir when filtering '..'.
jeremysrand Mar 17, 2023
5d4bfce
py/mpstate: Add mp_thread_is_main_thread() helper macro.
dpgeorge Dec 16, 2022
d54208a
py/scheduler: Implement VM abort flag and mp_sched_vm_abort().
dpgeorge Dec 16, 2022
b5ceb9d
tools/pyboard.py: Fix joining of path in filesystem_command.
dpgeorge Mar 22, 2023
b7ea90d
rp2/machine_uart: Fix setting of UART LCR parameters.
robert-hh Mar 8, 2023
c7923b1
stm32: Add support for USB on G0 MCUs.
dpgeorge Mar 21, 2023
3163847
stm32/mboot: Add support for G0 MCUs.
dpgeorge Mar 21, 2023
31e7a05
stm32/boards/NUCLEO_G0B1RE: Add config for USB and mboot.
dpgeorge Mar 21, 2023
af42634
tests/run-multitests.py: Support outputting test metrics.
dpgeorge Mar 17, 2023
6c76248
tests/multi_bluetooth: Use multitest.output_metric in BLE perf tests.
dpgeorge Mar 17, 2023
38e7b84
ports: Implement simple write polling for stdout.
dpgeorge Mar 21, 2023
283c1ba
py/obj: Fix spelling of staticmethod.
dlech Mar 28, 2023
a467214
tests/extmod/vfs_fat_ilistdir_del.py: Use 512-byte erase block size.
dpgeorge Mar 29, 2023
0a3600a
stm32/boards/ARDUINO_NICLA_VISION: Fix incorrect bootloader PID.
sebromero Mar 23, 2023
783ddfc
shared/tinyusb: Allow max USB descriptor string to be configured.
dpgeorge Apr 4, 2023
9f74ffb
tools/pyboard.py: Fix ESPxx boards hanging in bootloader after reset.
Josverl Mar 19, 2023
5652f1f
stm32/flash: Fix get_bank function for STM32H750.
jahr Mar 31, 2023
9025671
drivers/ninaw10: Fix ESP32 input-only pins.
iabdalkader Mar 26, 2023
3d46fe6
extmod/network_ninaw10: Check socket types when creating new sockets.
iabdalkader Mar 29, 2023
11b5ee0
extmod/network_cyw43: Fix setting hostname using config() method.
Mar 11, 2023
f34af3e
extmod/network_cyw43: Add support to get STA RSSI using status() method.
Mar 11, 2023
b4a0390
extmod/network_ninaw10: Add missing raw socket type to socket().
iabdalkader Apr 4, 2023
4085565
nrf/modules/machine/pwm: Fix resource conflict, and change id to device.
robert-hh Mar 11, 2023
a529e0e
nrf/nrfx_config: Use UARTE for nrf52xxx devices.
robert-hh Mar 21, 2023
eb6e514
nrf/modules/machine/uart: Prevent UART lock-up after a receive error.
robert-hh Mar 22, 2023
db4b416
mimxrt/pendsv: Clean up PendSV code.
iabdalkader Apr 4, 2023
c046b23
shared/runtime/pyexec: Don't allow Ctrl+C to interrupt frozen boot code.
DavidEGrayson Apr 4, 2023
cfd3b70
tools/manifestfile.py: Add support for publishing packages to PyPI.
jimmo Mar 31, 2023
a22136a
py/makeqstrdefs.py: Fix handling GreenHills C/C++ preprocessor output.
ar-cetitec Feb 21, 2023
ed5e359
mimxrt/Makefile: Fix internal flash configuration and build.
iabdalkader Feb 28, 2023
944b4c2
mimxrt/boards/MIMXRT1064_EVK: Fix board config to use internal flash.
iabdalkader Feb 28, 2023
8b72721
mimxrt/mpconfigport: Allow configuring different network interfaces.
iabdalkader Mar 7, 2023
bde222c
mimxrt/modmachine: Implement machine.bootloader().
iabdalkader Apr 9, 2023
0acc733
mimxrt: Fix the build for boards without ROM API.
iabdalkader Apr 12, 2023
b525f1c
tools/mpremote: Add ctrl-x as additonal mpremote disconnect shortcut.
brainelectronics Apr 5, 2023
bf3eb9d
rp2/machine_i2c: Add timeout parameter for machine.I2C().
DavidEGrayson Apr 13, 2023
ec1eecc
shared/tinyusb: Revert setting of CFG_TUD_CDC_EP_BUFSIZE to 256.
dpgeorge Apr 21, 2023
9e6885a
extmod/btstack: Switch to use hci_dump_init instead of hci_dump_open.
dpgeorge Apr 21, 2023
bc9ec1c
extmod/modbluetooth: Merge gatts_notify/indicate implementation.
jimmo Mar 2, 2023
256f47e
extmod/btstack: Fix indicate/notify queuing.
jimmo Mar 2, 2023
a6aa739
extmod/btstack: Include value handle in client read/write events.
jimmo Mar 2, 2023
dcb863e
tests/multi_bluetooth: Use time.sleep_ms instead of time.sleep.
jimmo Mar 8, 2023
a652695
tests/multi_bluetooth/ble_mtu: Split peripheral/central-initiated.
jimmo Mar 9, 2023
a2df439
extmod/btstack: Fix MTU handling.
jimmo Mar 9, 2023
f9b60a2
tests/multi_bluetooth/ble_subscribe: Use end_handle in desc discovery.
jimmo Mar 9, 2023
bb4ee06
extmod/btstack: Add support for CCCD to allow client subscriptions.
jimmo Mar 9, 2023
e6de665
extmod/nimble: Fix flags for descriptor registration.
jimmo Apr 11, 2023
80fc1c8
tests/multi_bluetooth: Add test for descriptors.
jimmo Apr 11, 2023
419017e
tests/multi_bluetooth/ble_characteristic.py: Add write-no-response.
jimmo Apr 11, 2023
201f5df
examples/bluetooth/ble_temperature_central.py: Remove service tuple.
jimmo Apr 11, 2023
ab31e23
tests/multi_bluetooth: Use multitest.broadcast instead of sleep.
jimmo Apr 12, 2023
a42a802
extmod/modbluetooth: Make all HCI transports trace in the same format.
jimmo Apr 13, 2023
67fb0be
extmod/btstack/modbluetooth_btstack: Add default services.
jimmo Apr 13, 2023
7ea06a3
esp32/esp32_rmt: Fix looping behaviour for RMT on ESP32-S3.
IcedRooibos Apr 13, 2023
fe4ac49
rp2/memmap_mp.ld: Allow a board to reserve memory for the C heap.
dpgeorge Apr 4, 2023
41a2415
lib/cyw43-driver: Update driver to latest version v1.0.0.
dpgeorge Apr 26, 2023
a14e79b
stm32/cyw43_configport: Provide cyw43_hal_pin_config_irq_falling func.
dpgeorge Apr 26, 2023
c27d686
lib/micropython-lib: Update submodule to latest.
dpgeorge Apr 26, 2023
57ca8b7
LICENSE,docs: Update copyright year range to include 2023.
dpgeorge Apr 26, 2023
294baf5
all: Bump version to 1.20.0.
dpgeorge Apr 26, 2023
2c0fa0f
initial merge from v1.20.0; just satisifying conflicts
dhalbert Sep 19, 2023
4d175ab
convert to MP_DEFINED_CONST_OBJ_TYPE()
dhalbert Sep 20, 2023
02e54e5
extmod: don't list files that don't exist in our tree
jepler Sep 20, 2023
b6722c3
update translations
jepler Sep 20, 2023
5eb7320
fix conditional compliation
jepler Sep 20, 2023
e05f79a
update pre-commit
jepler Sep 20, 2023
0c64275
Add header for PLACE_IN_ITCM
jepler Sep 20, 2023
36371fe
fix compiling gc.c
jepler Sep 20, 2023
dc277f0
fix HEAP_PTR macro
jepler Sep 20, 2023
aceb573
fix makeversionhdr
jepler Sep 20, 2023
73612ac
Fix availability of MP_ERROR_TEXT in misc.h
jepler Sep 20, 2023
649ea62
fix typo
jepler Sep 20, 2023
57c3dfd
fix missing define of NONSTANDARD_TYPECODES
jepler Sep 20, 2023
b499b7f
add missing type objects
jepler Sep 20, 2023
a9d6661
add and fix exception prototypes
jepler Sep 20, 2023
e4e58ac
add mp_obj_get_type_qstr
jepler Sep 20, 2023
fb2eb6a
add mp_obj_is_tuple_compatible
jepler Sep 20, 2023
cd3ca6b
fix array object name
jepler Sep 20, 2023
8e00c69
spelling
jepler Sep 20, 2023
d83285b
update translations
jepler Sep 20, 2023
a715f08
mpy-cross needs to know it's targeting circuitpython
jepler Sep 20, 2023
2b754b1
spelling
jepler Sep 20, 2023
e7668ed
spelling
jepler Sep 20, 2023
082b299
spelling
jepler Sep 20, 2023
37a881f
Get the type object for the constructor call
jepler Sep 20, 2023
f9fb567
fix CP vs MP differences in exception-throwing functions
jepler Sep 20, 2023
be62395
fix indentation
jepler Sep 20, 2023
680b94d
fix compile erors
jepler Sep 20, 2023
4ed939f
fix compile error
jepler Sep 20, 2023
ee51968
can't be static, is called from builtins
jepler Sep 20, 2023
9cedfc4
implemented as macro now
jepler Sep 20, 2023
7806044
string construction changed
jepler Sep 20, 2023
bb6d530
slots & macro moved to header
jepler Sep 20, 2023
6b8ee2c
remove old python style checking for "special accessors"
jepler Sep 20, 2023
37c8b0d
fix argument name
jepler Sep 20, 2023
c877035
fix conditional nesting
jepler Sep 20, 2023
1ab884a
fix compile errors
jepler Sep 20, 2023
e068ff7
fix compile errors, fix mp_raise prototypes
jepler Sep 20, 2023
76ef77a
fix exception chaining, preprocessor error
jepler Sep 20, 2023
51f4969
indentation
jepler Sep 20, 2023
5108c3a
whitespace
jepler Sep 20, 2023
6250cd2
fix mpy_ld
jepler Sep 20, 2023
2d5709a
spelling
jepler Sep 20, 2023
1c611f6
file not used any longer
jepler Sep 20, 2023
e7c74f2
add translation to mpy-cross
jepler Sep 20, 2023
f83a235
re-add mp_obj_exception_get_native
jepler Sep 20, 2023
a760794
re-add objtraceback.o
jepler Sep 20, 2023
7a38654
re-add translation make rules
jepler Sep 20, 2023
a00f2d8
array extend/append need extern linkage & right names
jepler Sep 20, 2023
10b95a1
add translate.h and linker.h includes back to runtime.h; remove linke…
dhalbert Sep 21, 2023
018baf7
Add micropython-lib
jepler Sep 22, 2023
9104654
makeqstrdata: ensure _lt and _gt qstrs are sorted early
jepler Sep 22, 2023
a285a33
Restore our defines for exception chaining
jepler Sep 22, 2023
5c0f8f7
fixes for circuitpython nativeglue
jepler Sep 22, 2023
60fa260
build fixes for persistent code
jepler Sep 22, 2023
f77e0b8
fix comment marker
jepler Sep 22, 2023
9dda69c
add missing declarations that got lost in the merge
jepler Sep 22, 2023
4902b76
guard this file against being included twice
jepler Sep 22, 2023
e1fffe6
split heap doesn't build yet so don't test it
jepler Sep 22, 2023
6b5c7b6
fix const vs static generatorexit again
jepler Sep 22, 2023
23ad19f
Fix crc32 duplication
jepler Sep 22, 2023
886285c
fix vfs_fat build errors
jepler Sep 22, 2023
87feeab
fix ringbuf differences
jepler Sep 22, 2023
2cc07ae
dummy RUN_BACKGROUND_TASKS for unix port
jepler Sep 22, 2023
f9f75d8
MAKE_ENUM_TYPE for new style type defs
jepler Sep 22, 2023
5367c9f
fix "native exception getter"
jepler Sep 22, 2023
0d79624
remove unused function
jepler Sep 22, 2023
bb0f814
fix circuitpy memoryview.cast
jepler Sep 22, 2023
566688b
fix mpy magic numbers
jepler Sep 22, 2023
556ec9d
fixes for mp_type_get_protocol_slot
jepler Sep 22, 2023
085cf0e
make mp_stream_flush available
jepler Sep 22, 2023
e1af819
fix (unused) default for some required args
jepler Sep 22, 2023
ea5bc12
fix getting protocol
jepler Sep 22, 2023
1c09a0b
fix string construction
jepler Sep 22, 2023
2c70537
fix memoryview cast&hex
jepler Sep 22, 2023
51314fb
fix availability of mp_obj_array_locals_dict
jepler Sep 22, 2023
0265ae0
remove unused functions
jepler Sep 22, 2023
a181172
remove redundant declaratoin
jepler Sep 22, 2023
e489848
allow definition of namedtuples in core
jepler Sep 22, 2023
99479a6
fix definition of slice type with optional "make_new"
jepler Sep 22, 2023
f812750
fix use of mp_type_fileio
jepler Sep 22, 2023
031c163
make RE compile
jepler Sep 22, 2023
78a7c6b
fix getting make_new slot of object
jepler Sep 22, 2023
5d9b84d
fix definition of MathOperation
jepler Sep 22, 2023
477b230
fix definitoin of MidiTrack type
jepler Sep 22, 2023
d1ee906
fix dependency on generated header
jepler Sep 22, 2023
7c2fbff
fix use of locals_dict
jepler Sep 22, 2023
4bbf42c
fix duplicate array_locals_dict_table
jepler Sep 22, 2023
79309c1
re-add CP-specific exception types
jepler Sep 22, 2023
c53cb3e
re-add CP-specific exception related types
jepler Sep 22, 2023
2c3d811
re-add CP-specific C files
jepler Sep 22, 2023
cd462c5
re-fix stream function definition
jepler Sep 22, 2023
fb6f4c9
tweak coverage build configuration
jepler Sep 22, 2023
171aa42
update ulab
jepler Sep 22, 2023
76ff014
Trinket M0 comes up; still very much wip
dhalbert Sep 28, 2023
1c388ab
finish converting to MP_REGISTER_ROOT_POINTER()
dhalbert Sep 29, 2023
68a2927
MP_REGISTER_ROOT_POINTER for port-specific root pointers
dhalbert Sep 29, 2023
2fc5a93
add back generic subscript iterator, gc_never_free
dhalbert Sep 30, 2023
6d59e55
fix making mpy-cross automatically
jepler Oct 2, 2023
ac64e6d
Fix tests that use skip_if
jepler Oct 2, 2023
499ea3f
Restore unix Makefile functionality
jepler Oct 2, 2023
1ccce65
file no longer used
jepler Oct 2, 2023
18a5a89
makeqstrdef: restore CIRCUITPY behavior
jepler Oct 2, 2023
410a99b
fix exception type in test
jepler Oct 2, 2023
542d157
Fix getenv test
jepler Oct 2, 2023
fc58200
update with circuitpython mpy files
jepler Oct 2, 2023
1b9ecab
Fix constructing empty namedtuple
jepler Oct 2, 2023
7e0e6fc
Metro M4 now compiles
dhalbert Oct 3, 2023
18c03a7
Fix a few tests
tannewt Oct 5, 2023
06765cc
RP2040 now builds
dhalbert Oct 5, 2023
58db172
Merge branch 'v1.20-merge' of https://github.com/dhalbert/circuitpyth…
dhalbert Oct 5, 2023
f8996cb
Fix json tests by checking for zero read from stream
tannewt Oct 5, 2023
4863ce7
Fix binascii.crc32 unicode check
tannewt Oct 5, 2023
94c7082
Fix super init. CP changed it to support kwargs
tannewt Oct 5, 2023
49511b0
Bring back ordereddict.move_to_end()
tannewt Oct 5, 2023
85650bf
Fix re unescaping
tannewt Oct 5, 2023
ca7be16
fixes for stm and mimxrt10xx
dhalbert Oct 8, 2023
7869706
force FROZEN_MANIFEST build; add back make print-%
dhalbert Oct 11, 2023
22a44c6
Try and fix mpy-cross variants
tannewt Oct 5, 2023
2910dea
Almost fix extra_coverage test
tannewt Oct 6, 2023
01aec14
Add windows/fmode.c for mpy-cross
tannewt Oct 6, 2023
9be3999
Add back makefile print variable
tannewt Oct 6, 2023
6e27890
Only include mpconfigport.h once
tannewt Oct 10, 2023
9ded673
Unpack mpy-cross to the new location
tannewt Oct 10, 2023
db9085c
Hopefully fix mpy-cross-mac build
tannewt Oct 10, 2023
26a503f
Remove two mpy docs
tannewt Oct 10, 2023
4c4eba8
Add lib/mbedtls back
tannewt Oct 10, 2023
9633c4e
Merge remote-tracking branch 'adafruit/main' into v1.20-merge
tannewt Oct 11, 2023
1f38293
Fix ESP related issues
tannewt Oct 11, 2023
81ccc60
Fix memorymap type check
tannewt Oct 11, 2023
a13185b
fix inclusion of ulab sources
dhalbert Oct 12, 2023
2f391e5
restore SUPEROPT_GC, SUPEROPT_VM
dhalbert Oct 12, 2023
021926c
Fix DotClockFrameBuffer type definition
dhalbert Oct 13, 2023
43b99a6
fix fomu board.c
dhalbert Oct 13, 2023
9930bc1
Fix skipped test
tannewt Oct 11, 2023
544553c
Fix cyw43 (pico w) builds
tannewt Oct 11, 2023
9c9819d
Hopefully fix mpy-cross upload
tannewt Oct 11, 2023
db4253e
Fix spresence by disabling asserts
tannewt Oct 13, 2023
732caed
Fix non-CYW43 RP2040 builds
tannewt Oct 13, 2023
5a19971
Fix pre-commit
tannewt Oct 16, 2023
4d262c8
Fix typo
tannewt Oct 16, 2023
8b8944a
Update asyncio
tannewt Oct 16, 2023
dc01676
Add back glossary to fix docs build
tannewt Oct 16, 2023
f78b35d
remove unused files; fix typo; remove debugging code
dhalbert Oct 16, 2023
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
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .codespell/ignore-words.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,5 @@ numer
arithmetics
ftbfs
straightaway
ftbs
ftb
5 changes: 4 additions & 1 deletion .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#all: Reformat remaining C code that doesn't have a space after a comma.
# top: Update Python formatting to black "2023 stable style".
8b2748269244304854b3462cb8902952b4dcb892

# all: Reformat remaining C code that doesn't have a space after a comma.
5b700b0af90591d6b1a2c087bb8de6b7f1bfdd2d

# ports: Reformat more C and Python source code.
Expand Down
11 changes: 8 additions & 3 deletions .github/actions/mpy_cross/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ inputs:
required: false
default: true
type: boolean
cp-version:
required: true
type: string

runs:
using: composite
Expand All @@ -16,22 +19,24 @@ runs:
uses: actions/download-artifact@v3
with:
name: mpy-cross
path: mpy-cross
path: mpy-cross/build

- name: Make mpy-cross executable
if: inputs.download == 'true' && steps.download-mpy-cross.outcome == 'success'
run: sudo chmod +x mpy-cross/mpy-cross
run: sudo chmod +x mpy-cross/build/mpy-cross
shell: bash

- name: Build mpy-cross
if: inputs.download == 'false' || steps.download-mpy-cross.outcome == 'failure'
run: make -C mpy-cross -j2
shell: bash
env:
CP_VERSION: ${{ inputs.cp-version }}

- name: Upload mpy-cross
if: inputs.download == 'false' || steps.download-mpy-cross.outcome == 'failure'
continue-on-error: true
uses: actions/upload-artifact@v3
with:
name: mpy-cross
path: mpy-cross/mpy-cross
path: mpy-cross/build/mpy-cross
2 changes: 2 additions & 0 deletions .github/workflows/build-boards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ jobs:
- name: Set up mpy-cross
if: steps.set-up-submodules.outputs.frozen == 'True'
uses: ./.github/actions/mpy_cross
with:
cp-version: ${{ inputs.cp-version }}

- name: Versions
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-mpy-cross.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: mpy-cross.${{ env.EX }}
path: mpy-cross/mpy-cross.${{ env.EX }}
path: mpy-cross/build-${{ env.EX}}/mpy-cross.${{ env.EX }}
- name: Upload to S3
uses: ./.github/actions/upload_aws
with:
source: mpy-cross/mpy-cross.${{ env.EX }}
source: mpy-cross/build-${{ env.EX}}/mpy-cross.${{ env.EX }}
destination: mpy-cross/${{ env.OS }}/mpy-cross-${{ env.OS }}-${{ env.CP_VERSION }}.${{ env.EX }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
7 changes: 4 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ jobs:
- name: Set up mpy-cross
uses: ./.github/actions/mpy_cross
with:
cp-version: ${{ steps.set-up-submodules.outputs.version }}
download: false
- name: Get last commit with checks
id: get-last-commit-with-checks
Expand Down Expand Up @@ -127,15 +128,15 @@ jobs:
- uses: actions/upload-artifact@v3
with:
name: mpy-cross-macos-11-x64
path: mpy-cross/mpy-cross
path: mpy-cross/build/mpy-cross
- name: Build mpy-cross (arm64)
run: make -C mpy-cross -j2 -f Makefile.m1 V=2
- uses: actions/upload-artifact@v3
with:
name: mpy-cross-macos-11-arm64
path: mpy-cross/mpy-cross-arm64
path: mpy-cross/build-arm64/mpy-cross-arm64
- name: Make universal binary
run: lipo -create -output mpy-cross-macos-universal mpy-cross/mpy-cross mpy-cross/mpy-cross-arm64
run: lipo -create -output mpy-cross-macos-universal mpy-cross/build/mpy-cross mpy-cross/build-arm64/mpy-cross-arm64
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/custom-board-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ jobs:
if: steps.set-up-submodules.outputs.frozen == 'True'
uses: ./.github/actions/mpy_cross
with:
cp-version: ${{ steps.set-up-submodules.outputs.version }}
download: false
- name: Versions
run: |
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
env:
CP_VERSION: ${{ inputs.cp-version }}
MICROPY_CPYTHON3: python3.8
MICROPY_MICROPYTHON: ../ports/unix/micropython-coverage
MICROPY_MICROPYTHON: ../ports/unix/build-coverage/micropython
TEST_all:
TEST_mpy: --via-mpy -d basics float micropython
TEST_native: --emit native
Expand All @@ -41,6 +41,8 @@ jobs:
uses: ./.github/actions/deps/external
- name: Set up mpy-cross
uses: ./.github/actions/mpy_cross
with:
cp-version: ${{ inputs.cp-version }}
- name: Build unix port
run: make -C ports/unix VARIANT=coverage -j2
- name: Run tests
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,9 @@
path = ports/raspberrypi/lib/Pico-PIO-USB
url = https://github.com/sekigon-gonnoc/Pico-PIO-USB.git
branch = main
[submodule "lib/micropython-lib"]
path = lib/micropython-lib
url = https://github.com/micropython/micropython-lib.git
[submodule "lib/certificates"]
path = lib/certificates
url = https://github.com/adafruit/certificates
5 changes: 4 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ repos:
exclude: |
(?x)^(
locale/|
lib/
lib/|
tests/unicode/data/utf-8_invalid.txt|
tests/extmod/data/qr.pgm|
tests/basics/bytearray_byte_operations.py
)
- repo: local
hooks:
Expand Down
8 changes: 4 additions & 4 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License
The MIT License (MIT)

Copyright (c) 2013-2022 Damien P. George and others
Copyright (c) 2013-2023 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 All @@ -9,8 +9,8 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
Expand Down
3 changes: 2 additions & 1 deletion conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,8 @@ def autoapi_prepare_jinja_env(jinja_env):
"ports/cxd56/spresense-exported-sdk",
"ports/espressif/certificates",
"ports/espressif/esp-idf",
"ports/espressif/esp32-camera",
"ports/espressif/esp-camera",
"ports/espressif/esp-protocols",
"ports/espressif/.idf_tools",
"ports/espressif/peripherals",
"ports/litex/hw",
Expand Down
1 change: 0 additions & 1 deletion devices/ble_hci/common-hal/_bleio/att.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
#include "shared-bindings/_bleio/Service.h"
#include "shared-bindings/_bleio/UUID.h"
#include "supervisor/shared/tick.h"
#include "supervisor/shared/translate/translate.h"

STATIC uint16_t max_mtu = BT_ATT_DEFAULT_LE_MTU; // 23
STATIC unsigned long timeout = 5000;
Expand Down
1 change: 0 additions & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ Full Table of Contents
design_guide
porting
common_hal
reference/mpyfiles.rst
reference/glossary.rst

.. toctree::
Expand Down
52 changes: 52 additions & 0 deletions docs/library/array.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,55 @@ Classes

Append new elements as contained in `iterable` to the end of
array, growing it.

.. method:: __getitem__(index)

Indexed read of the array, called as ``a[index]`` (where ``a`` is an ``array``).
Returns a value if *index* is an ``int`` and an ``array`` if *index* is a slice.
Negative indices count from the end and ``IndexError`` is thrown if the index is
out of range.

**Note:** ``__getitem__`` cannot be called directly (``a.__getitem__(index)`` fails) and
is not present in ``__dict__``, however ``a[index]`` does work.

.. method:: __setitem__(index, value)

Indexed write into the array, called as ``a[index] = value`` (where ``a`` is an ``array``).
``value`` is a single value if *index* is an ``int`` and an ``array`` if *index* is a slice.
Negative indices count from the end and ``IndexError`` is thrown if the index is out of range.

**Note:** ``__setitem__`` cannot be called directly (``a.__setitem__(index, value)`` fails) and
is not present in ``__dict__``, however ``a[index] = value`` does work.

.. method:: __len__()

Returns the number of items in the array, called as ``len(a)`` (where ``a`` is an ``array``).

**Note:** ``__len__`` cannot be called directly (``a.__len__()`` fails) and the
method is not present in ``__dict__``, however ``len(a)`` does work.

.. method:: __add__(other)

Return a new ``array`` that is the concatenation of the array with *other*, called as
``a + other`` (where ``a`` and *other* are both ``arrays``).

**Note:** ``__add__`` cannot be called directly (``a.__add__(other)`` fails) and
is not present in ``__dict__``, however ``a + other`` does work.

.. method:: __iadd__(other)

Concatenates the array with *other* in-place, called as ``a += other`` (where ``a`` and *other*
are both ``arrays``). Equivalent to ``extend(other)``.

**Note:** ``__iadd__`` cannot be called directly (``a.__iadd__(other)`` fails) and
is not present in ``__dict__``, however ``a += other`` does work.

.. method:: __repr__()

Returns the string representation of the array, called as ``str(a)`` or ``repr(a)```
(where ``a`` is an ``array``). Returns the string ``"array(<type>, [<elements>])"``,
where ``<type>`` is the type code letter for the array and ``<elements>`` is a comma
separated list of the elements of the array.

**Note:** ``__repr__`` cannot be called directly (``a.__repr__()`` fails) and
is not present in ``__dict__``, however ``str(a)`` and ``repr(a)`` both work.
45 changes: 41 additions & 4 deletions docs/reference/glossary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Glossary
cross-compiler
Also known as ``mpy-cross``. This tool runs on your PC and converts a
:term:`.py file` containing MicroPython code into a :term:`.mpy file`
containing MicroPython bytecode. This means it loads faster (the board
containing MicroPython :term:`bytecode`. This means it loads faster (the board
doesn't have to compile the code), and uses less space on flash (the
bytecode is more space efficient).

Expand Down Expand Up @@ -112,6 +112,24 @@ Glossary
require much less power. MicroPython is designed to be small and
optimized enough to run on an average modern microcontroller.

micropython-lib
MicroPython is (usually) distributed as a single executable/binary
file with just few builtin modules. There is no extensive standard
library comparable with :term:`CPython`'s. Instead, there is a related,
but separate project `micropython-lib
<https://github.com/micropython/micropython-lib>`_ which provides
implementations for many modules from CPython's standard library.

Some of the modules are are implemented in pure Python, and are able to
be used on all ports. However, the majority of these modules use
:term:`FFI` to access operating system functionality, and as such can
only be used on the :term:`MicroPython Unix port` (with limited support
for Windows).

Unlike the :term:`CPython` stdlib, micropython-lib modules are
intended to be installed individually - either using manual copying or
using :term:`mip`.

MicroPython port
MicroPython supports different :term:`boards <board>`, RTOSes, and
OSes, and can be relatively easily adapted to new systems. MicroPython
Expand All @@ -133,16 +151,26 @@ Glossary
machine-independent features. It can also function in a similar way to
:term:`CPython`'s ``python`` executable.

mip
A package installer for MicroPython (mip - "mip installs packages"). It
installs MicroPython packages either from :term:`micropython-lib`,
GitHub, or arbitrary URLs. mip can be used on-device on
network-capable boards, and internally by tools such
as :term:`mpremote`.

mpremote
A tool for interacting with a MicroPython device.

.mpy file
The output of the :term:`cross-compiler`. A compiled form of a
:term:`.py file` that contains MicroPython bytecode instead of Python
source code.
:term:`.py file` that contains MicroPython :term:`bytecode` instead of
Python source code.

native
Usually refers to "native code", i.e. machine code for the target
microcontroller (such as ARM Thumb, Xtensa, x86/x64). The ``@native``
decorator can be applied to a MicroPython function to generate native
code instead of bytecode for that function, which will likely be
code instead of :term:`bytecode` for that function, which will likely be
faster but use more RAM.

port
Expand Down Expand Up @@ -173,3 +201,12 @@ Glossary
peripheral that sends data over a pair of pins (TX & RX). Many boards
include a way to make at least one of the UARTs available to a host PC
as a serial port over USB.

upip
A now-obsolete package manager for MicroPython, inspired
by :term:`CPython`'s pip, but much smaller and with reduced
functionality. See its replacement, :term:`mip`.

webrepl
A way of connecting to the REPL (and transferring files) on a device
over the internet from a browser. See https://micropython.org/webrepl
Loading