Commit Graph

769 Commits

Author SHA1 Message Date
Dan Halbert
34f565dd89
Merge pull request #7891 from tannewt/fix_epd_uc
Add address_little_endian and fix display memory reuse
2023-04-26 00:27:59 -04:00
Ted Hess
ccbb6a58fb Fix web-editor debug on non-standard port using localhost (CORS) 2023-04-22 13:09:18 -04:00
Scott Shawcroft
7089ea4d65
Add address_little_endian for displayio
Add address_little_endian for epaper displays with little endian
(low byte first) addresses.

Also clears allocated display and display bus memory so it has a
known state. The acep member wasn't always set so it varied
accidentally.

Fixes #7560. May fix #7778. Fixes #5119.
2023-04-21 12:19:29 -07:00
Scott Shawcroft
66edcf5d03
Add PicoDVI support
PicoDVI in CP support 640x480 and 800x480 on Feather DVI, Pico and
Pico W. 1 and 2 bit grayscale are full resolution. 8 and 16 bit
color are half resolution.

Memory layout is modified to give the top most 4k of ram to the
second core. Its MPU is used to prevent flash access after startup.

The port saved word is moved to a watchdog scratch register so that
it doesn't get overwritten by other things in RAM.

Right align status bar and scroll area. This normally gives a few
pixels of padding on the left hand side and improves the odds it is
readable in a case. Fixes #7562

Fixes c stack checking. The length was correct but the top was being
set to the current stack pointer instead of the correct top.
Fixes #7643

This makes Bitmap subscr raise IndexError instead of ValueError
when the index arguments are wrong.
2023-04-19 15:14:02 -07:00
Scott Shawcroft
09c2c5ef0e
Merge pull request #7876 from thess/CORS-update
Simplify CORS checks and don't restrict host names.
2023-04-19 11:07:34 -07:00
Ted Hess
8980ebfa16 Simplify CORS checks and don't restrict host names.
Minor socket cleanup.
2023-04-18 22:09:48 -04:00
Ted Hess
27a97dec16 Static web pages:
- Move loading .js scripts from <head> to <body> for faster rendering
   - Enable back-button support for file system/editor navigation
   - Close WebSocket when navigating away from /cp/serial
   - Use better looking Blinka icon.
2023-04-16 15:53:07 -04:00
Scott Shawcroft
dbfe1e73cf
Merge pull request #7846 from isacben/device-name-for-web-workflow
Add device name environment variable for web workflow
2023-04-11 10:20:46 -07:00
Isaac Benitez
532283d1a5 Replace malloc() with static varible 2023-04-10 20:58:21 -07:00
Isaac Benitez
e38b5491f4 Add device name env variable for web workflow 2023-04-07 11:45:13 -07:00
Scott Shawcroft
097af804cd
Fix ticks
In #7497 port_background_task was renamed to port_background_tick
but the actual call site wasn't changed. This meant that it was
no longer called!

