aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-03-16tests/extmod/vfs_fat_fileio2.py: Close test file at end of test.Damien George
Otherwise it can lead to inconsistent results running subsequent tests. Signed-off-by: Damien George <damien@micropython.org>
2021-03-16extmod/modbluetooth: Free temp arrays in gatts register services.Damien George
This helps to reduce memory fragmentation, by freeing the heap data as soon as it is not needed. It also helps the compiler keeps a reference to the beginning of both arrays, which need to be traceable by the GC (otherwise some compilers may optimise this reference to something else). Signed-off-by: Damien George <damien@micropython.org>
2021-03-16stm32/Makefile: Fix C++ linker flags when toolchain has spaces in path.stijn
The GNU Make dir command uses spaces as item separator so it does not work for e.g building the STM32 port on Cygwin with a default Arm installation in "c:/program files (x86)/GNU Arm Embedded Toolchain". Fix by using POSIX dirname on a quoted path instead.
2021-03-15all: Add .git-blame-ignore-revs for fixing up git blame output.stijn
Add most formatting-only commits to this file so that when used with git blame, these commits are excluded and the output shows only the interesting bits.
2021-03-14rp2: Use core-provided cmake fragments instead of custom ones.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2021-03-14extmod/extmod.cmake: Add modonewire.c to MICROPY_SOURCE_EXTMOD list.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2021-03-14rp2/modmachine: Enable machine.Signal class.Damien George
Fixes issue #6863. Signed-off-by: Damien George <damien@micropython.org>
2021-03-14rp2: Enabled more core Python features.Damien George
This brings the port's configuration closer to the stm32 and esp32 ports. Signed-off-by: Damien George <damien@micropython.org>
2021-03-13rp2: Enable uerrno module.Kevin Köck
Fixes #6991.
2021-03-12tests/multi_bluetooth: Skip tests when BLE features are unsupported.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2021-03-12tests/run-tests.py: Reformat with Black.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2021-03-12tests: Rename run-tests to run-tests.py for consistency.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2021-03-12esp32/machine_hw_spi: Use default pins when making SPI if none given.Damien George
The default pins can be optionally configured by a board. Fixes issue #6974. Signed-off-by: Damien George <damien@micropython.org>
2021-03-12lib/pico-sdk: Update to latest version 1.1.0.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2021-03-12rp2/rp2_flash: Prevent MICROPY_HW_FLASH_STORAGE_BASE being set negative.Andrew Scheller
2021-03-12rp2/modmachine: Re-init UART for REPL on frequency change.robert-hh
When UART is used for REPL and the MCU frequency is changed, the UART has to be re-initialised. Besides that the UART may have to be recreated after a frequency change, but with USB REPL this is not a problem. Thanks to @HermannSW for spotting and providing the change.
2021-03-12rp2/modmachine: Allow changing CPU clock frequency.robert-hh
Using the standard machine.freq(). The safe ranges tested were 10 and 12-270MHz, at which USB REPL still worked. Requested settings can be checked with the script: pico-sdk/src/rp2_common/hardware_clocks/scripts/vcocalc.py. At frequencies like 300MHz the script still signaled OK, but USB did not work any more.
2021-03-12rp2/rp2_pio: Fix sm.get(buf) to not wait after getting last item.robert-hh
sm.get(buf) was waiting for one item more than the length of the supplied buffer. Even if this item was not stored, sm_get would block trying to get an item from the RX fifo. As part of the fix, the edge case for a zero length buffer was moved up to the section where the function arguments are handled. In case of a zero length buffer, sm.get() now returns immediately that buffer.
2021-03-12rp2/rp2_pio: Allow more than 8 consecutive pins for PIO out/set/sideset.robert-hh
The bitmasks supplied for initialization of out/set/sideset were only 8 bit instead of 32. This resulted in an error, that not more than 8 consecutive pins would get initialized. Fixes issue #6933.
2021-03-11rp2/machine_uart: Add support for inverted TX and RX lines.robert-hh
Usage as in the other ports: keyword "invert" constants: INV_TX and INV_RX Sample: uart = UART(1, invert=UART.INV_TX | UART.INV_RX)
2021-03-11rp2/machine_uart: Add timeout/timeout_char to read and write.robert-hh
2021-03-11rp2: Enable VfsFat class for FAT filesystem support.StereoRocker
Allows interfacing with SD cards, for example.
2021-03-11mimxrt/boards: Add MIMXRT1050_EVK board, based on MIMXRT1060_EVK.svetelna
2021-03-11esp32/Makefile: Specify port and baud on erase_flash command.Mike Causer
2021-03-11lib/utils/gchelper_generic: Implement AArch64 support.Yonatan Goldschmidt
2021-03-11py/nlrx64: Fix typo in comment.Yonatan Goldschmidt
2021-03-11py/nlr: Implement NLR for AArch64.Yonatan Goldschmidt
2021-03-11lib/mbedtls: Switch to currently latest commit of LTS branch v2.16.Mirko Vogt
From a version numbering point of view this is a downgrade (2.17.0 -> 2.16.x). However the latest commit for version 2.17.0 is from March 2019 and no further minor release happened after 2.17.0. This version is EOL. 2.16.x though is still actively maintained as a long term release, hence security and stability fixes are still being backported, including compatibility with upcoming compiler releases.
2021-03-11stm32/boardctrl: Add MICROPY_BOARD_STARTUP hook.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2021-03-11stm32/spi: Fix baudrate calculation for H7 series.Reinhard Feger
Fixes issue #6342.
2021-03-11stm32/powerctrl: Save and restore EWUP state when configuring standby.Peter Hinch
This allows the user to enable wake-up sources using the EWUP bits, on F7 MCUs. Disabling the wake-up sources while clearing the wake-up flags follows the reference manual and ST examples.
2021-03-10stm32/main: Fix passing state.reset_mode to init_flash_fs.Braiden Kindt
state.reset_mode is updated by `MICROPY_BOARD_BEFORE_SOFT_RESET_LOOP` but not passed to `init_flash_fs`, and so factory reset is not executed on boards that do not have a bootloader. This bug was introduced by 4c3976bbcaf58266fdcaab264fee5b7a94a682e5 Fixes #6903.
2021-03-10stm32/make-stmconst.py: Allow "[]" chars when parsing source comments.Herwin Grobben
For STM32WB MCUs, EXTI offset addresses were not parsed due to the appearance of "[31:0]" in a comment in the .h file.
2021-03-09stm32/storage: Prevent attempts to read/write invalid block addresses.Andrew Leech
A corrupt filesystem may lead to a request for a block which is out of range of the block device limits. Return an error instead of passing the request down to the lower layer.
2021-03-02stm32/rfcore: Allow BLE settings to be changed by a board.Damien George
Two of the defaults have also changed in this commit: - MICROPY_HW_RFCORE_BLE_LSE_SOURCE changed from 1 to 0, which configures the LsSource to be LSE (needed due to errata 2.2.1). - MICROPY_HW_RFCORE_BLE_VITERBI_MODE changed from 0 to 1, which enables Viterbi mode, following all the ST examples. Signed-off-by: Damien George <damien@micropython.org>
2021-02-23tools/pydfu.py: Support DFU files with elements of zero size.Damien George
Instead of raising a ZeroDivisionError, this tool now just skips any elements in the DFU file that have zero size. Signed-off-by: Damien George <damien@micropython.org>
2021-02-23rp2,stm32: Enable MICROPY_PY_UBINASCII_CRC32 to get ubinascii.crc32().Damien George
These ports already have uzlib enabled so this additional ubinascii.crc32 function only costs about 90 bytes of flash. Signed-off-by: Damien George <damien@micropython.org>
2021-02-21esp32: Define MICROPY_QSTRDEFS_PORT to include special qstrs.Damien George
Fixes issue #6942. Signed-off-by: Damien George <damien@micropython.org>
2021-02-21py/mkrules.cmake: Add MICROPY_QSTRDEFS_PORT to qstr build process.Damien George
This allows a port to specify a custom qstrdefsport.h file, the same as the QSTR_DEFS variable in a Makefile. Signed-off-by: Damien George <damien@micropython.org>
2021-02-21py/mkrules.cmake: Rename QSTR_DEFS variables to QSTRDEFS.Damien George
And also MICROPY_PY_QSTRDEFS to MICROPY_QSTRDEFS_PY. These variables are all related. Signed-off-by: Damien George <damien@micropython.org>
2021-02-21tools/verifygitlog.py: Show required format regexp in error message.iTitou
Signed-off-by: iTitou <moiandme@gmail.com>
2021-02-21stm32/boards/NUCLEO_WB55: Enable LPUART1 on PA2/PA3.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2021-02-21stm32/uart: Add support for LPUART1 on L0, L4, H7 and WB MCUs.Chris Mason
Add LPUART1 as a standard UART. No low power features are supported, yet. LPUART1 is enabled as the next available UART after the standard U(S)ARTs: STM32WB: LPUART1 = UART(2) STM32L0: LPUART1 = UART(6) STM32L4: LPUART1 = UART(6) STM32H7: LPUART1 = UART(9) On all ports: LPUART1 = machine.UART('LP1') LPUART1 is enabled by defining MICROPY_HW_LPUART1_TX and MICROPY_HW_LPUART1_RX in mpconfigboard.h. Signed-off-by: Chris Mason <c.mason@inchipdesign.com.au>
2021-02-19tests/multi_bluetooth: Add basic performance tests.Jim Mussared
1. Exchange GATT notifications. 2. Transmit a stream of data over L2CAP. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2021-02-19extmod/modbluetooth: Separate enabling of "client" from "central".Jim Mussared
Previously, the MICROPY_PY_BLUETOOTH_ENABLE_CENTRAL_MODE macro controlled enabling both the central mode and the GATT client functionality (because usually the two go together). This commits adds a new MICROPY_PY_BLUETOOTH_ENABLE_GATT_CLIENT macro that separately enables the GATT client functionality. This defaults to MICROPY_PY_BLUETOOTH_ENABLE_CENTRAL_MODE. This also fixes a bug in the NimBLE bindings where a notification or indication would not be received by a peripheral (acting as client) as gap_event_cb wasn't handling it. Now both central_gap_event_cb and peripheral_gap_event_cb share the same common handler for these events. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2021-02-19esp32: Make machine.soft_reset() work in main.py and reset_cause().Thorsten von Eicken
This commit fixes two issues on the esp32: - it enables machine.soft_reset() to be called in main.py; - it enables machine.reset_cause() to correctly identify a soft reset. The former is useful in that it enables soft resets in applications that are started at boot time. The support is patterned after the stm32 port.
2021-02-19esp32: Add basic support for Non-Volatile-Storage in esp32 module.Thorsten von Eicken
This commit implements basic NVS support for the esp32. It follows the pattern of the esp32.Partition class and exposes an NVS object per NVS namespace. The initial support provided is only for signed 32-bit integers and binary blobs. It's easy (albeit a bit tedious) to add support for more types. See discussions in: #4436, #4707, #6780
2021-02-19esp32: Add support to build with ESP-IDF v4.3 pre-release.Damien George
The esp32 port now builds against IDF v4.3-beta1, as well as v4.4-dev. Signed-off-by: Damien George <damien@micropython.org>
2021-02-19esp32/boards: Enable size optimisation for builds.Damien George
This enables -Os for compilation, but still keeps full assertion messages. With IDF v4.2, -Os changes the GENERIC firmware size from 1512176 down to 1384640, and the GENERIC_SPIRAM firmware is now 1452320 which fits in the allocated partition. Signed-off-by: Damien George <damien@micropython.org>
2021-02-18stm32/mboot: After sig verify, only write firmware-head if latter valid.Damien George
So that mboot can be used to program encrypted/signed firmware to regions of flash that are not the main application, eg that are the filesystem. Signed-off-by: Damien George <damien@micropython.org>