Commit Graph

34429 Commits

Author SHA1 Message Date
dotnfc d7f63f994f esp32/main: Allow a board to override the MicroPython task stack size.
This allows the MicroPython task stack size to be overridden by the
mpconfigboard.h settings.

Signed-off-by: dotnfc <dotnfc@163.com>
2023-09-29 16:14:15 +10:00
Glenn Moloney 6662d84faa esp32/boards: Add bootloader rollback support for all builds.
Add "CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE=y" to
ports/esp32/boards/sdkconfig.base so that all micropython esp32 images
support OTA rollback in the bootloader.  These images can then be converted
to OTA-capable images as required by user tools.

Also remove CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE=y from board-specific
sdkconfig files as this is now the default.

Signed-off-by: Glenn Moloney <glenn.moloney@gmail.com>
2023-09-29 16:00:51 +10:00
Angus Gratton b461d218d1 tests/run-internalbench.py: Remove old CPython reference.
At one point it was possible to internal_bench CPython vs MicroPython, but
seemingly not any more.

Signed-off-by: Angus Gratton <angus@redyak.com.au>
2023-09-29 15:41:41 +10:00
Angus Gratton dd8a69b5f2 tests/README: Document ./run-internalbench.py.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
2023-09-29 15:41:28 +10:00
Felix Dörre 3c2b2f7a4d rp2/modmachine: Fix lightsleep while wifi is powered off.
While cyw43 is deinitialized, an interrupt occurs.  That is handled with
these lines: ports/rp2/mpnetworkport.c#L59-L61 and as pendsv is disabled
while in network code, the poll function then just waits there.

When deinit has finished, the poll func is executed, but skipped:
src/cyw43_ctrl.c#L222-L225 this skips the `CYW43_POST_POLL_HOOK` which
would re-enable interrupts, but also reset `cyw43_has_pending`.

And in that state, the lightsleep code, will skip sleeping as it thinks
there is a network packet pending to be handled.

With this change applied, lightsleep works as expected when the wifi chip
is enabled, and when it's powered off.
2023-09-29 15:15:42 +10:00
Peter Harper 584c495d32 shared/netutils/dhcpserver: Reply on correct netif.
The DHCP server broadcasts messages.  They are being sent via the default
netif which might be completely the wrong network.  We want to send
messages to the netif we got the original message from.

