This enables the new `-X realtime` runtime option when running tests on
macOS. This causes MicroPython to configure all threads to be high
priority so that they are allowed to use high precision timers. This
makes tests that depend on the passage of time more likely to succeed.
CI tests that were disabled because of this are now enabled again.
Signed-off-by: David Lechner <david@pybricks.com>
This adds a new command line option to the unix port `-X realtime` to
enable realtime priority on threads. This enables high precision timers
for applications that need more accurate timers.
Related docs:
https://developer.apple.com/library/archive/technotes/tn2169/_index.html
Fixes issue #8621.
Signed-off-by: David Lechner <david@pybricks.com>
This adds the `mp_` prefix to the `thread_t` type. The name `thread_t`
conflicts with the same in `mach/mach_types.h` on macOS.
Signed-off-by: David Lechner <david@lechnology.com>
The examples/natmod features0 and features1 examples now build and run on
ARMv6-M platforms. More complicated examples are not yet supported because
the compiler emits references to built-in functions like __aeabi_uidiv.
Signed-off-by: Damien George <damien@micropython.org>
If __thumb2__ is defined by the compiler then .mpy files marked as ARMV6M
and above (up to ARMV7EMDP) are supported. If it's not defined then only
ARMV6M .mpy files are supported. This makes sure that on CPUs like
Cortex-M0+ (where __thumb2__ is not defined) only .mpy files marked as
ARMV6M can be imported.
Signed-off-by: Damien George <damien@micropython.org>
This commit adjusts the asm_thumb_xxx functions so they can be dynamically
configured to use ARMv7-M instructions or not. This is available when
MICROPY_DYNAMIC_COMPILER is enabled, and then controlled by the value of
mp_dynamic_compiler.native_arch.
If MICROPY_DYNAMIC_COMPILER is disabled the previous behaviour is retained:
the functions emit ARMv7-M instructions only if MICROPY_EMIT_THUMB_ARMV7M
is enabled.
Signed-off-by: Damien George <damien@micropython.org>
This eliminates the need to save and restore the exception unwind handler
pointer when calling nlr_push.
Signed-off-by: Damien George <damien@micropython.org>
The performance benchmark tests now support `--via-mpy` and `--emit native`
on remote targets. For example:
$ ./run-perfbench.py -p --via-mpy --emit native 100 100
Signed-off-by: Damien George <damien@micropython.org>
This adds support for the `--via-mpy` and `--emit native` options when
running tests on remote targets (via pyboard.py). It's now possible to do:
$ ./run-tests.py --target pyboard --via-mpy
$ ./run-tests.py --target pyboard --via-mpy --emit native
Signed-off-by: Damien George <damien@micropython.org>
Reasons for removal:
- It did not work properly because it stopped the hardware watchdog
timer while keeping the software watchdog running (issue #8597).
- There isn't a deinit method for the WDT in any other port.
- "The watchdog is not intended to be stopped. That is a feature."
(See #8600.)
For example, ussl can come from axtls or mbedtls. If neither are enabled
then don't try and set an empty definition twice, and only include it
once in MICROPY_REGISTERED_MODULES.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
When opening a new issue the following selection is now shown:
- Bug reports
- Feature requests
- Security issue
- Documentation issue
- Link to forum
- Link to docs
- Link to downloads
Now that constant tuples are supported in the parser, eg (1, True, "str"),
it's a small step to allow anything that is a constant to be used with the
pattern:
from micropython import const
X = const(obj)
This commit makes the required changes to allow the following types of
constants:
from micropython import const
_INT = const(123)
_FLOAT = const(1.2)
_COMPLEX = const(3.4j)
_STR = const("str")
_BYTES = const(b"bytes")
_TUPLE = const((_INT, _STR, _BYTES))
_TUPLE2 = const((None, False, True, ..., (), _TUPLE))
Prior to this, only integers could be used in const(...).
Signed-off-by: Damien George <damien@micropython.org>