Wykres commitów

381 Commity (afe2ca1a0af0fea2f8033eb900626725e30cf40c)

Autor SHA1 Wiadomość Data
Jim Mussared 9573d31071 all: Remove query-variants make target.
This is difficult to implement on cmake-based ports, and having the list
of variants in mpconfigboard.{cmake,mk} duplicates information that's
already in board.json.

This removes the existing query-variants make target from stm32 & rp2
and the definition of BOARD_VARIANTS from the various board files.

Also renames the cmake variable to MICROPY_BOARD_VARIANT to match other
variables such as MICROPY_BOARD. The make variable stays as
BOARD_VARIANT.

This work was funded through GitHub Sponsors.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-08-15 17:37:44 +10:00
Jim Mussared 24a6e951ec ports: Simplify board feature tags in board.json.
This commit:
- Finds a common set of board feature tags and maps existing features to
  that reduced set.
- Removes some less-useful board feature tags.
- Ensures all MCUs are specified correctly.
- Ensures all boards have a vendor (and fixes some vendor names).

This is to make the downloads page show a less intimidating set of filters.

Work done in conjunction with Matt Trentini <matt.trentini@gmail.com>.

This work was funded through GitHub Sponsors.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-08-10 14:54:03 +10:00
Jim Mussared 3533924c36 extmod/moddeflate: Add deflate module providing the DeflateIO class.
This provides similar functionality to the former zlib.DecompIO and
especially CPython's gzip.GzipFile for both compression and decompression.

This class can be used directly, and also can be used from Python to
implement (via io.BytesIO) zlib.decompress and zlib.compress, as well as
gzip.GzipFile.

Enable/disable this on all ports/boards that zlib was previously configured
for.

This work was funded through GitHub Sponsors.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-07-21 19:32:40 +10:00
Jim Mussared add1200343 all: Remove the zlib module.
This will be replaced with a new deflate module providing the same
functionality, with an optional frozen Python wrapper providing a
replacement zlib module.

binascii.crc32 is temporarily disabled.

This work was funded through GitHub Sponsors.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-07-21 18:48:29 +10:00
Angus Gratton 4548928449 stm32/boards/B_L072Z_LRWAN1: Lower default ROM level to "Core".
Re-enable some features required for the board to still build and the lora
driver to run.

This board only has 192KB of flash total, so default stm32 build is very
close to the limit.

Before:

LINK build-B_L072Z_LRWAN1/firmware.elf
   text    data     bss     dec     hex filename
 184352      68   14112  198532   30784 build-B_L072Z_LRWAN1/firmware.elf

(12256 bytes free)

After:

LINK build-B_L072Z_LRWAN1/firmware.elf
   text    data     bss     dec     hex filename
 155028      68   14052  169148   294bc build-B_L072Z_LRWAN1/firmware.elf

(41580 bytes free)

This work was funded through GitHub Sponsors.

Signed-off-by: Angus Gratton <angus@redyak.com.au>
2023-07-20 21:48:10 +10:00
Angus Gratton 3aabdf2f6b stm32/boards/B_L072Z_LRWAN1: Add pin definitions for internal SX1262.
Includes fixing the SCK connection pin.

This work was funded through GitHub Sponsors.

Signed-off-by: Angus Gratton <angus@redyak.com.au>
2023-07-20 21:47:55 +10:00
Yuuki NAGAO 7ca3c1d892 stm32: Add USB support for STM32L1 MCUs.
Signed-off-by: Yuuki NAGAO <wf.yn386@gmail.com>
2023-06-27 22:28:31 +09:00
Jim Mussared 2fbc08c462 extmod/asyncio: Rename uasyncio to asyncio.
The asyncio module now has much better CPython compatibility and
deserves to be just called "asyncio".

This will avoid people having to write `from uasyncio import asyncio`.

Renames all files, and updates port manifests to use the new path. Also
renames the built-in _uasyncio to _asyncio.

This work was funded through GitHub Sponsors.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-06-19 17:33:03 +10:00
Damien George 6f74146bc1 stm32/boards/STM32H573I_DK: Add H5 board definition files.
Signed-off-by: Damien George <damien@micropython.org>
2023-06-15 11:09:37 +10:00
Damien George ec4232b32e stm32/boards: Add ld, af.csv and hal_conf_base.h files for H5 MCUs.
Signed-off-by: Damien George <damien@micropython.org>
2023-06-15 11:09:37 +10:00
Damien George 30100e9b3d stm32/boards: Use default spibdev config where appropriate.
Signed-off-by: Damien George <damien@micropython.org>
2023-06-08 23:01:03 +10:00
Jim Mussared a1fbb1980c extmod/modtimeq: Remove timeq module.
This is a MicroPython-specific module that existed to support the old
version of uasyncio.  It's undocumented and not enabled on all ports and
takes up code size unnecessarily.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-06-08 17:54:28 +10:00
Jim Mussared 5fd042e7d1 all: Replace all uses of umodule in Python code.
Applies to drivers/examples/extmod/port-modules/tools.

