Commit Graph

74 Commits

Author SHA1 Message Date
Scott Shawcroft
8137e2d6d2
Switch all ports to auto-growing split heap
This simplifies allocating outside of the VM because the VM doesn't
take up all remaining memory by default.

On ESP we delegate to the IDF for allocations. For all other ports,
we use TLSF to manage an outer "port" heap. The IDF uses TLSF
internally and we use their fork for the other ports.

This also removes the dynamic C stack sizing. It wasn't often used
and is not possible with a fixed outer heap.

Fixes #8512. Fixes #7334.
2023-11-01 15:24:16 -07:00
Scott Shawcroft
00457788e9
Fix mbedtls and stop removing it 2023-10-24 14:47:43 -07:00
Scott Shawcroft
544553c542
Fix cyw43 (pico w) builds 2023-10-16 10:43:30 -07:00
Scott Shawcroft
9633c4e78f
Merge remote-tracking branch 'adafruit/main' into v1.20-merge 2023-10-11 11:21:57 -07:00
Dan Halbert
1c388ab315 finish converting to MP_REGISTER_ROOT_POINTER() 2023-09-29 10:49:34 -04:00
Dan Halbert
9f1d52601e merge from 8.2.x 2023-09-12 20:14:30 -04:00
Dan Halbert
58a21326b2 Update to new certificates submodule. 2023-09-06 19:36:48 -04:00
Jeff Epler
b0967cb1a4
Use QSTR_GLOBAL_REQUIREMENTS to give explicit dependency for qstr generation
I investigated and found that this seems to be the best way to specify
a file that must be generated before "qstr processing" can occur.

Closes #8337
2023-08-27 16:16:40 -05:00
Jeff Epler
b589dc2589
Merge pull request #8091 from bill88t/update-picow
Update pico-sdk to 1.5.1
2023-08-22 09:51:20 -05:00
Jeff Epler
f9e99bd3c3
Fix picow build 2023-08-20 11:30:36 -05:00
Dan Halbert
2171e67c1b merge latest adafruit/main 2023-08-13 19:43:54 -04:00
Dan Halbert
27c7807693 silabs build needs work; other builds are working 2023-08-13 19:05:16 -04:00
Jeff Epler
67c5563eec
Apply -Wno-undef to just the needed file & remove incorrect -I arg 2023-08-03 10:20:25 -05:00
Scott Shawcroft
2686beab36
Basic USB host support and keyboard workflow
Connects up read, write and ctrl_transfer to TinyUSB. USB Host
support is available on iMX RT and RP2040.

Fixes #6527 (imx) and fixes #5986 (rp2).
2023-07-10 14:22:21 -07:00
Bill Sideris
112f0fd767
Add -Wno-undef to rp2 makefile for sdk 2023-06-21 01:43:10 +03:00
Dan Halbert
38f6fa27e3 fetch-port-submodules; fetch-all-submodules 2023-06-05 17:23:34 -04: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
fe40035cb9
Merge pull request #7697 from dhalbert/pico-sdk-cyw43-update
pico-sdk to 1.5.0; cyw43-driver to 0.9.0
2023-03-09 10:02:45 -08:00
Dan Halbert
fef9571400 pico-sdk to 1.5.0; cyw43-driver to 0.9.0 2023-03-08 22:43:12 -05:00
MicroDev
b17364a447
conditionally build all languages 2023-03-04 15:08:54 +05:30
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
Bill Sideris
362018dcca
Merge branch 'main' into picow-ap 2022-11-30 19:11:03 +02:00
Scott Shawcroft
c13ca95da1
Add MDNS support to Pico W
This adds both cpy-MAC.local and circuitpython.local support.

Fixes #7214
2022-11-28 16:15:28 -08:00
Scott Shawcroft
ad2d190507
Merge pull request #7247 from tannewt/picow_web_workflow
Enable* web workflow for Pico W
2022-11-28 14:19:42 -08:00
Dan Halbert
6d022733b3
Merge pull request #7162 from rhooper/boards-list
add boards list to make error message
2022-11-21 23:18:37 -05:00
Scott Shawcroft
c3a96a63c0
Enable* web workflow for Pico W
* Except for circuitpython.local which depends on MDNS and will be
done in a follow up PR.

Progress on #7214
2022-11-21 16:24:05 -08:00
MicroDev
c3c1717813
refactor common port specific Makefile code 2022-11-18 23:00:28 +05:30
MicroDev
e2a3597263
add awesome new make error message
Copied from initial implementation on atmel-samd

