summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-06-27renesas-ra: Add support for RA6M5, and add machine PWM, DAC, SDCard.mbedNoobNinja
This commit adds support for a new processor RA6M5. It also adds the following classes to the machine module: PWM, DAC, SDCard. Signed-off-by: mbedNoobNinja <novoltage@gmail.com>
2023-06-26renesas-ra: Support changing baudrate for UART.Takeo Takahashi
* Use R_SCI_UART_BaudCalculate() of fsp/src/r_sci_uart/r_sci_uart.c * Support UART.init(baudrate) Signed-off-by: Takeo Takahashi <takeo.takahashi.xv@renesas.com>
2023-06-26docs/library/ssl: Add documentation for SSLContext.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2023-06-26tests/extmod: Add test for passing cadata into ssl.wrap_socket().Damien George
For coverage. Signed-off-by: Damien George <damien@micropython.org>
2023-06-26tests/extmod: Add tests for ssl.SSLContext.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2023-06-26extmod/modssl: Add SSLContext class.Damien George
This commit adds the SSLContext class to the ssl module, and retains the existing ssl.wrap_socket() function to maintain backwards compatibility. CPython deprecated the ssl.wrap_socket() function since CPython 3.7 and instead one should use ssl.SSLContext().wrap_socket(). This commit makes that possible. For the axtls implementation: - ssl.SSLContext is added, although it doesn't hold much state because axtls requires calling ssl_ctx_new() for each new socket - ssl.SSLContext.wrap_socket() is added - ssl.PROTOCOL_TLS_CLIENT and ssl.PROTOCOL_TLS_SERVER are added For the mbedtls implementation: - ssl.SSLContext is added, and holds most of the mbedtls state - ssl.verify_mode is added (getter and setter) - ssl.SSLContext.wrap_socket() is added - ssl.PROTOCOL_TLS_CLIENT and ssl.PROTOCOL_TLS_SERVER are added The signatures match CPython: - SSLContext(protocol) - SSLContext.wrap_socket(sock, *, server_side=False, do_handshake_on_connect=True, server_hostname=None) The existing ssl.wrap_socket() functions retain their existing signature. Signed-off-by: Damien George <damien@micropython.org>
2023-06-25renesas-ra: Consolidate all fsp_cfg header files to one location.Damien George
The config header files with the same name have the same contents, so they don't need to be repeated for each board in the board's source directory. Signed-off-by: Damien George <damien@micropython.org>
2023-06-25esp32/modules/inisetup.py: Format partition as FAT if its label is ffat.Wind-stormger
Signed-off-by: Wind-stormger <storm-wind@foxmail.com>
2023-06-24esp32/boards: Change SDK config parameters from deprecated to new ones.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2023-06-23tools/autobuild: Update auto-build code to build esp32 port with IDF v5.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2023-06-23github/workflows: Update esp32 CI to use IDF v5.0.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2023-06-23docs/esp32: Update esp32 docs based on IDF v5 changes.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2023-06-23esp32/Makefile: Provide more IDF shortcuts.Damien George
And change erase_flash to erase-flash, because the former is deprecated since IDF 4.4. Signed-off-by: Damien George <damien@micropython.org>
2023-06-23esp32/network_wlan: Wait for WIFI_EVENT_STA_START after activating.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2023-06-23esp32: In recv_cb, get espnow rssi from recv_info->rx_ctrl.Glenn Moloney
IDF v5.0 provides access to rssi value for received espnow packets via recv_info arg to recv_cb(). Signed-off-by: Glenn Moloney <glenn.moloney@gmail.com>
2023-06-23esp32: Update port to support IDF v5.0.2.Damien George
This commit updates the esp32 port to work exclusively with ESP-IDF v5. IDF v5 is needed for some of the newer ESP32 SoCs to work, and it also cleans up a lot of the inconsistencies between existing SoCs (eg S2, S3, and C3). Support for IDF v4 is dropped because it's a lot of effort to maintain both versions at the same time. The following components have been verified to work on the various SoCs: ESP32 ESP32-S2 ESP32-S3 ESP32-C3 build pass pass pass pass SPIRAM pass pass pass N/A REPL (UART) pass pass pass pass REPL (USB) N/A pass pass N/A filesystem pass pass pass pass GPIO pass pass pass pass SPI pass pass pass pass I2C pass pass pass pass PWM pass pass pass pass ADC pass pass pass pass WiFi STA pass pass pass pass WiFi AP pass pass pass pass BLE pass N/A pass pass ETH pass -- -- -- PPP pass pass pass -- sockets pass pass pass pass SSL pass ENOMEM pass pass RMT pass pass pass pass NeoPixel pass pass pass pass I2S pass pass pass N/A ESPNow pass pass pass pass ULP-FSM pass pass pass N/A SDCard pass N/A N/A pass WDT pass pass pass pass Signed-off-by: Damien George <damien@micropython.org> Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-06-23esp32/modesp32: Remove esp32.hall_sensor function.Damien George
The hall sensor is no longer supported by IDF v5. Signed-off-by: Damien George <damien@micropython.org>
2023-06-23esp32/ppp_set_auth: Add pppapi_set_auth from ESP-IDF.Damien George
This function was made private/static in IDF commit c67f4c2b4c2bb4b7740f988fc0f8a3e911e56afe, so it add back here. Signed-off-by: Damien George <damien@micropython.org>
2023-06-23esp32: Switch from UART driver to UART HAL.Angus Gratton
Allows registering UART interrupt again. Signed-off-by: Angus Gratton <angus@redyak.com.au>
2023-06-23extmod/modbtree: Undefine queue macros before including berkeley-db.Damien George
To prevent warnings when building with ESP IDF v5. Signed-off-by: Damien George <damien@micropython.org>
2023-06-23extmod/modplatform: Set MICROPY_PLATFORM_ARCH on riscv platforms.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2023-06-23extmod: Update to support mbedtls 3.x.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2023-06-21tests/extmod/framebuf: Fix buffer size issues.Duncan Lowther
Tests framebuf1 and framebuf2 do not take the need for byte-aligned strides into consideration when calculating buffer lengths. Accordingly, the buffers allocated are slightly too small. Fixed buffer length calculations. Signed-off-by: Duncan Lowther <Duncan.Lowther@glasgow.ac.uk>
2023-06-21tests/extmod/uctypes_array_assign_le: Fix buffer.Duncan Lowther
Structure descriptor in test extmod/uctypes_array_assign_le is 6 bytes long, due to member "arr3" having length 4 (2 * UINT16) and offset 2, but only 5 bytes are allocated. Increased buffer length to 6 bytes. Signed-off-by: Duncan Lowther <Duncan.Lowther@glasgow.ac.uk>
2023-06-21extmod/modbinascii: Fix buffer length error.Duncan Lowther
The mod_binascii_a2b_base64() function allocates a buffer which may be too small. It needs to be no less than three-quarters of the input length, but is calculated as (<length> / 4) * 3 + 1, which may be less due to integer division. Changed to (<length> * 3) / 4 + 1. Signed-off-by: Duncan Lowther <Duncan.Lowther@glasgow.ac.uk>
2023-06-21lib/oofatfs: Fix speculative read in create_name.Duncan Lowther
Signed-off-by: Duncan Lowther <Duncan.Lowther@glasgow.ac.uk>
2023-06-19extmod/asyncio/uasyncio.py: Add backwards-compatible uasyncio alias.Jim Mussared
This allows existing code that does `import uasyncio` or `import uasyncio as asyncio` to continue working. It uses the same lazy-loading as asyncio to prevent loading of unused features. This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-06-19ports: In machine_i2s.c, rename uasyncio to asyncio.Jim Mussared
Mostly updates comments, but also renames the UASYNCIO enum value to ASYNCIO. This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-06-19examples/hwapi: Rename uasyncio to asyncio.Jim Mussared
This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-06-19docs: Rename uasyncio to asyncio.Jim Mussared
This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-06-19tests: Rename uasyncio to asyncio.Jim Mussared
This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-06-19extmod/asyncio: Rename uasyncio to asyncio.Jim Mussared
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-18tests/float: Test domain errors for more combos of args to math funcs.Damien George
Instead of having a special set of arguments to test for each math-module function, just test all functions with all sets of arguments. This gives improved test cases to prevent regressions. Signed-off-by: Damien George <damien@micropython.org>
2023-06-15esp32,esp8266: Allow Ctrl-C to interrupt the corrupt-fs while loop.Damien George
Commit c046b23ea29e0183c899a8dbe1da3bed3440a255 prevented frozen boot code from being interrupted by Ctrl-C, but that means a corrupt filesystem will forever lock up an esp32/esp8266 board. This commit fixes that by explicitly enabling Ctrl-C before running the forever loop. Signed-off-by: Damien George <damien@micropython.org>
2023-06-15tools/ci.sh: Add a H5 board to stm32 CI build.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2023-06-15stm32/boards/STM32H573I_DK: Add H5 board definition files.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2023-06-15stm32/octospi: Add preliminary support for OCTOSPI peripheral.Damien George
It currently operates in 1-line (SPI) mode only. Signed-off-by: Damien George <damien@micropython.org>
2023-06-15stm32/boards: Add ld, af.csv and hal_conf_base.h files for H5 MCUs.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2023-06-15stm32: Add initial support for H5 MCUs.Damien George
This commit adds initial support for STM32H5xx MCUs. The following features have been confirmed to be working on an STM32H573: - UART over REPL and USB CDC - USB CDC and MSC - internal flash filesystem - machine.Pin - machine.SPI transfers with DMA - machine.ADC - machine.RTC - pyb.LED - pyb.Switch - pyb.rng - mboot Signed-off-by: Damien George <damien@micropython.org>
2023-06-15lib/stm32lib: Update library for H5 v1.0.0.Damien George
Changes in this new library version are: - Add H5 HAL at v1.0.0. Signed-off-by: Damien George <damien@micropython.org>
2023-06-15stm32/machine_adc: Handle ADC resolution less than 8 bits on all MCUs.Damien George
All MCUs can have 6-bit resolution; see adc_cr_to_bits_table. Signed-off-by: Damien George <damien@micropython.org>
2023-06-15stm32/usbd_conf: Treat G0 USB periph as MICROPY_HW_USB_IS_MULTI_OTG=0.Damien George
The G0 USB peripheral behaves more like MICROPY_HW_USB_IS_MULTI_OTG=0 than that config =1. This fixes the configuration of the PMA FIFO buffers. Signed-off-by: Damien George <damien@micropython.org>
2023-06-15stm32/main: Start UART REPL as early as possible.Damien George
For debugging purposes, to see output from other peripherals. Also reset the pyb_stdio_uart state at the end of soft reset, in case it points to a heap-allocated object. Signed-off-by: Damien George <damien@micropython.org>
2023-06-15stm32/make-stmconst.py: Support structs with names ending in _t.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2023-06-15stm32/Makefile: Pass relevant CPU flags to assembler.Damien George
Needed for compiling gchelper_thumb2 on cortex-m33. Signed-off-by: Damien George <damien@micropython.org>
2023-06-15py/mkrules.mk: Allow $(AFLAGS) to set flags to $(AS).Damien George
Signed-off-by: Damien George <damien@micropython.org>
2023-06-14tools/ci.sh: Build PICO_W board as part of rp2 CI.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2023-06-14rp2/boards/PICO_W: Enable Bluetooth Low Energy support.Peter Harper
Signed-off-by: Damien George <damien@micropython.org>
2023-06-14extmod/btstack: Fix marking of static addresses in set_random_address.Peter Harper
Marking address as static was not applied to all code paths. Signed-off-by: Damien George <damien@micropython.org>
2023-06-14rp2/mpbthciport: Cancel existing alarms.Peter Harper
Cancel any existing poll alarm before add a new one. Signed-off-by: Damien George <damien@micropython.org>