This work was funded through GitHub Sponsors.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-06-08 17:54:24 +10:00
Jim Mussared f5f9edf645 all: Rename UMODULE to MODULE in preprocessor/Makefile vars.
This work was funded through GitHub Sponsors.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-06-08 17:54:11 +10:00
Damien George b57b079bbe stm32/boards/NUCLEO_L4A6ZG: Add new board definition.
Signed-off-by: Damien George <damien@micropython.org>
2023-05-24 11:25:53 +10:00
Jim Mussared 0ba08e6299 stm32/boards/NUCLEO_G474RE: Make it easier to enable USB.
This work was funded through GitHub Sponsors.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-05-24 11:13:23 +10:00
brave ulysses ad216be5f1 stm32/boards/stm32h723_af.csv: Fix ADC AF definitions.
These were incorrectly added in d995c01042.
The fix here includes the full differential ADC definitions.

Signed-off-by: brave ulysses <brave_ulysses@email.com>
2023-05-19 22:12:05 +10:00
Jim Lipsey 7333c06d05 stm32/boards/ARDUINO_PORTENTA_H7: Enable FDCAN.
Add pin definitions to enable FDCAN support using the pyb.CAN() class.
2023-05-09 13:25:03 +10:00
Christian Clauss 79e57473b2 all: Fix various Python coding inconsistencies found by ruff.
This fixes:
- type-comparison (E721): do not compare types, use isinstance().
- string-dot-format-missing-arguments (F524): .format call is missing
  argument(s) for placeholder(s): {message}.
- f-string-missing-placeholders (F541).
- is-literal (F632): Use != to compare constant literals.

The last one is fixed by just comparing for truthfulness of `state`.
2023-05-02 16:14:45 +10:00
Damien George b1229efbd1 all: Fix spelling mistakes based on codespell check.
Signed-off-by: Damien George <damien@micropython.org>
2023-04-27 18:03:06 +10:00
Sebastian Romero 0a3600a9ad stm32/boards/ARDUINO_NICLA_VISION: Fix incorrect bootloader PID. 2023-03-31 17:11:14 +11:00
Damien George 31e7a0587d stm32/boards/NUCLEO_G0B1RE: Add config for USB and mboot.
But leave these disabled.

Signed-off-by: Damien George <damien@micropython.org>
2023-03-22 16:38:03 +11:00
Damien George 31638473b7 stm32/mboot: Add support for G0 MCUs.
Signed-off-by: Damien George <damien@micropython.org>
2023-03-22 16:38:03 +11:00
Damien George c7923b1139 stm32: Add support for USB on G0 MCUs.
Signed-off-by: Damien George <damien@micropython.org>
2023-03-22 16:38:03 +11:00
Damien George 051e2900d9 stm32/boards/NUCLEO_H723ZG: Add new H723 board.
The following have been tested and are working:
- 550MHz CPU frequency
- UART REPL via ST-Link
- USB REPL and mass storage
- 3x LEDs and 1x user button
- Ethernet

Signed-off-by: Damien George <damien@micropython.org>
2023-03-21 14:05:59 +11:00
Damien George d995c01042 stm32/boards: Add ld and af.csv for H723.
Signed-off-by: Damien George <damien@micropython.org>
2023-03-21 14:02:49 +11:00
Damien George 42511b5291 stm32/boards/NUCLEO_H743ZI2: Fix MCU tag in board.json file.
Signed-off-by: Damien George <damien@micropython.org>
2023-03-20 15:24:45 +11:00
iabdalkader a197823eb7 ports: Fix MCU tags in Arduino board.json files. 2023-03-20 15:22:24 +11:00
Christian Clauss 4376c969f6 all: Fix Python comparison to None and True, and use "not in".
These are basic PEP8 recommendations.
2023-03-10 13:32:24 +11:00
iabdalkader 8307046406 stm32/boards: Include "senml" in manifest for ARDUINO boards. 2023-03-09 10:37:06 +11:00
Andrew Leech 2eca86e8fa stm32/powerctrl: Add sleep RCC semaphore management for WB55 MCUs.
Signed-off-by: Andrew Leech <andrew.leech@planetinnovation.com.au>
2023-03-08 11:33:00 +11:00
iabdalkader 40a49f5a7a stm32/boards/ARDUINO_GIGA: Add support for Arduino Giga H7 board. 2023-03-08 00:55:51 +11:00
iabdalkader b6904cba76 stm32/boards/ARDUINO_NICLA_VISION: Add support for Arduino Nicla Vision. 2023-03-08 00:55:38 +11:00
iabdalkader d18de7ec81 stm32/boards/ARDUINO_PORTENTA_H7: Update board config files.
Changes are:
- Freeze micropython-lib time module to get strftime.
- Reserve the last 1MB of QSPI flash for (optional) WiFi firmware storage.
- Disable SD card mount on boot.
- Enable high-speed BLE firmware download.
2023-03-08 00:51:33 +11:00
iabdalkader e98d7ec804 stm32/boards/PYBD_SF2: Set CYW43 Bluetooth fimrware download baudrate. 2023-03-02 22:30:31 +11:00
Damien George 593375aa5d stm32/boards: Update linker scripts now that big_const is gone.
Signed-off-by: Damien George <damien@micropython.org>
2023-03-01 01:27:51 +11:00
Jim Mussared a377302623 extmod/modnetwork: Add network.hostname() and network.country().
This provides a standard interface to setting the global networking config
for all interfaces and interface types.

