| Age | Commit message (Collapse) | Author |
|
This new logic is equivalent to the old logic when the only possibilities
for reset_mode are NORMAL, SAFE_MODE and FILESYSTEM, which is the standard
case. But the new logic also allows other reset_mode values (eg
BOOTLOADER) to run boot.py and main.py.
Signed-off-by: Damien George <damien@micropython.org>
|
|
When disabled the bootloader is entered via a direct jump. When enabled
the bootloader is entered via a system reset then a jump. It's enabled by
default to retain the existing behaviour, which is the recommended way.
Signed-off-by: Damien George <damien@micropython.org>
|
|
If the user sets V or BUILD_VERBOSE then they don't need to see this
message.
Signed-off-by: Damien George <damien@micropython.org>
|
|
Signed-off-by: Damien George <damien@micropython.org>
|
|
This was broken by 8459f538eb45fd8e1e4d614298449cf18de84d75
Signed-off-by: Damien George <damien@micropython.org>
|
|
This can be a replacement for a UART in custom ports.
|
|
So the TinyUSB headers can be found during qstr processing.
Fixes issue #7236.
Signed-off-by: Damien George <damien@micropython.org>
|
|
This was broken by 32ec07a3504d6dcbfc53997197a3c53e8c03497f
|
|
Based on original commit made by Seon Rozenblum aka @UnexpectedMaker.
Signed-off-by: Damien George <damien@micropython.org>
|
|
And add default hardware SPI 0 pins in mpconfigboard.h, and
CONFIG_LWIP_LOCAL_HOSTNAME in sdkconfig.board.
|
|
Improvements made:
- PSRAM support for S2
- partition definition for 16MiB flash
- correct ADC and DAC pins
- correct GPIO and IRQ pins
- S3 components in CMakeLists
Based on original commit made by Seon Rozenblum aka @UnexpectedMaker.
Signed-off-by: Damien George <damien@micropython.org>
|
|
The RP2040 has 2 cores and supports running at most 2 Python threads (the
main one plus another), and will raise OSError if a thread cannot be
created because core1 is already in use. This commit adjusts some thread
tests to be robust against such OSError's. These tests now pass on rp2
boards.
Signed-off-by: Damien George <damien@micropython.org>
|
|
This commit makes gc_lock_depth have one counter per thread, instead of one
global counter. This makes threads properly independent with respect to
the GC, in particular threads can now independently lock the GC for
themselves without locking it for other threads. It also means a given
thread can run a hard IRQ without temporarily locking the GC for all other
threads and potentially making them have MemoryError exceptions at random
locations (this really only occurs on MCUs with multiple cores and no GIL,
eg on the rp2 port).
The commit also removes protection of the GC lock/unlock functions, which
is no longer needed when the counter is per thread (and this also fixes the
cas where a hard IRQ calling gc_lock() may stall waiting for the mutex).
It also puts the check for `gc_lock_depth > 0` outside the GC mutex in
gc_alloc, gc_realloc and gc_free, to potentially prevent a hard IRQ from
waiting on a mutex if it does attempt to allocate heap memory (and putting
the check outside the GC mutex is now safe now that there is a
gc_lock_depth per thread).
Signed-off-by: Damien George <damien@micropython.org>
|
|
Any code running on core1 should be stopped on soft-reset (the GC heap is
reset so if code continues to run on core1 it will see corrupt memory).
Signed-off-by: Damien George <damien@micropython.org>
|
|
This is a long-running test, so make it run in reasonable time on slower,
bare-metal ports.
Signed-off-by: Damien George <damien@micropython.org>
|
|
The esp32 port needs to be idle for finished threads and their resources to
be freed up.
Signed-off-by: Damien George <damien@micropython.org>
|
|
So a lock can be acquired on one Python thread and then released on
another. A test for this is added.
Signed-off-by: Damien George <damien@micropython.org>
|
|
Because vPortCleanUpTCB runs on the FreeRTOS idle task and cannot execute
any VM or runtime related code like freeing memory.
Signed-off-by: Damien George <damien@micropython.org>
|
|
All the method signatures from rp2_pio.c and friends have been taken and
converted to RST format, then explanatory notes added for each signature.
Signed-off-by: Tim Radvan <tim@tjvr.org>
|
|
And clean up (make more efficient) display set-up commands.
|
|
Or unset entries will have garbage in them.
Signed-off-by: mishafarms <github@mishafarms.us>
|
|
|
|
|
|
|
|
|
|
uctypes.FLOAT32 has a special value representation and
uctypes_struct_scalar_size() should be used instead of GET_SCALAR_SIZE().
Signed-off-by: Damien George <damien@micropython.org>
|
|
Signed-off-by: Damien George <damien@micropython.org>
|
|
Signed-off-by: Damien George <damien@micropython.org>
|
|
They are no longer used, and the text in the docs is more up to date.
Signed-off-by: Damien George <damien@micropython.org>
|
|
This fixes a bug where double arguments on a 32-bit architecture would not
be passed correctly because they only had 4 bytes of storage (not 8). It
also fixes a compiler warning/error in return_ffi_value on certian
architectures: array subscript 'double[0]' is partly outside array bounds
of 'ffi_arg[1]' {aka 'long unsigned int[1]'}.
Fixes issue #7064.
Signed-off-by: Damien George <damien@micropython.org>
|
|
To match other ports.
Signed-off-by: Damien George <damien@micropython.org>
|
|
|
|
|
|
|
|
In the STM32 HAL libraries, the default value for LSI_VALUE for F4 MCUs is
32 kHz.
Signed-off-by: David Lechner <david@pybricks.com>
|
|
|
|
This adds to the ESP8266 tutorial instructions explaining which pins to
pull low to enter programming mode.
Commit made originally by @ARF1 in #2910.
Signed-off-by: Damien George <damien@micropython.org>
|
|
See also https://github.com/esp8266/Arduino/issues/1624
|
|
The number shown in the USB id is now the same as that returned by
machine.unique_id(). All 8 bytes are inserted as hex into the USB id. A
usb id at /dev/serial/by-id then looks like:
usb-MicroPython_Board_in_FS_mode_e469b03567342f37-if00
|
|
|
|
|
|
Doing "import <tab>" will now complete/list built-in modules.
Originally at adafruit#4548 and adafruit#4608
Signed-off-by: Artyom Skrobov <tyomitch@gmail.com>
|
|
Originally at adafruit#4548
Signed-off-by: Artyom Skrobov <tyomitch@gmail.com>
|
|
Originally at adafruit#4548
Signed-off-by: Artyom Skrobov <tyomitch@gmail.com>
|
|
Originally at adafruit#1859
Signed-off-by: scottbelden <scottabelden@gmail.com>
|
|
Anything beginning with "_" will now only be tab-completed if there is
already a partial match for such an entry. In other words, entering
foo.<tab> will no longer complete/list anything beginning with "_".
Originally at adafruit#1850
Signed-off-by: Kathryn Lingel <kathryn@lingel.net>
|
|
This was missed in commit 7cbf826a9575e18ce1b7fe11b0f0997509153260.
Signed-off-by: Damien George <damien@micropython.org>
|
|
This is provide by a few ports now, and is very useful.
Signed-off-by: Damien George <damien@micropython.org>
|
|
This adds an initial specification of the machine.PWM class, to provide a
way to generate PWM output that is portable across the different ports.
Such functionality may already be available in one way or another (eg
through a Timer object), but because configuring PWM via a Timer is very
port-specific, and because it's a common thing to do, it's beneficial to
have a top-level construct for it.
The specification in this commit aims to provide core functionality in a
minimal way. It also somewhat matches most existing ad-hoc implementations
of machine.PWM.
See discussion in #2283 and #4237.
Signed-off-by: Damien George <damien@micropython.org>
|
|
These commented-out lines of code have been unused for a long time, so
remove them to avoid confusion as to why they are there.
mp_obj_dict_free() never existed, this line was converted from
mp_map_deinit() and commented out as soon as it was added. The call to
mp_map_deinit(mp_loaded_modules_map) was commented in
1a1d11fa32ba043d22995d28cbc039cfa5f3cc46.
Fixes issue #3507.
Signed-off-by: Damien George <damien@micropython.org>
|