Commit Graph

4925 Commits

Author SHA1 Message Date
Dan Halbert 9c643aa907 Merge branch '7.3.x' into merge-7.3.0-rc.1-to-main 2022-05-21 12:57:46 -04:00
Dan Halbert 199e2ef2fc Turn on f-strings for all builds 2022-05-21 00:04:53 -04:00
Dan Halbert 309dab4c75 merge 7.3.0-rc.1 changes to main 2022-05-20 15:37:56 -04:00
Dan Halbert f63b26c534 address jepler's comments and further squeezes 2022-05-20 10:10:55 -04:00
Dan Halbert a01dec1df9 message consolidation and more use of validators 2022-05-19 15:38:37 -04:00
Dan Halbert 4487f61404 Restore automatic gc_collect() after an import 2022-05-18 11:37:13 -04:00
Scott Shawcroft 269d51d023
Add two stage reset for BLE
This lets the BLE stack run through the wait period after a VM run
when it may be waiting for more writes due to an auto-reload.

User BLE functionality will have their events stopped. Scanning and
advertising is also stopped.
2022-05-12 13:20:44 -07:00
Dan Halbert 58646a936e Correct errno messages 2022-05-10 14:01:30 -04:00
Jeff Epler 510890b207
Enable squeezing property storage in flash
.. and enable it on atmel-samd and raspberrypi. On trinket_m0 this saves
96 net bytes of flash. There are 216 bytes actually saved by reducing
the flash storage size of the property descriptors, but added code in
several paths takes back over half of the 'raw savings'.

By organizing the "get-only" and "get-set" (but no delete) properties
each in a different section, we can represent then more efficiently.

Testing performed: that a get-only property can still be gotten but
can't be set or deleted; that a get-set property can sill be gotten or
set but can't be deleted.  Tested on pygamer.

Because this requires linker file support, I only enabled it on two of
the ports.
2022-05-03 08:48:53 -05:00
Jeff Epler 78cf0a90af
Make MP_PROPERTY_GETTER / _GETSET fully declare the property
This will enable setting data attributes, namely, the section of the
symbol.
2022-05-03 08:48:53 -05:00
Jeff Epler 5b9f0681ad
Get some getter props defined through another macro 2022-05-03 08:48:53 -05:00
Jeff Epler 31da335cac
Introduce, use MP_PROPERTY_GETTER, _GETSET
Later, these can be changed in cunning ways to save flash storage.
2022-05-03 08:48:52 -05:00
Dan Halbert 3a8fb4e956
Merge pull request #5852 from jepler/floppy
Add floppyio
2022-04-26 11:40:19 -04:00
Dan Halbert 4aea8049c5
Merge pull request #6279 from mjs513/main
Added Settable Clock for MIMXRT BOARDS
2022-04-20 08:31:41 -04:00
George White 32fc084b39 Removed compiler flag in favor of MP_WEAK implementation 2022-04-18 13:10:12 +00:00
George White f502703e52 Add hook to do some flash setup before filesystem init 2022-04-18 13:10:12 +00:00
mjs513 fd41c1ac5b Update based on PR Comments 2022-04-14 06:45:16 -04:00
lady ada 1f3dadcbb9 ok other waythen 2022-04-08 16:43:15 -04:00
lady ada ea3dfa444a msys at least breaks elsewhere now 2022-04-08 16:39:47 -04:00
Jeff Epler f7be4345d9
Merge remote-tracking branch 'origin/main' into floppy 2022-04-07 08:37:46 -05:00
Dan Halbert 2693a4cfe1
Merge pull request #6069 from gamblor21/uzlib-module
zlib Module
2022-04-06 12:06:44 -04:00
Jeff Epler fe98248a3d
Merge remote-tracking branch 'origin/7.2.x' into merge-7.2.x 2022-04-05 08:45:13 -05:00
Jeff Epler e0827eb52a
Merge pull request #6238 from dhalbert/ringbuf-free-fix
Free ringbuf buffer by relying on gc, not gc_free()
2022-04-05 08:43:36 -05:00
Dan Halbert b29b7bfe32 Free ringbuf buffer by relying on gc, not gc_free() 2022-04-04 20:34:49 -04:00
Damien George a43cfdd274
py/vm: Prevent array bound warning when using -MP_OBJ_ITER_BUF_NSLOTS.
This warning can happen on clang 13.0.1 building mpy-cross:

../py/vm.c:748:25: error: array index -3 refers past the last possible
  element for an array in 64-bit address space containing 64-bit (8-byte)
  elements (max possible 2305843009213693952 elements)
  [-Werror,-Warray-bounds]
                        sp[-MP_OBJ_ITER_BUF_NSLOTS + 1] = MP_OBJ_NULL;
                        ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~