Rename more functions from task to tick to make it clearer which is
which.
2023-04-07 09:49:51 -07:00
Ted Hess
9825b7fbb7 Web Workflow sockets and threads handling improvements.
Fixes polling thread looping forever hangs preventing new connections.
Don't lose listening sockets on mp resets and re-init.
Keep better separation of "system" and "user" sockets.
Track socket states to prevent re-use of sockets before closed.
Close REST socket when transaction completes. No post-init.
Remove unnecessary state flags.
2023-04-05 13:50:42 -04:00
Ted Hess
1a5afd485b Allow web_workflow to startup after deep sleep alarm wakeup 2023-03-29 15:47:17 -04:00
hathach
8c1095b268
Merge branch 'main' into add-codespell 2023-03-23 14:09:57 +07:00
Scott Shawcroft
53b16615bc
Merge pull request #7767 from tannewt/imx_fixed_stack
Make set_stack_limit respect fixed stack
2023-03-22 09:56:33 -07:00
Scott Shawcroft
cfedcd411f
Merge pull request #7748 from microdev1/patch
Rewrite pystack logic & Update auto-reload
2023-03-22 09:39:13 -07:00
Scott Shawcroft
0eb08509f0
Make set_stack_limit respect fixed stack
Fixes #2830
2023-03-21 16:42:49 -07:00
MicroDev
e4b5b20ebe
don't call reload_initiate if already initiated 2023-03-21 21:34:30 +05:30
Scott Shawcroft
67e0a49a1f
Merge pull request #7724 from tannewt/get_perfbench_running
Improve iMX RT performance
2023-03-21 09:00:48 -07:00
Scott Shawcroft
c78502d8a5
Merge pull request #7746 from FoamyGuy/diskinfo_api
Diskinfo api for web workflow
2023-03-21 08:43:21 -07:00
foamyguy
0773a2bd6d increment web_api_version 2023-03-20 17:32:00 -05:00
hathach
fecc1bdedb
fix typos (partial) detected by codepell 2023-03-18 22:17:02 +07:00
foamyguy
a1506df805 implement real diskinfo functionality 2023-03-17 21:36:13 -05:00
foamyguy
408406c84f starting diskinfo api 2023-03-14 18:09:18 -05:00
Scott Shawcroft
5bb8a7a7c6
Improve iMX RT performance
* Enable dcache for OCRAM where the VM heap lives.
* Add CIRCUITPY_SWO_TRACE for pushing program counters out over the
  SWO pin via the ITM module in the CPU. Exempt some functions from
  instrumentation to reduce traffic and allow inlining.
* Place more functions in ITCM to handle errors using code in RAM-only
  and speed up CP.
* Use SET and CLEAR registers for digitalio. The SDK does read, mask
  and write.
* Switch to 2MiB reserved for CircuitPython code. Up from 1MiB.
* Run USB interrupts during flash erase and write.
* Allow storage writes from CP if the USB drive is disabled.
* Get perf bench tests running on CircuitPython and increase timeouts
  so it works when instrumentation is active.
2023-03-14 12:30:58 -07:00
hathach
b432cf6201
fix rp2040 with new shared irq usb handler 2023-03-13 22:46:27 +07:00
Dan Halbert
21305e3e1c
Merge pull request #7694 from DavePutz/issue_7054
Fix for issue #7054 by avoiding recursive calls to websocket_background.
2023-03-09 11:02:15 -05:00
root
59f56a438a Fix for issue #7054 by avoiding recursive calls to websocket_background. 2023-03-08 13:09:45 -06:00
Scott Shawcroft
de5f58a61d
Merge branch 'main' into banglejs2 2023-02-21 12:04:28 -08:00
Dan Halbert
bbadc00599
Merge pull request #7577 from dhalbert/safemode-py
Implement safemode.py
2023-02-16 14:15:20 -05:00
Scott Shawcroft
931c7c1c51
Add Bangle.js 2, JDI memory displays and ACeP epd
This 2-in-1 PR started with the goal of support the Bangle.js 2
smartwatch with *no USB*.
* Adds "secure" DFU build support with a committed private key.
* Adds 3-bit color support with one dummy bit for the JDI memory display
* Allows nrf boards to have a board_background_task() run in RUN_BACKGROUND_TASK.
  This is needed because the Bangle.js 2 uses the watchdog to reset.
* Renamed port_background_task() to port_background_tick() to indicate it
  runs on tick, not RUN_BACKGROUND_TASK.
* Marks serial connected when the display terminal is inited. This means
  that safe mode messages show up on the display.

ACep, 7-color epaper displays also pack 3 bits in 4. So, I added that
support as well.
* Adds 3-bit ACeP color support for 7-color e-paper displays. (Not
  watch related but similar due to color depth.)
* Allows a refresh sequence instead of a single int command. The 7" ACeP
  display requires a data byte for refresh.
* Adds optional delay after resetting the display. The ACeP displays
  need this. (Probably to load LUTs from flash.)
* Adds a cleaning phase for ACeP displays before the real refresh.

For both:
* Add dither support to Palette.
* Palette no longer converts colors when set. Instead, it caches
  converted colors at each index.
* ColorConverter now caches the last converted color. It should make
  conversions faster for repeated colors (not dithering.)