Original author: [Peter Harper](https://github.com/peterharperuk)
Source: https://github.com/raspberrypi/pico-examples/pull/392

Signed-off-by: Samveen <samveen@samveen.in>
2023-09-29 14:53:26 +10:00
Jos Verlinde 58c2c503a9 tools/mpremote: Add support for rfc2217, serial over TCP.
Signed-off-by: Jos Verlinde <jos_verlinde@hotmail.com>
2023-09-29 14:40:17 +10:00
Jim Mussared 88ecc78eb3 tools/autobuild/build-downloads.py: Verify standard features.
Defines the list of standard features and ensures that each board.json
only uses those ones. This list can be extended, but needs to be a
deliberate decision.

This work was funded through GitHub Sponsors.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-09-29 14:18:33 +10:00
Jim Mussared cf32c2feb5 ports: Restrict board.json to standard features.
Applies to newly-added ARDUINO_PORTENTA_C33 and UM_NANOS3.

Makes the list match the standard features defined in
24a6e951ec.

This work was funded through GitHub Sponsors.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-09-29 14:15:02 +10:00
Jim Mussared 79473691f2 {mimxrt,powerpc,samd}/mpconfigport: Don't override parse chunk alloc.
This was copied from minimal/mpconfigport.h, but it doesn't make sense
for general ports.

Add a comment to minimal/mpconfigport.h to explain why it specifically
overrides it.

This work was funded through GitHub Sponsors.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-09-29 14:11:26 +10:00
Seon Rozenblum 77ae0a0948 esp32/boards: Fix VBAT voltage calculation for UM S3 boards.
Signed-off-by: Seon Rozenblum <seon@unexpectedmaker.com>
2023-09-29 14:09:15 +10:00
Jim Mussared 276bfa3146 py/lexer: Add missing initialisation for fstring_args_idx.
This was missed in 692d36d779. Probably
never noticed because everything enables `MICROPY_GC_CONSERVATIVE_CLEAR`,
but found via ASAN thanks to @gwangmu & @chibinz.

This work was funded through GitHub Sponsors.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-09-29 13:58:26 +10:00
Ihor Nehrutsa d83c1a43d4 py: Change ifdef DEBUG_PRINT to if DEBUG_PRINT.
Signed-off-by: Ihor Nehrutsa <Ihor.Nehrutsa@gmail.com>
2023-09-29 13:04:38 +10:00
Angus Gratton 2fcd28f713 py/mkrules.mk: Don't strip binary if STRIP variable is unset.
This provides a way to build a non-DEBUG host binary that still has symbols
and debug information.

Document this for the unix port, and update a comment in the unix port
Makefile.

This work was funded through GitHub Sponsors.

Signed-off-by: Angus Gratton <angus@redyak.com.au>
2023-09-29 13:01:12 +10:00
Damien George 58f63497e5 extmod/modssl_axtls: Only close underlying socket once if it was used.
To match the behaviour of the mbedtls implementation, and pass the
ssl_basic.py test.

Signed-off-by: Damien George <damien@micropython.org>
2023-09-29 12:03:00 +10:00
Damien George 03a3af417e esp8266/boards: Make sure modespnow.o is placed in irom0.
Signed-off-by: Damien George <damien@micropython.org>
2023-09-29 12:03:00 +10:00
Damien George 62c3033ba6 tests/extmod/vfs_fat_finaliser.py: Tweak test so files are collected.
Signed-off-by: Damien George <damien@micropython.org>
2023-09-29 12:02:36 +10:00
Damien George 7c88cdda49 tests/float/math_domain.py: Tweak test to also pass with obj-repr-C.
Signed-off-by: Damien George <damien@micropython.org>
2023-09-29 12:02:21 +10:00
Damien George a7e2a6d9f2 tests/extmod/ssl_cadata.py: Skip test on axtls.
The axtls bindings don't support this.

Signed-off-by: Damien George <damien@micropython.org>
2023-09-29 12:01:50 +10:00
Damien George a33766880e tests/extmod/deflate_decompress.py: Skip test when not enough memory.
Signed-off-by: Damien George <damien@micropython.org>
2023-09-29 12:01:04 +10:00
Damien George 3695211576 tests/float/float_format_ints.py: Put power-of-10 test in separate file.
This test doesn't pass on builds with 30-bit floats (object repr C).

Signed-off-by: Damien George <damien@micropython.org>
2023-09-29 12:00:15 +10:00
Jim Mussared 52f76cf4fc tests/stress/bytecode_limit.py: Reverse order of cases.
The PYBD_SF2 is right on the limit of being able to run this test and so
it succeeds the first two cases and fails the next two with MemoryError.

This causes it to SKIP, but that only works if it's the first thing
printed. So reverse the order of the tests so it fails on the biggest
one first.

This work was funded through GitHub Sponsors.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-09-29 11:44:20 +10:00
Jeff Epler 10aeb23789
remove console pins, that was wrong 2023-09-28 17:13:22 -05:00
Dan Halbert 76ff01452b Trinket M0 comes up; still very much wip 2023-09-28 16:22:10 -04:00
Bill Sideris 2284211cc1
Merge remote-tracking branch 'adafruit/main' into rpi-auto-disconnect 2023-09-28 18:01:43 +03:00
Bill Sideris c3cf7c0894
wifi_reset 2023-09-28 17:53:40 +03:00
Dan Halbert 4ea0e4735d
Merge pull request #8442 from jepler/issue8441
Fixes for ci_set_matrix
2023-09-28 10:21:36 -04:00
Bill Sideris 8c37156675
Revert "stop_station when no wifi-reconnect"
This reverts commit 7588abad32.
2023-09-28 14:47:43 +03:00
Bill Sideris 7258f7b4a0
Revert "Remove a space"
This reverts commit ed4c510d8f.
2023-09-28 14:47:39 +03:00
Bill Sideris df13d8615d
Merge remote-tracking branch 'adafruit/main' into rpi-auto-disconnect 2023-09-28 14:45:30 +03:00
Damien George 5dbd6fc705 stm32/dma: Remove unbalanced ).
This was added by mistake in 9e0f934cdf

Signed-off-by: Damien George <damien@micropython.org>
2023-09-28 17:31:54 +10:00
Damien George 88564c1406 stm32/uart: Generalise UART source clock calculation for H5 and H7 MCUs.
This gets the calculation working properly for H5 MCUs, and fixes the
switch statement to switch on csel&7 instead of csel&3.

Signed-off-by: Damien George <damien@micropython.org>
2023-09-28 17:30:38 +10:00
Damien George 82b4ab7576 stm32/boards: Move includes to after defines in all hal_conf.h files.
The include of HAL headers should come after the HAL configuration defines,
so that the headers can see whether the defines were made or not, to
provide defaults and configure various things.

