Commit Graph

77 Commits

Author SHA1 Message Date
Jeff Epler
80f909001d esp32s2: Add support for make monitor
`idf.py monitor` connects to the debug UART and shows the messages.  In
contrast to a traditional terminal program, it also has the limited
ability to transform hex addresses into file & line number information,
especially for debug builds.

This requires the elf file be copied to a specific place.
2021-06-10 11:15:18 -05:00
Jeff Epler
11288c1c28 esp32s2: Add rgbmatrix support 2021-05-26 11:21:59 -05:00
Jeff Epler
f21eec5fe1 Work for non-psram builds
This is more or less a complete re-organization of the code.

 * Use the actual byte size of the .bin file as the flash size,
   as the algorithm for packing sections into the flash is complicated
 * Match each section to a data region & find the high water mark in the
   region
 * Report on all the RAM regions, separately

Note that elftools is a requirement of esp-idf and so does not need to
be listed in our requirements.txt.
2021-05-25 10:06:31 -05:00
Jeff Epler
c931e5deb7 Add build_memory_info for esp32s2
This detects an overflowed flash partition, such as
```
1452105 bytes used, -10313 bytes free in flash firmware space out of 1441792 bytes (1408.0kB).
444428 bytes used, 1652724 bytes free in ram for stack and heap out of 2097152 bytes (2048.0kB).
```
on a metro esp32-s2 built with debugging.
2021-05-14 10:39:07 -05:00
Scott Shawcroft
17fcd499b2
Merge pull request #4649 from tannewt/merge_1.11_2
Merge MicroPython v1.11 into CircuitPython
2021-04-27 11:02:02 -07:00
Scott Shawcroft
76033d5115
Merge MicroPython v1.11 into CircuitPython 2021-04-26 15:47:41 -07:00
Artyom Skrobov
4e3c1d4a4c [build] Allow USB to be set to 0
Unify USB-related makefile var and C def as CIRCUITPY_USB.

Always define it as 0 or 1, same as all other settings.

USB_AVAILABLE was conditionally defined in supervisor.mk,
but never actually used to #ifdef USB-related code.

Loosely related to #4546
2021-04-23 11:13:34 -04:00
Kevin Banks
fbfb7b68cc Most of the code we need has been pulled in from the tinyusb webusb_serial demo. Still LOTS to do regarding descriptors. 2021-01-25 20:37:58 -06:00
Jeff Epler
ed0cb248e9 esp32s2: Fix 'make flash'
As reported by @jerryneedell, this change was incorrect; the given
ESPTOOL_FLAGS caused `write_flash` to be repeated twice, which doesn't
work.

Closes #3981.
2021-01-12 16:04:29 -06:00
Jeff Epler
4735cf4747 esp32s2: audiobusio: move i2s_common inside
Originally, I believed the implementation might be shared with AudioOut,
as on the ESP32 (non-S2) the I2S peripheral was also used to drive the DAC.
However, this is not the case on ESP32-S2 and appears it will not be
the case with the ESP32-S3 or -C3, to the extent that there's skeletal
support for either of them in esp-idf master branch.

However, it could still be shared by I2SIn or PDMIn (the latter being
hypothetically implemented as I2SIn + digital postprocessing like we did
in the atmel-sam port, to my understanding), so I moved it to
the common-hal folder.
2021-01-09 14:02:47 -06:00
Jeff Epler
7bb196b9d2 esp32s2: 'make flash': Allow customizing the esptool flags
This can be useful so that e.g., on a Kaluga when programming via
the FTDI chip, you can override the variable to specify "--after=hard_reset"
to automatically return to running CircuitPython, choose a different
baud rate (921600 is about 2s faster than 460800), etc:
    make BOARD=espressif_kaluga_1 ESPTOOL_FLAGS="-b 921600 --before=default_reset --after=hard_reset"
