Age | Commit message (Collapse) | Author |
|
Avoids the new Wunterminated-string-literal when compiled with gcc 15.1.
This work was funded through GitHub Sponsors.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
|
|
Avoids the new Wunterminated-string-literal when compiled with gcc 15.1.
Also split out the duplicate string to a top-level array (probably the
duplicate string literal was interned, so unlikely to have any impact.)
This work was funded through GitHub Sponsors.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
|
|
This is a workaround for this upstream issue:
https://github.com/raspberrypi/pico-sdk/issues/2448
Can be removed after the next pico-sdk update.
This work was funded through GitHub Sponsors.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
|
|
IOBase is quite an important building block of other parts of the system,
such as `mpremote mount` and running .mpy and native tests.
This feature costs +244 bytes of firmware size on ARM Thumb2 architectures,
which is worth the cost for the extra features it enables.
The change here means that `io.IOBase` is now enabled on all nrf boards,
(previously it was only nRF52840 and nRF9160) and also B_L072Z_LRWAN1
(there is no change to other ports or boards).
Signed-off-by: Damien George <damien@micropython.org>
|
|
The bit position of CHAIN_TO is not the same as on RP2040.
Signed-off-by: Damien George <damien@micropython.org>
|
|
This is a convenient way to deploy firmware to an RP2xxx-based board.
Signed-off-by: Damien George <damien@micropython.org>
|
|
This means the fix from dd1465e7 will also apply to stm32 and mimxrt ports
that use CYW43.
This work was funded through GitHub Sponsors.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
|
|
This is only a surface level refactor, some deeper refactoring would be
possible with (for example) the SDIO interface in mimxrt and stm32, or the
BTHCI interface which is is similar on supported ports. But sticking to
cases where the macros are the same across all ports.
This work was funded through GitHub Sponsors.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
|
|
These both need to fit a pointer, so make them `intptr_t` and `uintptr_t`,
similar to other ports.
Signed-off-by: Anton Blanchard <antonb@tenstorrent.com>
|
|
This commit adds the required functionality for a peripheral to create
services at runtime, using `BLE.register_services()`.
The feature is enabled on the nrf52840dk_nrf52840 board.
Note that the `CONFIG_BT_GATT_ENFORCE_SUBSCRIPTION=n` option must be used
so that BLE notifications/indications can be sent even if not subscribed.
Signed-off-by: danicampora <danicampora@gmail.com>
|
|
The former is deprecated.
Signed-off-by: Jos Verlinde <jos_verlinde@hotmail.com>
|
|
This ensures the check in MP_NLR_JUMP_HEAD works as expected and
nlr_jump_fail gets called so we get a bit better error message.
Signed-off-by: Daniël van de Giessen <daniel@dvdgiessen.nl>
|
|
Getting this to work required fixing a small issue in `lfs2_util.h`, which
has been submitted upstream.
Signed-off-by: Daniël van de Giessen <daniel@dvdgiessen.nl>
|
|
Going above the root directory (/../foo) now gives an error. This is an
intentional change made by LittleFS. It required a update of the testsuite
and is a (minor) compatibility break.
Signed-off-by: Daniël van de Giessen <daniel@dvdgiessen.nl>
|
|
Since all QSPI flash device used by this port are defined, this code was
only used unintentionally. Besides that it was incomplete, so better drop
it.
Note: The flash type for Mini-SAM had to be changed too.
Signed-off-by: robert-hh <robert@hammelrath.com>
|
|
Changes in this commit:
- Check for the proper SFDP header.
- Use the flash size information from SFDP, if present.
- Add two more special flash chips <= 1 MByte without SFDP. JEDEC-ID table
for special flash types instead of a series of conditional statements.
- Add a compile flag `MICROPY_HW_SPIFLASH_SIZE` to set the size in
`mpconfigboard.h`, which replaces getting the size from the JEDEC ID or
the SFDP record.
Signed-off-by: robert-hh <robert@hammelrath.com>
|
|
Fixes in this commit:
- The wrong loader script was assigned for SAMD_GENERIC_D51X20, causing the
VFS block count to be wrong.
- Change the VFS block size from 1536 to 2048. With the setting of 1536,
writing more that 1536 bytes at once failed. This applies to
SAMD_GENERIC_D51X19 and SAMD_GENERIC_D51X20. No other SAMD51 board uses
the internal flash for the file system.
Signed-off-by: robert-hh <robert@hammelrath.com>
|
|
That is done by adding the offset to epoch, following the scheme from the
RP2 port. RTC and `ticks_us()` are not precisely in sync, and so the
difference between `time.time_ns()/1e9` and `time.time()` will increase by
more than 9 seconds/24h. So applications should avoid using `time.time()`
and `time.time_ns()` in the same context.
Signed-off-by: robert-hh <robert@hammelrath.com>
|
|
To make it compliant with the documentation. The default value is 50000us.
Signed-off-by: robert-hh <robert@hammelrath.com>
|
|
To the Microchip Web site. Thanks to Matt Trentini for suggesting this
site.
Signed-off-by: robert-hh <robert@hammelrath.com>
|
|
This is a follow-up to 1e92bdd206f6f87ba65ea05c5b2623fca0b926cd correcting
more of the instances where "Sparkfun" should be "SparkFun".
Signed-off-by: Damien George <damien@micropython.org>
|
|
This commit fixes three open issues related to the asyncio scheduler
exiting prematurely when the main task queue is empty, in cases where
CPython would not exit (for example, because the main task is not done
because it's on a different queue).
In the first case, the scheduler exits because running a task via
`run_until_complete` did not schedule any dependent tasks.
In the other two cases, the scheduler exits because the tasks are queued in
an event queue.
Tests have been added which reproduce the original issues. These test
cases document the unauthorized use of `Event.set()` from a soft IRQ, and
are skipped in unsupported environments (webassembly and native emitter).
Fixes issues #16759, #16569 and #16318.
Signed-off-by: Yoctopuce dev <dev@yoctopuce.com>
|
|
Signed-off-by: Angus Gratton <angus@redyak.com.au>
|
|
Fixes thread safety issue that could cause memory corruption on ports
with (MICROPY_PY_THREAD && !MICROPY_PY_THREAD_GIL) - currently only rp2 and
unix have this configuration.
Adds unit test for TLS sockets that exercises this code path. I wasn't
able to make this fail on rp2, the race condition window is pretty narrow
and may not have a direct impact on a quiet system.
This work was funded through GitHub Sponsors.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
|
|
Enable Analog inputs. Requires Zephyr >= v3.8.0.
Signed-off-by: Ayush Singh <ayush@beagleboard.org>
|
|
Signed-off-by: Vdragon <mail@massdriver.space>
|
|
This enables listing all flash area partitions automagically instead of
just sotrage_partitions. It uses the label, and the ID when not present.
Signed-off-by: Vdragon <mail@massdriver.space>
|
|
This enables using the newer USB stack and its CDC ACM for the REPL.
To switch to it, board file must contain `CONFIG_USB_DEVICE_STACK_NEXT=y`
and `CONFIG_USBD_CDC_ACM_CLASS=y`. In the case of a board that is a
platform that supports the older device stack, `CONFIG_USB_DEVICE_STACK=n`
may be necessary.
Signed-off-by: Vdragon <mail@massdriver.space>
|
|
When using `mip install`, if a file that needs to be downloaded already
exists locally, then the hash of that local file will be computed and if it
matches the known hash of the remote file it will not be downloaded.
Hashes in mip are guaranteed unique, so this change should never leave
stale files on the filesystem.
This behaviour follows that of the `mip` package in `micropython-lib`.
Signed-off-by: Damien George <damien@micropython.org>
|
|
The https://github.com/jepler/esp-open-sdk repository has been removed, so
use the file hosted at micropython.org (it's the same file).
Signed-off-by: Damien George <damien@micropython.org>
|
|
Changes in this commit:
- Allow the DMA instance to be any instance, not just DMA(0); eg WLAN may
be using DMA(0).
- Make the DMA timing test run a little faster by preloading `dma.active`.
- Run the DMA timing test 10 times and take the average time taken as the
test result, to eliminate any big effects of caching.
- Change the expected time to `range(30, 80)` to cover RP2040, RP2350,
RISC-V variants, and both bytecode and native emitter.
- Add a `sleep_ms(1)` after waiting for the IRQ to fire, so that any
scheduled code gets a chance to run when the test is compiled with the
native emitter.
With these changes this test passes reliably on RPI_PICO, RPI_PICO_W,
RPI_PICO2, RPI_PICO2_W, RPI_PICO2-RISCV and RPI_PICO2_W-RISCV, in both
bytecode and native emitter mode, with and without WLAN enabled.
Signed-off-by: Damien George <damien@micropython.org>
|
|
This test is rather complicated and benefits from being a unittest.
Signed-off-by: Damien George <damien@micropython.org>
|
|
Only a few ports have TCP/IP loopback enabled in their network stack, and
this test will only pass on those ports. There's not really any good way
to do a feature check for loopback mode without actually running the test
and seeing if it passes/fails, so add an explicit check that the test is
running on a port known to support loopback.
(Enabling loopback on lwIP, eg RPI_PICO_W, costs +568 code and +272 bss and
is a rarely used feature, so not worth unconditionally enabling.)
Signed-off-by: Damien George <damien@micropython.org>
|
|
Add support for the nrf9151dk. This DK has a GD25WB256 32mb external QSPI
flash chip.
Signed-off-by: Patrick Joy <patrick@thinktransit.com.au>
|
|
Add support for the nrf5340dk. This DK has a MX25R64 8mb external QSPI
flash chip.
Compile using:
$ west build -b nrf5340dk/nrf5340/cpuapp
Signed-off-by: Patrick Joy <patrick@thinktransit.com.au>
|
|
Enables the ability to use frozen modules in the zephyr port.
Enabled by adding `CONFIG_MICROPY_FROZEN_MODULES` to the board
configuration file. Manually set manifest path with
`CONFIG_MICROPY_FROZEN_MANIFEST`.
Signed-off-by: Vdragon <mail@massdriver.space>
|
|
Enable PWM config for bcf.
Signed-off-by: Ayush Singh <ayush@beagleboard.org>
|
|
Add docs for PWM support.
Signed-off-by: Ayush Singh <ayush@beagleboard.org>
|
|
Implement PWM support using standard zephyr APIs, exposed as the standard
MicroPython `machine.PWM` class.
Signed-off-by: Ayush Singh <ayush@beagleboard.org>
|
|
Updates the Zephyr port build instructions. The CI is updated to use
Zephyr docker image 0.27.4, SDK 0.17.0 and the latest Zephyr release
tag.
Tested on max32690fthr and frdm_k64f.
Signed-off-by: Maureen Helm <maureen.helm@analog.com>
Signed-off-by: Detlev Zundel <dzu@member.fsf.org>
|
|
Commit 07a8e3253a2d8a2076c9c83c4ed4158fa3fbb2a2 removes
CONFIG_MMC_VOLUME_NAME from the Kconfig space. Instead we need to use
the device tree to find the "disk-name" property of "zephyr,mmc-disk"
devices.
Signed-off-by: Detlev Zundel <dzu@member.fsf.org>
|
|
Commit 1b6e0f64796dfd6f86a8679ea6d24e1fca1e63a8 for Zephyr v4.0.0
changed the function "thread_analyzer_print" to require a cpu argument
and allow thread analysis on each cpu separately. The argument is
ignored when THREAD_ANALYZER_AUTO_SEPARATE_CORES=n which is the
default on single core machines.
Promote this change to the MicroPython zephyr module.
Signed-off-by: Detlev Zundel <dzu@member.fsf.org>
Signed-off-by: Maureen Helm <maureen.helm@analog.com>
|
|
The (deprecated) kconfig option NET_SOCKETS_POSIX_NAMES was removed in
commit abad505bdeed6102061767f45acd63323973f564 so remove it from our
configuration.
As the option has been deprecated longer, this also works for v3.7 and
v4.0 the other still supported versions.
Signed-off-by: Detlev Zundel <dzu@member.fsf.org>
|
|
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>
|