For ports that already use either a static hostname (mimxrt, rp2) they will
now use the configured value. The default is configured by the port
(or optionally the board).

For interfaces that previously supported .config(hostname), this is still
supported but now implemented using the global network.hostname.

Similarly, pyb.country and rp2.country are now deprecated, but the methods
still exist (and forward to network.hostname).

Because ESP32/ESP8266 do not use extmod/modnetwork.c they are not affected
by this commit.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-03-01 01:26:17 +11:00
Jim Mussared 4eb72b34df stm32/boards/ARDUINO_PORTENTA_H7: Use default aioble.
The default now includes all sub-components (security, l2cap, etc)
and using the kwarg options is no longer supported.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-02-16 12:32:03 +11:00
iabdalkader e140c7d26a stm32/boards/ARDUINO_PORTENTA_H7: Fix macro value check for QSPI.
QSPI deepsleep should be enabled only when the internal flash storage is
not used.
2023-02-16 12:21:48 +11:00
Andrew Leech 75e7e7d034 stm32/boards/STM32F769DISC: Fix building with USE_QSPI_XIP=1.
Signed-off-by: Damien George <damien@micropython.org>
2023-02-16 12:04:29 +11:00
Jim Mussared 8b27482692 top: Update Python formatting to black "2023 stable style".
See https://black.readthedocs.io/en/stable/the_black_code_style/index.html

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-02-02 12:51:03 +11:00
Damien George fe2a8332ff stm32/boards/NUCLEO_H743ZI2: Refer to NUCLEO_H743ZI for frozen manifest.
Fixes build issue introduced by 6250337c9c

Signed-off-by: Damien George <damien@micropython.org>
2023-02-01 23:22:18 +11:00
Jim Mussared 6250337c9c ports: Make all network-capable boards use bundle-networking.
This will ensure that any board with networking support gets:
 - webrepl
 - mip
 - urequests
 - ntptime

This work was funded through GitHub Sponsors.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-02-01 12:42:06 +11:00
Andrew Leech fa57ee971b stm32/boards: Consolidate linker snippets to reduce duplication.
This commit uses the REGION_ALIAS GNU linker command to simplify the linker
snippets and consolidate the duplication.

Signed-off-by: Damien George <damien@micropython.org>
2023-01-13 15:14:26 +11:00
brave ulysses 7f71057a89 stm32/boards/NUCLEO_F756ZG: Add board definition for NUCLEO-F756ZG.
Signed-off-by: Damien George <damien@micropython.org>
2022-12-15 14:59:26 +11:00
Dale Weber f2de289ef3 stm32/boards/NUCLEO_F429ZI: Enable I2C1 and I2C2 with default pins.
The datasheet on page 55 shows PF0 (SDA) and PF1 (SCL) are the pins for
I2C2, but these pins do not work.  Checking the MBED pinout for the
NUCLEO-F429ZI shows:

    I2C1: PB8 (SCL) and PB9 (SDA).
    I2C2: PB10 (SCL) and PB11 (SDA).

Both of these work and can be scanned and find devices connected to them.

Signed-off-by: Dale Weber <hybotics.sd@gmail.com>.
2022-12-13 17:35:55 +11:00
iabdalkader fb7d211530 stm32/boards: Add missing LPUART macros for H7 HAL.
The STM32H7xx HAL LPUART AF macros are missing the number, this HAL is the
only one that's inconsistent in the way it defines LPUART AF macros, so we
only need to define them for H7.
2022-12-01 15:35:07 +11:00
Damien George 771c16f3d9 stm32/mboot: Make all mboot sectors erase/write protected.
Prior to this commit, only sector 0 was erase/write protected, which may
not be enough to protect all of mboot (especially if mboot lives at a
higher address than the start of flash).

This commit makes sure all internal flash sectors that mboot lives in are
protected from erasing and writing.  The linker script must define
_mboot_writable_flash_start for this to work.

Signed-off-by: Damien George <damien@micropython.org>
2022-11-30 17:19:36 +11:00
iabdalkader 8ddb4567ff stm32/boards/ARDUINO_PORTENTA_H7: Add more modules, I2C1 and SE pin.
Changes in this commit are:
- Increase CDC buffer size.
- Define I2C1 SCL/SDA pins.
- Add crypto device enable pin to board pins.
- Update deploy instructions.
- Add ntptime, urequests and logging to manifest.
2022-11-14 18:59:17 +11:00
iabdalkader ebb1a4ecb0 stm32/boards/ARDUINO_PORTENTA_H7: Add custom mbedtls config. 2022-11-08 23:46:06 +11:00