summaryrefslogtreecommitdiff
path: root/docs/zephyr
AgeCommit message (Collapse)Author
2025-10-22zephyr: Mount all disks and flash partition, formatting if necessary.Ned Konz
Existing C code in `main.c` only mounts a flash filesystem if one exists, and doesn't do anything if the 'storage' partition is not formatted. This commit moves the mounting logic from `main.c` to frozen code using `modules/_boot.py` and adds the formatting of a previously unformatted partition if the mount fails. Every available disk (in the newly added `DiskAccess.disks` tuple) will be mounted on separate mount points (if they're formatted), and the 'storage' flash partition (if any) will be mounted on /flash (and will be formatted as LFS2 if necessary). Also, `sys.path` will be updated with appropriate 'lib' subdirectories for each mounted filesystem. The current working directory will be changed to the last `DiskAccess.disk` mounted, or to /flash if no disks were mounted. Then `boot.py` and `main.py` will be executed from the current working directory if they exist. Thanks to @VynDragon for the logic in `zephyr/zephyr_storage.c`. Signed-off-by: Ned Konz <ned@metamagix.tech>
2025-10-13zephyr/modzsensor: Add set/get sensor attributes to zsensor.Ned Konz
This commit adds `Sensor.attr_set()` and `Sensor.attr_get_*()` methods that are necessary to set various sensor attributes if they haven't been set statically in the device tree. This is needed, for example, because the LSM6DS3TR-C sensor on the XIAO BLE NRF52840 SENSE board will not work with `zsensor` because it doesn't have any default configuration for sampling frequency. Various `SENSOR_ATTR_*` constants from `zephyr/incude/zephyr/drivers/sensor.h` have been added as `ATTR_*` constants in the `zsensor` module. Signed-off-by: Ned Konz <ned@metamagix.tech>
2025-10-13zephyr/machine_adc: Add ADC support.Ned Konz
This commit adds support for ADC peripherals in the Zephyr port. As is typical for Zephyr, the ADC channel setup is done in the devicetree (typically using an overlay). This code requires ADC channels to be listed in the io-channels property of the zephyr,user root node. Signed-off-by: Ned Konz <ned@metamagix.tech>
2025-08-16zephyr: Upgrade to Zephyr v4.2.0.Maureen Helm
Updates the Zephyr port build instructions and CI to use the latest Zephyr release tag. Tested on max32690fthr and frdm_k64f. Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2025-05-02docs/zephyr: Add zephyr FlashArea IDs docs.Vdragon
Signed-off-by: Vdragon <mail@massdriver.space>
2025-04-30docs/zephyr: Add quick reference for PWM support.Ayush Singh
Add docs for PWM support. Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2025-04-29zephyr: Upgrade to Zephyr v4.0.0.Maureen Helm
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>
2024-10-01zephyr: Allow using devicetree node labels to construct machine objects.Maureen Helm
Zephyr v3.7.0 added a new feature to allow getting devices by their devicetree node labels. Use this feature in the MicroPython Zephyr port to simplify constructing machine module objects, including Pin, SPI, I2C, and UART. It's still possible to use the more verbose device names (e.g., gpio@400ff040, i2c@40066000, spi@4002c000), but now we can also use their devicetree node labels (e.g., gpiob, i2c0, spi0). Node labels aren't standardized across all SoC families because they generally try to follow their respective SoC hardware user manual naming convention, however many boards define common labels for devices routed to Arduino headers (e.g., arduino_i2c, arduino_serial, and arduino_spi). That means I2C("arduino_i2c") will work on quite a few boards (>100 in the main Zephyr tree). Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2024-10-02zephyr: Upgrade to Zephyr v3.7.0.Maureen Helm
Updates the Zephyr port build instructions and CI to use the latest Zephyr release tag. Tested on frdm_k64f. Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2024-10-02docs/zephyr: Update docs to reflect device name changes.Maureen Helm
Zephyr v3.2.0 deprecated the devicetree label property as a base property, which had been used as the device name string for device_get_binding(). The device name string is now the devicetree node name appended with its unit-address. Update Zephyr port documentation to reflect this change. Signed-off-by: Maureen Helm <maureen.helm@intel.com>
2024-02-07docs: Use vfs module instead of os.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2024-02-07docs/library: Move vfs functions and classes from os to vfs module docs.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2023-06-08docs/library/index: Update docs after umodule rename.Jim Mussared
- Update guide for extending built-in modules. - Remove any last trace of umodule in other docs. This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-04-27all: Fix spelling mistakes based on codespell check.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2023-01-19docs/zephyr/quickref: Fix zsensor module usage examples.enriquezgarc
Signed-off-by: enriquezgarc <enriquezgarcia.external@infineon.com>
2022-06-17zephyr: Upgrade to Zephyr v3.1.0.Maureen Helm
Updates the Zephyr port build instructions and CI to use the latest Zephyr release tag. Tested on frdm_k64f. Signed-off-by: Maureen Helm <maureen.helm@intel.com>
2022-03-07zephyr: Upgrade to Zephyr v3.0.0.Maureen Helm
Updates the Zephyr port build instructions and CI to use the latest Zephyr release tag. Signed-off-by: Maureen Helm <maureen.helm@intel.com>
2022-01-06zephyr: Upgrade to Zephyr v2.7.0.Maureen Helm
Updates the Zephyr port build instructions and CI to use the latest Zephyr release tag. Signed-off-by: Maureen Helm <maureen.helm@intel.com>
2021-08-13docs: Replace ufoo with foo in all docs.Jim Mussared
Anywhere a module is mentioned, use its "non-u" name for consistency. The "import module" vs "import umodule" is something of a FAQ, and this commit intends to help clear that up. As a first approximation MicroPython is Python, and so imports should work the same as Python and use the same name, to a first approximation. The u-version of a module is a detail that can be learned later on, when the user wants to understand more and have finer control over importing. Existing Python code should just work, as much as it is possible to do that within the constraints of embedded systems, and the MicroPython documentation should match the idiomatic way to write Python code. With universal weak links for modules (via MICROPY_MODULE_WEAK_LINKS) users can consistently use "import foo" across all ports (with the exception of the minimal ports). And the ability to override/extend via "foo.py" continues to work well. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2021-08-13docs/zephyr: Add quick reference for the Zephyr port.Julia Hathaway
Includes an introduction to using the Zephyr port on MicroPython. The quickref details examples of how to use each module the port currently supports. The tutorial provides additional details for Zephyr specific modules. Signed-off-by: Julia Hathaway <julia.hathaway@nxp.com>