Commit Graph

28289 Commits

Author SHA1 Message Date
Jeff Epler 4e6fa55cba
Merge pull request #6591 from tannewt/web_workflow_ticks
Add socket select task to wake CP
2022-07-15 18:30:43 -05:00
Scott Shawcroft c2a8ef752c
Remove ps2io to make space 2022-07-15 14:01:50 -07:00
Scott Shawcroft 6e7fdcc24b
Add wait for MDNS hostname to be set 2022-07-15 13:48:19 -07:00
Scott Shawcroft bad080a7bb
Merge pull request #6588 from jepler/signal-errors-ci-fetch-deps
signal errors in ci_fetch_deps subprocesses
2022-07-15 11:17:59 -07:00
Scott Shawcroft 145cce93da
Merge pull request #6596 from Neradoc/ble-name-in-dotenv
Setup default BLE name in dotenv
2022-07-14 15:46:28 -07:00
Scott Shawcroft 02c804c2d8
Merge pull request #6600 from jepler/esp32-soft-reset-wifi
esp32: don't fully reset the wifi device
2022-07-14 15:44:30 -07:00
Jeff Epler 19fad093cb
Merge pull request #6590 from weblate/weblate-circuitpython-main
Translations update from Hosted Weblate
2022-07-14 15:20:52 -05:00
Jeff Epler 8cdbeb62f6
Pass check=False for an expected-fail command 2022-07-14 15:16:28 -05:00
Jeff Epler dcc27a8c88
Need to ensure wifi radio is set enabled again on esp32
.. otherwise, nothing set it enabled on the second soft reboot.
2022-07-14 15:09:26 -05:00
Jeff Epler 72f5537027
esp32: don't fully reset the wifi device
.. this makes reconnecting without a full reset not work.

Because this works on other generations of the esp32 (c2, c3, etc),
apply this behavior only to esp32.

