summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-06-02all: Remove third argument to MP_REGISTER_MODULE.Damien George
It's no longer needed because this macro is now processed after preprocessing the source code via cpp (in the qstr extraction stage), which means unused MP_REGISTER_MODULE's are filtered out by the preprocessor. Signed-off-by: Damien George <damien@micropython.org>
2022-06-02py: Change makemoduledefs process so it uses output of qstr extraction.Damien George
This cleans up the parsing of MP_REGISTER_MODULE() and generation of genhdr/moduledefs.h so that it uses the same process as compressed error string messages, using the output of qstr extraction. This makes sure all MP_REGISTER_MODULE()'s that are part of the build are correctly picked up. Previously the extraction would miss some (eg if you had a mod.c file in the board directory for an stm32 board). Build speed is more or less unchanged. Thanks to @stinos for the ports/windows/msvc/genhdr.targets changes. Signed-off-by: Damien George <damien@micropython.org>
2022-06-02stm32/boards/LEGO_HUB_NO6: Add helper scripts to update app firmware.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2022-06-02stm32/boards/LEGO_HUB_NO6: Implement robust filesystem-load updates.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2022-06-02stm32/boards/LEGO_HUB_NO6: Use multi-colour LED for mboot status.Damien George
This gives more information to the user when doing updates from SPI flash. Signed-off-by: Damien George <damien@micropython.org>
2022-06-02stm32/boards/LEGO_HUB_NO6: Add support for mboot to access SPI flash.Damien George
The following changes are made: - Use software SPI for external SPI flash access when building mboot. - Enable the mboot filesystem-loading feature, with FAT FS support. - Increase the frequency of the CPU when in mboot to 96MHz, to increase the speed of SPI flash accesses and programming. Signed-off-by: Damien George <damien@micropython.org>
2022-06-02stm32/boards/LEGO_HUB_NO6: Make all SPI flash transfers use 32-bit addr.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2022-06-02stm32/mboot: Pass initial_r0 to early-init and get-reset-mode funcs.Damien George
This allows a board to modify initial_r0 if needed. Also make default board behaviour functions always available, named as mboot_get_reset_mode_default and mboot_state_change_default. Signed-off-by: Damien George <damien@micropython.org>
2022-06-02stm32/mboot: Make 0x70ad0000 values named constants with macros.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2022-06-02stm32/mboot: Add update_app_elements to return mboot fsload elements.Damien George
In case the elements should not be passed directly to machine.bootloader. Signed-off-by: Damien George <damien@micropython.org>
2022-06-02stm32/mboot: Move remaining led_state_all call into mboot_state_change.Damien George
This was missed in b2deea67628b7069ed4e5d0cde84005738463514 Signed-off-by: Damien George <damien@micropython.org>
2022-06-02drivers/bus: Rename MP_SPI_ADDR_IS_32B to MICROPY_HW_SPI_ADDR_IS_32BIT.Damien George
And allow it to be configured externally, if needed. Signed-off-by: Damien George <damien@micropython.org>
2022-06-02mimxrt/mphalport: Fix strict aliasing error with unique id.Jared Hancock
2022-06-01esp32/machine_i2c: Implement write-then-read I2C transfers.Damien George
I2C transfers are much more efficient if they are combined, instead of doing separate writes and reads. Fixes issue #7134. Signed-off-by: Damien George <damien@micropython.org>
2022-06-01extmod/machine_i2c: Add optional support for write-then-read transfers.Damien George
This option is useful for ports where it's more efficient to do a full I2C transfer in one go. Signed-off-by: Damien George <damien@micropython.org>
2022-05-27docs/reference/manifest: Add link to details about opt-level for freeze.Andrew Leech
2022-05-27mimxrt/boards: Extend the deploy_teensy.md instructions.robert-hh
2022-05-27mimxrt/boards/OLIMEX_RT1010: Document the initial deploy procedure.robert-hh
The procedure given here will work whether or not the DevKit motherboard is used and is equipped with the support MCU. It is laborious but works.
2022-05-27docs/mimxrt: Move the pinout tables to a separate document.robert-hh
This shortens the quickref. Also change the note about the hardware SPI frequeny limits.
2022-05-27docs/mimxrt: Add i.MX RT1015 to general.rst, and a few clarifications.robert-hh
2022-05-26tests: Move native while test from pybnative to micropython.Damien George
And make it so this test can run on any target. LED and time testing has been removed from this test, that can now be tested using: ./run-tests.py --via-mpy --emit native. Signed-off-by: Damien George <damien@micropython.org>
2022-05-26tests/run-tests.py: Add rp2 test target.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2022-05-26tests/micropython: Make import_mpy_native test run on all architectures.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2022-05-26tests/micropython: Make import_mpy_native_gc run on ARMv6-M and above.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2022-05-26py/emitinlinethumb: Make float instruction use dynamically selectable.Damien George
This allows mpy-cross to dynamically select whether ARMv7-M float instructions are supported in @micropython.asm_thumb functions. Signed-off-by: Damien George <damien@micropython.org>
2022-05-26py/emitinlinethumb: Make ARMv7-M instruction use dynamically selectable.Damien George
This follows on from a5324a10747dfba921bb363ed904f05ebb6de010 and allows mpy-cross to dynamically select whether ARMv7-M instructions are supported in @micropython.asm_thumb functions. The config option MICROPY_EMIT_INLINE_THUMB_ARMV7M is no longer needed, it is now controlled by MICROPY_EMIT_THUMB_ARMV7M. Signed-off-by: Damien George <damien@micropython.org>
2022-05-26tools/mpy-tool.py: Remove obsolete unicode flag in .mpy header.Damien George
This was removed in c49d5207e9437755be364639632be31c001955a8 Signed-off-by: Damien George <damien@micropython.org>
2022-05-26teensy/mpconfigport.h: Remove obsolete macros.iabdalkader
2022-05-26extmod/network_ninaw10: Add support for socket events callback.iabdalkader
2022-05-25drivers/ninaw10: Update driver to support firmware 1.5.0.iabdalkader
* Firmware 1.5.0 introduces a new BSD-like sockets ABI, which improves the integration with MicroPython.
2022-05-25rp2/boards/ARDUINO_NANO_RP2040_CONNECT: Enable webrepl.iabdalkader
2022-05-25rp2/boards/ARDUINO_NANO_RP2040_CONNECT: Disable internal errno.iabdalkader
* Internal errno can't be used with Nina module due to an issue with esp-idf config.
2022-05-25rp2/mpconfigport.h: Allow boards to override internal errno config.iabdalkader
2022-05-25rp2/mpconfigport.h: Enable static scheduler nodes.iabdalkader
2022-05-25ports: Use default VFS config for import_stat and builtin_open.Damien George
For ports with MICROPY_VFS and MICROPY_PY_IO enabled their configuration can now be simplified to use the defaults for mp_import_stat and mp_builtin_open. This commit makes no functional change, except for the following minor points: - the built-in "open" is removed from the minimal port (it previously did nothing) - the duplicate built-in "input" is removed from the esp32 port - qemu-arm now delegates to VFS import/open Signed-off-by: Damien George <damien@micropython.org>
2022-05-25py/builtin: Clean up and simplify import_stat and builtin_open config.Damien George
The following changes are made: - If MICROPY_VFS is enabled then mp_vfs_import_stat and mp_vfs_open are automatically used for mp_import_stat and mp_builtin_open respectively. - If MICROPY_PY_IO is enabled then "open" is automatically included in the set of builtins, and points to mp_builtin_open_obj. This helps to clean up and simplify the most common port configuration. Signed-off-by: Damien George <damien@micropython.org>
2022-05-25Revert "stm32/rfcore: Intercept addr-resolution HCI cmd to work arou..."Damien George
This reverts commit 2668337f36deef7fdd97f35e2efc68a5d2102192. The issue with potential breaking of the BLE RX path in the radio is fixed since WS v1.12.0. Signed-off-by: Damien George <damien@micropython.org>
2022-05-25extmod/modusocket: Add sendall function.iabdalkader
2022-05-25extmod/modusocket: Add timeout and callback to socket object.iabdalkader
2022-05-25extmod/modusocket: Fix socket_make_new argument parsing.iabdalkader
2022-05-25extmod/modusocket: Add support for socket events callback.iabdalkader
Add support for the special sockopt 20.
2022-05-25extmod/modusocket: Add socket type print function.iabdalkader
2022-05-25extmod/modusocket: Fix errcode returned from socket read/write.iabdalkader
Drivers should ensure a positive errcode is returned from read/write.
2022-05-25extmod/modusocket: Bind unconnected socket to default NIC in setsockopt.iabdalkader
Bind socket to default NIC if setsockopt is called before the socket is bound, to allow setting SO_REUSEADDR before calling socket_bind(). Fixes issue #8653.
2022-05-25extmod/modusocket: Fix polling of a new socket.iabdalkader
New sockets should return HUP and WR when polled, following modlwip.
2022-05-25renesas-ra/modmachine: Add missing MP_REGISTER_MODULE for umachine.Takeo Takahashi
Fix the issue that umachine is not available. Signed-off-by: Takeo Takahashi <takeo.takahashi.xv@renesas.com>
2022-05-24py/asmthumb: Provide implementations of clz/ctz for msvc.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2022-05-24tests/run-multitests.py: Use LAN for IP address if WLAN doesn't exist.robert-hh
This allows running the test on boards with just a LAN interface. Fixes issue #8681.
2022-05-24tests/multi_net: Fix TCP accept test when using system error numbers.iabdalkader
If a port is not using internal error numbers, which match both lwIP and Linux error numbers, ENTOCONN from standard libraries errno.h equals 128, not 107.
2022-05-24extmod/webrepl: Fix setting password in foreground mode and factor code.iabdalkader
The password was not being set when running in foreground mode. Duplicate code has been removed.