Commit Graph

325 Commits

Author SHA1 Message Date
Jeff Epler
60755cc690
straggling translate()s that my glob missed 2023-10-30 10:15:14 +01:00
Scott Shawcroft
e1df598199
Split displayio hardware support from core
These are moved:
* Display -> busdisplay.BusDisplay
* FourWire -> fourwire.FourWire
* EPaperDisplay -> epaperdisplay.EPaperDisplay
* I2CDisplay -> i2cdisplaybus.I2CDisplayBus

`paralleldisplay` is now `paralleldisplaybus` (and registered as
`paralleldisplay` too).

Bus related helpers are split out of display_core into bus_core.
It is in still displayio since it is a dependency of both
busdisplay and epaperdisplay.

Fixes #7667
2023-10-24 15:43:34 -07:00
Scott Shawcroft
9633c4e78f
Merge remote-tracking branch 'adafruit/main' into v1.20-merge 2023-10-11 11:21:57 -07:00
Scott Shawcroft
bf3d84195f
Fix decompressing using qstrs after running the VM
The qstr state still pointed to qstr pools in the released MP heap.
2023-10-05 14:56:11 -07:00
Scott Shawcroft
a15c111d5c
Merge pull request #7718 from microdev1/watchdog-rp
Update WatchDog implementation
2023-10-02 14:17:29 -07:00
Scott Shawcroft
3fdfb9bd32
Update ADC and I2S APIs for 5.1
This fixes ESP32 because the BufferedIn used the old ADC API and
I2S did too indirectly.

Fixes #8429
2023-09-26 16:06:54 -07:00
MicroDev
05812e0618
Merge branch 'main' into watchdog-rp 2023-09-24 05:13:22 +00:00
Dan Halbert
2c0fa0f7dc initial merge from v1.20.0; just satisifying conflicts 2023-09-19 11:10:12 -04:00
Jeff Epler
c3c2b84584
fix typo, copyright notice 2023-09-07 12:57:45 -05:00
Jeff Epler
5e26862b2c
Allow use of CONFIG_SPIRAM_USE_CAPS_ALLOC
.. and switch makerfabs tft7 over to it as a test.

We have our existing way of "reserving" PSRAM for esp-idf (we actually
control it all but add back the "reserved" part). However, this does
not work with off the shelf esp_lcd, which only will allocate a
framebuffer in PSRAM if CONFIG_SPIRAM_USE_CAPS_ALLOC (or CONFIG_SPIRAM_USE_ALLOC)
is defined, not if CONFIG_SPIRAM_USE_MEMMAP is.

This new way is possibly compatible with more esp-idf code, but it complicates
CircuitPython's initial startup since nothing until port_heap_init is
permitted to use the CP heap or supervisor allocator. In practice this
seems to be OK today.

Right now this doesn't change the setting across all boards with PSRAM and so
it does not revert esp-idf to its prior state. Instead, what I'm thinking is
that we can do it during or just after the IDF5 update when sdkconfig files
will be getting an overhaul anyway.
2023-09-05 12:43:22 -05:00
Scott Shawcroft
b81c0e2924
Merge pull request #8344 from jepler/repl-py
add support for "repl.py"
2023-08-29 11:20:13 -07:00
Jeff Epler
d7cf11d3ef
Add repl.py support 2023-08-28 13:59:50 -05:00
Dan Halbert
282e93d3e3
Merge pull request #8281 from dhalbert/merge-micropython-v1.19.1
Merge micropython v1.19.1
2023-08-21 19:24:26 -04:00
Dan Halbert
babd2dec45
Merge pull request #8296 from pypewpew/reset-cwd
Reset cwd before looking for files to run
2023-08-18 17:36:24 -04:00
Radomir Dopieralski
1a47c5f326 Reset cwd before looking for files to run
Make sure we only look for the files in the root directory.
2023-08-18 22:05:29 +02:00
Dan Halbert
d582407b06 pre-commit fixes 2023-08-14 00:59:22 -04:00
Scott Shawcroft
cbfb2d0f55
Add Pimoroni Inky Frame 5.7
Tweak DTCM and ITCM loading and prevent epd refresh while waiting
for autoreload.
2023-05-11 12:12:34 -07:00
Scott Shawcroft
b59f0e17be
Fix RP2040 idle
Don't idle from main if we scheduled an interrupt for 0 ticks in
the future.

