34799 Commits

Author SHA1 Message Date
Angus Gratton
98fd78437c esp32: Allow malloc() to allocate from SPIRAM.
Also shrinks the "prefer internal" threshold to 8KB, any allocation larger
than this will try PSRAM first.

Change the mbedTLS config to use regular malloc() as well, instead of
internal only.  The default is set to internal-only due to to potential
physical security issue of readout via PSRAM on the original ESP32.
However, as MicroPython runs from plaintext flash and all other context is
in the MP heap of PSRAM then it's hard to see how worsens physical security
for MP.

This work was funded through GitHub Sponsors.

Signed-off-by: Angus Gratton <angus@redyak.com.au>
2023-08-15 10:49:33 +10:00
Angus Gratton
519c24dd48 py/gc: Add new MICROPY_GC_SPLIT_HEAP_AUTO "auto grow heap" mode.
When set, the split heap is automatically extended with new areas on
demand, and shrunk if a heap area becomes empty during a GC pass or soft
reset.

To save code size the size allocation for a new heap block (including
metadata) is estimated at 103% of the failed allocation, rather than
working from the more complex algorithm in gc_try_add_heap(). This appears
to work well except in the extreme limit case when almost all RAM is
exhausted (~last few hundred bytes). However in this case some allocation
is likely to fail soon anyhow.

Currently there is no API to manually add a block of a given size to the
heap, although that could easily be added if necessary.

This work was funded through GitHub Sponsors.

Signed-off-by: Angus Gratton <angus@redyak.com.au>
2023-08-15 10:48:02 +10:00
Angus Gratton
d325ee4509 py/gc: Apply some code formatting cleanup.
This commit:
- Breaks up some long lines for readability.
- Fixes a potential macro argument expansion issue.

This work was funded through GitHub Sponsors.

Signed-off-by: Angus Gratton <angus@redyak.com.au>
2023-08-15 10:41:02 +10:00
Dan Halbert
3d48e87e60 jepler: fix 18 tests (redo commit to be correct) 2023-08-14 18:34:32 -04:00
Dan Halbert
545d434239 Revert "jepler: fix 18 tests"
This reverts commit 5ad35004cb3705967060b637ebcbd48d50f1b80f.
2023-08-14 18:21:50 -04:00
Dan Halbert
5ad35004cb jepler: fix 18 tests 2023-08-14 17:53:38 -04:00
Dan Halbert
b73f05fe64 turn off viper tests; thanks jepler 2023-08-14 16:43:07 -04:00
Scott Shawcroft
7567f71709
Merge pull request #8280 from dglaude/8.2.x-backport-metro-esp32s3
8.2.x backport metro esp32s3
2023-08-14 11:50:41 -07:00
Scott Shawcroft
f353fb1b80
Merge pull request #8279 from dglaude/8.2.x-backport-picopad
8.2.x backport picopad by @lynt-smitka
2023-08-14 11:43:15 -07:00
Scott Shawcroft
c75640eb0b
Merge pull request #8277 from weblate/weblate-circuitpython-main
Translations update from Hosted Weblate
2023-08-14 11:42:34 -07:00
Dan Halbert
4a579f7242 fix doc build; reorganize placement of library docs 2023-08-14 12:34:00 -04:00
Dan Halbert
2f81f36c41 fix windows mpy-cross builds; tnx @jepler 2023-08-14 11:37:41 -04:00
Dan Halbert
c823b9b2f6 force mpversion.h build early in silabs 2023-08-14 11:28:13 -04:00
Damien George
88518009ce tests/extmod/select_poll_eintr.py: Improve robustness of test.
Increase allowed range of dt_ms, and print it in case of failure.

