Commit Graph

24261 Commits

Author SHA1 Message Date
Alvaro Figueroa
1f9b982119
Translated using Weblate (Spanish)
Currently translated at 100.0% (985 of 985 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/es/
2021-05-10 13:33:22 +02:00
Damien George
0e87459e2b esp32/boards: Add UM_FEATHERS2 and UM_TINYS2 board definitions.
Based on original commit made by Seon Rozenblum aka @UnexpectedMaker.

Signed-off-by: Damien George <damien@micropython.org>
2021-05-10 16:56:53 +10:00
Seon Rozenblum
32ec07a350 esp32/boards: Rename TINYPICO board to UM_TINYPICO.
And add default hardware SPI 0 pins in mpconfigboard.h, and
CONFIG_LWIP_LOCAL_HOSTNAME in sdkconfig.board.
2021-05-10 16:56:53 +10:00
Damien George
5093d49fae esp32: Extend support for S2 series, and S3 where applicable.
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>
2021-05-10 16:56:53 +10:00
Neradoc
dcfb7949d7
fix FunHome to FunHouse
FunHouse, sweet FunHouse.
2021-05-10 05:34:03 +02:00
Damien George
4cdcbdb753 tests/thread: Make exc1,exit1,exit2,stacksize1,start1 tests run on rp2.
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>
2021-05-10 13:07:16 +10:00
Damien George
b6b39bff47 py/gc: Make gc_lock_depth have a count per thread.
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>
2021-05-10 13:07:16 +10:00
Ben Bleything
44f162bb64
free up PA00 and PA01 on BHB 2021-05-09 10:19:48 -07:00
Limor "Ladyada" Fried
af6d97f67f
Merge pull request #4733 from nm3210/sparkfunpromicrorp2040_boardupdate
Swap mis-labelled D0/D1 pins on SparkFun Pro Micro RP2040
2021-05-09 12:13:04 -04:00
Dan Halbert
becff6f93d restore pulseio to pirkey 2021-05-09 11:33:35 -04:00
Dan Halbert
f504af3127 fix HID; fix interface name table creation 2021-05-09 00:42:45 -04:00
Jeff Epler
d9ee63b0c1 run updated black 2021-05-08 20:42:52 -05:00
nm3210
a3de9bda5f Swap mis-labelled D0/D1 pins on SparkFun Pro Micro RP2040 2021-05-08 21:35:37 -04:00
Jeff Epler
aca9d5bc40 Fix up all natmod examples
* modframebuf: _mp_framebuf_p_t is not "really" a protocol, but the
   QSTR assignment caused problems when building as a dynamic module
 * modure: str_index_to_ptr is not in the natmod API, disable URE match
   spans when dynamic.  mp_obj_len() is a bugfix, we should throw here
   if the object is not string-like
 * moduzlib: Correct paths to uzlib headers & sources.  this relative
   path (from moduzlib.c to the referenced file) works in all cases,
   the other only worked from ports/PORTNAME.
 * dynruntime: Handle 2-arg m_malloc, assert_native_inited, add a
   micropythonish mp_arg_check_num_mp, fix mp_raise_msg to use dumb
   strings, add mp_raise_arg1
 * nativeglue: ad assert_native_inited
 * translate: MP_ERROR_TEXT evaluates to its argument for DYNRUNTIME
 * mpy-tool: A straggling magic number change
 * mpy_ld: Have to renumber manually after dynruntime change
 * import_mpy_native_gc.py: Update copy of features0 baked into this test
2021-05-08 20:17:16 -05:00
Jeff Epler
026cd5914d
Merge pull request #4725 from tannewt/merge_helper
Add Python helper tool for MicroPython merges.
2021-05-08 11:10:42 -05:00
Jeff Epler
ec897038be
Merge pull request #4729 from weblate/weblate-circuitpython-main
Translations update from Weblate
2021-05-08 10:40:19 -05:00
Dan Halbert
4b45c37516 Do USB init even in safe mode 2021-05-08 11:03:05 -04:00
Damien George
d0de16266f rp2/mpthreadport: Add mp_thread_deinit to reset core1 on soft reset.
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>
2021-05-09 00:08:30 +10:00
Hosted Weblate
affc9da56c Merge remote-tracking branch 'origin/main' into main 2021-05-08 15:47:32 +02:00
Jeff Epler
5e06c91244
Merge pull request #4716 from tyomitch/main
s/Circuit Python/CircuitPython/g
2021-05-08 08:47:29 -05:00
Hosted Weblate
296a9b828f
Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/
2021-05-08 15:46:26 +02:00
Hosted Weblate
8974ef3782 Merge remote-tracking branch 'origin/main' into main 2021-05-08 15:46:24 +02:00
Jeff Epler
446169e078
Merge pull request #4720 from tannewt/merge_1.13
Merge in MicroPython 1.13
2021-05-08 08:46:03 -05:00
Hosted Weblate
b02e3fdaf0 Merge remote-tracking branch 'origin/main' into main 2021-05-08 15:45:58 +02:00
Jeff Epler
9f3ae54dcc
Merge pull request #4726 from jposada202020/design_guide_string_formatting
adding_string_format_explanation
2021-05-08 08:45:50 -05:00
Jonny Bergdahl
6643de2fca
Translated using Weblate (Swedish)
Currently translated at 100.0% (980 of 980 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/sv/
2021-05-08 15:32:42 +02:00
Wellington Terumi Uemura
e3f319f446
Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (980 of 980 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/pt_BR/
2021-05-08 15:32:41 +02:00
Damien George
7b923d6c72 tests/thread: Make stress_aes.py test run on bare-metal ports.
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>
2021-05-08 22:47:03 +10:00
Damien George
9340cfe774 tests/thread: Make stress_create.py test run on esp32.
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>
2021-05-08 22:47:03 +10:00
Damien George
864e4ecc47 esp32/mpthreadport: Use binary semaphore instead of mutex.
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>
2021-05-08 22:47:03 +10:00
Damien George
31e0b8c71c esp32/mpthreadport: Don't explicitly free thread struct in TCB cleanup.
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>
2021-05-08 22:47:03 +10:00
Tim Radvan
fd24e649fd docs/library: Add initial API reference for rp2 module and its classes.
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>
2021-05-08 18:02:04 +10:00
jposada202020
bba0afa464 adding_string_format_explanation 2021-05-07 15:15:05 -04:00
Scott Shawcroft
20c4a325a4
Add Python helper tool for MicroPython merges.
It automates ignoring parts of MP we don't use.

Related to #2999
2021-05-07 10:21:35 -07:00
Scott Shawcroft
5c736835de
Fix esp32s2 builds after AP changes 2021-05-07 10:03:02 -07:00
Scott Shawcroft
f761292c72
Merge pull request #4718 from weblate/weblate-circuitpython-main
Translations update from Weblate
2021-05-07 09:49:01 -07:00
Scott Shawcroft
cebb10ddae
Fixes from review 2021-05-07 09:31:59 -07:00
Hosted Weblate
df5c30e0a8 Merge remote-tracking branch 'origin/main' into main 2021-05-07 12:32:31 +02:00
Dan Halbert
2fe1df4668
Merge pull request #4719 from hierophect/stm-espr-pico-fix
Espruino Pico: Remove settings for DNP oscillator
2021-05-07 06:32:19 -04:00
Lucian Copeland
9920741c2f Merge remote-tracking branch 'upstream/main' into stm-espr-pico-fix 2021-05-06 17:43:38 -04:00
Hosted Weblate
3e879fa279 Merge remote-tracking branch 'origin/main' into main 2021-05-06 22:48:27 +02:00
hexthat
ae79096e34
Translated using Weblate (Chinese (Pinyin))
Currently translated at 100.0% (980 of 980 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/zh_Latn/
2021-05-06 22:48:26 +02:00
Alvaro Figueroa
cce8096395
Translated using Weblate (Spanish)
Currently translated at 100.0% (980 of 980 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/es/
2021-05-06 22:48:26 +02:00
Dan Halbert
c6b9885573
Merge pull request #4721 from dhalbert/update-xtensa-cache-id
update github actions xtensa cache id; fix a typo
2021-05-06 16:48:20 -04:00
Scott Shawcroft
b19c1a310e
mpy M -> C 2021-05-06 13:31:20 -07:00
Dan Halbert
0773e355a7 update github actions xtensa cache id; fix a typo 2021-05-06 15:10:45 -04:00
Scott Shawcroft
42f4065c8a
Merge remote-tracking branch 'adafruit/main' into merge_1.13 2021-05-06 11:17:53 -07:00
Lucian Copeland
80a459d1f8 Remove settings for DNP oscillator 2021-05-06 13:52:07 -04:00
Hosted Weblate
51645bc094
Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/
2021-05-06 19:51:53 +02:00
Hosted Weblate
0b8824313a Merge remote-tracking branch 'origin/main' into main 2021-05-06 19:51:51 +02:00