2021-01-07 15:01:33 -06:00
Jeff Epler
30c6dd3f76 Merge remote-tracking branch 'origin/main' into audioout-esp32 2021-01-07 14:11:14 -06:00
microDev
28ce5e8988
Merge branch 'main' into touch-s2 2020-12-30 22:44:22 +05:30
Jeff Epler
a7542598a0 esp32s2: add I2SOut 2020-12-29 14:46:38 -06:00
Dan Halbert
8061a2574d
Merge branch 'main' into pin_alarm 2020-12-23 22:05:02 -05:00
Jeff Epler
da8f023665 esp32s2: make flash: use the stub
Very long ago, this was apparently not supported in esptool yet, at
least when operating over USB CDC.  This now works just fine, and
our esp webtool relies on it as well.  It makes flashing faster,
too.
2020-12-22 10:27:42 -06:00
microDev
a60fabdffa
add touch alarm support for esp32s2 2020-12-19 12:56:34 +05:30
microDev
4512290ba0
Merge branch 'main' into ota-s2 2020-12-18 00:44:00 +05:30
Scott Shawcroft
0dcc659d53
Swap to IDF release/4.2 branch for stability 2020-12-15 18:12:59 -08:00
BennyE
81c4871fdf Set DEBUG CFLAG if set in make 2020-12-11 22:11:39 +01:00
microDev
602243748b
add ota support for esp32s2 2020-12-08 11:45:00 +05:30
Dan Halbert
596e0e4bd2 merge from upstream 2020-11-27 16:06:57 -05:00
Dan Halbert
ef0830bfe2 merge from upstream + wip 2020-11-25 17:52:06 -05:00
hierophect
510f464234
Merge branch 'main' into esp32s2-udp 2020-11-24 18:28:10 -05:00
microDev
bbe13490b5
Merge branch 'main' into nvm-s2 2020-11-24 12:24:48 +05:30
Dan Halbert
7a45afc549 working, but need to avoid deep sleeping too fast before USB ready 2020-11-23 22:44:53 -05:00
Lucian Copeland
8ffd973e22 Merge remote-tracking branch 'upstream/main' into esp32s2-udp 2020-11-23 18:40:14 -05:00
microDev
ff987e7496
add timer peripheral 2020-11-18 12:16:14 +05:30
Lucian Copeland
0bbdf05936 Implement recvfrom_into and sendto for UDP 2020-11-17 16:11:04 -05:00
microDev
35ef6c687f
nvm implementation for esp32s2 2020-11-11 23:11:12 +05:30
microDev
d8ef9a127b
rename pcnt_handler to pcnt 2020-11-05 10:10:39 +05:30
microDev
fe6bfde590
move pcnt handler 2020-11-04 21:20:24 +05:30
microDev
4438050f79
Add pcnt handler 2020-11-01 18:00:07 +05:30
Jeff Epler
8ddbebd2c1 esp32s2: fix build after qstr rule changes 2020-10-12 13:35:15 -05:00
Lucian Copeland
97d217a764 Merge remote-tracking branch 'upstream/main' into esp32-analogin 2020-10-08 12:34:58 -04:00
hathach
e1fc85c56b fix usb issue with latest idf 2020-10-08 13:30:32 +07:00
Scott Shawcroft
8c428a3bdd
Merge pull request #3492 from hierophect/esp32-update-idf
ESP32S2: move to official IDF submodule
2020-10-06 16:53:32 -07:00
hierophect
e93a274f2f
Merge branch 'main' into esp32-analogin 2020-10-05 13:02:42 -04:00
Lucian Copeland
a8dfae58d9 Add ADC calibration module support 2020-10-01 17:17:39 -04:00
Lucian Copeland
9a3bd82f40 Update TinyUSB include compatibility 2020-10-01 13:19:54 -04:00
Lucian Copeland
0bbd067a17 Revert ADC calibration removal, complete merge 2020-10-01 13:06:48 -04:00
Lucian Copeland
c624c1e838 Merge branch 'esp32-update-idf' into esp32-analogin 2020-09-30 16:51:19 -04:00
Lucian Copeland
e01e8dd6b9 Revert HAL refactor changes to avoid USB breaking changes past esp-idf dde6222cd 2020-09-30 16:36:13 -04:00
Lucian Copeland
66b8559fd4 Change submodule, rework all includes 2020-09-30 11:26:07 -04:00
Scott Shawcroft
abdbbf9e24
One grep 2020-09-28 15:10:12 -07:00
Lucian Copeland
128b4a013b Add non-calibrated ADC 2020-09-28 12:11:08 -04:00
Scott Shawcroft
17bdc969db
Reorganize sdkconfigs and release UF2s 2020-09-17 16:01:23 -07:00
Scott Shawcroft
2bd169ec32
Add partition layouts for 8 and 16 MB as well. 2020-09-15 18:12:06 -07:00
Lucian Copeland
ecc219fe50 Merge remote-tracking branch 'upstream/main' into esp32-displayio-fix 2020-09-14 10:44:31 -04:00
Lucian Copeland
4733a67226 Add GDB debugging capability 2020-09-02 11:27:42 -04:00