Commit Graph

58 Commits

Author SHA1 Message Date
Jeff Epler
2b0f1cd087
espressif: fix dependencies in esp-idf modules
while developing esp-camera I had the problem that firmware.elf was
not regenerated if the only file I edited was in the esp32-camera
submodule.

By telling make that $(IDF_CMAKE_TARGETS), the list of .a fliles
produced by ninja-building esp-idf, depend on esp-idf-stamp and that
firmware.elf in turn depends on these files, the ninja build is re-run
on each make, which is reasonably quick if nothing needs to be rebuilt.
2023-08-02 07:52:45 -05:00
Jeff Epler
f503b37b2b
espressif: allow setting FLASH_SDKCONFIG at board level 2023-07-26 08:32:25 -05:00
Dan Halbert
38f6fa27e3 fetch-port-submodules; fetch-all-submodules 2023-06-05 17:23:34 -04:00
Scott Shawcroft
bd2c1198d9
Minor C3 debug tweaks 2023-05-12 14:51:59 -07:00
Dan Halbert
b6a7613350
Merge pull request #7470 from microdev1/espnow
Add ESP-NOW Support
2023-03-10 12:21:56 -05:00
MicroDev
b17364a447
conditionally build all languages 2023-03-04 15:08:54 +05:30
MicroDev
a1644f15ea
use esp error for espnow 2023-02-03 15:42:44 +05:30
MicroDev
14c3b52b8d
Merge branch 'main' into espnow 2023-02-03 01:37:07 +05:30
MicroDev
7028a3adfe
rework espnow api 2023-02-03 01:32:28 +05:30
MicroDev
ae4bb75e29
split espnow between bindings and common-hal 2023-02-01 18:53:58 +05:30
MicroDev
cda5689263
move esp32_camera to espcamera 2023-01-27 22:05:43 +05:30
MicroDev
7330c638b9
minimal changes to make espnow work 2023-01-20 14:12:55 +05:30
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
Scott Shawcroft
a8c70aa7bd
Fix S3 deep sleep
Adding `-u ld_include_highint_hdl` forces the linker to keep the
high priority interrupt handler that calls the ipc_isr handler.

The deep sleep is waiting for this interrupt to be handled on core
0 before sleeping from core 1.

Fixes #6090
2022-11-29 17:20:38 -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
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
microDev
2285dd1838
update espressif risc-v build configuration
- use optimization level O2
- explicitly state risc-v arch
2022-10-21 17:11:56 +05:30
microDev
5232e3f6c3
add coproc module 2022-10-20 09:09:44 +05:30
microDev
434c6d5604
fix uf2 bootloader condition in makefile 2022-10-17 19:45:48 +05:30
microDev
5114ae7a31
fix 2MB-no-uf2 partition table 2022-10-17 19:44:08 +05:30
microDev
4f753251db
cleanup mpconfigboard.mk of espressif boards
- move `INTERNAL_FLASH_FILESYSTEM` to `mpconfigport.mk`
- move `LONGINT_IMPL` to `mpconfigport.mk`
- move `CFG_TUD_TASK_QUEUE_SZ` to `Makefile`
2022-10-06 16:15:01 +05:30
Jeff Epler
428fbcd343
remove debug message during build 2022-08-04 15:12:10 -05:00
Jeff Epler
d1b89fca91
Reset camera when interpreter is reset 2022-08-04 15:11:55 -05:00
Jeff Epler
5db6db0128
add esp32-camera
This uses the esp32-camera code instead of our own homebrewed camera code.
In theory it supports esp32, esp32-s2 and esp32-s3, as long as they have
PSRAM.

This is very basic and doesn't support changing any camera parameters,
including switching resolution or pixelformat.

This is tested on the Kaluga (ESP32-S2) and ESP32-S3-Eye boards.

First, reserve some PSRAM by putting this line in `CIRCUITPY/_env`:
```
CIRCUITPY_RESERVED_PSRAM=524288
```
and hard-reset the board for it to take effect.

Now, the following script will take a very low-resolution jpeg file and print
it in the REPL in escape coded form:

```python
import board
import esp32_camera

c = esp32_camera.Camera(
    data_pins=board.CAMERA_DATA,
    external_clock_pin=board.CAMERA_XCLK,
    pixel_clock_pin=board.CAMERA_PCLK,
    vsync_pin=board.CAMERA_VSYNC,
    href_pin=board.CAMERA_HREF,
    pixel_format=esp32_camera.PixelFormat.JPEG,
    i2c=board.I2C(),
    external_clock_frequency=20_000_000)

m = c.take()
if m is not None:
    print(bytes(m))
```