Have RP2040 detect wakes that happen between setting the timer and
the idle call.

Fixes #7361
2023-04-21 16:04:23 -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
Jeff Epler
d247e5c6c9
Add the ability for a port to gc things, collect pin change objects that way 2023-03-23 09:16:00 -05:00
MicroDev
7ee3f30c17
rewrite allocate_pystack logic 2023-03-21 07:06:46 +05:30
MicroDev
11cf031284
reset watchdog conditionally 2023-03-15 19:03:57 +05:30
Patrick Van Oosterwijck
4c9044a0bf Fix it with simulate_reset instead 2023-02-26 19:49:12 -07:00
Patrick Van Oosterwijck
5bca86b43d Fix print of "soft reboot" when the user presses ^D
The logic of the main loop was changed between version 7 and 8.
[Commit](9307b62ad5)
Something is wrong with the existing version 8 logic so the serial
write of "soft reboot" is never executed when the user does a
soft reboot.
A consequence of this is that tools like `tools/pyboard.py`, `ampy`
and `mpremote` are not able to activate the raw REPL since they
execute a soft reboot and wait for this to be printed to the console.
2023-02-26 16:00:37 -07:00
Bill Sideris
b4ff08d185
Prohibit too big a size 2023-02-18 23:56:06 +02:00
Bill Sideris
d7e6a78ef4
safemode prevent dynamic stack alloc 2023-02-17 17:40:55 +02:00
Bill Sideris
8abce77971
fix safemode 2023-02-17 00:52:13 +02:00
Bill Sideris
5a9264261e
Merge branch 'adafruit:main' into settings-toml-pystack 2023-02-17 00:50:27 +02:00
Bill Sideris
66215f7983
gcc is evil, I respond with fake pointer 2023-02-16 23:57:47 +02:00
Bill Sideris
c003b8817a
Put on all and preinit with NULL 2023-02-16 23:40:49 +02:00
Bill Sideris
4bb0b0acdf
volatile to skip optimisation 2023-02-16 23:37:37 +02:00
Bill Sideris
54ae7ced82
Updated to requested changes 2023-02-16 23:10:11 +02:00
Dan Halbert
bbadc00599
Merge pull request #7577 from dhalbert/safemode-py
Implement safemode.py
2023-02-16 14:15:20 -05:00
Bill Sideris
6dc179dc4a
Removed old supervisor stack setting code and revert some 'optimisations' 2023-02-16 13:33:37 +02:00
Bill Sideris
a61a9f4bde
Size reductions (attempts, at the very least) 2023-02-16 13:12:21 +02:00
Bill Sideris
f6e7edc900
Size reductions 2023-02-16 12:34:48 +02:00
Bill Sideris
c920dbb81c
Skip unecessary check for space 2023-02-16 11:50:35 +02:00
Bill Sideris
8061e8e7c6
Names changed to better fit mp style 2023-02-16 11:05:29 +02:00
Bill Sideris
b00a25fecc
Merge branch 'adafruit:main' into settings-toml-pystack 2023-02-16 10:44:01 +02:00
Bill Sideris
659adb7172
fix for stackless 2023-02-16 00:45:41 +02:00
Bill Sideris
8216aa4890
struct stacks 2023-02-16 00:41:49 +02:00
Bill Sideris
133045a95a
Add error message and guardrail 2023-02-15 23:15:21 +02:00
Bill Sideris
818d1d4cb1
Discard pystack_size 2023-02-15 22:43:57 +02:00
Bill Sideris
c3b9567641
using vm cleanup and no globals 2023-02-15 22:27:37 +02:00
Bill Sideris
cf6afe250c
re-add attribute 2023-02-15 22:00:52 +02:00
Bill Sideris
fa302b2e29
Now works on reload. 2023-02-15 21:54:53 +02:00
Gregory Neverov
ffbb7550b4 Move serial init to earlier in boot process 2023-02-15 11:08:09 -08:00
Bill Sideris
2077bb9da9
pystack_size as multiple of sizeof size_t, no more stackless via settings.toml 2023-02-15 17:54:52 +02:00
Bill Sideris
0d5b400b33
swap int for mp_int_t 2023-02-15 16:08:22 +02:00
Bill Sideris
9e2235d7f7
pystack works via settings.toml, stackless not working yet 2023-02-15 15:23:16 +02:00