| Age | Commit message (Collapse) | Author |
|
|
|
Via the standard tx/rx arguments: UART(0, 115200, tx=Pin(15), rx=Pin(13)).
Resolves issue #4718.
|
|
|
|
Partitions are exposed as a standard MicroPython block device.
|
|
Fixes issue #5018.
|
|
|
|
- Split 'qemu-arm' from 'unix' for generating tests.
- Add frozen module to the qemu-arm test build.
- Add test that reproduces the requirement to half-word align native
function data.
|
|
This is necessary for ARMV6 and V7. Without this change, calling a frozen
native/viper function that is misaligned will crash.
|
|
The line number for comprehensions is now always reported as the correct
global location in the script, instead of just "line 1".
|
|
Enabled via MICROPY_PY_URE_DEBUG, disabled by default (but enabled on unix
coverage build). This is a rarely used feature that costs a lot of code
(500-800 bytes flash). Debugging of regular expressions can be done
offline with other tools.
|
|
As allowed by recent cd35dd9d9a29836906acdce60c931f6352b536d0
|
|
Recent versions of gcc perform optimisations which can lead to the
following code from the MP_NLR_JUMP_HEAD macro being omitted:
top->ret_val = val; \
MP_NLR_RESTORE_PYSTACK(top); \
*_top_ptr = top->prev; \
This is noticeable (at least) in the unix coverage on x86-64 built with gcc
9.1.0. This is because the nlr_jump function is marked as no-return, so
gcc deduces that the above code has no effect.
Adding MP_UNREACHABLE tells the compiler that the asm code may branch
elsewhere, and so it cannot optimise away the code.
|
|
And use it to replace the same pattern at the end of nlrthumb.c:nlr_jump.
|
|
As per PEP 485, this function appeared in for Python 3.5. Configured via
MICROPY_PY_MATH_ISCLOSE which is disabled by default, but enabled for the
ports which already have MICROPY_PY_MATH_SPECIAL_FUNCTIONS enabled.
|
|
Before this patch I2C transactions using a hardware I2C peripheral on F0/F7
MCUs would not correctly generate the I2C restart condition, and instead
would generate a stop followed by a start. This is because the CR2 AUTOEND
bit was being set before CR2 START when the peripheral already had the I2C
bus from a previous transaction that did not generate a stop.
As a consequence all combined transactions, eg read-then-write for an I2C
memory transfer, generated a stop condition after the first transaction and
didn't generate a stop at the very end (but still released the bus). Some
I2C devices require a repeated start to function correctly.
This patch fixes this by making sure the CR2 AUTOEND bit is set after the
start condition and slave address have been fully transferred out.
|
|
|
|
|
|
The rename matches other ports, e.g. stm32, and gives consistency with
mpconfigboard.h.
|
|
Replaces the `SDKCONFIG` makefile variable with `BOARD`. Defaults to
BOARD=GENERIC. spiram can be enabled with `BOARD=GENERIC_SPIRAM`
Add example definition for TINYPICO, currently identical to GENERIC_SPIRAM
but with custom board/SoC names for the uPy banner.
|
|
|
|
Prior to this patch the amount of free space in an array (including
bytearray) was not being maintained correctly for the case of slice
assignment which changed the size of the array. Under certain cases (as
encoded in the new test) it was possible that the array could grow beyond
its allocated memory block and corrupt the heap.
Fixes issue #4127.
|
|
Like it's done on normal boot up. Fixes issue #5004.
|
|
|
|
It wasn't clear why that element was `10` instead of `0`. Also bumped the
`10` to `100` to make the mouse movement more obvious.
|
|
See issue #4970.
|
|
|
|
|
|
|
|
|
|
|
|
This patch implements a new sys.atexit function which registers a function
that is later executed when the main script ends. It is configurable via
MICROPY_PY_SYS_ATEXIT, disabled by default.
This is not compliant with CPython, rather it can be used to implement a
CPython compatible "atexit" module if desired (similar to how
sys.print_exception can be used to implement functionality of the
"traceback" module).
|
|
They are both enabled by default, but can be disabled by defining
MICROPY_HW_ENABLE_MDNS_QUERIES and/or MICROPY_HW_ENABLE_MDNS_RESPONDER to
0. The hostname for the responder is currently taken from
tcpip_adapter_get_hostname() but should eventually be configurable.
|
|
Allows to optimise and configure the FIFO sizes depending on the USB device
configuration selected at runtime, eg VCP+MSC vs 3xVCP+MSC.
|
|
|
|
|
|
This is an internal config value that is enabled for MCUs that have
multiple OTG instances, to simplify #if configuration of the USB code.
|
|
|
|
This commit adds the connect() method to the PPP interface and requires
that connect() be called after active(1). This is a breaking change for
the PPP API.
With the connect() method it's now possible to pass in authentication
information for PAP/CHAP, eg:
ppp.active(1)
ppp.connect(authmode=ppp.AUTH_PAP, username="user", "password="password")
If no authentication is needed simply call connect() without any
parameters. This will get the original behaviour of calling active(1).
|
|
Some SD/MMC breakout boards don't support 4-bit bus mode. This adds a new
macro MICROPY_HW_SDMMC_BUS_WIDTH that allows each board to define the width
of the SD/MMC bus interface used on that board, defaulting to 4 bits.
|
|
|
|
Fixes #4936.
|
|
|
|
|
|
|
|
Configurable via MICROPY_PY_LWIP_SOCK_RAW.
|
|
|
|
|
|
So code is not duplicated and it can take advantage of __import__ being
overridden.
|
|
This patch adds a simple but powerful hook into the import system, in a
CPython compatible way, by allowing to override builtins.__import__.
This does introduce some overhead to all imports but it's minor:
- the dict lookup of __import__ is bypassed if there are no modifications
to the builtins module (which is the case at start up);
- imports are not performance critical, usually done just at the start of a
script;
- compared to how much work is done in an import, looking up a value in a
dict is a relatively small additional piece of work.
|
|
Note that bytecode already includes the source filename as a qstr so there
is no additional memory used by the interning operation here.
|