summaryrefslogtreecommitdiffstatshomepage
path: root/docs
Commit message (Collapse)AuthorAge
* docs/rp2: Document the new rp2 Timer hard= option.Chris Webb4 days
| | | | Signed-off-by: Chris Webb <chris@arachsys.com>
* esp32/modesp32: Make wake_on_ext1 available only on SoCs supporting it.Meir Armon5 days
| | | | | | | The `esp32.wake_on_ext1()` method should only be available on boards that have SOC_PM_SUPPORT_EXT1_WAKEUP=y. And update docs to reflect this. Signed-off-by: Meir Armon <meirarmon@gmail.com>
* esp32/modesp32: Make wake_on_ext0 available only on SoCs supporting it.Meir Armon5 days
| | | | | | | The `esp32.wake_on_ext0()` method should only be available on boards that have SOC_PM_SUPPORT_EXT0_WAKEUP=y. And update docs to reflect this. Signed-off-by: Meir Armon <meirarmon@gmail.com>
* esp32/modesp32: Make wake_on_touch available only on SoCs supporting it.Meir Armon5 days
| | | | | | | The `esp32.wake_on_touch()` method should only be available on boards that have SOC_TOUCH_SENSOR_SUPPORTED=y. And update docs to reflect this. Signed-off-by: Meir Armon <meirarmon@gmail.com>
* esp32/modesp32: Make wake_on_ulp available only on SoCs that support it.Meir Armon5 days
| | | | | | | The `esp32.wake_on_ulp()` method should only be available on boards that have SOC_ULP_SUPPORTED=y. Update docs to reflect this. Signed-off-by: Meir Armon <meirarmon@gmail.com>
* esp32: Update ADC driver update to the new esp_adc API.purewack2025-06-05
| | | | | | | | | | | | | | | | | | This commit updates the ADC to use the new driver `esp_adc/adc_oneshot.h`. There are several errata notes about not being able to change the bit-width of the ADCs certain chips. The only chip that can switch resolution to a lower one is the normal ESP32. ESP32 C2 and S3 are stuck at 12 bits, while S2 is at 13 bits. On the S2, you can change the resolution, but it has no effect on the resolution, rather, it prevents attenuation from working at all! The resolution is set to the maximum possible for each SoC, with the ESP32 being the only one not throwing errors when trying to set the bit-width to 9, 10, 11 or 12 bits using `ADC.width(bits)`. Signed-off-by: Damian Nowacki (purewack) bobimaster15@gmail.com
* tools/mpy_ld.py: Resolve fixed-address symbols if requested.Alessandro Gatti2025-06-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit lets mpy_ld.py resolve symbols not only from the object files involved in the linking process, or from compiler-supplied static libraries, but also from a list of symbols referenced by an absolute address (usually provided by the system's ROM). This is needed for ESP8266 targets as some C stdlib functions are provided by the MCU's own ROM code to reduce the final code footprint, and therefore those functions' implementation was removed from the compiler's support libraries. This means that unless `LINK_RUNTIME` is set (which lets tooling look at more libraries to resolve symbols) the build process will fail as tooling is unaware of the ROM symbols' existence. With this change, fixed-address symbols can be exposed to the symbol resolution step when performing natmod linking. If there are symbols coming in from a fixed-address symbols list and internal code or external libraries, the fixed-address symbol address will take precedence in all cases. Although this is - in theory - also working for the whole range of ESP32 MCUs, testing is currently limited to Xtensa processors and the example natmods' makefiles only make use of this commit's changes for the ESP8266 target. Natmod builds can set the MPY_EXTERN_SYM_FILE variable pointing to a linkerscript file containing a series of symbols (weak or strong) at a fixed address; these symbols will then be used by the MicroPython linker when packaging the natmod. If a different natmod build method is used (eg. custom CMake scripts), `tools/mpy_ld.py` can now accept a command line parameter called `--externs` (or its short variant `-e`) that contains the path of a linkerscript file with the fixed-address symbols to use when performing the linking process. The linkerscript file parser can handle a very limited subset of binutils's linkerscript syntax, namely just block comments, strong symbols, and weak symbols. Each symbol must be in its own line for the parser to succeed, empty lines or comment blocks are skipped. For an example of what this parser was meant to handle, you can look at `ports/esp8266/boards/eagle.rom.addr.v6.ld` and follow its format. The natmod developer documentation is also updated to reflect the new command line argument accepted by `mpy_ld.py` and the use cases for the changes introduced by this commit. Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
* extmod/modframebuf: Add support for blit'ing read-only data.Damien George2025-06-04
| | | | | | | | | | | | | | | | | | | | | | Currently the `FrameBuffer.blit(buf, x, y)` method requires the `buf` argument to be another `FrameBuffer`, which is quite restrictive because it doesn't allow blit'ing read-only memory/data. This commit extends `blit()` to allow the `buf` argument to be a tuple or list of the form: (buffer, width, height, format[, stride]) where `buffer` can be anything with the buffer protocol and may be read-only, eg `bytes`. Also, the palette argument to `blit()` may be of the same form. The form of this tuple/list was chosen to be the same as the signature of the `FrameBuffer` constructor (that saves quite a bit of code size doing it that way). Signed-off-by: Damien George <damien@micropython.org>
* docs: Add a description of recv/recvfrom flags argument.Angus Gratton2025-06-03
| | | | | | | | Implementation added for various ports in the parent commits. This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton <angus@redyak.com.au>
* docs/esp32: Mention the use of Timer(0) by UART.IRQ_RXIDLE.robert-hh2025-05-28
| | | | | | In both the machine.UART and esp32.quickref sections. Signed-off-by: robert-hh <robert@hammelrath.com>
* docs/esp32/quickref: Mention the different timer counts.robert-hh2025-05-28
| | | | | | Since the are ESP32 variants with 1, 2 or 4 hardware timers. Signed-off-by: robert-hh <robert@hammelrath.com>
* docs/library/time: Amend the documentation of time.mktime().robert-hh2025-05-28
| | | | | | | By showing the argument and refer to epoch instead of a fixed date. The note about epoch lists the ports using the POSIX epoch. Signed-off-by: robert-hh <robert@hammelrath.com>
* samd/boards: Add two SparkFun SAMD21 boards.robert-hh2025-05-28
| | | | | | | | | | Add support for the boards: - SparkFun SAMD21 Dev Breakout - SparkFun RedBoard Turbo Both boards are SAMD21 based and actively sold by SparkFun. Signed-off-by: robert-hh <robert@hammelrath.com>
* docs/reference/mpremote: Document the 'fs tree' command.Jos Verlinde2025-05-18
| | | | Signed-off-by: Jos Verlinde <Jos_Verlinde@hotmail.com>
* esp32/network_lan: Add PHY_GENERIC device type.Elvis Pfutzenreuter2025-05-16
| | | | | | | | | | | | | | Support the new PHY_GENERIC device type, added in ESP-IDF v5.4.0 [1]. This PHY driver was added to ESP-IDF to support "generic"/oddball PHY LAN chips like the JL1101, which offer no features beyond the bare 802.3 PHY standard and don't actually need a chip-specific driver (see discussion at [2]). [1] https://github.com/espressif/esp-idf/commit/0738314308ad36a73601ddb8bb82f1dcbfe1f550 [2] https://github.com/espressif/esp-eth-drivers/pull/28 Signed-off-by: Elvis Pfutzenreuter <epxx@epxx.co>
* esp32/modesp32: Implement esp32.idf_task_info().Daniël van de Giessen2025-05-16
| | | | | | | | | | This adds a new function, `esp32.idf_task_info()`, that can be used to retrieve task statistics which is useful for diagnosing issues where some tasks are using up a lot of CPU time. It's best used in conjunction with the `utop` module from micropython-lib. Signed-off-by: Daniël van de Giessen <daniel@dvdgiessen.nl>
* docs/esp32/quickref: Add PWM lightsleep example.IhorNehrutsa2025-05-16
| | | | Signed-off-by: Ihor Nehrutsa <Ihor.Nehrutsa@gmail.com>
* docs/esp32: Improve PWM documentation and examples.IhorNehrutsa2025-05-16
| | | | | | | | This reduces inconsitencies between esp32 and other ports. According to the discussion in #10817. Signed-off-by: Ihor Nehrutsa <Ihor.Nehrutsa@gmail.com>
* docs,ports: Fix SparkFun capitalization.Malcolm McKellips2025-05-07
| | | | | | | 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>
* docs/zephyr: Add zephyr FlashArea IDs docs.Vdragon2025-05-02
| | | | Signed-off-by: Vdragon <mail@massdriver.space>
* docs/zephyr: Add quick reference for PWM support.Ayush Singh2025-04-30
| | | | | | Add docs for PWM support. Signed-off-by: Ayush Singh <ayush@beagleboard.org>
* zephyr: Upgrade to Zephyr v4.0.0.Maureen Helm2025-04-29
| | | | | | | | | | | 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>
* zephyr: Fix call to thread_analyzer_print for v4.0.Detlev Zundel2025-04-29
| | | | | | | | | | | | | 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>
* docs/reference/mpremote: Update docs for mpremote rm -r.Jos Verlinde2025-04-09
| | | | Signed-off-by: Jos Verlinde <Jos_Verlinde@hotmail.com>
* docs/library/vfs: Document no-args mount output.Anson Mansfield2025-03-27
| | | | Signed-off-by: Anson Mansfield <amansfield@mantaro.com>
* docs/rp2: Add network information to the rp2 quickref.Matt Trentini2025-03-25
| | | | | | | | | | | 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>
* mimxrt: Enable default devices for I2C, SPI and UART.robert-hh2025-03-25
| | | | | | | | 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>
* mimxrt/boards/MAKERDIARY_RT1011_NANO_KIT: Add new Makerdiary board.robert-hh2025-03-17
| | | | | | | | 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>
* tools/mpy_ld.py: Allow linking static libraries.Volodymyr Shymanskyy2025-03-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* esp32/machine_sdcard: Add SDCard SPI mode support for ESP32-S2,C3,C6.Angus Gratton2025-03-13
| | | | | | | | | | | 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>
* esp32/machine_sdcard: Add SDCard pin assignments for ESP32-S3 support.Angus Gratton2025-03-13
| | | | | | | | | | 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>
* tools/mpremote: Add romfs query, build and deploy commands.Damien George2025-03-06
| | | | | | | 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>
* esp8266/network_wlan: Allow enumerating connected stations in AP mode.Alessandro Gatti2025-03-05
| | | | | | | | | | | | | | | | | 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>
* py/modsys: Add sys.implementation._build entry.Damien George2025-03-05
| | | | | | | | | | | | | | | | | | | 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>
* docs/samd: Update the SAMD documentation describing default IDs/pins.robert-hh2025-03-03
| | | | | | | | | | | | 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>
* docs/library/machine.Pin: Show availability of low, high and toggle.robert-hh2025-02-28
| | | | Signed-off-by: robert-hh <robert@hammelrath.com>
* docs: Fix double 'the' in documentation.Ronald Weber2025-02-25
| | | | Signed-off-by: Ronald Weber <ronaldxweber@gmail.com>
* all: Upgrade codespell to v2.4.1.Christian Clauss2025-02-25
| | | | | | | 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>
* tools/mpremote: Add support for relative urls in package.json files.Glenn Moloney2025-02-24
| | | | | | | | | | | | | | | | | | | | | 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>
* extmod/modtls_mbedtls: Wire in support for DTLS.Keenan Johnson2025-02-14
| | | | | | | | | | | | | | | | | | | | | | | | | 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>
* docs/library/marshal: Document the marshal module.Damien George2025-02-11
| | | | Signed-off-by: Damien George <damien@micropython.org>
* docs/library/espnow: Clarify usage of the "rate" configuration key.Alessandro Gatti2025-02-11
| | | | | | | | | | | | | | 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>
* docs/reference: Add strings vs bytes to speed optimisation tips.Angus Gratton2025-02-11
| | | | | | | | | 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>
* docs: Note which ports have default or optional network.PPP support.Angus Gratton2025-02-11
| | | | | | | 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>
* docs/esp32: Add documentation for SPI Ethernet devices on esp32 port.Angus Gratton2025-02-11
| | | | | | | | 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>
* rp2/rp2_pio: Add side_pindir support for PIO.Markus Gyger2025-02-08
| | | | | | | | | | | | Side-setting can also be used to change pin directions instead of pin values. This adds a parameter `side_pindir` to decorator `asm_pio()` to configure it. Also replaces a few close-by 0s with corresponding PIO.* constants. Addresses issue #10027. Signed-off-by: Markus Gyger <markus@gyger.org>
* docs/samd/pinout: Add pinout for the Generic SAMD board types.robert-hh2025-02-07
| | | | | | | The table shows the devices available at the pin and the respective package letter. Signed-off-by: robert-hh <robert@hammelrath.com>
* docs/samd/pinout: Add pinout for Adafruit NeoKey Trinkey and QT Py.robert-hh2025-02-07
| | | | | | Only pins accessible at the board are shown. Signed-off-by: robert-hh <robert@hammelrath.com>
* LICENSE,docs: Update copyright year range to include 2025.Damien George2025-01-22
| | | | Signed-off-by: Damien George <damien@micropython.org>
* docs/esp32: Defer to the download page for flashing steps.Angus Gratton2025-01-17
| | | | | | | | | The user already has it open, and its customised for their particular board. This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton <angus@redyak.com.au>