summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-03-24ports: Allow boards to define additional network interfaces.iabdalkader
2022-03-22stm32: Support building for STM32F745.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2022-03-22stm32/mboot: Verify CRC32 of fsload DFU files before writing.Andrew Leech
2022-03-22stm32/mboot: Verify signature of fsload packed DFU files before writing.Andrew Leech
When verifying the DFU contents, the signature of signed/encrypted files is also now checked in this initial, dry-run stage.
2022-03-22stm32/mboot/fwupdate.py: Simplify calculation of CRC32.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2022-03-22stm32/boards/PYBD_SF2: Turn on SD card in mboot init if SD enabled.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2022-03-22stm32/mboot: Add support for reading from SD card.Damien George
Tested on PYBV10 and PYBD_SF6, with MBOOT_FSLOAD enabled and programming new firmware from a .dfu.gz file stored on the SD card. Signed-off-by: Damien George <damien@micropython.org>
2022-03-22stm32/mboot: Add support for 64-bit mboot address space for reads.Damien George
If enabled via MBOOT_ADDRESS_SPACE_64BIT (it's disabled by default) then read addresses will be 64-bit. Signed-off-by: Damien George <damien@micropython.org>
2022-03-22stm32/mboot: Always check the magic number to enter filesystem loading.Damien George
Even if MBOOT_FSLOAD is disabled, mboot should still check for 0x70ad0080 so it can immediately return to the application if this feature is not enabled. Otherwise mboot will get stuck in DFU mode. Signed-off-by: Damien George <damien@micropython.org>
2022-03-22stm32/mboot: Add pragma for GCC to ignore array bounds warning.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2022-03-22stm32/dma: Add option to disable auto-DMA-turn-off.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2022-03-22stm32/main: Support SD cards without a partition table.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2022-03-22stm32/sdcard: Add sdcard_select_sd/mmc functions.Damien George
So that C code can select which of SD or MMC to use. Signed-off-by: Damien George <damien@micropython.org>
2022-03-22stm32/sdcard: Use mp_hal_pin_input instead of HAL function.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2022-03-22esp8266/modesp: Remove esp.info() function.Damien George
The main functionality of this info function is available via the existing micropython.mem_info() and micropython.qstr_info() functions. The printing of the address space layout doesn't add much and removing esp.info() saves about 600 bytes. Signed-off-by: Damien George <damien@micropython.org>
2022-03-22esp8266/mpconfigport.h: Remove config values that are the defaults.Damien George
This commit is a no-op in terms of functionality. Signed-off-by: Damien George <damien@micropython.org>
2022-03-22esp32/machine_pin: Expose pin 20 for ESP32.Kattni Rembor
This pin is available on some ESP32 packages. Signed-off-by: Kattni Rembor <kattni@adafruit.com>
2022-03-22esp32/boards: Add support for LilyGO LoRa32 boards.Algy Tynan
Boards use ESP32-PICO-D4. Added pins for hardware versions v1.0, v1.2, v1.6 and v2.0. Signed-off-by: Algy Tynan <algy@tynan.io>
2022-03-22esp32/machine_hw_spi: Use automatic DMA channel selection for SPI on C3.robert-hh
Addresses issue #8204.
2022-03-22esp32/boards: Add LOLIN C3 MINI ESP32-C3 based board.wemos
2022-03-21esp32/boards/UM_TINYPICO: Remove use of PULL_HOLD.Jonathan Hogg
Change APA102 power handling to not use the (now removed) PULL_HOLD constant.
2022-03-21esp32/modesp32: Add new gpio_deep_sleep_hold function.Jonathan Hogg
Add a new function to control whether held pins will retain their function through deep-sleep. Also document this function and explain how to use this in quickref to retain pin configuration during deep-sleep.
2022-03-21esp32/machine_pin: Add new hold keyword argument and remove PULL_HOLD.Jonathan Hogg
The current pull=Pin.PULL_HOLD argument doesn't make a lot of sense in the context of what it actually does vs what the ESP32 quickref document says it does. This commit removes PULL_HOLD and adds a new hold=True|False keyword argument to Pin()/Pin.init(). Setting this to True will cause the ESP32 to lock the configuration of the pin – including direction, output value, drive strength, pull-up/-down – such that it can't be accidentally changed and will be retained through a watchdog or internal reset. Fixes issue #8283, and see also #8284.
2022-03-21docs/esp32/quickref: Refine deep-sleep power-saving notes.Jonathan Hogg
This attempts to better explain how pull-ups and pull-downs operate in deep-sleep mode.
2022-03-17mimxrt/mbedtls: Add NULL pointer check in m_free_mbedtls.Peter Züger
Signed-off-by: Peter Züger <zueger.peter@icloud.com>
2022-03-17stm32/mbedtls: Add NULL pointer check in m_free_mbedtls.Peter Züger
According to the C standard the free(void *ptr) function: if ptr is a null pointer, no action occurs. Signed-off-by: Peter Züger <zueger.peter@icloud.com>
2022-03-17stm32/boards: Convert F4xx and F7xx to new flash FS config.iabdalkader
Following on from 35e70c1698047170f9fb8b1edc65a7f7125f267f. Fixes issue #8390.
2022-03-16extmod/modure: Set subject begin_line so ^ doesn't match interior.Damien George
Fixes issue #8402. Signed-off-by: Damien George <damien@micropython.org>
2022-03-16lib/re1.5: Distinguish between subject start-of-line and start-of-srch.Damien George
Otherwise a repeated sub/split will continue to match ^ to the start of that search. Signed-off-by: Damien George <damien@micropython.org>
2022-03-16py/showbc: Remove global variables and make DECODE_PTR work correctly.Damien George
The bytecode state variables mp_showbc_code_start and mp_showbc_constants have been removed and made local variables passed into the various functions. As part of this, the DECODE_PTR macro is fixed so it extracts the relevant pointer from the child_table (a regression introduced in f2040bfc7ee033e48acef9f289790f3b4e6b74e5). Signed-off-by: Damien George <damien@micropython.org>
2022-03-16py/parse: Handle check for target small-int size in parser.Damien George
This means that all constants for EMIT_ARG(load_const_obj, obj) are created in the parser (rather than some in the compiler). Signed-off-by: Damien George <damien@micropython.org>
2022-03-16py/parse: Put const bytes objects in parse tree as const object.Damien George
Instead of as an intermediate qstr, which may unnecessarily intern the data of the bytes object. Signed-off-by: Damien George <damien@micropython.org>
2022-03-16py/parse: Simplify handling of const int parse nodes.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2022-03-10unix/variants: Enable a few optimisations and features on dev, coverage.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2022-03-10unix/variants: Use rom feature config for standard, dev, coverage.Damien George
This change is a no-op in terms of functionality. Signed-off-by: Damien George <damien@micropython.org>
2022-03-10unix/mpconfigport.h: Collect together config options from extra level.Damien George
This change is a no-op in terms of functionality. Signed-off-by: Damien George <damien@micropython.org>
2022-03-10py/modsys: Add optional mutable attributes sys.ps1/ps2 and use them.Damien George
This allows customising the REPL prompt strings. Signed-off-by: Damien George <damien@micropython.org>
2022-03-10py/modsys: Add optional sys.tracebacklimit attribute.Damien George
With behaviour as per CPython. Signed-off-by: Damien George <damien@micropython.org>
2022-03-10py/modsys: Add optional attribute delegation.Damien George
To be enabled when needed by specific sys attributes. Signed-off-by: Damien George <damien@micropython.org>
2022-03-10py/objmodule: Support delegating failed attr lookups.Damien George
This commit adds generic support for mutable module attributes on built in modules, by adding support for an optional hook function for module attribute lookup. If a module wants to support additional attribute load/ store/delete (beyond what is in the constant, globals dict) then it should add at the very end of its globals dict MP_MODULE_ATTR_DELEGATION_ENTRY(). This should point to a custom function which will handle any additional attributes. The mp_module_generic_attr() function is provided as a helper function for additional attributes: it requires an array of qstrs (terminated in MP_QSTRnull) and a corresponding array of objects (with a 1-1 mapping between qstrs and objects). If the qstr is found in the array then the corresponding object is loaded/stored/deleted. Signed-off-by: Damien George <damien@micropython.org>
2022-03-10tests/extmod/vfs_posix.py: Only test statvfs if it exists.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2022-03-10windows: Switch to VFS subsystem and use VfsPosix.Damien George
Following the unix port. Signed-off-by: Damien George <damien@micropython.org>
2022-03-09unix/moduos: Convert module to use extmod version.Damien George
All variants now use extmod/moduos.c as their uos module implementation. In particular this means they all have MICROPY_VFS enabled and use VfsPosix for their filesystem. As part of this, the available functions in uos become more consistent with other ports: - coverage variant gets uos.urandom - minimal and standard variant get: unlink, chdir, getcwd, listdir Signed-off-by: Damien George <damien@micropython.org>
2022-03-09esp8266/moduos: Convert module to use extmod version.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2022-03-09stm32/moduos: Convert module to use extmod version.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2022-03-09mimxrt/moduos: Convert module to use extmod version.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2022-03-09qemu-arm/moduos: Convert module to use extmod version.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2022-03-09samd/moduos: Convert module to use extmod version.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2022-03-09zephyr/moduos: Convert module to use extmod version.Damien George
This also adds uos.unlink(), for all ports that use extmod/moduos.c. Signed-off-by: Damien George <damien@micropython.org>
2022-03-09esp32/moduos: Convert module to use extmod version.Damien George
Signed-off-by: Damien George <damien@micropython.org>