Commit Graph

5634 Commits

Author SHA1 Message Date
Jeff Epler 3a68d2f621
Fix build error when frozen modules are updated
When a frozen module was added or updated, a build error would occur
during CI: `KeyError: 'FROZEN_MPY_DIRS'`.

In e40abda1bc I decided that it should be an error if all the expected
keys were not defined in the board settings dict. I made this change
and all seemed to be well; however, my testing did not exercise the
case that a frozen module was changed.

It turns out that FROZEN_MPY_DIRS was not being set in the board settings
dict because the output of print-FROZEN_MPY_DIRS was "FROZEN_MPY_DIRS ="
(which does not match the regular expression) instead of
"FROZEN_MPY_DIRS = " (with a trailing space).

This change fixes the problem by ensuring that an undefined or empty
variable still prints with a space character after the equal character.

Tested by running locally:
```
python3 -c 'import shared_bindings_matrix; print(shared_bindings_matrix.get_settings_from_makefile("ports/atmel-samd", "trinket_m0")["FROZEN_MPY_DIRS"])'
```
(prints a blank line, expected)

as well as simulating a change to the asyncio frozen submodule:
```
python3 -c 'import shared_bindings_matrix; print(shared_bindings_matrix.get_settings_from_makefile("ports/atmel-samd", "trinket_m0")["FROZEN_MPY_DIRS"])'
```
(which will build the elecfreaks_picoed board)
2023-11-18 09:43:36 -06:00
Dan Halbert 58b111d428
Merge pull request #8608 from jepler/add-locale-module
Add `locale.getlocale()`
2023-11-15 09:24:04 -05:00
Jeff Epler 46bfbad1bb
Add `locale.getlocale()`
This returns the localization of the running CircuitPython, such as
en_US, fr, etc.

Additional changes are needed in build infrastructure since the
string "en_US" should not appear to be translated in weblate, ever;
instead the value comes from the translation metadata.

Closes: #8602
2023-11-14 21:20:03 -06:00
Scott Shawcroft 8ff0682937
Merge pull request #8605 from tannewt/fix_esp_heap_alloc
Fix split heap on ESP
2023-11-14 14:52:28 -08:00
Scott Shawcroft 1f2355742b
Fix split heap on ESP
It was setting the DMA capability requirement which excludes PSRAM.

Fixes #8597. Fixes #8573.
2023-11-14 12:00:59 -08:00
Scott Shawcroft 4bdd3e6150
Merge pull request #8589 from jepler/issue8588
Rework ci_fetch_deps and use it from makefiles too
2023-11-14 10:04:37 -08:00
Jeff Epler fb840159fb
Remove some stuff about reserved psram & supervisor allocations
this is obsoleted by the new split heap code 🎉
2023-11-13 12:55:26 -06:00
Jeff Epler 6db9f2e73f
Rework ci_fetch_deps and use it from makefiles too
* teach ci_fetch_deps about --filter=blob:none
 * change logic ensuring tags in frozen/ are fetched
 * since check=True was all the time, remove unused kwarg
 * add fetch-board-submodules

Closes: #8588
2023-11-12 12:32:34 -06:00
Dan Halbert 191a5a31c7
add CIRCUITPY-CHANGE annotations 2023-11-08 09:08:10 -05:00
Scott Shawcroft 8137e2d6d2
Switch all ports to auto-growing split heap
This simplifies allocating outside of the VM because the VM doesn't
take up all remaining memory by default.

On ESP we delegate to the IDF for allocations. For all other ports,
we use TLSF to manage an outer "port" heap. The IDF uses TLSF
internally and we use their fork for the other ports.

This also removes the dynamic C stack sizing. It wasn't often used
and is not possible with a fixed outer heap.

Fixes #8512. Fixes #7334.
2023-11-01 15:24:16 -07:00
Jeff Epler 2296c85e29
fix another error seen only on clean builds 2023-10-30 16:25:25 +01:00
Jeff Epler 774f6ac6ab
Switch to using MP_ERROR_TEXT instead of translate, globally 2023-10-30 09:49:06 +01:00
Dan Halbert 32b6ac79d5
Merge pull request #8519 from jepler/compressed-message-type
Rename compressed_string_t to mp_rom_error_text_t to match upstream
2023-10-27 10:53:44 -04:00
Scott Shawcroft cf08ef0b80
Enable warnings in full builds only 2023-10-26 13:43:04 -07:00
Dan Halbert 3f1b9af025 py/mpprint.c: fix formatting 2023-10-26 15:30:42 -04:00
Jeff Epler c695f8b20f
remove some unneeded diffs 2023-10-26 19:39:43 +02:00
Jeff Epler a069dc92e0
restore cprintf/vcprintf prototypes 2023-10-26 19:39:26 +02:00
Scott Shawcroft f439f02492
Add `warnings` and warn about displayio changes
Follow up to #8493
2023-10-25 15:45:45 -07:00
Jeff Epler de541cf155
Fix pointer-ness, const-ness of compressed messages
micropython puts the pointer-ness into the typedef; we can put the
const-ness there too.