After this change, it's possible to connect multiple times to wifi in
different runs of code.py or the repl after soft rebooting.
2022-07-14 15:01:15 -05:00
Neradoc 44a91c12be add docs for dotenv BLE 2022-07-14 20:45:01 +02:00
Hosted Weblate 0e565a7240
Merge remote-tracking branch 'origin/main' 2022-07-14 20:05:22 +02:00
Jonny Bergdahl 49a5e83a61
Translated using Weblate (Swedish)
Currently translated at 100.0% (995 of 995 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/sv/
2022-07-14 20:05:21 +02:00
Scott Shawcroft 01b18cc8dc
Merge pull request #6595 from Neradoc/add-root-group-to-framebufferio
Add root_group accessor in framebufferio.FramebufferDisplay
2022-07-14 11:05:14 -07:00
Neradoc 17d65fe8f3 fix the docs 2022-07-14 13:31:41 +02:00
Neradoc 5ca6d8953d use available constants instead of testing errors for length 2022-07-14 11:55:53 +02:00
Neradoc 50a9beda04 Retrieve the BLE name from dotenv if available
Format:
CIRCUITPY_BLE_NAME = My BLE Board

- the length is limited to 31 characters
- for the NRF version it repeatedly truncates the name if it's too long
- the ESP version defaults to "nimble" if the name is too long
2022-07-14 11:55:53 +02:00
Neradoc 626296b613 implement root_group in framebufferio.FramebufferDisplay 2022-07-14 11:47:36 +02:00
Hosted Weblate 3111d2dba9
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/
2022-07-14 02:36:55 +02:00
Hosted Weblate b7a7370297
Merge remote-tracking branch 'origin/main' 2022-07-14 02:36:52 +02:00
Scott Shawcroft e9dd254127
Add socket select task to wake CP
This fixes the web workflow on boards without a display.

Fixes #6552
2022-07-13 17:35:35 -07:00
Scott Shawcroft 3515003b30
Merge pull request #6571 from dhalbert/esp32
initial ESP32 support PR
2022-07-13 17:33:10 -07:00
Scott Shawcroft ac460dd1e1
Merge branch 'main' into esp32 2022-07-13 15:30:53 -07:00
Hosted Weblate 04004210f5
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/
2022-07-13 23:16:06 +02:00
Scott Shawcroft 2f9de1cb07
Merge pull request #6584 from tannewt/websocket_serial
Add WebSocket at /cp/serial/
2022-07-13 14:15:49 -07:00
Jeff Epler 104ac5b965
signal errors in ci_fetch_deps subprocesses
A recent build failed. The original error seemed to be during ci_fetch_deps
where a build message said
```
  fatal: reference is not a tree: 346c936e14c6ea3a8d3d65cb1fa46202dc92999d
  fatal: Unable to checkout '346c936e14c6ea3a8d3d65cb1fa46202dc92999d' in submodule path 'extmod/ulab'
```
(along with other problems), but this step didn't signal failure to
github actions.

By adding the check= parameter, a failure of the subprocess will cause
a CalledProcessError to be raised, which will make ci_fetch_deps exit with
nonzero status. In turn, this should let Actions understand that something
went wrong with this step, instead of waiting for some subsequent step(s)
to go wrong.
2022-07-13 14:56:22 -05:00
Jeff Epler 09b754ffa0
espressif: Set heap size automatically, like micropython
rather than setting the heap size statically, micropython allocates
the biggest contiguous chunk possible, but in no event more than half the
total internal sram. On esp32 this gives 123728 bytes of `gc.mem_free`
in the repl.
2022-07-13 14:00:59 -05:00
Jeff Epler afa8b2ea72
Don't hard fault trying to run boot.py if there's no heap 2022-07-13 13:56:49 -05:00
Jeff Epler 09d1c846c4
Set heap size to 0 when heap allocation fails 2022-07-13 13:53:22 -05:00
Jeff Epler c1b6c367ff
esp32 can allocate 88kB successfully 2022-07-13 13:53:08 -05:00
Jeff Epler 13be10ef14
rename function to avoid confusion 2022-07-13 13:28:51 -05:00
Scott Shawcroft f869a86d9a
Merge pull request #6581 from FoamyGuy/docs_links_foamyguy_0
adding links in docs
2022-07-13 10:30:35 -07:00
Jeff Epler 5c6ee20ca5
on esp32 need to initialize nvs before starting wifi
Also, change error handling so that the esp-idf error number
is shown in the traceback in the case of an error.

This allows scanning & connecting to work. I didn't try requests yet.
2022-07-13 11:57:38 -05:00
Jeff Epler f620c2901c
Set a small but working heap size for esp32 without psram 2022-07-13 11:10:00 -05:00
Jeff Epler ea52ca66dc
Disable SPIRAM bankswitch on esp32
We don't use this facility, which was reserving the last 256kiB of
psram.
2022-07-13 10:56:58 -05:00
Jeff Epler 953f44b46e
Fix spiram limit calculation on esp32
esp32 places the psram start at SOC_EXTRAM_DATA_LOW and it can extend
up to SOC_EXTRAM_DATA_SIZE. This is different than esp32-s2 and later,
which place the end at EXTRAM_DATA_HIGH and the limitation of
SOC_EXTRAM_DATA_SIZE was not previously identified as important.
Additionally, the esp32 has a reserved area within himem which was
not being accounted for.

With this change, the Feather ESP32 V2 feather can be used via thonny,
and the other "quick memory corruption tests" I was performing
also all succeed instead of failing.

Before this change, the incorrect address being used for spiram was
0x3fa00000..0x3fc00000 (2MiB). Now, it's 0x3f800000..0x3f9c0000 (1.75MiB)
due to the reserved area and the changed start address.

This is intended to be a no-effect change for other espressif chips besides
original esp32.
2022-07-13 10:52:15 -05:00
Jeff Epler afbaa2eb6c
decode_backtrace: Show even more information
addr2line can show information about how functions were inlined,
including function names

Typical new output:
```
0x400dec57: mp_obj_get_type at /home/jepler/src/circuitpython/ports/espressif/../../py/obj.c:68
 (inlined by) mp_obj_print_helper at /home/jepler/src/circuitpython/ports/espressif/../../py/obj.c:133
 (inlined by) mp_obj_print_helper at /home/jepler/src/circuitpython/ports/espressif/../../py/obj.c:114
0x400e1a25: fun_builtin_1_call at /home/jepler/src/circuitpython/ports/espressif/../../py/objfun.c:75
0x400dd016: mp_call_function_n_kw at /home/jepler/src/circuitpython/ports/espressif/../../py/runtime.c:665
0x400eac99: mp_execute_bytecode at /home/jepler/src/circuitpython/ports/espressif/../../py/vm.c:936
0x400e1ae9: fun_bc_call at /home/jepler/src/circuitpython/ports/espressif/../../py/objfun.c:297 (discriminator 4)
0x400dd016: mp_call_function_n_kw at /home/jepler/src/circuitpython/ports/espressif/../../py/runtime.c:665
0x400dd03a: mp_call_function_0 at /home/jepler/src/circuitpython/ports/espressif/../../py/runtime.c:638
0x40117c03: parse_compile_execute at /home/jepler/src/circuitpython/ports/espressif/../../shared/runtime/pyexec.c:146
0x4011800d: pyexec_friendly_repl at /home/jepler/src/circuitpython/ports/espressif/../../shared/runtime/pyexec.c:734
0x400eeded: run_repl at /home/jepler/src/circuitpython/ports/espressif/../../main.c:823
 (inlined by) main at /home/jepler/src/circuitpython/ports/espressif/../../main.c:922
0x400ef5e3: app_main at /home/jepler/src/circuitpython/ports/espressif/supervisor/port.c:410
0x401bb461: main_task at /home/jepler/src/circuitpython/ports/espressif/build-adafruit_feather_esp32_v2/esp-idf/../../esp-idf/components/freertos/port/port_common.c:141
```
2022-07-12 16:28:33 -05:00
Scott Shawcroft 031c124a81
Tweak serial page to work better in Chrome 2022-07-12 14:12:39 -07:00
Scott Shawcroft 8093f8e555
Default gifio to camera setting 2022-07-12 14:12:25 -07:00
Scott Shawcroft 9d5b04ebc4
Merge pull request #6577 from NathanY3G/uf2-family-id-for-stm32f405
stm: Make family IDs consistent with TinyUF2
2022-07-12 13:38:40 -07:00
Scott Shawcroft 23bbb19138
Merge remote-tracking branch 'adafruit/main' into websocket_serial 2022-07-12 13:15:38 -07:00
Scott Shawcroft 506a7b8793
Merge pull request #6582 from weblate/weblate-circuitpython-main
Translations update from Hosted Weblate
2022-07-12 11:18:54 -07:00
Scott Shawcroft 15fe386457
Fix build and minify html and js 2022-07-12 11:13:17 -07:00
Hosted Weblate 311c77ef98
Merge remote-tracking branch 'origin/main' 2022-07-12 15:10:20 +02:00
Jonny Bergdahl 636e22b05b
Translated using Weblate (Swedish)
Currently translated at 100.0% (993 of 993 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/sv/
2022-07-12 15:10:20 +02:00
Wellington Terumi Uemura 83b62567d2
Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (993 of 993 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/pt_BR/
2022-07-12 15:10:19 +02:00
Jeff Epler 078ebeb3f0
Merge pull request #6583 from tannewt/fix_rp2040_uart
Fix RP2040 UART
2022-07-12 08:10:13 -05:00
Scott Shawcroft 425a0efeca
A bit more cleanup 2022-07-11 14:53:20 -07:00
Scott Shawcroft 8cfdfb95f7
Remove extra logging, auth /cp/serial and add doc 2022-07-11 14:32:28 -07:00
Scott Shawcroft d9f6e99942
Fix RP2040 UART
It couldn't receive more than 32 bytes in while checking in_waiting
because in_waiting didn't turn interrupts back on correctly.

Fixes #6579
2022-07-11 13:36:44 -07:00