Signed-off-by: Damien George <damien@micropython.org>
2023-08-15 00:08:51 +10:00
Dan Halbert
8cf5b6e707 fixes to unix port support; thanks @jepler 2023-08-14 09:51:52 -04:00
Damien George
f6af48416d extmod/modselect: Properly track number of poll objects that are fd's.
Signed-off-by: Damien George <damien@micropython.org>
2023-08-14 18:48:47 +10:00
Dan Halbert
d582407b06 pre-commit fixes 2023-08-14 00:59:22 -04:00
Andi Chandler
c0f39076dc
Translated using Weblate (English (United Kingdom))
Currently translated at 100.0% (998 of 998 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/en_GB/
2023-08-14 03:48:33 +02:00
Dan Halbert
2171e67c1b merge latest adafruit/main 2023-08-13 19:43:54 -04:00
Dan Halbert
27c7807693 silabs build needs work; other builds are working 2023-08-13 19:05:16 -04:00
Melissa LeBlanc-Williams
9d69ddc583 Add D0 and D1 2023-08-14 00:20:47 +02:00
Melissa LeBlanc-Williams
4c62db2d05 Add D pins 2023-08-14 00:20:24 +02:00
Melissa LeBlanc-Williams
8dd52430b6 Change to octal ram 2023-08-14 00:18:50 +02:00
Melissa LeBlanc-Williams
1b3993a29e Added initial Adafruit Metro ESP32-S3 2023-08-14 00:17:24 +02:00
Vladimír Smitka
acd8896094 Fix RGB/BGR color order 2023-08-13 17:42:23 +02:00
Vladimir Smitka
2819c88207 Formatting 2023-08-13 17:41:16 +02:00
Vladimir Smitka
d652c8d25c Add PicoPad support 2023-08-13 17:39:59 +02:00
Dan Halbert
850877a85f wip; fix generators; typos 2023-08-13 00:30:59 -04:00
Dan Halbert
433059023d fix -j1 builds, particularly CPX 2023-08-12 16:49:03 -04:00
Dan Halbert
48e404ab90 wip; fix frozen; still need to fix -j1 for frozen 2023-08-12 15:44:27 -04:00
Dan Halbert
1b19ed4c39 change compilation verbosity options; fix mpy-cross 2023-08-12 13:38:17 -04:00
Luc
29a7a9e63b
Translated using Weblate (German)
Currently translated at 98.2% (981 of 998 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/de/
2023-08-12 12:50:44 +02:00
Dan Halbert
8a89a3d425 sort TRANSLATION()'s 2023-08-11 13:36:03 -04:00
Dan Halbert
c5a0525604
Merge pull request #8258 from jepler/ordereddict-alternate-impl
OrderedDict.move_to_end: alternate implementation of #8234
2023-08-11 10:09:55 -04:00
Dan Halbert
3227c9f15a
Merge pull request #8274 from weblate/weblate-circuitpython-main
Translations update from Hosted Weblate
2023-08-11 10:08:47 -04:00
Dan Halbert
10b94796c0 wip; fix more m_malloc and gc_alloc 2023-08-11 00:30:34 -04:00
Dan Halbert
fe0e2f13bc wip; fix qstr processing 2023-08-10 20:06:32 -04:00
Jonny Bergdahl
6c8bfe3386
Translated using Weblate (Swedish)
Currently translated at 100.0% (998 of 998 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/sv/
2023-08-11 01:51:35 +02:00
Wellington Terumi Uemura
9ec83cd896
Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (998 of 998 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/pt_BR/
2023-08-11 01:51:34 +02:00
Jeff Epler
b650320f51
Translated using Weblate (French)
Currently translated at 95.5% (954 of 998 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/fr/
2023-08-11 01:51:33 +02:00
Scott Shawcroft
4811e0a375
Merge pull request #8273 from weblate/weblate-circuitpython-main
Translations update from Hosted Weblate
2023-08-10 09:31:49 -07:00
Melissa LeBlanc-Williams
ce61fd857b Bug fix for skip on only one bmp 2023-08-10 08:15:18 -07:00
Dan Halbert
8260f816f8
Merge pull request #8220 from jepler/update-protomatter-in-8.2.x
bump protomatter to 1.5.10
8.2.3
2023-08-10 06:35:30 -04:00
Jim Mussared
24a6e951ec ports: Simplify board feature tags in board.json.
This commit:
- Finds a common set of board feature tags and maps existing features to
  that reduced set.
- Removes some less-useful board feature tags.
- Ensures all MCUs are specified correctly.
- Ensures all boards have a vendor (and fixes some vendor names).

This is to make the downloads page show a less intimidating set of filters.

Work done in conjunction with Matt Trentini <matt.trentini@gmail.com>.

This work was funded through GitHub Sponsors.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-08-10 14:54:03 +10:00
Jim Mussared
4bbe879c26 tools/mpremote: Make soft-reset count as an action.
Otherwise `mpremote soft-reset` will implicitly run the repl command.

Fixes issue #10871.

This work was funded through GitHub Sponsors.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-08-10 14:11:53 +10:00
Jos Verlinde
232c29c2ed tools/codeformat.py: Use pyproject.toml for black config.
Signed-off-by: Jos Verlinde <jos_verlinde@hotmail.com>
2023-08-10 11:54:36 +10:00
Daniël van de Giessen
8dbb29da3f tools/codeformat.py: Skip formatting ESP-IDF managed components.
Signed-off-by: Daniël van de Giessen <daniel@dvdgiessen.nl>
2023-08-10 11:36:24 +10:00
Dan Halbert
0dca530b70 wip; Trinket M0 compiles 2023-08-09 15:20:10 -04:00
Jonny Bergdahl
8a468354fe
Translated using Weblate (Swedish)
Currently translated at 99.2% (991 of 998 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/sv/
2023-08-09 19:50:35 +02:00
Hosted Weblate
6cbbebbfb1
Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/
2023-08-09 19:44:11 +02:00