| Age | Commit message (Collapse) | Author |
|
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>
|
|
Set the default timeout to 50000 us. The default used to be 0, causing the
NXP I2C driver to silently stop working in case of a non-responding device.
Signed-off-by: robert-hh <robert@hammelrath.com>
|
|
The buffer would be reset on every call to `uart.init()`. If no sizes were
given, the buffer would be set to the default size 256. That made problems
e.g. with PPP. Also, the RX buffer was not stored at the UART object and
not visible to GC as being in use. Then a `gc.collect()` would eventually
free the buffer.
This commit fixes those issues, keeping the buffer size if not deliberately
changed and allocating new buffers only if the size was changed.
Signed-off-by: robert-hh <robert@hammelrath.com>
|
|
The flash devices used by the MIMXRT board are specified either with 3ns or
5 ns CS setup and hold time. Since a single configuration file is used for
all boards, use 5ns instead of 3ns to be safe, even if there were no
problems so far.
Signed-off-by: robert-hh <robert@hammelrath.com>
|
|
Changes:
- The duplicate LPUART_Init call was not needed, just an edit fail.
- Allow a port to disable UART.irq(). Some code for configuration stays,
but the respective UART IRQ is not enabled. Calling uart.irq() will
cause an exception by extmod/machine_uart.c.
Signed-off-by: robert-hh <robert@hammelrath.com>
|
|
PPP is now enabled on all boards with Ethernet support. PPP could be
enabled for other boards without Ethernet like the Teensy 4.0 as well in a
second step. Enabling for MIMXRT101x boards is hardly possible due to the
large RAM demand of lwIP.
Tested with a Teensy 4.1 board and a SimCom A7608 GPRS/LTE modem.
Signed-off-by: robert-hh <robert@hammelrath.com>
|
|
There is plenty of room in the MIMXRT board flash, so it can be enabled.
Tested with:
- MIMXRT1176_EVK
- MIMXRT1061 (Teensy 4.1)
- MIMXRT1010 (Olimex RT1010)
Signed-off-by: robert-hh <robert@hammelrath.com>
|
|
Matching the generic documentation.
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 removes the assumption made by the CI scripts that the
system-provided python executable is simply named "python". The scripts
will now look for a binary called "python3" first, and then fall back to
"python" if that is not found.
Whilst this is currently the case for the CI environment, there are no
guarantees for this going forward. For example minimal CI environments
set up by some developers, using the same base OS, have their python
executable called "python3".
Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
|
|
This commit expands the CI tests by checking whether the example native
modules are able to be built for the Xtensa architecture.
This was made possible by the changes to mpy_ld that allow symbol
resolution across standard compiler-provided libraries.
Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
|
|
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>
|
|
Add `pyexec_vstr()` to execute Python code from a vstr source.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
|
|
Currently only classic CAN, but tests run on both the stm32 classic CAN
controller and the FD-CAN controller with the same results.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
|
|
This is necessary for the machine.CAN implementation to use the same
low-level functions.
Includes some refactoring around FIFO selection as there was a footgun
where CAN_FIFO0/1 are 0/1 but FDCAN_RX_FIFO0/1 are not. Added an explicit
type for non-hardware-specific FIFO numbering.
Also moved responsibility for re-enabling CAN receive interrupts into the
higher layer (pyb_can.c layer) after calling can_receive().
Also includes this behaviour change for FDCAN boards:
- Fix for boards with FDCAN not updating error status
counters (num_error_warning, num_error_passive, num_bus_off). These are
now updated the same as on boards with CAN Classic controllers, as
documented.
- Previously FDCAN boards would trigger the RX callback function on error
events instead (passing undocumented irq numbers 3, 4, 5).
This behaviour has been removed in favour of the documented behaviour of
updating the status counters.
This work was funded through GitHub Sponsors.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
|
|
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
|
|
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
|
|
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
|
|
For consistency with the stm32 port.
Signed-off-by: Damien George <damien@micropython.org>
|
|
Change ROMFS partition configuration variables to use index 0 as the
starting partition number (instead of index 1).
Reasons to do this:
- `vfs.rom_ioctl()` numbers the partitions starting from 0
- `mpremote romfs -p <partition id>` numbers the partitions starting from 0
Signed-off-by: Damien George <damien@micropython.org>
|
|
Signed-off-by: Lesords <2385342343@qq.com>
|
|
Signed-off-by: Dryw Wade <dryw.wade@sparkfun.com>
|
|
Signed-off-by: Dryw Wade <dryw.wade@sparkfun.com>
|
|
Signed-off-by: Matt Trentini <matt.trentini@gmail.com>
|
|
Signed-off-by: Alex Brudner <alex.brudner@sparkfun.com>
Signed-off-by: Malcolm McKellips <malcolm.mckellips@sparkfun.com>
|
|
Co-authored-by: graham sanderson <graham.sanderson@raspberrypi.com>
Signed-off-by: Phil Howard <github@gadgetoid.com>
|
|
Similar to parent commit, allow using USB Serial/JTAG pins for other
purposes but only if this feature is disabled in the build config.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
|
|
When we don't use USB JTAG, we want to use the two USB pins (D+/D-) as
GPIO. So, do clear USB_SERIAL_JTAG_USB_PAD_ENABLE when USB SERIAL JTAG is
not enabled
Signed-off-by: Garry W <32130780+garywill@users.noreply.github.com>
Signed-off-by: Angus Gratton <angus@redyak.com.au>
|
|
The ESP32 PWM (LEDC) timer wasn't correctly stopped. `ledc_timer_rst()` is
for resetting the timer counter to zero, not for stopping the timer.
The correct way to stop a pwm timer is to pause it, then configure it with
`deconfigure = true`.
Signed-off-by: garywill <garywill@disroot.org>
|
|
This increases binary size by about 4KB on C3, probably a bit less on S2.
This work was funded through GitHub Sponsors.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
|
|
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>
|
|
Reverts workaround added in acbdbcd9.
According to the linked ESP-IDF issue this was only a problem for ESP-IDF
V5.0.x, and support for versions older than V5.2 was dropped in 6e5d8d009.
This work was funded through GitHub Sponsors.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
|
|
Removes redundant metadata from each, shouldn't otherwise change
any build output.
Reverts the split originally added in e4650125.
This work was funded through GitHub Sponsors.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
|
|
These are now supported by cyw43-driver.
Signed-off-by: Damien George <damien@micropython.org>
|
|
Includes various fixes and improvements to the WLAN driver, in particular:
- Add WPA3 STA and AP support.
- Attempt to reconnect to AP in response to validation error.
- Update 43439 BT firmware for Data Length Extension fix.
Signed-off-by: Damien George <damien@micropython.org>
|
|
Simple `machine.Timer` implementation in-line with the rest of the
MicroPython ports.
Note: Only virtual timers are supported (not linked to any particular
hardware peripheral).
Tested with the nRF5340 and the nRF52840.
Signed-off-by: danicampora <danicampora@gmail.com>
|
|
Signed-off-by: Damien George <damien@micropython.org>
|
|
The same as the 2M flash variant but with a 320KiB ROM partition.
Signed-off-by: Damien George <damien@micropython.org>
|
|
Not enabled by default on any board. For a board to enable ROMFS it must:
- Add `#define MICROPY_VFS_ROM (1)` to its `mpconfigboard.h` file.
- Add a FLASH_ROMFS partition to the linker script and expose the partition
with:
_micropy_hw_romfs_start = ORIGIN(FLASH_ROMFS);
_micropy_hw_romfs_size = LENGTH(FLASH_ROMFS);
Signed-off-by: Damien George <damien@micropython.org>
|
|
Not enabled by default on any board. For a board to enable ROMFS it must:
- Add `#define MICROPY_VFS_ROM (1)` to its `mpconfigboard.h` file.
- Use `partitions-4MiB-romfs.csv` as its partitions file (or a similar
partitions definition that has an entry labelled "romfs").
Signed-off-by: Damien George <damien@micropython.org>
|
|
Not enabled by default on any board. A board can enable a ROMFS partition
by defining `MICROPY_HW_ROMFS_BYTES` in its `mpconfigboard.h` file. For
example:
#define MICROPY_HW_ROMFS_BYTES (128 * 1024)
The ROMFS partition is placed at the end of the flash allocated for the
firmware, giving less space for the firmware. It then lives between the
firmware and the read/write filesystem.
Signed-off-by: Damien George <damien@micropython.org>
|
|
Using unused and previously inaccessible external QSPI flash.
Signed-off-by: Damien George <damien@micropython.org>
|
|
This commit implements `vfs.rom_ioctl()` to query, erase and write both
internal and external flash, depending on how the board configures its
flash memory.
A board can configure ROM as follows.
To use internal flash memory:
#define MICROPY_HW_ROMFS_ENABLE_INTERNAL_FLASH (1)
To use external flash memory (QSPI memory mapped):
#define MICROPY_HW_ROMFS_ENABLE_EXTERNAL_QSPI (1)
#define MICROPY_HW_ROMFS_QSPI_SPIFLASH_OBJ (&spi_obj)
Then the partition must be defined as symbols in the linker script:
_micropy_hw_romfs_part1_start
_micropy_hw_romfs_part1_size
And finally the partition needs to be enabled:
#define MICROPY_HW_ROMFS_ENABLE_PART1 (1)
There's support for a second, optional partition via:
_micropy_hw_romfs_part2_start
_micropy_hw_romfs_part2_size
#define MICROPY_HW_ROMFS_ENABLE_PART1 (1)
Signed-off-by: Damien George <damien@micropython.org>
|
|
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 is put in `mp_init()` to make it consistent across all ports.
Signed-off-by: Damien George <damien@micropython.org>
|
|
This function will attempt to create a `VfsRom` instance and mount it at
location "/rom" in the filesystem.
Signed-off-by: Damien George <damien@micropython.org>
|
|
This is a generic interface to allow querying and modifying the read-only
memory area of a device, if it has such an area.
Signed-off-by: Damien George <damien@micropython.org>
|
|
This allows defining a `memoryview` instance, either statically or on the
C stack.
Signed-off-by: Damien George <damien@micropython.org>
|
|
When writing to flash, the source buffer only needs to be read-only, not
writable. This fix allows passing in `bytes` and other read-only buffer
objects.
Signed-off-by: Damien George <damien@micropython.org>
|