Using pointer access instead of array access works around this warning.

Fixes issue #8467.

Signed-off-by: Damien George <damien@micropython.org>
2022-04-04 09:22:30 -05:00
Mark 8ed7b114cd
Merge branch 'main' into uzlib-module 2022-04-03 11:48:37 -05:00
gamblor21 f9d7f46d67 Removing DecompIO 2022-03-23 17:02:58 -05:00
Jeff Epler e9d81c2826
Add mdns module
This allows for CircuitPython to resolve a .local domain and find
other devices with MDNS services.

First step for #6174
2022-03-17 18:16:16 -07:00
Dan Halbert bad6cdcfa5
Merge pull request #6160 from tannewt/merge_7.2.2
Merge 7.2.2 changes into main
2022-03-17 20:02:30 -04:00
Nicolas Favre-Felix 6573981350
Explicitly ignore unused variables (fixes #6158)
A macro in py/bc.h declares five variables that are used to hold data
temporarily, without their values being used after the assignments. This
causes "unused-but-set-variable" warnings in clang 13. We mark these
variables as explicitly ignored to avoid this new warning.
2022-03-15 22:33:10 -07:00
Scott Shawcroft dcc3ec171e
Merge remote-tracking branch 'adafruit/7.2.x' into merge_7.2.2 2022-03-15 13:56:11 -07:00
Dan Halbert f13d218749
Merge pull request #6125 from tannewt/usb_host
Start of USB host API
2022-03-11 21:41:28 -05:00
Scott Shawcroft 7cb66dd316
Merge pull request #6142 from dhalbert/7.2.x-autoreload-fake-sleep
7.2.x autoreload rework (again)
2022-03-11 16:46:04 -08:00
Dan Halbert e4cd9690f1 rework auto-reload delay logic 2022-03-11 14:03:04 -05:00
Scott Shawcroft 00dcf6bd03
Tweaks from review 2022-03-11 10:51:50 -08:00
Dan Halbert f59f8acf78 implement: from __future__ import annotations 2022-03-10 11:19:35 -05:00
Dan Halbert 05a4d24a0f
Merge pull request #6117 from dhalbert/__future__
implement `from __future__ import annotations`
2022-03-08 09:33:36 -05:00
Scott Shawcroft 83593a1558
Start of USB host API
This allows you to list and explore connected USB devices. It
only stubs out the methods to communicate to endpoints. That will
come in a follow up once TinyUSB has it. (It's in progress.)

Related to #5986
2022-03-07 18:07:25 -08:00
Radomir Dopieralski 93ea1bd9bd Add a flag for removing the Blinka logo from the REPL
There may be several reasons why we might want to remove the logo form
the REPL: a fork of CircuitPython that doesn't have the right to use the
logo, an especially small display that needs all the room it has to be
useful, displays that are especially vulnerable to burn-in, maybe even
the smaller chips where we want to save as much flash memory as
possible.
2022-03-05 15:38:59 +01:00
Dan Halbert 1164f2b081 implement: from __future__ import annotations 2022-03-04 14:16:40 -05:00
Dan Halbert fc8aae0540 clean up py/objmodule.c for circuitpython 2022-02-24 15:33:12 -05:00
Tsutomu IKEGAMI 4c06915c47 Rename _uasyncio to _asyncio.
Register _asyncio module in CP manner.
2022-02-23 18:44:55 +09:00
Tsutomu IKEGAMI 0929353e5c Merge branch 'main' into enable_uasyncio 2022-02-22 16:53:10 +09:00
gamblor21 664e02535b Renaming and documentation 2022-02-20 15:32:44 -06:00
gamblor21 ba229f1007 Initial commit of uzlib module 2022-02-19 10:41:42 -06:00
Jeff Epler ff4d4f791b
Make sure ULAB_HAS_USER_MODULE is defined (as zero)
This fixes a problem preprocessing genhdr/moduledefs.h, which refers to it.

This file doesn't include the place that ulab normally defines
ULAB_HAS_USER_MODULE by default, so just force it.
2022-02-19 10:29:17 -06:00
Jeff Epler 090b153b3e
Fix build of dynmod with armv7m (lacks floating point) 2022-02-18 08:45:50 -06:00
Jeff Epler 684faab110
Enable the "lookup cache" for FULL_BUILDs
.. and remove a stanza for the "cache map lookup in bytecode" option,
which has been removed by upstream in 1.18; it's superceded by these
other improvements.
2022-02-18 08:32:39 -06:00
Jeff Epler f45a6d762f
Merge remote-tracking branch 'origin/main' into merge-1.18 2022-02-18 08:12:05 -06:00
Dan Halbert 28714963d5 don't wait for USB or BLE workflow after true deep sleep 2022-02-17 15:41:55 -05:00