Signed-off-by: Damien George <damien@micropython.org>
2023-09-28 17:30:38 +10:00
Rene Straub 08c661c930 stm32/dac: Add STM32H5 DAC support, with dma_nohal implementation.
Integrate DAC support for STM32H5.  Implement STM32H5 GPDMA driver. The DMA
driver is largely different from other STM32 variants.  To support the DAC
circular mode, memory based linked list DMA descriptors are used.

Signed-off-by: Rene Straub <rene@see5.ch>
2023-09-28 17:11:37 +10:00
Jeff Epler 8b84edfdde
ci_set_matrix: no need to expand the value of CIRCUITPY_WEB_WORKFLOW
This is now done by the way shared_bindings_matrix.py invokes make.
2023-09-27 21:36:35 -05:00
Jeff Epler e40abda1bc
ci_set_matrix: Don't use .get(), it hides errors
Variables that are explicitly fetched always have a value, even if it
is the empty value. However, using .get() hid the error that
shared_bindings_matrix wasn't fetching SRC_SUPERVISOR.
2023-09-27 21:36:34 -05:00
Jeff Epler c261ac6318
shared_bindings_matrix: Explicitly fetch SRC_SUPERVISOR for ci_set_matrix 2023-09-27 21:33:19 -05:00
Jeff Epler a9fce6c495
qualia: fixes for revision C
* neopixel removed, could not share function with DBLTAP
 * external SPI bus definition is settled
2023-09-27 18:13:21 -05:00
Jeff Epler aa0d7aad83
Merge pull request #8440 from jepler/dotclock-overscan-rotation
Dotclock: fix overscan and rotation
2023-09-27 18:07:50 -05:00
Jeff Epler c1a98e460a
Merge pull request #8439 from tannewt/fix_for_make_quirk
Tweak for make quirk
2023-09-27 18:05:43 -05:00
Jeff Epler 451356db2d
Merge pull request #8438 from weblate/weblate-circuitpython-main
Translations update from Hosted Weblate
2023-09-27 18:05:21 -05:00
Jeff Epler b3141933af
FramebufferDisplay: dirty rows are physical
.. so they need a correct row count, which could be the "core.width"
of a 90/180 rotated display.

While I discovered this on the very unusual 320x960 display it could have
affected any framebuffer display that was taller than it was wide,
including sharp memory displays and rgbmatrix displays.
2023-09-27 15:15:34 -05:00
Jeff Epler f80d08e207
Make dot clock displays with a masked portion on the left work 2023-09-27 15:15:32 -05:00
Hosted Weblate c2297f7980
Merge remote-tracking branch 'origin/main' 2023-09-27 18:39:46 +00:00
Scott Shawcroft 3684640ada
Merge pull request #8430 from jepler/dotclock-enhancements
Dotclock enhancements
2023-09-27 11:39:37 -07:00
Scott Shawcroft ad837d44ed
Tweak for make quirk 2023-09-27 09:17:07 -07:00
Hosted Weblate fdab0f7212
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-09-27 18:13:54 +02:00
Scott Shawcroft 44d27cb23d
Merge pull request #8435 from tannewt/fix_esp32_with5.1
Update ADC and I2S APIs for 5.1
2023-09-27 09:13:47 -07:00
Rene Straub 72ef2e6291 stm32/machine_adc: Fix and improve STM32H5 support.
Changes are:
- Run ADC on PCLK/16.
- Verify and optimize timings (ADC_STAB_DELAY_US, ADC_SAMPLETIME_DEFAULT).
- Add support for STM32H5 VBAT and COREVDD channels on ADC2.
- Replace ADC constants in machine_adc_locals_dict_table.
- Convert STM32 literal to channel numbers in adc_config_channel with
  corresponding STM32 LL library functions (__LL_ADC_IS_CHANNEL_INTERNAL(),
  __LL_ADC_CHANNEL_TO_DECIMAL_NB()).

Reasoning for the second last point: the STM32 driver literals are uint32_t
that don't work with MP_ROM_INT() which handles signed 31 bit integers
only.  Introduce enumerator machine_adc_internal_ch_t to define external
channels (0..19), internal channels (256..) and the special channel VREF
(0xffff).  Values are converted to STM32 literals with adc_ll_channel()
when required in adc_config_and_read_u16().

Signed-off-by: Rene Straub <rene@see5.ch>
2023-09-27 16:58:10 +10:00
Rene Straub 64d24fccd6 stm32/adc: Optimize sampling time for G4, H5, L4 and WB MCUs.
Signed-off-by: Rene Straub <rene@see5.ch>
2023-09-27 16:28:31 +10:00