2023-02-15 15:03:40 -08:00
Jeff Epler
73840f840d Improve boot_out.txt truncation
* write any partial message
 * instead of "..." show a sensible (translatable) message

This does slightly lower the amount of data that can be printed,
and makes the exact amount dependent on the language. However, if boot.py
intentionally needs to produce larger amounts of output, it can
deliberately mount the filesystem in RW mode and perform any writes needed.
In that case it's up to the boot.py to choose an appropriate way to
limit the number of writes if needed for the application.
2023-02-14 10:47:06 -06:00
Dan Halbert
d46d9d5c21 shorten safe mode messages; improve message printing; fix CIRCUITPY_SAFEMODE_PY=0 2023-02-13 21:29:57 -05:00
Dan Halbert
d8231f1588 Implement safemode.py 2023-02-13 18:26:38 -05:00
Neradoc
f0058774d0 add CIRCUITPY_SKIP_SAFE_MODE_WAIT to circuitpy_mpconfig.mk
use #if (also a CIRCUITPY_ULAB)
2023-01-29 00:56:16 +01:00
Scott Shawcroft
dca66eb98c
Watch for ctrl-c over BLE workflow serial
Before this, it was impossible to interrupt a running program over
BLE.
2023-01-18 16:28:35 -08:00
Scott Shawcroft
5c517b7e5a
Handle MDNS deinited better. 2023-01-12 11:24:20 -08:00
Scott Shawcroft
ca80f30348
Share the web workflow MDNS object with the user
Fixes #7369
2023-01-11 16:05:19 -08:00
Jeff Epler
e817563ca0
Update cyw43-driver, fix no-password wifi
Now, open wifi works on Pico W, so this closes #7438.

For the web workflow it's now OK to either
 * specify an empty password string (as before)
 * not have the CIRCUITPY_WIFI_PASSWORD key at all (new functionality)
2023-01-10 15:07:17 -06:00
Dan Halbert
c0c02d0e04
Merge pull request #7371 from PontusO/main
Initializing external flash SPI speed to SPI_FLASH_MAX_BAUDRATE, instead of using driver default speed (32MHz), before probing JEDEC identifier.
2023-01-04 12:29:45 -05:00
Jeff Epler
3d66ed27ce
oofatfs: enable use of random volume IDs
This may help address #7409 if the underlying cause is the deterministic
volume ID. However, not all boards have working urandom (samd21
at least does not) so a couple of fallbacks are attempted when it fails.

I verified that on a pico_w, each `storage.erase_filesystem()` gives
a distinct 32-bit volume ID (pico_w's urandom can never fail)
2023-01-03 17:18:29 -06:00
Pontus Oldberg
14417a21d1
Merge branch 'adafruit:main' into main 2023-01-03 09:31:49 +01:00
Dan Halbert
cc92ce4820 Use memory fence when disabling cache to avoid -O2 problems 2022-12-29 19:49:40 -05:00
Pontus Oldberg
9f266c361b Initializing external flash SPI speed to SPI_FLASH_MAX_BAUDRATE, instead of using driver default speed (32MHz), before probing JEDEC identifier. 2022-12-21 16:33:06 +01:00
Scott Shawcroft
f8ac1d9261
Rework the coproc API
It is now a generic `memorymap` API and an ESP specific `espulp` module.

Fixes #7218. Fixes #3234. Fixes #7300.
2022-12-19 14:08:38 -05:00
Jeff Epler
808161eaab
fix missing sentinel in call 2022-12-12 19:09:57 -06:00
Jeff Epler
3620d14542
Pass string length when enabling radio 2022-12-12 17:04:03 -06:00
Jeff Epler
1b15985783
Fix web workflow builds 2022-12-12 09:20:56 -06:00
Jeff Epler
44f15d563d
Rename "environ" errors to "getenv" errors 2022-12-09 14:14:53 -06:00
Jeff Epler
3a92c079fc
Finish renaming os_environ_get_key to os_getenv
.. for consistency.
2022-12-09 14:07:23 -06:00