| Age | Commit message (Collapse) | Author |
|
This fixes a regression introduced by PR #17926 / commit
b5fcb33eaa682bb666c839cd4fb301175cc3564f which accidentally disabled
`hashlib.sha1` and the `cryptolib` module on rp2 boards that don't have
networking enabled, eg RPI_PICO.
`hashlib.md5` is enabled to keep the configuration the same as boards that
do have networking enabled.
Signed-off-by: Damien George <damien@micropython.org>
|
|
On RP2350B where there are more than 32 pins, using
`pio_sm_set_pins_with_mask()` and `pio_sm_set_pindirs_with_mask()` is not
correct because their arguments are `uint32_t` and higher bits get lost
when `pio.gpio_base(16)` is used.
This commit fixes the issue by using the 64-bit API functions on RP2350B.
It also makes sure pin wrapping is supported, i.e. using [30, 31, 0, 1] or
[46, 47, 16, 17] as contiguous pin ranges for a PIO program.
Fixes issue #16199.
Signed-off-by: Anson Mansfield <amansfield@mantaro.com>
|
|
Clears the control registers and aborts the closed channel upon a call to
`.close()` and `.__del__()` (GC collect).
Fixes issue #18446.
Signed-off-by: Dryw Wade <dryw.wade@sparkfun.com>
|
|
A follow up to 40df95357c7b3270dc60421a0078fd73b122473f / PR #17692, this
commit adds the HSTX alternate pin function for GPIO12-19 on the RP2350.
Signed-off-by: Dryw Wade <dryw.wade@sparkfun.com>
|
|
Add a #if MICROPY_PY_MACHINE_I2S guard around the call to
machine_i2s_init0() in ports/rp2/main.c. This matches the existing
guard around machine_i2s_deinit_all() in the same function.
Signed-off-by: David Lechner <david@pybricks.com>
|
|
This adds an ANSI-rendered pinout for the WeAct Studio RP2350B Core board.
Signed-off-by: Matt Trentini <matt.trentini@gmail.com>
|
|
Add support for the upcoming Soldered NULA Mini ESP32C6 board by Soldered
Electronics.
Signed-off-by: Josip Šimun Kuči <josipsimunkuci@gmail.com>
|
|
This is necessary to get native code running on the ESP32-P4.
Signed-off-by: Damien George <damien@micropython.org>
|
|
Eventually this cache flushing mechanism should be generalised to work the
same way for all architectures. But for now, this allows ESP32 RV32 SoCs
to flush the D-cache whenn needed.
Signed-off-by: Damien George <damien@micropython.org>
|
|
This was necessary to un-wedge the USJ TX path on ESP32-P4, I think because
the bootloader prints a lot on this chip. I think it might be possible to
hit it on other chips, though.
The implementation is based on the ESP-IDF driver, which will always add an
extra flush when the TXFIFO is empty in case the host is expecting a ZLP.
This work was funded through GitHub Sponsors.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
|
|
Includes a base variant with LAN, and C5_WIFI and C6_WIFI variants with
LAN, WiFi and BLE.
And builds this board in the esp32 CI, to cover the P4 support.
Signed-off-by: Vincent1-python <pywei201209@163.com>
Signed-off-by: Angus Gratton <angus@redyak.com.au>
Signed-off-by: Damien George <damien@micropython.org>
|
|
This commit adds support for ESP32-P4 SoCs.
Signed-off-by: Vincent1-python <pywei201209@163.com>
Signed-off-by: Angus Gratton <angus@redyak.com.au>
Signed-off-by: Damien George <damien@micropython.org>
|
|
(and a smaller binary size as a result)
Signed-off-by: Angus Gratton <angus@redyak.com.au>
|
|
TinyUSB defines TUD_OPT_RHPORT which is the same thing, make
shorter definition RHPORT in the two files which use it.
This work was funded through GitHub Sponsors.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
|
|
As per 4c9ce826cbfbd99cff10cc933064f87a13bee4ac the tests now target Python
3.8 syntax and features, so update the ruff configuration to match.
Changes in this commit:
- Update to Python 3.8 syntax.
- Ignore import not at top of module warnings.
- Exclude common SDK folders.
- Exclude cpydiff test with intentional error.
Also see: https://github.com/micropython/micropython-lib/pull/1059
Signed-off-by: Jos Verlinde <jos_verlinde@hotmail.com>
|
|
Currently the CI for stm32 only tests building about half of the available
MCU families. This commit adds the remaining families to the stm32 CI
jobs.
Signed-off-by: Damien George <damien@micropython.org>
|
|
This is needed to build Cortex-M55 (STM32N6) based boards.
Signed-off-by: Damien George <damien@micropython.org>
|
|
Some boards (eg NUCLEO_G0B1RE and NUCLEO_G474RE) have USB disabled but
still configure MICROPY_HW_USB_FS/HS for the cases where USB does get
enabled. Such a configuration should not build any of the code in
`usbd_conf.c`, nor the USB interrupt handlers.
Signed-off-by: Damien George <damien@micropython.org>
|
|
Signed-off-by: Damien George <damien@micropython.org>
|
|
This commit fixes the initialization sequence for TinyUSB when enabled on
the stm32 port:
- Following other ports, `mp_usbd_init()` should be called just after
running `boot.py`, to give the user a chance to configure USB.
- Hardware initialization (via `pyb_usbd_init()`) should only occur once,
the first time TinyUSB is started up. This is achieved by adding a hook
to the shared TinyUSB bindings to call `pyb_usbd_init()`, and only do the
hardware init if TinyUSB was not already initialized.
Also, `pyb_usbd_init()` is renamed `mp_usbd_ll_init()` to make it match
with the rest of the stared TinyUSB binding code.
Signed-off-by: Damien George <damien@micropython.org>
|
|
Break the FS and HS initialization routines out into separate functions,
and call them as necessary from the TinyUSB or STM USB helper functions.
Signed-off-by: Damien George <damien@micropython.org>
|
|
This allows a port to do hardware initialization just before the TinyUSB
stack is brought up. That means the hardware is only turned on when it's
needed.
Signed-off-by: Damien George <damien@micropython.org>
|
|
This change adds WeAct Studio Mini STM32H743 board support to the STM32
port. Some of the work from PR #12540 is combined here.
WeAct Studio Mini STM32H43 board:
https://github.com/WeActStudio/MiniSTM32H7xx
This board uses STM32H743VI:
https://www.st.com/en/microcontrollers-microprocessors/stm32h743vi.html
Signed-off-by: Yuuki NAGAO <wf.yn386@gmail.com>
|
|
Signed-off-by: Damien George <damien@micropython.org>
|
|
Signed-off-by: Mike Tolkachev <contact@miketolkachev.dev>
|
|
Signed-off-by: Mike Tolkachev <contact@miketolkachev.dev>
|
|
Allows using TinyUSB stack on N6.
Note there's still an issue with TinyUSB on the N6: `pyb_usbd_init()` can't
be called multiple times (on soft-reboot).
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
|
|
This commit adds a new workflow step to the CI, to test the debug
emitter provided by mpy-cross. The checks being done are limited to
make sure that the debug emitter does not crash and emits opcodes for a
simple test file that is guaranteed to work for all configurations.
Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
|
|
This commit fixes a regression introduced in
1b92bda5b8e5e2db8e57c4b7134930e52bc5207a, where a new architecture was
added to mpy-cross but it had no matching native emitter exists.
The result was that the architecture emitter entry point would be
correctly calculated according to the native architecture index, but if
the emitters entry points table was not updated to match the new number
of architectures an out of bound access may be performed.
Unfortunately adding RV64IMC shifted the debug emitter index further
down the table, and that table wasn't updated to reflect the lack of an
emitter for RV64. Adding a NULL entry there would cause a NULL pointer
access as there was no need to perform any check about the emitter entry
point function's validity until now.
Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
|
|
Adds the ability to use PSRAM and non-contiguous memory.
Example usage, add this to dts overlay:
/ {
heap_psram {
compatible = "micropython,heap";
size = <DT_SIZE_M(4)>;
memory-region = <&psram>;
};
heap_sram1 {
compatible = "micropython,heap";
size = <DT_SIZE_K(140)>;
memory-region = <&sram1>;
};
};
Signed-off-by: Vdragon <mail@massdriver.space>
|
|
Allows using custom DTS things such as bindings.
Signed-off-by: Vdragon <mail@massdriver.space>
|
|
Fixes issue #7915.
Signed-off-by: Matt Trentini <matt.trentini@gmail.com>
|
|
There were a few typos in the documentation for the `I2CTarget.irq` method
description where `IRQ_ADDR_MATCH_READ` was used, however
`IRQ_ADDR_MATCH_WRITE` should have been used.
Fixes issue #18470.
Signed-off-by: Alex Tran <alex.t.tran@gmail.com>
|
|
Fixes issue #18370.
Signed-off-by: Jos Verlinde <jos_verlinde@hotmail.com>
|
|
This commit adds custom command completion functions for both the zsh
and fish shell.
The behaviour for those new completions follow the existing completion
for the bash shell, including the way to generate the completion alias
(with appropriately named command line switches).
Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
|
|
Add the IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP to modsocket in the Unix
port so that the directives take on the values defined in the system
headers. This is needed because the values of these directives are
different for MacOS vs other Unix systems.
Fixes issue #8456.
Signed-off-by: Alex Tran <alex.t.tran@gmail.com>
|
|
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v5...v6)
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-version: '6'
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
|
|
Uses constants added in previous commit.
This work was funded through GitHub Sponsors.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
|
|
Changes are:
- Add constants for some of the supported ESP-NOW data rates.
- Add constants for switching an ESP32 WLAN radio in/out of
Long Range mode.
- Document the new constants and their usage.
This work was funded through GitHub Sponsors.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
|
|
Only set the rate on interfaces that are active.
It seems ESP-IDF 5.4.x or so added checks that the interface is enabled,
whereas previous versions silently did nothing.
This work was funded through GitHub Sponsors.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
|
|
Noted while adding C2 support that some of these comments are a bit out of
date. Spun out to its own commit, and also mention C5 as well.
This change also adds some recommendation on which ESP32 board to pick, as
we occasionally see issues or questions that would be non-issues on a board
with more RAM (and for small production or personal projects the savings of
picking a cheaper ESP32 chip are basically neglible).
This work was funded through GitHub Sponsors.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
|
|
It's now available in the version of TinyUSB used by this repository.
Also, update to the newer `tud_cdc_configure_t` struct name and newer
`tud_cdc_configure()` function name.
Signed-off-by: Damien George <damien@micropython.org>
|
|
This is 0.19.0 plus the following changes:
- remove obsolete dcd_esp32sx
- fix for HID stylus descriptor and HID example
- typos, docs and generator scripts
- MTP fix
- DWC2 enumeration when EP0 size=8
- DWC2 fix for EP0 IN
- stm32 FSDEV IRQ remapping fix
- DWC2 ZLP fix
The reason we need the extra 24 commits is due to a bug with TinyUSB's
handling of zero-length-packets in the DWC2 (Synopsis) backend, which
affects the stm32 port. That's fixed by
https://github.com/hathach/tinyusb/pull/3293
Signed-off-by: Damien George <damien@micropython.org>
|
|
Signed-off-by: Damien George <damien@micropython.org>
|
|
This commit adds a `--json` option to `mpy-tool.py`, in order to generate
Compiler-Explorer-compatible JSON annotation information for the bytecode
disassembly. Some of this information might be theoretically possible to
parse out from the text itself, but not all of it is, e.g. disambiguating
child references with non-unique simple names.
Signed-off-by: Anson Mansfield <amansfield@mantaro.com>
|
|
Add wrapper macros that by default expand to the callback name.
Users can define this macro to add a prefix (e.g., mp_) to
callback implementations, to redirect or completely override
MicroPython's TinyUSB callbacks.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
|
|
When `MICROPY_PYEXEC_ENABLE_EXIT_CODE_HANDLING` is enabled, `SystemExit`
now sets the `PYEXEC_FORCED_EXIT` flag in addition to the exit code. This
allows the REPL to properly detect and exit when SystemExit is raised,
while still preserving the exit code in the lower bits.
Fixes `repl_lock.py` test which expects REPL to exit on `SystemExit`.
Signed-off-by: Andrew Leech <andrew.leech@planetinnovation.com.au>
|
|
Enable `MICROPY_PYEXEC_ENABLE_EXIT_CODE_HANDLING` to propagate `sys.exit()`
exit codes properly. Update `convert_pyexec_result()` to handle return
values where pyexec returns the exit code with `PYEXEC_FORCED_EXIT` flag
set for `SystemExit`. Extract the exit code from the lower 8 bits when the
flag is set, otherwise return as-is (0 for success, 1 for exception).
Signed-off-by: Andrew Leech <andrew.leech@planetinnovation.com.au>
|
|
This ensures that ctrl-C works on the unix port when executing code at the
REPL.
Signed-off-by: Damien George <damien@micropython.org>
|
|
Consolidates file and string execution to use the standard pyexec interface
for consistency with other ports.
Simplify execute_from_lexer for remaining usage: Remove unused LEX_SRC_VSTR
and LEX_SRC_FILENAME cases, keeping only LEX_SRC_STR for REPL and
LEX_SRC_STDIN for stdin execution.
Signed-off-by: Andrew Leech <andrew.leech@planetinnovation.com.au>
|