- 15 8月, 2023 3 次提交
-
-
由 Angus Gratton 提交于
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: NAngus Gratton <angus@redyak.com.au>
-
由 Angus Gratton 提交于
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: NAngus Gratton <angus@redyak.com.au>
-
由 Angus Gratton 提交于
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: NAngus Gratton <angus@redyak.com.au>
-
- 14 8月, 2023 2 次提交
-
-
由 Damien George 提交于
Increase allowed range of dt_ms, and print it in case of failure. Signed-off-by: NDamien George <damien@micropython.org>
-
由 Damien George 提交于
Signed-off-by: NDamien George <damien@micropython.org>
-
- 10 8月, 2023 4 次提交
-
-
由 Jim Mussared 提交于
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: NJim Mussared <jim.mussared@gmail.com>
-
由 Jim Mussared 提交于
Otherwise `mpremote soft-reset` will implicitly run the repl command. Fixes issue #10871. This work was funded through GitHub Sponsors. Signed-off-by: NJim Mussared <jim.mussared@gmail.com>
-
由 Jos Verlinde 提交于
Signed-off-by: NJos Verlinde <jos_verlinde@hotmail.com>
-
由 Daniël van de Giessen 提交于
Signed-off-by: NDaniël van de Giessen <daniel@dvdgiessen.nl>
-
- 09 8月, 2023 3 次提交
-
-
由 Angus Gratton 提交于
Ruff version 283 expanded E721 to fail when making direct comparison against a built-in type. Change the code to use isinstance() as suggested, these usages appear to have equivalent functionality. Signed-off-by: NAngus Gratton <angus@redyak.com.au>
-
由 Damien George 提交于
Signed-off-by: NDamien George <damien@micropython.org>
-
由 Damien George 提交于
An SSL stream can only handle CLOSE and POLL ioctls. Other ones do not make sense, or at least it doesn't make sense to pass the ioctl request directly down to the underlying stream. In particular MP_STREAM_GET_FILENO should not be passed to the underlying stream because the SSL stream is not directly related to a file descriptor, and the SSL stream must handle the polling itself. Signed-off-by: NDamien George <damien@micropython.org>
-
- 07 8月, 2023 7 次提交
-
-
由 Damien George 提交于
Some targets (eg PYBV10) have the socket module but are unable to create UDP sockets without a registered NIC. So skip UDP tests on these targets. Signed-off-by: NDamien George <damien@micropython.org>
-
由 Damien George 提交于
Signed-off-by: NDamien George <damien@micropython.org>
-
由 Damien George 提交于
The signature of this method was poller.poll(timeout=-1, flags=0, /) but the flags argument was not documented and is not CPython compatible. So it's removed in this commit. (The optional flags remains for the ipoll() method, which is documented.) Signed-off-by: NDamien George <damien@micropython.org>
-
由 Damien George 提交于
A previous commit removed the unix-specific select module implementation and made unix use the common one. This commit adds an optimisation so that the system poll function is used when polling objects that have a file descriptor. With this optimisation enabled, if code registers both file-descriptor-based objects, and non- file-descriptor-based objects with select.poll() then the following occurs: - the system poll is called for all file-descriptor-based objects with a timeout of 1ms - then the bare-metal polling implementation is used for remaining objects, which calls into their ioctl method (which can be in C or Python) In the case where all objects have file descriptors, the system poll is called with the full timeout requested by the caller. That makes it as efficient as possible in the case everything has a file descriptor. Benefits of this approach: - all ports use the same select module implementation - the unix port now supports polling of all objects and matches bare metal implementations - it's still efficient for existing cases where only files and sockets are polled (on unix) - the bare metal implementation does not change - polling of SSL objects will now work on unix by calling in to the ioctl method on SSL objects (this is required for asyncio ssl support) Note that extmod/vfs_posix_file.c has poll disable when the optimisation is enabled, because the code is not reachable when the optimisation is used. Signed-off-by: NDamien George <damien@micropython.org>
-
由 Damien George 提交于
Signed-off-by: NDamien George <damien@micropython.org>
-
由 Damien George 提交于
To make it easier to extend and modify this polling implementation. Signed-off-by: NDamien George <damien@micropython.org>
-
由 Damien George 提交于
The unix port has a custom select module which only works with objects that have a file descriptor, eg files and sockets. On the other hand, bare metal ports use the common extmod/modselect.c implementation of the select module that supports polling of arbitrary objects, as long as those objects provide a MP_STREAM_POLL in their ioctl implementation (which can be done in C or Python). This commit removes the unix-specific code and makes unix use the common one provided by extmod/modselect.c instead. All objects with file descriptors implement MP_STREAM_POLL so they continue to work. Signed-off-by: NDamien George <damien@micropython.org>
-
- 06 8月, 2023 2 次提交
-
-
由 Damien George 提交于
Signed-off-by: NDamien George <damien@micropython.org>
-
由 Damien George 提交于
Signed-off-by: NDamien George <damien@micropython.org>
-
- 05 8月, 2023 1 次提交
-
-
由 Elecia White 提交于
Signed-off-by: NElecia White <elecia@logicalelegance.com>
-
- 04 8月, 2023 2 次提交
-
-
由 Rene Straub 提交于
When building for a specific board this must be specified in make submodules. I.e. make BOARD=STM32F769DISC submodules. Signed-off-by: NRene Straub <rene@see5.ch>
-
由 Damien Tournoud 提交于
In applications that use little memory and run GC regularly, the cost of the sweep phase quickly becomes prohibitives as the amount of RAM increases. On an ESP32-S3 with 2 MB of external SPIRAM, for example, a trivial GC cycle takes a minimum of 40ms, virtually all of it in the sweep phase. Similarly, on the UNIX port with 1 GB of heap, a trivial GC takes 47 ms, again virtually all of it in the sweep phase. This commit speeds up the sweep phase in the case most of the heap is empty by keeping track of the ID of the highest block we allocated in an area since the last GC. The performance benchmark run on PYBV10 shows between +0 and +2% improvement across the existing performance tests. These tests don't really stress the GC, so they were also run with gc.threshold(30000) and gc.threshold(10000). For the 30000 case, performance improved by up to +10% with this commit. For the 10000 case, performance improved by at least +10% on 6 tests, and up to +25%. Signed-off-by: NDamien George <damien@micropython.org>
-
- 01 8月, 2023 1 次提交
-
-
由 Jim Mussared 提交于
Prevent the GC cleaning up (and finalising) the SSLContext while the socket is still live. Signed-off-by: NJim Mussared <jim.mussared@gmail.com>
-
- 27 7月, 2023 2 次提交
-
-
由 Brett Cannon 提交于
Signed-off-by: NBrett Cannon <brett@python.org>
-
由 Damien George 提交于
On esp32, the build output consists of: - micropython.elf - micropython.map - micropython.bin -- application only - micropython.uf2 -- application only - firmware.bin -- bootloader, partition table and application Currently everything is available at the download page except micropython.bin. This commit adds that file but with the extension changed to .app-bin, to distinguish it from .bin (the full thing). Signed-off-by: NDamien George <damien@micropython.org>
-
- 25 7月, 2023 6 次提交
-
-
由 Damien George 提交于
Signed-off-by: NDamien George <damien@micropython.org>
-
由 Damien George 提交于
Listing the IDF version number in the board description is not as important as it once was, when the IDF was still undergoing a lot of changes. Now, all builds use IDF 5.x and it's possible to query the exact version with platform.platform(). Signed-off-by: NDamien George <damien@micropython.org>
-
由 Damien George 提交于
Otherwise constructing an invalid SPI instance (eg machine.SPI(3)) will mess up machine.SPI(2)'s state before it's detected that it's an invalid SPI id. Signed-off-by: NDamien George <damien@micropython.org>
-
由 Damien George 提交于
On ESP32C3 it's not doing anything. On ESP32S3 the original code prevented prevented machine.SPI(1) from working. Signed-off-by: NDamien George <damien@micropython.org>
-
由 Damien George 提交于
Signed-off-by: NDamien George <damien@micropython.org>
-
由 Damien George 提交于
SPI3_HOST is not a macro but rather an enum, so use SOC_SPI_PERIPH_NUM to detect if it's defined. Fixes issue #11919. Signed-off-by: NDamien George <damien@micropython.org>
-
- 24 7月, 2023 7 次提交
-
-
由 Jim Mussared 提交于
Previously this was explicitly enabled on esp32/stm32/renesas/mimxrt/samd, but didn't get a default feature level because it wasn't in py/mpconfig.h. With this commit it's now enabled at the "extra features" level, which adds rp2, unix-standard, windows, esp8266, webassembly, and some nrf boards. This work was funded through GitHub Sponsors. Signed-off-by: NJim Mussared <jim.mussared@gmail.com>
-
由 Armin Brauns 提交于
This way, a bare `-` is never interpreted as an option, even before `--`. Filenames starting with `-` still need to be put after `--`. Signed-off-by: NArmin Brauns <armin.brauns@embedded-solutions.at>
-
由 Armin Brauns 提交于
Unless -o is given, output defaults to stdout unless a source file is given (in which case the source file name is used to derive an output file name). Signed-off-by: NArmin Brauns <armin.brauns@embedded-solutions.at>
-
由 Armin Brauns 提交于
Signed-off-by: NArmin Brauns <armin.brauns@embedded-solutions.at>
-
由 Armin Brauns 提交于
Signed-off-by: NArmin Brauns <armin.brauns@embedded-solutions.at>
-
由 Daniël van de Giessen 提交于
This changes the ESP32 WDT implementation to use a custom handle so that it becomes possible to reset the WDT from a thread. By default esp_task_wdt_add subscribes the task_id of the current task. That means that if we're running in a different task we are unable to reset the WDT, which prevents feeding the WDT from a thread directly, or even from a timer (which may randomly run in a different task when there's multiple threads). As an added bonus, the name we set makes the error clearly specify that it was the user-specified WDT that reset the chip. Signed-off-by: NDaniël van de Giessen <daniel@dvdgiessen.nl>
-
由 Daniël van de Giessen 提交于
Since commit beeb74 we already check in modussl_mbedtls whether this function is provided by the ESP-IDF before calling it, thus we no longer need to define it here in order to compile. Removing it so that if CONFIG_MBEDTLS_DEBUG is defined we do not cause any 'multiple definition' compile errors. Signed-off-by: NDaniël van de Giessen <daniel@dvdgiessen.nl>
-