- 16 Jul, 2020 5 commits
-
-
Matt Trentini authored
-
Glenn Ruben Bakke authored
-
Glenn Ruben Bakke authored
Update toolchain to GNU Arm Embedded Toolchain.
-
Glenn Ruben Bakke authored
Resolves dependencies for MICROPY_PY_TIME_TICKS which requires to link against nrfx_rtc.c functions by setting MICROPY_PY_MACHINE_RTCOUNTER to 1.
-
Glenn Ruben Bakke authored
nRF9160 does not have any RTC2. Disable the configuration in case of NRF9160_XXAA.
-
- 10 Jul, 2020 1 commit
-
-
Alex Tsamakos authored
Example make command: make BOARD=actinius_icarus
-
- 09 Jul, 2020 1 commit
-
-
Thomas Friebel authored
In case of error, NimBLE calls the read callback with attr = NULL.
-
- 08 Jul, 2020 7 commits
-
-
iabdalkader authored
Following the documented pyb can_send behavior in pyb.CAN docs.
-
iabdalkader authored
-
iabdalkader authored
-
iabdalkader authored
-
Damien George authored
So that micropython-dev can be used to test VFS code, and inspect and build filesystem images that are compatible with bare-metal systems. Signed-off-by: Damien George <damien@micropython.org>
-
Martin Fischer authored
Having time.ticks_ms/us/add/diff is very useful and used by many drivers, libraries and components.
-
Martin Fischer authored
This commit adds time.ticks_ms/us support using RTC1 as the timebase. It also adds the time.ticks_add/diff helper functions. This feature can be enabled using MICROPY_PY_TIME_TICKS. If disabled the system uses the legacy sleep methods and does not have any ticks functions. In addition support for MICROPY_EVENT_POLL_HOOK was added to the time.sleep_ms(x) function, making this function more power efficient and allows support for select.poll/asyncio. To support this, the RTC's CCR0 was used to schedule a ~1msec event to wakeup the CPU. Some important notes about the RTC timebase: - Since the granularity of RTC1's ticks are approx 30usec, time.ticks_us is not perfect, does not have 1us resolution, but is otherwise quite usable. For tighter measurments the ticker's 1MHz counter should be used. - time.ticks_ms(x) should *not* be called in an IRQ with higher prio than the RTC overflow irq (3). If so it introduces a race condition and possibly leads to wrong tick calculations. See #6171 and #6202.
-
- 01 Jul, 2020 11 commits
-
-
Glenn Ruben Bakke authored
When compiling for debug (-O0) the .text segment cannot fit the flash region when MICROPY_ROM_TEXT_COMPRESSION=1, because the compiler does not optimise away the large if-else chain used to select the correct compressed string. This commit enforces MICROPY_ROM_TEXT_COMPRESSION=0 when compiling for debug (DEBUG=1).
-
Glenn Ruben Bakke authored
Changing line ending character of cooked strings makes rshell/pyboard.py work correctly over Bluetooth socat/pts devices.
-
Glenn Ruben Bakke authored
The storage space of the advertisement name is not declared static, leading to a random advertisement name. This commit fixes the issue by declaring it static.
-
Glenn Ruben Bakke authored
This adds support for enabling MICROPY_PY_SYS_STDFILES when running UART over Bluetooth (NUS).
-
Glenn Ruben Bakke authored
The Bluetooth link gets disconnected when connecting from a PC after 30-40 seconds. This commit adds handling of the data length update request. The data length parameter pointer is set to NULL in the reply, letting the SoftDevice automatically set values and use them in the data length update procedure.
-
Glenn Ruben Bakke authored
mp_keyboard_interrupt() triggers a compiler error because the function is implicitly declared. This commit adds "py/runtime.h" to the includes. Fixes issue #5732.
-
Jim Mussared authored
-
Jim Mussared authored
Changes are: - The default manifest.py is moved to the variants directory (it's in "boards" in other ports). - The coverage variant now uses a custom manifest in its variant directory to add frzmpy/frzstr. - The frzmpy/frzstr tests are moved to variants/coverage/.
-
Andrew Leech authored
This reverts commit 4d6f60d4. This implementation used the timeout as a maximum amount of time needed for the operation, when actually the spec and other tools suggest that it's the minumum delay needed between subsequent USB transfers.
-
Andrew Leech authored
Polling mode will cause failures with the mass-erase command due to USB timeouts, because the USB IRQs are not being serviced. Swiching from polling to IRQ mode fixes this because the USB IRQs can be serviced between page erases. Note that when the flash is being programmed or erased the MCU is halted and cannot respond to USB IRQs, because mboot runs from flash, as opposed to the built-in bootloader which is in system ROM. But the maximum delay in responding to an IRQ is the time taken to erase a single page, about 100ms for large pages, and that is short enough that the USB does not timeout on the host side. Recent tests have shown that in the current mboot code IRQ mode is pretty much the same speed as polling mode (within timing error), code size is slightly reduced in IRQ mode, and IRQ mode idles at about half of the power consumption as polling mode.
-
Andrew Leech authored
This is treated more like a "delay before continuing" in the spec and official tools and does not appear to be really needed. In particular, downloading firmware is much slower with non-zero timeouts because the host must pause by the timeout between sending each DFU_GETSTATUS to poll for download/erase complete.
-
- 30 Jun, 2020 11 commits
-
-
Damien George authored
This commit fixes lookups of class members to make it so that built-in functions that are used as methods/functions of a class work correctly. The mp_convert_member_lookup() function is pretty much completely changed by this commit, but for the most part it's just reorganised and the indenting changed. The functional changes are: - staticmethod and classmethod checks moved to later in the if-logic, because they are less common and so should be checked after the more common cases. - The explicit mp_obj_is_type(member, &mp_type_type) check is removed because it's now subsumed by other, more general tests in this function. - MP_TYPE_FLAG_BINDS_SELF and MP_TYPE_FLAG_BUILTIN_FUN type flags added to make the checks in this function much simpler (now they just test this bit in type->flags). - An extra check is made for mp_obj_is_instance_type(type) to fix lookup of built-in functions. Fixes #1326 and #6198. Signed-off-by: Damien George <damien@micropython.org>
-
Damien George authored
There's no reason to have them non-sequential, this was likely a typo from commit 9ec1caf4. Signed-off-by: Damien George <damien@micropython.org>
-
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 2 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>
-