- 30 Jun, 2020 9 commits
-
-
Damien George authored
Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
Supports hard and soft interrupts. In the current implementation, soft interrupt callbacks will only be called when the VM is executing, ie they will not be called during a blocking kernel call like k_msleep. And the behaviour of hard interrupt callbacks will depend on the underlying device, as well as the amount of ISR stack space. Soft and hard interrupts tested on frdm_k64f and nucleo_f767zi boards. Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
So it can be unconditionally included in a port's build even if certain configurations in that port do not use its features, to simplify the Makefile. Signed-off-by: Damien George <damien@micropython.org>
-
spacemanspiff2007 authored
See related #4581.
-
victor authored
-
Damien George authored
This is required for some DFU programmers, eg ST's DfuSe demo PC app. Signed-off-by: Damien George <damien@micropython.org>
-
Andrew Leech authored
So the caller can tell when an invalid address is used and can take appropriate action.
-
Andrew Leech authored
The implementation internally uses sector erase to wipe everything except the sector(s) that mboot lives in (by erasing starting from APPLICATION_ADDR). The erase command can take some time (eg an STM32F765 with 2MB of flash takes 8 to 10 seconds). This time is normally enough to make pydfu.py fail with a timeout. The DFU standard includes a mechanism for the DFU device to request a longer timeout as part of the get-status response just before starting an operation. This timeout functionality has been implemented here.
-
Andrew Leech authored
-
- 29 Jun, 2020 2 commits
-
-
Damien George authored
Signed-off-by: Damien George <damien@micropython.org>
-
Andrew Leech authored
Before this commit the USB VCP TX ring-buffer used the basic implementation where it can only be filled to a maximum of buffer size-1. For a 1024 size buffer this means the largest packet that can be sent is 1023. Once a packet of this size is sent the next byte copied in goes to the final byte in the buffer, so must be sent as a 1 byte packet before the read pointer can be wrapped around to the beginning. So in large streaming transfers, watching the USB sniffer you basically get alternating 1023 byte packets then 1 byte packets. This commit changes the ring-buffer implementation to a scheme that doesn't have the full-size limitation, and the USB VCP driver can now achieve a constant stream of full-sized packets. This scheme introduces a restriction on the size of the buffer: it must be a power of 2, and the maximum size is half of the size of the index (in this case the index is 16-bit, so the maximum size would be 32767 bytes rounded to 16384 for a power-of-2). But this is not a big limitation because the size of the ring-buffer prior to this commit was restricted to powers of 2 because it was using a mask-based method to wrap the indices. For an explanation of the new scheme see https://www.snellman.net/blog/archive/2016-12-13-ring-buffers/ The RX buffer could likely do with a similar change, though as it's not read from in chunks like the TX buffer it doesn't present the same issue, all that's lost is one byte capacity of the buffer. USB VCP TX throughput is improved by this change, potentially doubling the speed in certain cases.
-
- 26 Jun, 2020 10 commits
-
-
Damien George authored
This allows complex binary operations to fail gracefully with unsupported operation rather than raising an exception, so that special methods work correctly. Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
uint types in viper mode can now be used for all binary operators except floor-divide and modulo. Fixes issue #1847 and issue #6177. Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
By passing through the I2C instance to the application callbacks, the application can implement multiple I2C slave devices on different peripherals (eg I2C1 and I2C2). This commit also adds a proper rw argument to i2c_slave_process_addr_match for F7/H7/WB MCUs, and enables the i2c_slave_process_tx_end callback. Mboot is also updated for these changes. Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
Mboot now supports FAT, LFS1 and LFS2 filesystems, to load firmware from. The filesystem needed by the board must be explicitly enabled by the configuration variables MBOOT_VFS_FAT, MBOOT_VFS_LFS1 and MBOOT_VFS_LFS2. Boards that previously used FAT implicitly (with MBOOT_FSLOAD enabled) must now add the following config to mpconfigboard.h: #define MBOOT_VFS_FAT (1) Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
This commit factors the code for files and streaming to separate source files (vfs_fat.c and gzstream.c respectively) and introduces an abstract gzstream interface to make it easier to plug in different filesystems. Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
There's no need to do a directory listing to search for the given firmware filename, it just takes extra time and code size. Instead this commit changes it so that the requested firmware file is opened immediately and will abort if the file couldn't be opened. This also allows to specify files in a directory. Signed-off-by: Damien George <damien@micropython.org>
-
- 25 Jun, 2020 4 commits
-
-
Damien George authored
This was missed in commit 120368baSigned-off-by: Damien George <damien@micropython.org>
-
Damien George authored
Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
Previously, if FAT was not enabled but LFS1/2 was then MICROPY_PY_IO_FILEIO would be disabled and file binary-mode was not supported. Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
Signed-off-by: Damien George <damien@micropython.org>
-
- 24 Jun, 2020 4 commits
-
-
Damien George authored
This adds support for freezing an entire directory while keeping the directory as part of the import path. For example freeze("path/to/library", "module") will recursively freeze all scripts in "path/to/library/module" and have them importable as "from module import ...". Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
An OrderedDict can now be used for the locals when creating a type explicitly via type(name, bases, locals). Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
And use it in py/objdict.c instead of mp_obj_is_dict_type. Signed-off-by: Damien George <damien@micropython.org>
-
- 23 Jun, 2020 2 commits
-
-
Damien George authored
This is the same as a902b69d but applied to mboot's Makefile. Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
Commit 86758584 switched to using the CMSIS provided SystemInit function which sets VTOR to 0x00000000 (previously it was 0x08000000). A VTOR of 0x00000000 will be correct on some MCUs but not on others where the built-in bootloader is remapped to this address, via __HAL_SYSCFG_REMAPMEMORY_SYSTEMFLASH(). To make sure mboot has the correct vector table, this commit explicitly sets VTOR to the correct value of 0x08000000. Signed-off-by: Damien George <damien@micropython.org>
-
- 22 Jun, 2020 9 commits
-
-
Damien George authored
Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
As an example of how to use mboot on a WB series MCU. Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
There's no need to duplicate this functionality in mboot, the code provided in stm32lib/CMSIS does the same thing and makes it easier to support other MCU series. Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
The flash functions in ports/stm32/flash.c are almost identical to those in ports/stm32/mboot/main.c, so remove the duplicated code in mboot and use instead the main stm32 code. This also allows supporting other MCU series. Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
This commit makes the low-level flash C functions usable by code other than flashbdev.c (eg by mboot). Changes in this commit are: - flash_erase() and flash_write() now return an errno error code, a negative value on error. - flash_erase() now automatically locks the flash, as well as unlocking it. - flash_write() now automatically unlocks the flash, as well as locking it. - flashbdev.c is modified for the above changes. Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
irq.h is included by py/mphal.h but it's better to be explicit, eg if mboot uses powerctrlboot.c. Signed-off-by: Damien George <damien@micropython.org>
-