Commit graph

1768 commits

Author SHA1 Message Date
foamyguy
1c199268df
Merge pull request #10485 from dunkmann00/static-stubs
Add a static stubs directory
2025-07-25 08:12:52 -05:00
Scott Shawcroft
a7ebe3b6c7
restart -> reset 2025-07-17 13:16:49 -07:00
George Waters
b4a8d45e0c
Add redirect from old micropython doc page 2025-07-16 21:48:46 -04:00
Scott Shawcroft
7ec01bbdbf
Add restart/reload note about env variables
Fixes #10450
2025-07-16 14:14:04 -07:00
George Waters
559a72b4d6
Use stub for micropython module doc generation 2025-07-16 14:13:13 -04:00
Dan Halbert
1263d11286 Merge remote-tracking branch 'adafruit/main' into merge-micropython-v1.25.0 2025-06-20 17:25:01 -04:00
Dan Halbert
5fb3f960ca MicroPython v1.25.0 merge 2025-06-20 14:26:24 -04:00
foamyguy
c78f843924 revert latex docs build workaround 2025-06-18 18:34:47 -05:00
Dan Halbert
34af8c378b shrink boards and remove non-circuitpython attributes in micropython module doc 2025-06-13 12:18:36 -04:00
Dan Halbert
8c7b5923cc fix compilation issues 2025-06-12 22:48:11 -04:00
Dan Halbert
356643826a wip: fix some tests 2025-06-11 22:53:06 -04:00
Dan Halbert
1381e17320 wip: initial merge; no compilation yet 2025-06-08 19:23:05 -04:00
foamyguy
4663b3fd71 add the prepare readme python script 2025-05-08 09:16:18 -05:00
Jos Verlinde
ef8282c717 docs/reference/mpremote: Update docs for mpremote rm -r.
Signed-off-by: Jos Verlinde <Jos_Verlinde@hotmail.com>
2025-04-09 10:51:48 +10:00
Dan Halbert
c286fc4bca
Merge pull request #9878 from eightycc/bleio-build-fix
Allow Selection of _bleio by Board, Fixup CIRCUITPY_BLEIO Flags
2025-04-07 18:52:56 -04:00
Scott Shawcroft
2e412427ab
Add additional documentation 2025-04-01 11:12:05 -07:00
eightycc
ed3ccfd4ab Update module support matrix to include new bleio selection flags. 2025-03-31 06:15:44 -07:00
Scott Shawcroft
1cb188d6d3
Add native support for LVGL binary fonts on disk
This allows the terminal to use a font from the disk at
/fonts/terminal.lvfontbin for languages that need more
characters than we want to ship.

TileGrid now support 16bit indices as well.

Font files for use with it are generated by the GitHub actions
here:
https://github.com/adafruit/circuitpython-font-generator
2025-03-28 15:54:41 -07:00
Anson Mansfield
c68a40ac94 docs/library/vfs: Document no-args mount output.
Signed-off-by: Anson Mansfield <amansfield@mantaro.com>
2025-03-27 16:37:04 +11:00
Matt Trentini
39452dbeed docs/rp2: Add network information to the rp2 quickref.
Some rp2 boards include WiFi, at least with the very popular Pico W and
Pico 2 W.  New users frequently ask how to set up WiFi and are confused
because it's not covered in the quickref.

This commit adds the wlan section, copied and modified with notes from the
ESP32 quickref.

Signed-off-by: Matt Trentini <matt.trentini@gmail.com>
2025-03-25 23:28:56 +11:00
robert-hh
cdcc70d4f8 mimxrt: Enable default devices for I2C, SPI and UART.
Since all boards are configured to have a I2C(0), SPI(0) and UART(1), these
can be set as default devices, allowing the instantiation of I2C(), SPI(),
UART() without an id argument.

Signed-off-by: robert-hh <robert@hammelrath.com>
2025-03-25 12:44:20 +11:00
Dan Halbert
edf507e57d Multiple documentation fixes 2025-03-21 14:30:06 -04:00
robert-hh
f1018ee5c2 mimxrt/boards/MAKERDIARY_RT1011_NANO_KIT: Add new Makerdiary board.
This is a board based on the i.MX RT1011 in breadboard-friendly shape.  A
good basic board with 16M flash and regular pinout, providing access to
many GPIO_nn and GPIO_AD_nn Pins.

Signed-off-by: robert-hh <robert@hammelrath.com>
2025-03-17 13:59:32 +11:00
Volodymyr Shymanskyy
51976110e2 tools/mpy_ld.py: Allow linking static libraries.
This commit introduces an additional symbol resolution mechanism to the
natmod linking process.  This allows the build scripts to look for required
symbols into selected libraries that are provided by the compiler
installation (libgcc and libm at the moment).

For example, using soft-float code in natmods, whilst technically possible,
was not an easy process and required some additional work to pull it off.
With this addition all the manual (and error-prone) operations have been
automated and folded into `tools/mpy_ld.py`.