this reduces the delta to micropython; for instance, emitinlinextensa
and emitinlinethumb now match upstream.
2023-10-25 21:40:11 +02:00
Jeff Epler 54a5878ee0
WIP 2023-10-25 21:24:52 +02:00
Scott Shawcroft be30c12a74
Pass subobject into native subscr
This allows PixelBuf to call transmit after setting a value.

Fixes #8488
2023-10-25 11:44:32 -07:00
Jeff Epler acf350a1b7
In py/ use MP_ERROR_TEXT instead of translate 2023-10-25 08:19:31 +02:00
Jeff Epler 55874b6470
Rename compressed_string_t to mp_rom_error_text_t to match upstream 2023-10-25 08:14:13 +02:00
Scott Shawcroft 63079c75b0
Re-add passing native methods the subclass instance
Fixes #8488
2023-10-24 16:20:51 -07:00
Scott Shawcroft e62db5adcd
Fix native property setting from subclass 2023-10-24 16:20:51 -07:00
Scott Shawcroft e1df598199
Split displayio hardware support from core
These are moved:
* Display -> busdisplay.BusDisplay
* FourWire -> fourwire.FourWire
* EPaperDisplay -> epaperdisplay.EPaperDisplay
* I2CDisplay -> i2cdisplaybus.I2CDisplayBus

`paralleldisplay` is now `paralleldisplaybus` (and registered as
`paralleldisplay` too).

Bus related helpers are split out of display_core into bus_core.
It is in still displayio since it is a dependency of both
busdisplay and epaperdisplay.

Fixes #7667
2023-10-24 15:43:34 -07:00
Scott Shawcroft 168c40e940
Merge pull request #8508 from dhalbert/v1.21-merge
V1.21 merge
2023-10-24 15:36:06 -07:00
Scott Shawcroft ecaf9e6b14
Fix native emitter compile 2023-10-24 14:48:02 -07:00
Scott Shawcroft d8148559c2
Enable native subpackage support 2023-10-24 13:49:18 -07:00
Scott Shawcroft d14bb575cb
Fix mp_frozen_names 2023-10-24 13:02:09 -07:00
Dan Halbert 2c795acf1e py/compile.c: add missing line for native labels in await 2023-10-24 15:39:26 -04:00
Bob Abeles 6725be4259 And formatting, again 2023-10-23 20:43:57 -07:00
Bob Abeles 3f4332be80 Another CI formatting issue 2023-10-23 20:40:51 -07:00
Bob Abeles 892d89e8b7 Fix CI detected line-length issue 2023-10-23 20:35:31 -07:00
Bob Abeles 2e996587fe Improve make translation data performance. 2023-10-23 20:08:15 -07:00
Dan Halbert 6cd5150ac1 fix gc_free() to build in mpy-cross 2023-10-23 20:44:03 -04:00
Dan Halbert 3f0b807e74 pre-commit C formatting fix 2023-10-23 20:37:42 -04:00
Dan Halbert 8f254035dd pre-commit fixes 2023-10-23 20:14:40 -04:00
Scott Shawcroft f13ea9a49f
Fix async tests by adding back __await__ use. Remove u* lookup 2023-10-23 16:13:11 -07:00
Dan Halbert 8017a1ad30 ports/unix VARIANT=coverage fixes 2023-10-20 16:51:04 -04:00
Jeff Epler 7ab5252cdd
Add CIRCUITPY_MESSAGE_COMPRESSION_LEVEL
to trade compile speed & flash size

Initially enable the faster mode on rp2040 and espressif, where there's
usually plenty of flash available (these advanced techniques save hundreds
to thousands of bytes, which is important on a lot of old samd21 boards
but is a drop in the lake of a 4MB flash chip)
2023-10-20 19:18:18 +01:00
Dan Halbert fdfc4421b1 MICROPY_NONSTANDARD_TYPECODES default; check MICROPY_PY_ERRNO in objexcept.c 2023-10-20 13:35:38 -04:00
Dan Halbert 6eb0607a53 fix build when MICROPY_PY_ERRNO is 0 2023-10-20 10:43:22 -04:00
Dan Halbert 4b42a6f4a0 restore old uzlib; remove remaining U and u prefixes 2023-10-19 21:29:57 -04:00
Dan Halbert 367e13c69f change CIRCUITPY change markers to CIRCUITPY-CHANGE 2023-10-19 16:42:36 -04:00
Dan Halbert c0a4abc03c Fix merge bugs; remove shared/tinyusb/* 2023-10-19 16:02:42 -04:00
Dan Halbert f2ebe6839c Initial MicroPython v1.21.0 merge; not compiled yet 2023-10-18 17:49:14 -04:00
Dan Halbert 2f391e5679 restore SUPEROPT_GC, SUPEROPT_VM 2023-10-12 15:25:28 -04:00
Dan Halbert a13185bb34 fix inclusion of ulab sources 2023-10-12 11:03:00 -04:00
Scott Shawcroft 9633c4e78f
Merge remote-tracking branch 'adafruit/main' into v1.20-merge 2023-10-11 11:21:57 -07:00