| Commit message (Collapse) | Author | Age |
|
|
|
| |
Signed-off-by: Chris Webb <chris@arachsys.com>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
In both the machine.UART and esp32.quickref sections.
Signed-off-by: robert-hh <robert@hammelrath.com>
|
|
|
|
|
|
| |
Since the are ESP32 variants with 1, 2 or 4 hardware timers.
Signed-off-by: robert-hh <robert@hammelrath.com>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Jos Verlinde <Jos_Verlinde@hotmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Ihor Nehrutsa <Ihor.Nehrutsa@gmail.com>
|
|
|
|
|
|
|
|
| |
This reduces inconsitencies between esp32 and other ports.
According to the discussion in #10817.
Signed-off-by: Ihor Nehrutsa <Ihor.Nehrutsa@gmail.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>
|
|
|
|
| |
Signed-off-by: Vdragon <mail@massdriver.space>
|
|
|
|
|
|
| |
Add docs for PWM support.
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 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>
|
|
|
|
| |
Signed-off-by: Jos Verlinde <Jos_Verlinde@hotmail.com>
|
|
|
|
| |
Signed-off-by: Anson Mansfield <amansfield@mantaro.com>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: robert-hh <robert@hammelrath.com>
|
|
|
|
| |
Signed-off-by: Ronald Weber <ronaldxweber@gmail.com>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Damien George <damien@micropython.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
The table shows the devices available at the pin and the respective package
letter.
Signed-off-by: robert-hh <robert@hammelrath.com>
|
|
|
|
|
|
| |
Only pins accessible at the board are shown.
Signed-off-by: robert-hh <robert@hammelrath.com>
|
|
|
|
| |
Signed-off-by: Damien George <damien@micropython.org>
|
|
|
|
|
|
|
|
|
| |
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>
|