Both newlib and picolibc toolchains are supported, albeit the latter may
require a bit of extra configuration depending on the environment the build
process runs on.  Picolibc's soft-float functions aren't in libm - in fact
the shipped libm is nothing but a stub - but they are inside libc.  This is
usually not a problem as these changes cater for that configuration quirk,
but on certain compilers the include paths used to find libraries in may
not be updated to take Picolibc's library directory into account.  The bare
metal RISC-V compiler shipped with the CI OS image (GCC 10.2.0 on Ubuntu
22.04LTS) happens to exhibit this very problem.

To work around that for CI builds, the Picolibc libraries' path is
hardcoded in the Makefile directives used by the linker, but this can be
changed by setting the PICOLIBC_ROOT environment library when building
natmods.

Signed-off-by: Volodymyr Shymanskyy <vshymanskyi@gmail.com>
Co-authored-by: Alessandro Gatti <a.gatti@frob.it>
2025-03-17 13:03:27 +11:00
Angus Gratton
c85eefc55b esp32/machine_sdcard: Add SDCard SPI mode support for ESP32-S2,C3,C6.
These micros don't have full SDMMC host support, but they can initialise
the SDCard in SPI mode.

A bit limited on C3 and C6 as they only have one host SPI peripheral.

This work was funded through GitHub Sponsors.

Signed-off-by: Angus Gratton <angus@redyak.com.au>
2025-03-13 12:27:23 +11:00
Angus Gratton
79fb5aa878 esp32/machine_sdcard: Add SDCard pin assignments for ESP32-S3 support.
Previously ESP32-S3 SDMMC could only use fixed pin assignments, however the
ESP-IDF defaults don't match common boards. The chip also supports using
GPIO Matrix to assign any pin.

This work was funded through GitHub Sponsors.

Signed-off-by: Angus Gratton <angus@redyak.com.au>
2025-03-13 12:27:01 +11:00
Scott Shawcroft
6f609bf0f8
Merge pull request #10121 from tannewt/fix_release_info_script
Fix build board info
2025-03-11 15:29:30 -07:00
Scott Shawcroft
5a8a0c3b03
Fix build board info
Use board mapping instead of looking for directories
2025-03-06 13:55:44 -08:00
foamyguy
77db5b43a5 update picodvi display modes and default docs 2025-03-06 14:43:08 -06:00
Damien George
0c98c60b68 tools/mpremote: Add romfs query, build and deploy commands.
These commands use the `vfs.rom_ioctl()` function to manage the ROM
partitions on a device, and create and deploy ROMFS images.

Signed-off-by: Damien George <damien@micropython.org>
2025-03-06 12:52:35 +11:00
Alessandro Gatti
4d034f817c esp8266/network_wlan: Allow enumerating connected stations in AP mode.
This commit introduces the ability to obtain a list of stations
connected to the device when in soft-AP mode.

A new parameter ("stations") to pass to WLAN.status is supported,
returning a tuple of (bssid, ipv4) entries, one per connected station.
An empty tuple is returned if no stations are connected, and an
exception is raised if an error occurred whilst building the python
objects to return to the interpreter.

Documentation is also updated to cover the new parameter.

This fixes #5395.

Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
2025-03-05 16:15:31 +11:00
Damien George
f5b4545761 py/modsys: Add sys.implementation._build entry.
For a given MicroPython firmware/executable it can be sometimes important
to know how it was built, which variant/board configuration it came from.

This commit adds a new field `sys.implementation._build` that can help
identify the configuration that MicroPython was built with.

For now it's either:
* <VARIANT> for unix, webassembly and windows ports
* <BOARD>-<VARIANT> for microcontroller ports (the variant is optional)

In the future additional elements may be added to this string, separated by
a hyphen.

Resolves issue #16498.

Signed-off-by: Damien George <damien@micropython.org>
2025-03-05 12:23:40 +11:00
robert-hh
016ae19cf0 docs/samd: Update the SAMD documentation describing default IDs/pins.
Changes are:
- Add the RX/TX pins to the table.  In most cases these are the D0/D1 pins.
- Document the ability for the instantiation of the default devices without
  submitting ID or pins.
- Improve the example script creating the pin list to show multiple name
  assigments to the same pin.
- Fix errors in the pinout document.

Signed-off-by: robert-hh <robert@hammelrath.com>
2025-03-03 10:59:26 +11:00
robert-hh
48925fd793 docs/library/machine.Pin: Show availability of low, high and toggle.
Signed-off-by: robert-hh <robert@hammelrath.com>
2025-02-28 16:51:54 +11:00
RetiredWizard
761d787148 Use CIRCUITPY_OS_GETENV to guard new feature 2025-02-26 16:00:02 -05:00
RetiredWizard
2ba8d26314 disable scaling for small M0 builds 2025-02-25 11:50:26 -05:00
RetiredWizard
cdaccdbda3 Add CIRCUITPY_TERMINAL_SCALE settings.toml parameter 2025-02-25 03:05:58 -05:00
Ronald Weber
3f0dd13d93 docs: Fix double 'the' in documentation.
Signed-off-by: Ronald Weber <ronaldxweber@gmail.com>
2025-02-25 17:07:16 +11:00
Christian Clauss
5e206fdeb5 all: Upgrade codespell to v2.4.1.
This commit upgrades from codespell==2.2.6 to the current codespell==2.4.1,
adding emac to the ignore-words-list.