Co-authored-by: Rose Hooper <rhooper@toybox.ca>
Co-authored-by: Jeff Epler <jepler@gmail.com>
2022-11-18 11:27:23 +05:30
Bill Sideris
a234b74e87
Merge branch 'adafruit:main' into picow-ap 2022-11-16 21:32:46 +02:00
Jeff Epler
e4d620f055
make whitespace match 2022-11-12 09:17:52 -06:00
Jeff Epler
78fc43baab
raspberrypi: Make port_idle_until_interrupt work
This needs thorough testing before it's merged, as we tried
and reverted this once before (#5341 and #5356).

I think that besides checking for tinyusb having "something to do",
the fact that `port_interrupt_after_ticks` and `port_disable_tick`
weren't implemented that was causing a secondary problem.

I've tested this on a pico w over reboot-cycles and ctrl-c-cycles,
with and without drive automounting, with and without serial repl open,
and on a power-only connection.

I didn't notice the problem reported in #5356 after merely implementing
port_idle_until_interrupt; but I did notice that sleeps in general would
take over-long until "something" (like writing to the USB drive) happened;
I think "something" was probably calling port_enable_tick(). When this
problem was happening, sleeps would take a lot longer; for instance,
`sleep(.001)` would take about 1/20s and `sleep(.1)` would take about 1/7s.
2022-11-12 09:16:41 -06:00
paul-1
8fdb2df0bf
picow: enable dhcpserver for apmode. 2022-11-10 17:23:38 +02:00
Jeff Epler
f882571366
pico w: pins improvements
Closes: #7017

 * Remove the 'GP23' alias for CYW1
 * Remove the 'CYW0' alias for CYW0
 * Switch VBUS_SENSE to CYW2, remove 'GP24' alias

Code that wants to use SMPS_MODE, VBUS_SENSE and LED while being
portable to the W and non-W variants should use those names, not alias
names.

 * Remove A3 / VOLTAGE_MONITOR

Right now this cannot be used. The ability to check the voltage monitor
should be added back in some fashion in the future.
2022-10-07 08:48:36 -05:00
Jeff Epler
fabfdcf6fe
More ssl work 2022-10-05 14:56:26 -05:00
Jeff Epler
dcb650c513 pico w: add ssl module
Note: at this time, the ssl module on pico_w never verifies the server
certificate. This means it does not actually provide a higher security
level than regular socket / http protocols.
2022-10-05 13:12:43 -04:00
Jeff Epler
c02602ace1
Enable strict-overflow diagnostic 2022-09-30 11:19:23 -05:00
Jeff Epler
afc1c0e3bb
Fix unused variable diagnostics, make it a fatal error 2022-09-30 11:19:22 -05:00
Jeff Epler
37620d4eb0
Fix several classes of compiler diagnostic & make fatal
* -Wno-nested-externs
 * -Wno-strict-prototypes
 * -Wno-double-promotion
 * -Wno-sign-compare
2022-09-30 11:19:22 -05:00
Jeff Epler
c6eef3931f
Enable warning for unused static functions 2022-09-30 11:19:22 -05:00
Jeff Epler
4de9487820
It turns out you CAN have too many GPIO 2022-09-29 20:10:33 -05:00
Jeff Epler
c6d3163841
remove comment about something the Makefile does now 2022-09-29 10:02:18 -05:00
Jeff Epler
e100981d90
revert CFLAGS change 2022-09-28 14:38:12 -05:00
Jeff Epler
ff7731491e
Implement enough of socketpool to do ntp and non-https requests 2022-09-28 10:06:34 -05:00
Jeff Epler
a7a1bd7880
Implement DNS resolution
```
>>> s = socketpool.SocketPool(wifi.radio)
>>> s.getaddrinfo("google.com", 80)
[(0, 0, 0, '', ('142.250.81.206', 80))]
```
2022-09-28 10:06:33 -05:00
Jeff Epler
6c3cdceb45
Implement scan, connect, ping
My pings go out, and then they come back

```py
import os
import wifi
import ipaddress

wifi.radio.connect(os.getenv('WIFI_SSID'), os.getenv('WIFI_PASSWORD'))
ipv4 = ipaddress.ip_address("8.8.4.4")
print("Ping google.com: %f ms" % (wifi.radio.ping(ipv4)*1000))
```
2022-09-28 10:06:33 -05:00
Jeff Epler
346fff2e7c
cyw43 basic gpio support, hwaddr in boot_out 2022-09-28 10:06:33 -05:00
Jeff Epler
22b04aef22
Reindent a block 2022-09-28 10:05:53 -05:00
Jeff Epler
9caa65cf28
allow a board to override link.ld 2022-09-28 10:05:53 -05:00
Jeff Epler
749bb99863
bump pico-sdk to 1.3.0 2022-02-02 17:15:33 -06:00
Jeff Epler
017b52c455
further raspberrypi fixes 2021-11-10 12:11:06 -06:00