Then on desktop open a python repl and run something like
```python
>>> with open("my.jpg", "wb") as f: f.write(<BIG PASTE FROM REPL>)
```
and open my.jpg in a viewer.
2022-08-04 15:11:50 -05:00
Jeff Epler
82be75adb5 Add ability to reserve psram
.. the primary user of which will be the camera, since the framebuffers
must be allocated via esp-idf allocation function and never from the
gc heap.

A board can have a default value, and the value can also be set in the
/.env file using the key CIRCUITPY_RESERVED_PSRAM with the value being
the reserved size in bytes.

Co-authored-by: Dan Halbert <halbert@adafruit.com>
2022-08-03 16:19:40 -05:00
Scott Shawcroft
74e841d835
Read fuses to know what flash and ram pins to never reset 2022-08-02 12:01:42 -07:00
Dan Halbert
b0efd130c9 ESP32 REPL working through debug UART 2022-06-29 23:19:36 -04:00
Dan Halbert
780c4963cb wip; change never-ever reset pin mechanism 2022-06-28 23:06:49 -04:00
Dan Halbert
ca64950503 wip fixes 2022-06-28 18:32:08 -04:00
Dan Halbert
55784c93de wip; compiles 2022-06-26 21:22:22 -04:00
Scott Shawcroft
9d10a3da66
Conditionalize LTO 2022-05-27 12:59:54 -07:00
Scott Shawcroft
6dd9db31b3
Add USB to Serial/JTAG support for REPL
Adds Adafruit QT Py C3 board that uses it. Also revamps size
check script to work for S3 and C3 as well.

Fixes #6030
2022-03-21 14:03:57 -07:00
Jeff Epler
e9d81c2826
Add mdns module
This allows for CircuitPython to resolve a .local domain and find
other devices with MDNS services.

First step for #6174
2022-03-17 18:16:16 -07:00
Dan Halbert
fe6e03f504
Merge pull request #6013 from tannewt/esp_ble_gatt_client
Add S3 GATT client support
2022-02-17 16:02:11 -05:00
Michael Himing
ca5095c94b Add AI thinker esp32c3s 2M 2022-02-15 07:00:38 +11:00
Scott Shawcroft
8958e7ef08
Add S3 GATT client support
This allows you to connect to GATT services on the other device.
It also adds connection initiation (GAP central).

More progress on #5926
2022-02-10 11:31:57 -08:00
Scott Shawcroft
019aecaa20
Support BLE advertising on ESP
Services and characteristics still won't work.

Progress on #5926
2022-01-27 17:40:37 -08:00
Scott Shawcroft
d9966c1724
Add TODOs and -Os for RISC-V 2022-01-26 17:07:20 -08:00
Scott Shawcroft
e409ff75cd
Turn off BLE HCI on ESP32-S2 2022-01-26 09:46:29 -08:00
Scott Shawcroft
5a6f456dbb
Add BLE scanning for S3 and C3.
Everything else should raise NotImplementedError.

First step in #5926
2022-01-25 16:28:46 -08:00
Scott Shawcroft
78942112c7
Ensure supervisor_tick is run on the same core as CP 2022-01-19 11:36:40 -08:00
Scott Shawcroft
869cf5eba5
Run USB on the same core as CP 2022-01-13 15:55:37 -08:00
Scott Shawcroft
39639ecd17
Rework configs to take target into account
New script will filter settings to different tiers.
2022-01-13 15:55:37 -08:00
hathach
53869d71fd
use family id for s2 and s3 depending on IDF_TARGET 2021-12-23 14:53:00 +07:00
microDev
dddc282e34
update default sdkconfig and correct bootloader offset 2021-11-26 22:44:22 +05:30
microDev
e5c125d153
update espressif makefile formatting 2021-11-24 18:14:54 +05:30
microDev
7ba5513f9a
update espressif port
- update esp-idf to v4.4
- add esp32s3 support
- add analogio on esp32c3
- disable rgbmatrix on all espressif soc

Co-authored-by: Scott Shawcroft <scott@adafruit.com>
Co-authored-by: Seon Rozenblum <seon@unexpectedmaker.com>
2021-11-24 18:01:34 +05:30
Jeff Epler
c9475adb00
Enable -Werror=missing-prototypes on espressif port 2021-11-10 11:07:45 -06:00