Signed-off-by: Christian Clauss <cclauss@me.com>
2025-02-25 16:11:33 +11:00
Glenn Moloney
2992e34956 tools/mpremote: Add support for relative urls in package.json files.
URLs in `package.json` may now be specified relative to the base URL of the
`package.json` file.

Relative URLs wil work for `package.json` files installed from the web as
well as local file paths.

Docs: update `docs/reference/packages.rst` to add documentation for:

- Installing packages from local filesystems (PR #12476); and
- Using relative URLs in the `package.json` file (PR #12477);
- Update the packaging example to encourage relative URLs as the default
  in `package.json`.

Add `tools/mpremote/tests/test_mip_local_install.sh` to test the
installation of a package from local files using relative URLs in the
`package.json`.

Signed-off-by: Glenn Moloney <glenn.moloney@gmail.com>
2025-02-24 13:29:40 +11:00
Randall Scharpf
3b0b4d3b5a Merge remote-tracking branch 'upstream/main' into main git diff main pixel_trinkey_test# Please enter a commit message to explain why this merge is necessary, 2025-02-13 18:40:43 -08:00
Keenan Johnson
321b30ca56 extmod/modtls_mbedtls: Wire in support for DTLS.
This commit enables support for DTLS, i.e. TLS over datagram transport
protocols like UDP.  While support for DTLS is absent in CPython, it is
worth supporting it in MicroPython because it is the basis of the
ubiquitous CoAP protocol, used in many IoT projects.

To select DTLS, a new set of "protocols" are added to SSLContext:
- ssl.PROTOCOL_DTLS_CLIENT
- ssl.PROTOCOL_DTLS_SERVER

If one of these is set, the library assumes that the underlying socket is a
datagram-like socket (i.e. UDP or similar).

Our own timer callbacks are implemented because the out of the box
implementation relies on `gettimeofday()`.

This new DTLS feature is enabled on all ports that use mbedTLS.

This commit is an update to a previous PR #10062.

Addresses issue #5270 which requested DTLS support.

Signed-off-by: Keenan Johnson <keenan.johnson@gmail.com>
2025-02-14 12:55:25 +11:00
e8eed627cc Move MaTouch link to the right spot 2025-02-13 13:41:10 -06:00
28cff5da28 raspberrypi: Add DVI auto-setup for select boards
This can be enabled on additional boards provided the board:
 * has a HSTX or DVI connector built in
 * connects the primary I2C bus to this connector
 * has pull-ups on this connector
 * for RP2040, a `preflight` function needs to be written to check
   the requested resolution is valid

If a DVI display is configured, it will be set as the primary display
and be available as `supervisor.runtime.display`. It will not be
`board.DISPLAY`.
2025-02-13 13:41:10 -06:00
Damien George
e40a3fdb81 docs/library/marshal: Document the marshal module.
Signed-off-by: Damien George <damien@micropython.org>
2025-02-11 16:59:11 +11:00
Alessandro Gatti
3b62524661 docs/library/espnow: Clarify usage of the "rate" configuration key.
This commit adds a clarification for the ESPNow module's documentation
regarding its "config" method.

The original documentation for that method could be interpreted as having
all its configuration keys being able to be queried, but the "rate"
configuration key is actually write-only due to ESP-IDF's lack of a way to
retrieve that bit of information from the radio's configuration.  The
documentation changes highlight the fact that said configuration key is
actually write-only.

Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
2025-02-11 16:23:35 +11:00
Angus Gratton
0a55f1f40c docs/reference: Add strings vs bytes to speed optimisation tips.
Also add some additional context links, suggestions for alternative
classes, etc.

This work was funded through GitHub Sponsors.

Signed-off-by: Angus Gratton <angus@redyak.com.au>
2025-02-11 16:17:00 +11:00
Angus Gratton
bab099826e docs: Note which ports have default or optional network.PPP support.
Also add the default values of these macros to the respective
`mpconfigport.h` files, to improve discoverability.

Signed-off-by: Angus Gratton <angus@redyak.com.au>
2025-02-11 16:11:33 +11:00
Angus Gratton
12dd9cb745 docs/esp32: Add documentation for SPI Ethernet devices on esp32 port.
Also cross-link with the other WIZNET5K driver, to avoid confusion.

This work was funded through GitHub Sponsors.

Signed-off-by: Angus Gratton <angus@redyak.com.au>
2025-02-11 12:56:42 +11:00
Randall Scharpf
d64ce00b23 Merge remote-tracking branch 'upstream/main' into main 2025-02-10 14:32:24 -08:00