If a board defines MICROPY_BLUETOOTH_BTSTACK_CONFIG_FILE as the path to a
header file, then that file will be used for the BTstack config.
Signed-off-by: Damien George <damien@micropython.org>
This update includes a few bug fixes for BLE, support for LE audio, updates
to classic BT support, cmake support, and other things.
Signed-off-by: Damien George <damien@micropython.org>
The existing actions/checkout@v2 is causing Node v12 deprecation warnings
to be shown in GitHub Actions. v3 uses Node v16, which will stop the
warnings.
Seems unused outside of spi.c, spi_obj[] array is the expected way to
iterate these.
This work was funded through GitHub Sponsors.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
This changes the CustomEvent for stdout to use the existing `detail`
property of CustomEvent instead of adding a `data` property.
Signed-off-by: David Lechner <david@pybricks.com>
mip-cmdline adds command-line support to mip, useful for the unix port, via
micropython -m mip ...
Signed-off-by: Damien George <damien@micropython.org>
This brings in mip-cmdline, espflash, use of machine.dht_readinto, and
other improvements to existing libraries.
Signed-off-by: Damien George <damien@micropython.org>
This commit executes __WFI() on core 0 only to avoid core1 locking up since
it doesn't enable any interrupts by default (except for `SIO_IRQ_PROC1`).
This fixes a lockup when calling `cyw43_do_ioctl` from core1.
Fixes issue #9597.
If USB CDC is connected and the board sends data, but the host does not
receive the data, the device locks up. This is fixed in this commit by
having a timeout of 500ms, after which time the transmission is skipped.
If USB CDC is connected and the board sends data, but the host does not
receive the data, the device locks up. This is fixed in this commit by
having a timeout of 500ms, after which time the transmission is skipped.
If USB CDC is connected and the board sends data, but the host does not
receive the data, the device locks up. This is fixed in this commit by
having a timeout of 500ms, after which time the transmission is skipped.
If USB CDC is connected and the board sends data, but the host does not
receive the data, the device locks up. This is fixed in this commit by
having a timeout of 500ms, after which time the transmission is skipped.
Fixes issue #9634.
The actual underlying error number raised from the lwIP subsystem when
attempting to listen on a socket is swallowed and replaced with an
out-of-memory error which is confusing.
This commit passes the underlying error message from the lwIP subsystem to
the appropriate OSError exception.
Most of the content of README.md became obsolete and was replaced by the
documentation of MicroPython. Instead, README.md now shows build
instructions like the other ports.
Including the uasyncio scripts and the drivers for DHT, DS18x20 and
onewire. The uasyncio scripts need about 8k of flash and are not included
for the SAMD21 boards by default.
This prevents a very subtle bug caused by writing e.g. `bytearray('\xfd')`
which gives you `(0xc3, 0xbd)`.
This work was funded through GitHub Sponsors.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
There are two calls to mp_builtin___import__():
1. ports/unix/main.c:main_() which provides a str in args[0]
2. py/runtime.c:mp_import_name() which provides a qstr in args[0]
The default implementation of mp_builtin___import__() is
mp_builtin___import___default() which has a different implementation based
on MICROPY_ENABLE_EXTERNAL_IMPORT.
If MICROPY_ENABLE_EXTERNAL_IMPORT is disabled then the handling of weak
links assumes that args[0] is a `const char *`, when it is either a str or
qstr object.
Use the existing qstr of the module name instead, and also use a vstr
instead of strcpy() to ensure no overflow occurs.
Emscripten strongly advises the use of optimisation when compiling with
ASYNCIFY enabled. Testing the difference betwen O3 and Os for various
configurations gives:
flags firmware.wasm micropython.js perf
-O3 -s ASYNCIFY 1342003 212845 0 (baseline)
-O3 -s ASYNCIFY -s WASM=0 - 7064750 -30%
-O3 367131 196569 +140%
-O3 -s WASM=0 - 2818260 +30%
-Os -s ASYNCIFY 1135450 213064 +40%
-Os -s ASYNCIFY -s WASM=0 - 6239768 -30%
-Os 295028 196569 +180%
-Os -s WASM=0 - 2271358 +30%
The first row is prior to this commit. The second and third columns show
firmware size (add them to get the total size). The fourth column shows
the approximate change in performance compared to the baseline. The
performance was measured using run-perfbench.py and the error was large, up
to 20%, although general trends in the change in performance could still be
seen.
In summary, using using Os instead of O3 makes it a little bit faster in
all cases, and smaller output (wasm/js) in all cases.
Signed-off-by: Damien George <damien@micropython.org>