| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
| |
Removes the risk of inadvertently deleting files on the host by preventing
the deletion of files via `rm -r` on the `/remote` vfs mount point.
Fixes issue #17147.
Signed-off-by: Jos Verlinde <jos_verlinde@hotmail.com>
|
|
|
|
| |
Signed-off-by: Jos Verlinde <jos_verlinde@hotmail.com>
|
|
|
|
| |
Signed-off-by: Anson Mansfield <amansfield@mantaro.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This rewrites the code that previously manually emitted and caught various
OSError subclasses with equivalent code that uses the errno name dictionary
to do this generically, and updates the exception handler in do_filesystem
to catch them in a similarly-generic fashion using os.strerror to retrieve
an appropriate error message text equivalent to the current messages.
Note that in the CPython environments where mpremote runs, the call to the
OSError constructor already returns an instance of the corresponding mapped
exception subtype.
Signed-off-by: Anson Mansfield <amansfield@mantaro.com>
|
|
|
|
| |
Signed-off-by: Anson Mansfield <amansfield@mantaro.com>
|
|
|
|
|
|
|
| |
Add code using all relevant macros to make sure they initialize
structs correctly.
Signed-off-by: stijn <stijn@ignitron.net>
|
|
|
|
|
|
|
|
|
|
|
| |
This requires explicitly naming and initializing all members so add that
where needed and possible. For MP_DEFINE_NLR_JUMP_CALLBACK_FUNCTION_1
this would require initializing the .callback member, but that's a bit
of a waste since the macro is always followed by a call to
nlr_push_jump_callback() to initialize exactly that member, so rewrite
the macro without initializers.
Signed-off-by: stijn <stijn@ignitron.net>
|
|
|
|
|
|
|
|
| |
This updates lwIP from STABLE-2_2_0_RELEASE, which was released in
September 2023. The latest STABLE-2_2_1_RELEASE was released in February
2025.
Signed-off-by: Damien George <damien@micropython.org>
|
|
|
|
|
|
|
|
|
|
| |
Because the `wbits` parameter was only added to `zlib.compress` in
CPython 3.11. Using `zlib.compressobj` makes the code compatible with much
older CPython versions.
Fixes issue #17140.
Signed-off-by: Damien George <damien@micropython.org>
|
|
|
|
|
|
|
|
| |
The output of 'idf.py size' has changed, plus some other cleanups around
build dir name, etc. Can now run on v5.2.2 and v5.4.1, probably other
versions.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit makes a slight change to the vfs_posix test suite to let it
pass on Android.
On Android, non-root processes can perform most filesystem operations
only on a restricted set of directories. The vfs_posix test suite
attempted to enumerate the filesystem root directory, and said directory
happens to be restricted for non-root processes. This would raise
an EACCES OSError and terminate the test with a unexpected failure.
To fix this, rather than enumerating the filesystem root directory the
enumeration target is the internal shared storage area root - which
doesn't have enumeration restrictions for non-root processes. The path
is hardcoded because it is guaranteed to be there on pretty much any
recent-ish device for now (it stayed the same for more than a decade for
compatibility reasons). The proper way would be to query the storage
subsystem via a JNI round-trip call, but this introduces too much
complexity for something that is unlikely to break going forward.
Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
|
|
|
|
| |
Signed-off-by: Damien George <damien@micropython.org>
|
|
|
|
| |
Signed-off-by: Damien George <damien@micropython.org>
|
|
|
|
|
|
|
| |
These functions are only available when `MICROPY_PY_BUILTINS_BYTES_HEX` is
enabled.
Signed-off-by: Damien George <damien@micropython.org>
|
|
|
|
|
|
|
| |
Brings it into sync with a matching change to micropython-lib (which was
much older). Includes one small automatic fix.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
|
|
|
|
|
|
| |
It has been completely replaced by equivalent code in cyw43-driver.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
|
|
|
|
|
|
|
| |
Update the cyw43 configuration to use the new BTHCI UART backend provided
by cyw43-driver.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
|
|
|
|
|
|
|
| |
Update the cyw43 configuration to use the new BTHCI UART backend provided
by cyw43-driver.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
|
|
|
|
|
|
|
|
| |
The new CYW43 BTHCI UART backend requires CTS pin to be defined and
readable. This patch enables the CTS pin SION bit to allow it to be read
regardless of mux mode.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
|
|
|
|
|
|
|
| |
Rename `bt_hci` to `bthci_uart` for consistency with the CYW43 driver and
to distinguish it from HCI backends that use a different transport.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
|
|
|
|
|
|
|
| |
Rename `bthci` to `bthci_uart` for consistency with the CYW43 driver and to
distinguish it from HCI backends that use a different transport.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
This commit makes the BTree module truly optional, as it was
unconditionally enabled in the shared CMake script for the port.
This meant that if a board/variant did explicitly turn BTree off said
request was not honoured by the build system and the BTree module would
still be brought in.
Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
|
|
|
|
|
|
| |
Reduces firmware size by about 3000 bytes.
Signed-off-by: Damien George <damien@micropython.org>
|
|
|
|
|
|
| |
Reduces firmware size by about 3300 bytes.
Signed-off-by: Damien George <damien@micropython.org>
|
|
|
|
| |
Signed-off-by: Damien George <damien@micropython.org>
|
|
|
|
|
|
| |
Required in MICROPY_PREVIEW_VERSION_2.
Signed-off-by: Andrew Leech <andrew.leech@planetinnovation.com.au>
|
|
|
|
|
|
| |
Required in MICROPY_PREVIEW_VERSION_2.
Signed-off-by: Andrew Leech <andrew.leech@planetinnovation.com.au>
|
|
|
|
|
|
| |
Required in MICROPY_PREVIEW_VERSION_2.
Signed-off-by: Andrew Leech <andrew.leech@planetinnovation.com.au>
|
|
|
|
|
|
| |
Required in MICROPY_PREVIEW_VERSION_2.
Signed-off-by: Andrew Leech <andrew.leech@planetinnovation.com.au>
|
|
|
|
|
|
| |
Required in MICROPY_PREVIEW_VERSION_2.
Signed-off-by: Andrew Leech <andrew.leech@planetinnovation.com.au>
|
|
|
|
|
|
|
| |
Like PICOLIBC, MUSL also has its math functions in libc.a. There is a
libm.a, but it's empty.
Signed-off-by: dubiousjim <dubiousjim@gmail.com>
|
|
|
|
|
|
|
|
|
| |
Goal is to document what's most commonly already in use, not to come up
with a new standard.
Also reformat the doc a bit for easier deep linking.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit fixes thread-related compilation issues under Android using
Termux as its runtime environment.
On Android's libc (Bionic) thread cancellation is not implemented, but
the Unix port uses that mechanism to provide asynchronous thread
termination. In this commit there is a workaround for that, by adding a
new signal handler to each newly created thread, whose callback simply
exits the thread. Threads are then sent the new signal rather than
being explicitly cancelled, which in turn trigger the signal handler to
stop the thread execution at the next possible occasion.
This makes the cancellation behaviour differ slightly on Android, as
threads are probably going to linger a little bit more since the method
introduced in this commit is equivalent to setting
PTHREAD_CANCEL_DEFERRED as the thread cancellation type. On the other
hand there are no guarantees of immediate cancellation using
PTHREAD_CANCEL_ASYNCHRONOUS either.
This fixes the pthread-related issues reported in #16259.
Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
|
|
|
|
|
|
|
|
|
| |
POSIX.1-2008 ensures realpath() give a dynamically allocated buffer if
NULL is passed (which is also true for ports/windows/realpath.c),
avoiding an explicit call to malloc() and use of PATH_MAX, which may be
undefined on some systems.
Signed-off-by: David Yang <mmyangfl@gmail.com>
|
|
|
|
|
|
|
| |
In order to provide test coverage for the previous commit, `os.uname()`
support is added to the unix coverage build.
Signed-off-by: Yoctopuce dev <dev@yoctopuce.com>
|
|
|
|
|
|
|
|
|
| |
This fix handles attrtuple as well, eg. os.uname(). A test case has been
added in basics/attrtuple2.py.
Fixes issue #16969.
Signed-off-by: Yoctopuce dev <dev@yoctopuce.com>
|
|
|
|
|
|
|
|
|
| |
The "index fixing" behavior of get_fast_slice_indexes are not desired here;
the underlying behavior of mp_obj_slice_indexes actually is.
Fixes issue #17016.
Signed-off-by: Jeff Epler <jepler@gmail.com>
|
|
|
|
| |
Signed-off-by: Jeff Epler <jepler@gmail.com>
|
|
|
|
| |
Signed-off-by: Damien George <damien@micropython.org>
|
|
|
|
| |
Signed-off-by: Damien George <damien@micropython.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This brings in:
- requests: do not leak header modifications when calling request
- mip: allow relative URLs in package.json
- mip: make mip.install() skip /rom*/lib directories
- umqtt.simple: restore legacy ssl/ssl_params arguments
- nrf24l01: increase startup delay
- nrf24l01: properly handle timeout
- nrf24l01: optimize status reading
- lora-sx126x: fix invert_iq_rx / invert_iq_tx behaviour
- unix-ffi/json: accept both str and bytes as arg for json.loads()
- unix-ffi/machine: use libc if librt is not present
- requests: use the host in the redirect url, not the one in headers
- aiohttp: fix header case sensitivity
- aiohttp: allow headers to be passed to a WebSocketClient
- usb-device-cdc: optimise writing small data so it doesn't require alloc
- inspect: fix isgenerator logic
- inspect: implement iscoroutinefunction and iscoroutine
Signed-off-by: Damien George <damien@micropython.org>
|
|
|
|
|
|
|
|
|
| |
Otherwise, when compiling on 16-bit systems (where `mp_uint_t` is 16 bits
wide) the compiler warns about "left shift count >= width of type", from
the static inline functions that have RV32_ENCODE_TYPE_xxx macros which
do a lot of bit shifting.
Signed-off-by: Damien George <damien@micropython.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Prior to this fix the following would fail:
$ make build-TEENSY40/flexram_config.s
because it didn't create the build directory before generating the file.
Also, make `hal/resethandler_MIMXRT10xx.S` have an explicit dependency on
`flexram_config.s` rather than the latter just being forced to be built
before everything else.
Signed-off-by: Damien George <damien@micropython.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are some newer PYBD_SF6 being produced which have a larger flash,
namely two of 8MiB (instead of the older ones with two of 2MiB).
This commit adds support for these boards. The idea is to have the same
PYBD_SF6 firmware run on both old and new boards. That means autodetecting
the flash at start-up and configuring all the relevant SPI/QSPI parameters,
including for ROMFS and mboot.
Signed-off-by: Damien George <damien@micropython.org>
|
|
|
|
| |
Signed-off-by: Damien George <damien@micropython.org>
|
|
|
|
| |
Signed-off-by: Damien George <damien@micropython.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Allows `MICROPY_HW_QSPIFLASH_SIZE_BITS_LOG2` and
`MICROPY_HW_QSPI_MPU_REGION_SIZE` to be arbitrary expressions, eg function
calls.
The `storage.h` header needs to be included in case access to `spi_bdev_t`
is needed by the macros.
Signed-off-by: Damien George <damien@micropython.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Options for a board to configure ROMFS are:
- Leave ROMFS disabled, do nothing.
- Enable by defining `MICROPY_HW_ROMFS_ENABLE_PARTx` to 1 and then in the
linker script define `_micropy_hw_romfs_partX_start` and
`_micropy_hw_romfs_partX_size`.
- Enable by defining `MICROPY_HW_ROMFS_ENABLE_PARTx` to 1 and also define
`MICROPY_HW_ROMFS_PARTx_START` and `MICROPY_HW_ROMFS_PARTx_SIZE` which
can be arbitrary expressions (not necessarily static)
Signed-off-by: Damien George <damien@micropython.org>
|
|
|
|
| |
Signed-off-by: Damien George <damien@micropython.org>
|
|
|
|
|
|
|
|
|
|
|
| |
This commit allows the user of this driver to intercept the SPI flash
initialisation routine and possibly take some action based on the JEDEC id,
for example change the `mp_spiflash_t::chip_params` element.
To do this, enable `MICROPY_HW_SPIFLASH_DETECT_DEVICE` and define a
function called `mp_spiflash_detect()`.
Signed-off-by: Damien George <damien@micropython.org>
|