diff --git a/.devcontainer/cortex-m/on-create.sh b/.devcontainer/cortex-m/on-create.sh index 8c4bd0cfedbd..3db1ff3f38c4 100755 --- a/.devcontainer/cortex-m/on-create.sh +++ b/.devcontainer/cortex-m/on-create.sh @@ -34,7 +34,7 @@ rm -fr /workspaces/dosfstools-4.2 /workspaces/dosfstools-4.2.tar.gz # prepare source-code tree cd /workspaces/circuitpython/ echo -e "[on-create.sh] fetching submodules" -make fetch-submodules +make fetch-all-submodules echo -e "[on-create.sh] fetching tags" git fetch --tags --recurse-submodules=no --shallow-since="2021-07-01" https://github.com/adafruit/circuitpython HEAD diff --git a/.github/actions/deps/external/action.yml b/.github/actions/deps/external/action.yml index a26579b53d55..2d6f65eeff31 100644 --- a/.github/actions/deps/external/action.yml +++ b/.github/actions/deps/external/action.yml @@ -37,11 +37,7 @@ runs: - name: Install IDF tools if: inputs.port == 'espressif' run: | - echo "Installing ESP-IDF tools" - $IDF_PATH/tools/idf_tools.py --non-interactive install required - $IDF_PATH/tools/idf_tools.py --non-interactive install cmake - echo "Installing Python environment and packages" - $IDF_PATH/tools/idf_tools.py --non-interactive install-python-env + $IDF_PATH/install.sh rm -rf $IDF_TOOLS_PATH/dist shell: bash - name: Set environment diff --git a/.gitmodules b/.gitmodules index 5c29c41b9fdd..75f1d5f2336c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -143,10 +143,14 @@ [submodule "ports/espressif/esp-idf"] path = ports/espressif/esp-idf url = https://github.com/adafruit/esp-idf.git - branch = release/v4.4-circuitpython -[submodule "ports/espressif/certificates/nina-fw"] - path = lib/certificates/nina-fw - url = https://github.com/adafruit/nina-fw.git + branch = circuitpython-v5.1 +[submodule "ports/espressif/esp-protocols"] + path = ports/espressif/esp-protocols + url = https://github.com/espressif/esp-protocols.git +[submodule "ports/espressif/esp-camera"] + path = ports/espressif/esp-camera + url = https://github.com/adafruit/esp32-camera.git + branch = circuitpython [submodule "frozen/Adafruit_CircuitPython_ST7789"] path = frozen/Adafruit_CircuitPython_ST7789 url = https://github.com/adafruit/Adafruit_CircuitPython_ST7789 @@ -300,10 +304,6 @@ [submodule "frozen/circuitpython_picoed"] path = frozen/circuitpython_picoed url = https://github.com/elecfreaks/circuitpython_picoed.git -[submodule "ports/espressif/esp32-camera"] - path = ports/espressif/esp32-camera - url = https://github.com/adafruit/esp32-camera/ - branch = circuitpython [submodule "ports/raspberrypi/lib/cyw43-driver"] path = ports/raspberrypi/lib/cyw43-driver url = https://github.com/georgerobotics/cyw43-driver.git @@ -340,8 +340,11 @@ url = https://github.com/bablokb/circuitpython-pcf85063a [submodule "frozen/Adafruit_CircuitPython_Wave"] path = frozen/Adafruit_CircuitPython_Wave - url = http://github.com/adafruit/Adafruit_CircuitPython_Wave.git + url = https://github.com/adafruit/Adafruit_CircuitPython_Wave.git [submodule "ports/raspberrypi/lib/Pico-PIO-USB"] path = ports/raspberrypi/lib/Pico-PIO-USB url = https://github.com/sekigon-gonnoc/Pico-PIO-USB.git branch = main +[submodule "lib/certificates"] + path = lib/certificates + url = https://github.com/adafruit/certificates diff --git a/docs/redirects.txt b/docs/redirects.txt index 47ec20d57764..1016d0bd70b7 100644 --- a/docs/redirects.txt +++ b/docs/redirects.txt @@ -84,8 +84,10 @@ shared-bindings/frequencyio/__init__.rst shared-bindings/frequencyio/ shared-bindings/gnss/__init__.rst shared-bindings/gnss/ shared-bindings/i2cperipheral/__init__.rst shared-bindings/i2cperipheral/ shared-bindings/i2csecondary/__init__.rst shared-bindings/i2csecondary/ -shared-bindings/i2cslave/I2CSlave.rst shared-bindings/i2cperipheral/#i2cperipheral.I2CPeripheral -shared-bindings/i2cslave/I2CSlaveRequest.rst shared-bindings/i2cperipheral/#i2cperipheral.I2CPeripheralRequest +shared-bindings/i2cslave/I2CSlave.rst shared-bindings/i2cperipheral/#i2ctarget.Target +shared-bindings/i2cslave/I2CSlaveRequest.rst shared-bindings/i2cperipheral/#i2ctarget.I2CTargetRequest +shared-bindings/i2cperipheral/I2CPeripheral.rst shared-bindings/i2ctarget/#i2ctarget.I2CTarget +shared-bindings/i2cperipheral/I2CPeripheralRequest.rst shared-bindings/i2ctarget/#i2ctarget.I2CTargetRequest shared-bindings/math/__init__.rst shared-bindings/math/ shared-bindings/microcontroller/Pin.rst shared-bindings/microcontroller/#microcontroller.Pin shared-bindings/microcontroller/Processor.rst shared-bindings/microcontroller/#microcontroller.Processor diff --git a/docs/shared_bindings_matrix.py b/docs/shared_bindings_matrix.py index e89b47c87103..2dad57299538 100644 --- a/docs/shared_bindings_matrix.py +++ b/docs/shared_bindings_matrix.py @@ -170,9 +170,11 @@ def get_settings_from_makefile(port_dir, board_name): This means that the effect of all Makefile directives is taken into account, without having to re-encode the logic that sets them in this script, something that has proved error-prone + + This list must explicitly include any setting queried by tools/ci_set_matrix.py. """ contents = subprocess.run( - ["make", "-C", port_dir, "-f", "Makefile", f"BOARD={board_name}", "print-CFLAGS", "print-CIRCUITPY_BUILD_EXTENSIONS", "print-FROZEN_MPY_DIRS", "print-SRC_PATTERNS"], + ["make", "-C", port_dir, "-f", "Makefile", f"BOARD={board_name}", "print-CFLAGS", "print-CIRCUITPY_BUILD_EXTENSIONS", "print-FROZEN_MPY_DIRS", "print-SRC_PATTERNS", "print-SRC_SUPERVISOR"], encoding="utf-8", errors="replace", stdout=subprocess.PIPE, diff --git a/lib/certificates b/lib/certificates new file mode 160000 index 000000000000..cbb33c111f24 --- /dev/null +++ b/lib/certificates @@ -0,0 +1 @@ +Subproject commit cbb33c111f245411370c1e571012472323df3f07 diff --git a/lib/certificates/README.md b/lib/certificates/README.md deleted file mode 100644 index dd5cf25b00a0..000000000000 --- a/lib/certificates/README.md +++ /dev/null @@ -1,3 +0,0 @@ -We share root certificates with the nina-fw to ensure they both use the same roots. - -https://github.com/adafruit/nina-fw diff --git a/lib/certificates/nina-fw b/lib/certificates/nina-fw deleted file mode 160000 index 21205e400515..000000000000 --- a/lib/certificates/nina-fw +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 21205e400515a698266abaaea902bd1ea897bb5d diff --git a/lib/protomatter b/lib/protomatter index ed2e7018718c..98a2da6da4bd 160000 --- a/lib/protomatter +++ b/lib/protomatter @@ -1 +1 @@ -Subproject commit ed2e7018718caebba2b7550517b556e7734357ef +Subproject commit 98a2da6da4bdbfee8f3ab2334871e8c360dccae3 diff --git a/locale/ID.po b/locale/ID.po index 9bbc16b76e96..2a218084b944 100644 --- a/locale/ID.po +++ b/locale/ID.po @@ -199,6 +199,10 @@ msgstr "" msgid "%q must be <= %d" msgstr "%q harus <= %d" +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c +msgid "%q must be <= %u" +msgstr "" + #: py/argcheck.c msgid "%q must be >= %d" msgstr "%q harus >= %d" @@ -450,10 +454,6 @@ msgstr "pow() 3-arg tidak didukung" msgid "A hardware interrupt channel is already in use" msgstr "Sebuah channel hardware interrupt sedang digunakan" -#: ports/espressif/common-hal/analogio/AnalogIn.c -msgid "ADC2 is being used by WiFi" -msgstr "ADC2 sedang digunakan oleh WiFi" - #: ports/raspberrypi/common-hal/wifi/Radio.c msgid "AP could not be started" msgstr "" @@ -1178,10 +1178,6 @@ msgstr "" msgid "Initial set pin state conflicts with initial out pin state" msgstr "" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "Initialization failed due to lack of memory" -msgstr "" - #: shared-bindings/bitops/__init__.c #, c-format msgid "Input buffer length (%d) must be a multiple of the strand count (%d)" @@ -1828,11 +1824,6 @@ msgstr "" msgid "Pull not used when direction is output." msgstr "Pull tidak digunakan saat arah output." -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c -msgid "RAISE mode is not implemented" -msgstr "" - #: ports/raspberrypi/common-hal/countio/Counter.c msgid "RISE_AND_FALL not available on this chip" msgstr "" @@ -2180,11 +2171,6 @@ msgstr "Tidak dapat mengalokasikan buffer untuk signed conversion" msgid "Unable to allocate the heap." msgstr "" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to configure ADC DMA controller, ErrorCode:%d" -msgstr "" - #: ports/espressif/common-hal/busio/I2C.c msgid "Unable to create lock" msgstr "" @@ -2203,20 +2189,10 @@ msgstr "Tidak dapat menemukan GCLK yang kosong" msgid "Unable to init parser" msgstr "Tidak dapat memulai parser" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to initialize ADC DMA controller, ErrorCode:%d" -msgstr "" - #: shared-module/displayio/OnDiskBitmap.c msgid "Unable to read color palette data" msgstr "Tidak dapat membaca data palet warna" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to start ADC DMA controller, ErrorCode:%d" -msgstr "" - #: ports/espressif/common-hal/mdns/Server.c #: ports/raspberrypi/common-hal/mdns/Server.c msgid "Unable to start mDNS query" @@ -2353,20 +2329,10 @@ msgstr "Tegangan baca habis waktu" msgid "WARNING: Your code filename has two extensions\n" msgstr "PERINGATAN: Nama file kode anda mempunyai dua ekstensi\n" -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "WatchDogTimer cannot be deinitialized once mode is set to RESET" msgstr "" -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer is not currently running" -msgstr "" - -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer.mode cannot be changed once set to WatchDogMode.RESET" -msgstr "" - #: py/builtinhelp.c #, c-format msgid "" @@ -4124,10 +4090,7 @@ msgstr "sintaksis error pada JSON" msgid "syntax error in uctypes descriptor" msgstr "sintaksis error pada pendeskripsi uctypes" -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "timeout duration exceeded the maximum supported value" msgstr "" @@ -4234,7 +4197,8 @@ msgstr "" msgid "unexpected keyword argument" msgstr "argumen keyword tidak diharapkan" -#: py/bc.c py/objnamedtuple.c shared-bindings/traceback/__init__.c +#: py/argcheck.c py/bc.c py/objnamedtuple.c +#: shared-bindings/traceback/__init__.c msgid "unexpected keyword argument '%q'" msgstr "keyword argumen '%q' tidak diharapkan" @@ -4328,10 +4292,6 @@ msgstr "" msgid "value out of range of target" msgstr "" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "watchdog not initialized" -msgstr "" - #: shared-bindings/is31fl3741/FrameBuffer.c msgid "width must be greater than zero" msgstr "" @@ -4391,10 +4351,6 @@ msgstr "jumlah nilai yang salah untuk dibongkar" msgid "wrong output type" msgstr "tipe output salah" -#: ports/espressif/common-hal/audiobusio/__init__.c -msgid "xTaskCreate failed" -msgstr "xTaskCreate gagal" - #: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be an ndarray" msgstr "zi harus ndarray" @@ -4407,6 +4363,12 @@ msgstr "zi harus berjenis float" msgid "zi must be of shape (n_section, 2)" msgstr "Zi harus berbentuk (n_section, 2)" +#~ msgid "ADC2 is being used by WiFi" +#~ msgstr "ADC2 sedang digunakan oleh WiFi" + +#~ msgid "xTaskCreate failed" +#~ msgstr "xTaskCreate gagal" + #~ msgid "queue overflow" #~ msgstr "antrian meluap (overflow)" diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index c4038db1fa09..d2ec2e2f6cf0 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -196,6 +196,10 @@ msgstr "" msgid "%q must be <= %d" msgstr "" +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c +msgid "%q must be <= %u" +msgstr "" + #: py/argcheck.c msgid "%q must be >= %d" msgstr "" @@ -447,10 +451,6 @@ msgstr "" msgid "A hardware interrupt channel is already in use" msgstr "" -#: ports/espressif/common-hal/analogio/AnalogIn.c -msgid "ADC2 is being used by WiFi" -msgstr "" - #: ports/raspberrypi/common-hal/wifi/Radio.c msgid "AP could not be started" msgstr "" @@ -1168,10 +1168,6 @@ msgstr "" msgid "Initial set pin state conflicts with initial out pin state" msgstr "" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "Initialization failed due to lack of memory" -msgstr "" - #: shared-bindings/bitops/__init__.c #, c-format msgid "Input buffer length (%d) must be a multiple of the strand count (%d)" @@ -1806,11 +1802,6 @@ msgstr "" msgid "Pull not used when direction is output." msgstr "" -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c -msgid "RAISE mode is not implemented" -msgstr "" - #: ports/raspberrypi/common-hal/countio/Counter.c msgid "RISE_AND_FALL not available on this chip" msgstr "" @@ -2156,11 +2147,6 @@ msgstr "" msgid "Unable to allocate the heap." msgstr "" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to configure ADC DMA controller, ErrorCode:%d" -msgstr "" - #: ports/espressif/common-hal/busio/I2C.c msgid "Unable to create lock" msgstr "" @@ -2179,20 +2165,10 @@ msgstr "" msgid "Unable to init parser" msgstr "" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to initialize ADC DMA controller, ErrorCode:%d" -msgstr "" - #: shared-module/displayio/OnDiskBitmap.c msgid "Unable to read color palette data" msgstr "" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to start ADC DMA controller, ErrorCode:%d" -msgstr "" - #: ports/espressif/common-hal/mdns/Server.c #: ports/raspberrypi/common-hal/mdns/Server.c msgid "Unable to start mDNS query" @@ -2327,20 +2303,10 @@ msgstr "" msgid "WARNING: Your code filename has two extensions\n" msgstr "" -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "WatchDogTimer cannot be deinitialized once mode is set to RESET" msgstr "" -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer is not currently running" -msgstr "" - -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer.mode cannot be changed once set to WatchDogMode.RESET" -msgstr "" - #: py/builtinhelp.c #, c-format msgid "" @@ -4097,10 +4063,7 @@ msgstr "" msgid "syntax error in uctypes descriptor" msgstr "" -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "timeout duration exceeded the maximum supported value" msgstr "" @@ -4207,7 +4170,8 @@ msgstr "" msgid "unexpected keyword argument" msgstr "" -#: py/bc.c py/objnamedtuple.c shared-bindings/traceback/__init__.c +#: py/argcheck.c py/bc.c py/objnamedtuple.c +#: shared-bindings/traceback/__init__.c msgid "unexpected keyword argument '%q'" msgstr "" @@ -4301,10 +4265,6 @@ msgstr "" msgid "value out of range of target" msgstr "" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "watchdog not initialized" -msgstr "" - #: shared-bindings/is31fl3741/FrameBuffer.c msgid "width must be greater than zero" msgstr "" @@ -4364,10 +4324,6 @@ msgstr "" msgid "wrong output type" msgstr "" -#: ports/espressif/common-hal/audiobusio/__init__.c -msgid "xTaskCreate failed" -msgstr "" - #: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be an ndarray" msgstr "" diff --git a/locale/cs.po b/locale/cs.po index 564fdb468957..74dd9ad1405b 100644 --- a/locale/cs.po +++ b/locale/cs.po @@ -6,15 +6,15 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2023-05-21 00:49+0000\n" -"Last-Translator: Scott Shawcroft \n" +"PO-Revision-Date: 2023-10-03 15:21+0000\n" +"Last-Translator: Vladimír Smitka \n" "Language-Team: LANGUAGE \n" "Language: cs\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" -"X-Generator: Weblate 4.18-dev\n" +"X-Generator: Weblate 5.1-dev\n" #: main.c msgid "" @@ -22,7 +22,7 @@ msgid "" "Code done running.\n" msgstr "" "\n" -"Program byl dokončen.\n" +"Běh programu byl dokončen.\n" #: main.c msgid "" @@ -38,18 +38,25 @@ msgid "" "Please file an issue with your program at github.com/adafruit/circuitpython/" "issues." msgstr "" +"\n" +"Prosím, založte issue s vaším programem na github.com/adafruit/circuitpython/" +"issues." #: supervisor/shared/safe_mode.c msgid "" "\n" "Press reset to exit safe mode.\n" msgstr "" +"\n" +"Stiskněte reset pro ukončení nouzového režimu.\n" #: supervisor/shared/safe_mode.c msgid "" "\n" "You are in safe mode because:\n" msgstr "" +"\n" +"Jste v bezpečnostním režimu z důvodu:\n" #: py/obj.c msgid " File \"%q\"" @@ -79,7 +86,7 @@ msgstr "%%c vyžaduje int nebo char" #: main.c #, c-format msgid "%02X" -msgstr "" +msgstr "%02X" #: shared-module/os/getenv.c #, c-format @@ -130,7 +137,7 @@ msgstr "%q: selhání %d" #: py/argcheck.c msgid "%q in %q must be of type %q, not %q" -msgstr "" +msgstr "%q v %q musí být typu %q, ne %q" #: ports/espressif/common-hal/espulp/ULP.c #: ports/mimxrt10xx/common-hal/audiobusio/__init__.c @@ -157,11 +164,11 @@ msgstr "Inicializace %q selhala" #: ports/espressif/bindings/espnow/Peer.c shared-bindings/dualbank/__init__.c msgid "%q is %q" -msgstr "" +msgstr "%q je %q" #: ports/raspberrypi/common-hal/wifi/Radio.c msgid "%q is read-only for this board" -msgstr "" +msgstr "%q je pouze u této desky pouze pro čtení" #: py/argcheck.c shared-bindings/usb_hid/Device.c msgid "%q length must be %d" @@ -200,35 +207,40 @@ msgstr "%q musí být 1, pokud %q je True" msgid "%q must be <= %d" msgstr "%q musí být <= %d" +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c +msgid "%q must be <= %u" +msgstr "%q musí být <= %u" + #: py/argcheck.c msgid "%q must be >= %d" msgstr "%q musí být >= %d" #: shared-bindings/analogbufio/BufferedIn.c +#, fuzzy msgid "%q must be a bytearray or array of type 'H' or 'B'" -msgstr "" +msgstr "%q musí být bytearray nebo pole typu 'H' nebo 'B'" #: shared-bindings/audiocore/RawSample.c msgid "%q must be a bytearray or array of type 'h', 'H', 'b', or 'B'" -msgstr "" +msgstr "%q musí být bytearray nebo pole typu 'h', 'H', 'b', nebo 'B'" #: ports/espressif/common-hal/analogbufio/BufferedIn.c msgid "%q must be array of type 'H'" -msgstr "" +msgstr "%q musí být pole typu 'H V" #: shared-module/synthio/__init__.c msgid "%q must be array of type 'h'" -msgstr "" +msgstr "%q musí být pole typu 'h'" #: ports/raspberrypi/bindings/cyw43/__init__.c py/argcheck.c py/objexcept.c #: shared-bindings/canio/CAN.c shared-bindings/digitalio/Pull.c #: shared-module/synthio/Synthesizer.c msgid "%q must be of type %q or %q, not %q" -msgstr "" +msgstr "%q musí být typu %q nebo %q, ne %q" #: py/argcheck.c py/objstrunicode.c shared-module/synthio/__init__.c msgid "%q must be of type %q, not %q" -msgstr "" +msgstr "%q musí být typu %q, ne %q" #: ports/atmel-samd/common-hal/busio/UART.c msgid "%q must be power of 2" @@ -249,7 +261,7 @@ msgstr "%q je mimo rozsah" #: py/objrange.c py/objslice.c shared-bindings/random/__init__.c msgid "%q step cannot be zero" -msgstr "" +msgstr "%q krok nemůže být nula" #: py/bc.c py/objnamedtuple.c msgid "%q() takes %d positional arguments but %d were given" @@ -261,19 +273,19 @@ msgstr "%q, %q, a %q musí mít všechny shodnou délku" #: py/objint.c shared-bindings/storage/__init__.c msgid "%q=%q" -msgstr "" +msgstr "%q=%q" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "%q[%u] shifts in more bits than pin count" -msgstr "" +msgstr "%q[%u] posouvá dovnitř o více bitů než je počet pinů" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "%q[%u] shifts out more bits than pin count" -msgstr "" +msgstr "%q[%u] posouvá ven o více bitů než je počet pinů" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "%q[%u] uses extra pin" -msgstr "" +msgstr "%q[%u] používá extra pin" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "%q[%u] waits on input outside of count" @@ -451,13 +463,9 @@ msgstr "pow() nepodporuje 3 argumenty" msgid "A hardware interrupt channel is already in use" msgstr "Kanál hardwarového přerušení je již používán" -#: ports/espressif/common-hal/analogio/AnalogIn.c -msgid "ADC2 is being used by WiFi" -msgstr "WiFi používá ADC2" - #: ports/raspberrypi/common-hal/wifi/Radio.c msgid "AP could not be started" -msgstr "" +msgstr "AP nemohl být spuštěn" #: shared-bindings/_bleio/Address.c shared-bindings/ipaddress/IPv4Address.c #, c-format @@ -468,7 +476,7 @@ msgstr "Adresa musí být %d bajtů dlouhá" #: ports/nrf/common-hal/memorymap/AddressRange.c #: ports/raspberrypi/common-hal/memorymap/AddressRange.c msgid "Address range not allowed" -msgstr "" +msgstr "Adresní rozsah není povolen" #: shared-bindings/memorymap/AddressRange.c msgid "Address range wraps around" @@ -513,7 +521,7 @@ msgstr "Všechny kanály jsou používány" #: ports/raspberrypi/common-hal/usb_host/Port.c msgid "All dma channels in use" -msgstr "" +msgstr "Všechny DMA kanály jsou používány" #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "All event channels in use" @@ -523,7 +531,7 @@ msgstr "Všechny kanály událostí jsou již používány" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #: ports/raspberrypi/common-hal/usb_host/Port.c msgid "All state machines in use" -msgstr "" +msgstr "Všechny stavové automaty jsou používány" #: ports/atmel-samd/audio_dma.c msgid "All sync event channels in use" @@ -650,8 +658,9 @@ msgid "Bitmap size and bits per value must match" msgstr "Velikost bitmapy a počet bitů na hodnotu se musí shodovat" #: supervisor/shared/safe_mode.c +#, fuzzy msgid "Boot device must be first (interface #0)." -msgstr "" +msgstr "Bootovací zařízení musí být první (rozhraní #0)." #: ports/mimxrt10xx/common-hal/busio/UART.c msgid "Both RX and TX required for flow control" @@ -702,7 +711,7 @@ msgstr "Buffer je příliš krátký o %d bajtů" #: shared-bindings/framebufferio/FramebufferDisplay.c #: shared-bindings/struct/__init__.c shared-module/struct/__init__.c msgid "Buffer too small" -msgstr "" +msgstr "Buffer příliš malý" #: ports/espressif/common-hal/imagecapture/ParallelImageCapture.c msgid "Buffers must be same size" @@ -730,7 +739,7 @@ msgstr "Disk CIRCUITPY nelze nalézt nebo vytvořit." #: ports/espressif/common-hal/espidf/__init__.c msgid "CRC or checksum was invalid" -msgstr "" +msgstr "CRC nebo kontrolní součet byl neplatný" #: py/objtype.c msgid "Call super().__init__() before accessing native object." @@ -808,7 +817,7 @@ msgstr "" #: ports/espressif/common-hal/socketpool/Socket.c msgid "Cannot set socket options" -msgstr "" +msgstr "Nelze nastavit možnosti socketu" #: shared-bindings/digitalio/DigitalInOut.c msgid "Cannot set value when direction is input." @@ -829,11 +838,11 @@ msgstr "Nelze měnit frekvenci časovače, který je již používán" #: ports/nrf/common-hal/alarm/pin/PinAlarm.c msgid "Cannot wake on pin edge, only level" -msgstr "" +msgstr "Nelze probudit hranou na pinu, pouze úrovní" #: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Cannot wake on pin edge. Only level." -msgstr "" +msgstr "Nelze probudit hranou na pinu. Pouze úrovní." #: shared-bindings/_bleio/CharacteristicBuffer.c msgid "CharacteristicBuffer writing not provided" @@ -868,7 +877,7 @@ msgstr "" #: ports/espressif/common-hal/neopixel_write/__init__.c msgid "Could not retrieve clock" -msgstr "" +msgstr "Nelze načíst hodiny" #: shared-bindings/_bleio/Adapter.c msgid "Could not set address" @@ -942,7 +951,7 @@ msgstr "Otočení displeje musí být po 90 stupních" #: main.c msgid "Done" -msgstr "" +msgstr "Hotovo" #: shared-bindings/digitalio/DigitalInOut.c msgid "Drive mode not used when direction is input." @@ -950,7 +959,7 @@ msgstr "" #: py/obj.c msgid "During handling of the above exception, another exception occurred:" -msgstr "" +msgstr "Při zpracování uvedené výjimky nastala další výjimka:" #: shared-bindings/aesio/aes.c msgid "ECB only operates on 16 bytes at a time" @@ -1178,10 +1187,6 @@ msgstr "" msgid "Initial set pin state conflicts with initial out pin state" msgstr "" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "Initialization failed due to lack of memory" -msgstr "" - #: shared-bindings/bitops/__init__.c #, c-format msgid "Input buffer length (%d) must be a multiple of the strand count (%d)" @@ -1819,11 +1824,6 @@ msgstr "" msgid "Pull not used when direction is output." msgstr "" -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c -msgid "RAISE mode is not implemented" -msgstr "" - #: ports/raspberrypi/common-hal/countio/Counter.c msgid "RISE_AND_FALL not available on this chip" msgstr "" @@ -2169,11 +2169,6 @@ msgstr "" msgid "Unable to allocate the heap." msgstr "" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to configure ADC DMA controller, ErrorCode:%d" -msgstr "" - #: ports/espressif/common-hal/busio/I2C.c msgid "Unable to create lock" msgstr "" @@ -2192,20 +2187,10 @@ msgstr "" msgid "Unable to init parser" msgstr "" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to initialize ADC DMA controller, ErrorCode:%d" -msgstr "" - #: shared-module/displayio/OnDiskBitmap.c msgid "Unable to read color palette data" msgstr "" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to start ADC DMA controller, ErrorCode:%d" -msgstr "" - #: ports/espressif/common-hal/mdns/Server.c #: ports/raspberrypi/common-hal/mdns/Server.c msgid "Unable to start mDNS query" @@ -2340,20 +2325,10 @@ msgstr "" msgid "WARNING: Your code filename has two extensions\n" msgstr "" -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "WatchDogTimer cannot be deinitialized once mode is set to RESET" msgstr "" -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer is not currently running" -msgstr "" - -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer.mode cannot be changed once set to WatchDogMode.RESET" -msgstr "" - #: py/builtinhelp.c #, c-format msgid "" @@ -4110,10 +4085,7 @@ msgstr "" msgid "syntax error in uctypes descriptor" msgstr "" -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "timeout duration exceeded the maximum supported value" msgstr "" @@ -4220,7 +4192,8 @@ msgstr "" msgid "unexpected keyword argument" msgstr "" -#: py/bc.c py/objnamedtuple.c shared-bindings/traceback/__init__.c +#: py/argcheck.c py/bc.c py/objnamedtuple.c +#: shared-bindings/traceback/__init__.c msgid "unexpected keyword argument '%q'" msgstr "" @@ -4314,10 +4287,6 @@ msgstr "" msgid "value out of range of target" msgstr "" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "watchdog not initialized" -msgstr "" - #: shared-bindings/is31fl3741/FrameBuffer.c msgid "width must be greater than zero" msgstr "" @@ -4377,10 +4346,6 @@ msgstr "" msgid "wrong output type" msgstr "" -#: ports/espressif/common-hal/audiobusio/__init__.c -msgid "xTaskCreate failed" -msgstr "" - #: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be an ndarray" msgstr "" @@ -4393,6 +4358,9 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "ADC2 is being used by WiFi" +#~ msgstr "WiFi používá ADC2" + #~ msgid "'coroutine' object is not an iterator" #~ msgstr "Objekt 'coroutine' není iterátor" diff --git a/locale/de_DE.po b/locale/de_DE.po index 7282d7a399c6..d94b51ff92a8 100644 --- a/locale/de_DE.po +++ b/locale/de_DE.po @@ -205,6 +205,10 @@ msgstr "%q muss 1 sein, wenn %q wahr ist" msgid "%q must be <= %d" msgstr "%q muss <= %d sein" +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c +msgid "%q must be <= %u" +msgstr "" + #: py/argcheck.c msgid "%q must be >= %d" msgstr "%q muss >= %d sein" @@ -458,10 +462,6 @@ msgstr "3-arg pow() wird nicht unterstützt" msgid "A hardware interrupt channel is already in use" msgstr "Ein Hardware Interrupt Kanal wird schon benutzt" -#: ports/espressif/common-hal/analogio/AnalogIn.c -msgid "ADC2 is being used by WiFi" -msgstr "ADC2 wird vom WiFi benutzt" - #: ports/raspberrypi/common-hal/wifi/Radio.c msgid "AP could not be started" msgstr "" @@ -1199,10 +1199,6 @@ msgstr "" "Anfänglicher Pin-Zustand steht im Widerspruch mit dem anfänglichen out-" "Zustand des Pins" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "Initialization failed due to lack of memory" -msgstr "Initialisierung aufgrund von Speichermangel fehlgeschlagen" - #: shared-bindings/bitops/__init__.c #, c-format msgid "Input buffer length (%d) must be a multiple of the strand count (%d)" @@ -1850,11 +1846,6 @@ msgstr "Programm zu lang" msgid "Pull not used when direction is output." msgstr "Pull wird nicht verwendet, wenn die Richtung output ist." -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c -msgid "RAISE mode is not implemented" -msgstr "RAISE-Modus ist nicht implementiert" - #: ports/raspberrypi/common-hal/countio/Counter.c msgid "RISE_AND_FALL not available on this chip" msgstr "RISE_AND_FALL ist auf diesem Chip nicht verfügbar" @@ -2207,11 +2198,6 @@ msgstr "Konnte keine Buffer für Vorzeichenumwandlung allozieren" msgid "Unable to allocate the heap." msgstr "Keine Allokation auf dem Heap möglich." -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to configure ADC DMA controller, ErrorCode:%d" -msgstr "ADC-DMA-Controller konnte nicht konfiguriert werden, Fehlercode: %d" - #: ports/espressif/common-hal/busio/I2C.c msgid "Unable to create lock" msgstr "Lock kann nicht erzeugt werden" @@ -2230,20 +2216,10 @@ msgstr "Konnte keinen freien GCLK finden" msgid "Unable to init parser" msgstr "Parser konnte nicht gestartet werden" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to initialize ADC DMA controller, ErrorCode:%d" -msgstr "ADC-DMA-Controller konnte nicht initialisiert werden, Fehlercode: %d" - #: shared-module/displayio/OnDiskBitmap.c msgid "Unable to read color palette data" msgstr "Konnte Farbpalettendaten nicht lesen" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to start ADC DMA controller, ErrorCode:%d" -msgstr "ADC-DMA-Controller konnte nicht gestartet werden, Fehlercode: %d" - #: ports/espressif/common-hal/mdns/Server.c #: ports/raspberrypi/common-hal/mdns/Server.c msgid "Unable to start mDNS query" @@ -2383,24 +2359,12 @@ msgid "WARNING: Your code filename has two extensions\n" msgstr "" "WARNUNG: Der Dateiname deines Programms hat zwei Dateityperweiterungen\n" -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "WatchDogTimer cannot be deinitialized once mode is set to RESET" msgstr "" "WatchDogTimer kann nicht deinitialisiert werden, wenn der Modus auf RESET " "gesetzt ist" -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer is not currently running" -msgstr "WatchDogTimer läuft aktuell nicht" - -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer.mode cannot be changed once set to WatchDogMode.RESET" -msgstr "" -"WatchDogTimer.mode kann nicht geändert werden, nachdem er auf WatchDogMode." -"RESET gesetzt wurde" - #: py/builtinhelp.c #, c-format msgid "" @@ -4190,10 +4154,7 @@ msgstr "Syntaxfehler in JSON" msgid "syntax error in uctypes descriptor" msgstr "Syntaxfehler in uctypes Deskriptor" -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "timeout duration exceeded the maximum supported value" msgstr "Das Zeitlimit hat den maximal zulässigen Wert überschritten" @@ -4302,7 +4263,8 @@ msgstr "" msgid "unexpected keyword argument" msgstr "unerwartetes Schlüsselwort-Argument" -#: py/bc.c py/objnamedtuple.c shared-bindings/traceback/__init__.c +#: py/argcheck.c py/bc.c py/objnamedtuple.c +#: shared-bindings/traceback/__init__.c msgid "unexpected keyword argument '%q'" msgstr "unerwartetes Schlüsselwort-Argument '%q'" @@ -4396,10 +4358,6 @@ msgstr "Wert muss in %d Byte(s) passen" msgid "value out of range of target" msgstr "Wert außerhalb des Zielbereiches" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "watchdog not initialized" -msgstr "watchdog nicht initialisiert" - #: shared-bindings/is31fl3741/FrameBuffer.c msgid "width must be greater than zero" msgstr "Breite muss größer als 0 sein" @@ -4459,10 +4417,6 @@ msgstr "falsche Anzahl zu entpackender Werte" msgid "wrong output type" msgstr "Falscher Ausgabetyp" -#: ports/espressif/common-hal/audiobusio/__init__.c -msgid "xTaskCreate failed" -msgstr "xTaskCreate fehlgeschlagen" - #: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be an ndarray" msgstr "zi muss ein ndarray sein" @@ -4475,6 +4429,42 @@ msgstr "zi muss eine Gleitkommazahl sein" msgid "zi must be of shape (n_section, 2)" msgstr "zi muss die Form (n_section, 2) haben" +#~ msgid "Initialization failed due to lack of memory" +#~ msgstr "Initialisierung aufgrund von Speichermangel fehlgeschlagen" + +#~ msgid "RAISE mode is not implemented" +#~ msgstr "RAISE-Modus ist nicht implementiert" + +#~ msgid "WatchDogTimer is not currently running" +#~ msgstr "WatchDogTimer läuft aktuell nicht" + +#~ msgid "WatchDogTimer.mode cannot be changed once set to WatchDogMode.RESET" +#~ msgstr "" +#~ "WatchDogTimer.mode kann nicht geändert werden, nachdem er auf " +#~ "WatchDogMode.RESET gesetzt wurde" + +#~ msgid "watchdog not initialized" +#~ msgstr "watchdog nicht initialisiert" + +#~ msgid "ADC2 is being used by WiFi" +#~ msgstr "ADC2 wird vom WiFi benutzt" + +#, c-format +#~ msgid "Unable to configure ADC DMA controller, ErrorCode:%d" +#~ msgstr "ADC-DMA-Controller konnte nicht konfiguriert werden, Fehlercode: %d" + +#, c-format +#~ msgid "Unable to initialize ADC DMA controller, ErrorCode:%d" +#~ msgstr "" +#~ "ADC-DMA-Controller konnte nicht initialisiert werden, Fehlercode: %d" + +#, c-format +#~ msgid "Unable to start ADC DMA controller, ErrorCode:%d" +#~ msgstr "ADC-DMA-Controller konnte nicht gestartet werden, Fehlercode: %d" + +#~ msgid "xTaskCreate failed" +#~ msgstr "xTaskCreate fehlgeschlagen" + #~ msgid "Unable to write to address." #~ msgstr "An die Adresse kann nicht geschrieben werden." diff --git a/locale/el.po b/locale/el.po index 350c6cf71339..b362f61284a9 100644 --- a/locale/el.po +++ b/locale/el.po @@ -208,6 +208,10 @@ msgstr "%q πρέπει να είναι 1 όταν %q είναι True" msgid "%q must be <= %d" msgstr "%q πρέπει να είναι <= %d" +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c +msgid "%q must be <= %u" +msgstr "" + #: py/argcheck.c msgid "%q must be >= %d" msgstr "%q πρέπει να είναι >= %d" @@ -459,10 +463,6 @@ msgstr "pow() με 3 παραμέτρους δεν υποστηρίζεται" msgid "A hardware interrupt channel is already in use" msgstr "Ένα κανάλι interrupt υλικού είναι ήδη σε χρήση" -#: ports/espressif/common-hal/analogio/AnalogIn.c -msgid "ADC2 is being used by WiFi" -msgstr "Το ADC2 χρησιμοποιείται απο το WIFI" - #: ports/raspberrypi/common-hal/wifi/Radio.c msgid "AP could not be started" msgstr "" @@ -1192,10 +1192,6 @@ msgstr "" msgid "Initial set pin state conflicts with initial out pin state" msgstr "" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "Initialization failed due to lack of memory" -msgstr "" - #: shared-bindings/bitops/__init__.c #, c-format msgid "Input buffer length (%d) must be a multiple of the strand count (%d)" @@ -1832,11 +1828,6 @@ msgstr "" msgid "Pull not used when direction is output." msgstr "" -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c -msgid "RAISE mode is not implemented" -msgstr "" - #: ports/raspberrypi/common-hal/countio/Counter.c msgid "RISE_AND_FALL not available on this chip" msgstr "" @@ -2182,11 +2173,6 @@ msgstr "" msgid "Unable to allocate the heap." msgstr "" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to configure ADC DMA controller, ErrorCode:%d" -msgstr "" - #: ports/espressif/common-hal/busio/I2C.c msgid "Unable to create lock" msgstr "" @@ -2205,20 +2191,10 @@ msgstr "" msgid "Unable to init parser" msgstr "" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to initialize ADC DMA controller, ErrorCode:%d" -msgstr "" - #: shared-module/displayio/OnDiskBitmap.c msgid "Unable to read color palette data" msgstr "" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to start ADC DMA controller, ErrorCode:%d" -msgstr "" - #: ports/espressif/common-hal/mdns/Server.c #: ports/raspberrypi/common-hal/mdns/Server.c msgid "Unable to start mDNS query" @@ -2353,20 +2329,10 @@ msgstr "" msgid "WARNING: Your code filename has two extensions\n" msgstr "" -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "WatchDogTimer cannot be deinitialized once mode is set to RESET" msgstr "" -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer is not currently running" -msgstr "" - -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer.mode cannot be changed once set to WatchDogMode.RESET" -msgstr "" - #: py/builtinhelp.c #, c-format msgid "" @@ -4123,10 +4089,7 @@ msgstr "" msgid "syntax error in uctypes descriptor" msgstr "" -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "timeout duration exceeded the maximum supported value" msgstr "" @@ -4233,7 +4196,8 @@ msgstr "" msgid "unexpected keyword argument" msgstr "" -#: py/bc.c py/objnamedtuple.c shared-bindings/traceback/__init__.c +#: py/argcheck.c py/bc.c py/objnamedtuple.c +#: shared-bindings/traceback/__init__.c msgid "unexpected keyword argument '%q'" msgstr "" @@ -4327,10 +4291,6 @@ msgstr "" msgid "value out of range of target" msgstr "" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "watchdog not initialized" -msgstr "" - #: shared-bindings/is31fl3741/FrameBuffer.c msgid "width must be greater than zero" msgstr "" @@ -4390,10 +4350,6 @@ msgstr "" msgid "wrong output type" msgstr "" -#: ports/espressif/common-hal/audiobusio/__init__.c -msgid "xTaskCreate failed" -msgstr "" - #: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be an ndarray" msgstr "" @@ -4406,6 +4362,9 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "ADC2 is being used by WiFi" +#~ msgstr "Το ADC2 χρησιμοποιείται απο το WIFI" + #~ msgid "" #~ "\n" #~ "Please file an issue with your program at https://github.com/adafruit/" diff --git a/locale/en_GB.po b/locale/en_GB.po index 158b5a1c9cda..a73c431037fe 100644 --- a/locale/en_GB.po +++ b/locale/en_GB.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2023-09-10 08:50+0000\n" +"PO-Revision-Date: 2023-10-05 03:10+0000\n" "Last-Translator: Andi Chandler \n" "Language-Team: none\n" "Language: en_GB\n" @@ -15,7 +15,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 5.0.1-dev\n" +"X-Generator: Weblate 5.1-dev\n" #: main.c msgid "" @@ -209,6 +209,10 @@ msgstr "%q must be 1 when %q is True" msgid "%q must be <= %d" msgstr "%q must be <= %d" +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c +msgid "%q must be <= %u" +msgstr "%q must be <= %u" + #: py/argcheck.c msgid "%q must be >= %d" msgstr "%q must be >= %d" @@ -460,10 +464,6 @@ msgstr "3-arg pow() not supported" msgid "A hardware interrupt channel is already in use" msgstr "A hardware interrupt channel is already in use" -#: ports/espressif/common-hal/analogio/AnalogIn.c -msgid "ADC2 is being used by WiFi" -msgstr "ADC2 is being used by WiFi" - #: ports/raspberrypi/common-hal/wifi/Radio.c msgid "AP could not be started" msgstr "AP could not be started" @@ -1187,10 +1187,6 @@ msgstr "Initial set pin direction conflicts with initial out pin direction" msgid "Initial set pin state conflicts with initial out pin state" msgstr "Initial set pin state conflicts with initial out pin state" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "Initialization failed due to lack of memory" -msgstr "Initialisation failed due to lack of memory" - #: shared-bindings/bitops/__init__.c #, c-format msgid "Input buffer length (%d) must be a multiple of the strand count (%d)" @@ -1833,11 +1829,6 @@ msgstr "Program too long" msgid "Pull not used when direction is output." msgstr "Pull not used when direction is output." -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c -msgid "RAISE mode is not implemented" -msgstr "RAISE mode is not implemented" - #: ports/raspberrypi/common-hal/countio/Counter.c msgid "RISE_AND_FALL not available on this chip" msgstr "RISE_AND_FALL not available on this chip" @@ -2185,11 +2176,6 @@ msgstr "Unable to allocate buffers for signed conversion" msgid "Unable to allocate the heap." msgstr "Unable to allocate the heap." -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to configure ADC DMA controller, ErrorCode:%d" -msgstr "Unable to configure ADC DMA controller, ErrorCode:%d" - #: ports/espressif/common-hal/busio/I2C.c msgid "Unable to create lock" msgstr "Unable to create lock" @@ -2208,20 +2194,10 @@ msgstr "Unable to find free GCLK" msgid "Unable to init parser" msgstr "Unable to init parser" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to initialize ADC DMA controller, ErrorCode:%d" -msgstr "Unable to initialise ADC DMA controller, ErrorCode:%d" - #: shared-module/displayio/OnDiskBitmap.c msgid "Unable to read color palette data" msgstr "Unable to read colour palette data" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to start ADC DMA controller, ErrorCode:%d" -msgstr "Unable to start ADC DMA controller, ErrorCode:%d" - #: ports/espressif/common-hal/mdns/Server.c #: ports/raspberrypi/common-hal/mdns/Server.c msgid "Unable to start mDNS query" @@ -2358,20 +2334,10 @@ msgstr "Voltage read timed out" msgid "WARNING: Your code filename has two extensions\n" msgstr "WARNING: Your code filename has two extensions\n" -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "WatchDogTimer cannot be deinitialized once mode is set to RESET" msgstr "WatchDogTimer cannot be deinitialised once mode is set to RESET" -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer is not currently running" -msgstr "WatchDogTimer is not currently running" - -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer.mode cannot be changed once set to WatchDogMode.RESET" -msgstr "WatchDogTimer.mode cannot be changed once set to WatchDogMode.RESET" - #: py/builtinhelp.c #, c-format msgid "" @@ -4138,10 +4104,7 @@ msgstr "syntax error in JSON" msgid "syntax error in uctypes descriptor" msgstr "syntax error in uctypes descriptor" -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "timeout duration exceeded the maximum supported value" msgstr "timeout duration exceeded the maximum supported value" @@ -4248,7 +4211,8 @@ msgstr "unexpected indent" msgid "unexpected keyword argument" msgstr "unexpected keyword argument" -#: py/bc.c py/objnamedtuple.c shared-bindings/traceback/__init__.c +#: py/argcheck.c py/bc.c py/objnamedtuple.c +#: shared-bindings/traceback/__init__.c msgid "unexpected keyword argument '%q'" msgstr "unexpected keyword argument '%q'" @@ -4342,10 +4306,6 @@ msgstr "value must fit in %d byte(s)" msgid "value out of range of target" msgstr "value out of range of target" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "watchdog not initialized" -msgstr "WatchDog not initialised" - #: shared-bindings/is31fl3741/FrameBuffer.c msgid "width must be greater than zero" msgstr "width must be greater than zero" @@ -4405,10 +4365,6 @@ msgstr "wrong number of values to unpack" msgid "wrong output type" msgstr "wrong output type" -#: ports/espressif/common-hal/audiobusio/__init__.c -msgid "xTaskCreate failed" -msgstr "xTaskCreate failed" - #: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be an ndarray" msgstr "zi must be an ndarray" @@ -4421,6 +4377,39 @@ msgstr "zi must be of float type" msgid "zi must be of shape (n_section, 2)" msgstr "zi must be of shape (n_section, 2)" +#~ msgid "Initialization failed due to lack of memory" +#~ msgstr "Initialisation failed due to lack of memory" + +#~ msgid "RAISE mode is not implemented" +#~ msgstr "RAISE mode is not implemented" + +#~ msgid "WatchDogTimer is not currently running" +#~ msgstr "WatchDogTimer is not currently running" + +#~ msgid "WatchDogTimer.mode cannot be changed once set to WatchDogMode.RESET" +#~ msgstr "WatchDogTimer.mode cannot be changed once set to WatchDogMode.RESET" + +#~ msgid "watchdog not initialized" +#~ msgstr "WatchDog not initialised" + +#~ msgid "ADC2 is being used by WiFi" +#~ msgstr "ADC2 is being used by WiFi" + +#, c-format +#~ msgid "Unable to configure ADC DMA controller, ErrorCode:%d" +#~ msgstr "Unable to configure ADC DMA controller, ErrorCode:%d" + +#, c-format +#~ msgid "Unable to initialize ADC DMA controller, ErrorCode:%d" +#~ msgstr "Unable to initialise ADC DMA controller, ErrorCode:%d" + +#, c-format +#~ msgid "Unable to start ADC DMA controller, ErrorCode:%d" +#~ msgstr "Unable to start ADC DMA controller, ErrorCode:%d" + +#~ msgid "xTaskCreate failed" +#~ msgstr "xTaskCreate failed" + #~ msgid "Unable to write to address." #~ msgstr "Unable to write to address." diff --git a/locale/es.po b/locale/es.po index d1f2891c54b1..c36dfbe627e4 100644 --- a/locale/es.po +++ b/locale/es.po @@ -211,6 +211,10 @@ msgstr "%q debe ser 1 cuando %q es True" msgid "%q must be <= %d" msgstr "%q debe ser <= %d" +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c +msgid "%q must be <= %u" +msgstr "" + #: py/argcheck.c msgid "%q must be >= %d" msgstr "%q debe ser >= %d" @@ -462,10 +466,6 @@ msgstr "pow() con 3 argumentos no soportado" msgid "A hardware interrupt channel is already in use" msgstr "Un canal de interrupción por hardware ya está en uso" -#: ports/espressif/common-hal/analogio/AnalogIn.c -msgid "ADC2 is being used by WiFi" -msgstr "ADC2 está siendo usado por WiFi" - #: ports/raspberrypi/common-hal/wifi/Radio.c msgid "AP could not be started" msgstr "" @@ -1209,10 +1209,6 @@ msgstr "" "El estado inicial del pin de configuración esta en conflicto con el estado " "inicial de salida del pin" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "Initialization failed due to lack of memory" -msgstr "Inicializacion fallida por falta de memoria" - #: shared-bindings/bitops/__init__.c #, c-format msgid "Input buffer length (%d) must be a multiple of the strand count (%d)" @@ -1864,11 +1860,6 @@ msgstr "El programa es demasiado grande" msgid "Pull not used when direction is output." msgstr "Pull no se usa cuando la dirección es output." -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c -msgid "RAISE mode is not implemented" -msgstr "El modo RAISE no esta implementado" - #: ports/raspberrypi/common-hal/countio/Counter.c msgid "RISE_AND_FALL not available on this chip" msgstr "RISE_AND_FALL no esta disponible para este chip" @@ -2221,11 +2212,6 @@ msgstr "No se pudieron asignar buffers para la conversión con signo" msgid "Unable to allocate the heap." msgstr "Imposible de asignar el heap." -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to configure ADC DMA controller, ErrorCode:%d" -msgstr "Imposible de configurar el controlador ADC DMA , código de error:%d" - #: ports/espressif/common-hal/busio/I2C.c msgid "Unable to create lock" msgstr "No se puede crear bloqueo" @@ -2244,21 +2230,10 @@ msgstr "No se pudo encontrar un GCLK libre" msgid "Unable to init parser" msgstr "Incapaz de inicializar el parser" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to initialize ADC DMA controller, ErrorCode:%d" -msgstr "" -"No es posible de inicializar el controlador ADC DMA, código de error:%d" - #: shared-module/displayio/OnDiskBitmap.c msgid "Unable to read color palette data" msgstr "No se pudo leer los datos de la paleta de colores" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to start ADC DMA controller, ErrorCode:%d" -msgstr "Imposible de iniciar el controlador ADC DMA, código de error:%d" - #: ports/espressif/common-hal/mdns/Server.c #: ports/raspberrypi/common-hal/mdns/Server.c msgid "Unable to start mDNS query" @@ -2395,23 +2370,11 @@ msgstr "Tiempo de espera agotado para lectura de voltaje" msgid "WARNING: Your code filename has two extensions\n" msgstr "ADVERTENCIA: El nombre de archivo de tu código tiene dos extensiones\n" -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "WatchDogTimer cannot be deinitialized once mode is set to RESET" msgstr "" "WatchDogTimer no se puede desinicializar luego de definirse en modo RESET" -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer is not currently running" -msgstr "WatchDogTimer no se está ejecutando en este momento" - -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer.mode cannot be changed once set to WatchDogMode.RESET" -msgstr "" -"WatchDogTimer.mode no se puede modificar luego de configurar WatchDogMode." -"RESET" - #: py/builtinhelp.c #, c-format msgid "" @@ -4187,10 +4150,7 @@ msgstr "error de sintaxis en JSON" msgid "syntax error in uctypes descriptor" msgstr "error de sintaxis en el descriptor uctypes" -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "timeout duration exceeded the maximum supported value" msgstr "" "la duración de tiempo de espera ha excedido la capacidad máxima del valor" @@ -4298,7 +4258,8 @@ msgstr "sangría inesperada" msgid "unexpected keyword argument" msgstr "argumento por palabra clave inesperado" -#: py/bc.c py/objnamedtuple.c shared-bindings/traceback/__init__.c +#: py/argcheck.c py/bc.c py/objnamedtuple.c +#: shared-bindings/traceback/__init__.c msgid "unexpected keyword argument '%q'" msgstr "argumento por palabra clave inesperado '%q'" @@ -4392,10 +4353,6 @@ msgstr "el valor debe caber en %d byte(s)" msgid "value out of range of target" msgstr "valor fuera de alcance al blanco" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "watchdog not initialized" -msgstr "watchdog no inicializado" - #: shared-bindings/is31fl3741/FrameBuffer.c msgid "width must be greater than zero" msgstr "el ancho debe ser mayor que cero" @@ -4455,10 +4412,6 @@ msgstr "numero erroneo de valores a descomprimir" msgid "wrong output type" msgstr "tipo de salida incorrecta" -#: ports/espressif/common-hal/audiobusio/__init__.c -msgid "xTaskCreate failed" -msgstr "fallo en xTaskCreate" - #: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be an ndarray" msgstr "zi debe ser un ndarray" @@ -4471,6 +4424,42 @@ msgstr "zi debe ser de tipo flotante" msgid "zi must be of shape (n_section, 2)" msgstr "zi debe ser una forma (n_section,2)" +#~ msgid "Initialization failed due to lack of memory" +#~ msgstr "Inicializacion fallida por falta de memoria" + +#~ msgid "RAISE mode is not implemented" +#~ msgstr "El modo RAISE no esta implementado" + +#~ msgid "WatchDogTimer is not currently running" +#~ msgstr "WatchDogTimer no se está ejecutando en este momento" + +#~ msgid "WatchDogTimer.mode cannot be changed once set to WatchDogMode.RESET" +#~ msgstr "" +#~ "WatchDogTimer.mode no se puede modificar luego de configurar WatchDogMode." +#~ "RESET" + +#~ msgid "watchdog not initialized" +#~ msgstr "watchdog no inicializado" + +#~ msgid "ADC2 is being used by WiFi" +#~ msgstr "ADC2 está siendo usado por WiFi" + +#, c-format +#~ msgid "Unable to configure ADC DMA controller, ErrorCode:%d" +#~ msgstr "Imposible de configurar el controlador ADC DMA , código de error:%d" + +#, c-format +#~ msgid "Unable to initialize ADC DMA controller, ErrorCode:%d" +#~ msgstr "" +#~ "No es posible de inicializar el controlador ADC DMA, código de error:%d" + +#, c-format +#~ msgid "Unable to start ADC DMA controller, ErrorCode:%d" +#~ msgstr "Imposible de iniciar el controlador ADC DMA, código de error:%d" + +#~ msgid "xTaskCreate failed" +#~ msgstr "fallo en xTaskCreate" + #~ msgid "Unable to write to address." #~ msgstr "Imposible de escribir en esa dirección." diff --git a/locale/fil.po b/locale/fil.po index 739d95799860..73cc68180bb8 100644 --- a/locale/fil.po +++ b/locale/fil.po @@ -197,6 +197,10 @@ msgstr "" msgid "%q must be <= %d" msgstr "" +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c +msgid "%q must be <= %u" +msgstr "" + #: py/argcheck.c msgid "%q must be >= %d" msgstr "" @@ -449,10 +453,6 @@ msgstr "3-arg pow() hindi suportado" msgid "A hardware interrupt channel is already in use" msgstr "Isang channel ng hardware interrupt ay ginagamit na" -#: ports/espressif/common-hal/analogio/AnalogIn.c -msgid "ADC2 is being used by WiFi" -msgstr "" - #: ports/raspberrypi/common-hal/wifi/Radio.c msgid "AP could not be started" msgstr "" @@ -1178,10 +1178,6 @@ msgstr "" msgid "Initial set pin state conflicts with initial out pin state" msgstr "" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "Initialization failed due to lack of memory" -msgstr "" - #: shared-bindings/bitops/__init__.c #, c-format msgid "Input buffer length (%d) must be a multiple of the strand count (%d)" @@ -1820,11 +1816,6 @@ msgstr "" msgid "Pull not used when direction is output." msgstr "Pull hindi ginagamit kapag ang direksyon ay output." -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c -msgid "RAISE mode is not implemented" -msgstr "" - #: ports/raspberrypi/common-hal/countio/Counter.c msgid "RISE_AND_FALL not available on this chip" msgstr "" @@ -2170,11 +2161,6 @@ msgstr "Hindi ma-allocate ang buffers para sa naka-sign na conversion" msgid "Unable to allocate the heap." msgstr "" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to configure ADC DMA controller, ErrorCode:%d" -msgstr "" - #: ports/espressif/common-hal/busio/I2C.c msgid "Unable to create lock" msgstr "" @@ -2193,20 +2179,10 @@ msgstr "Hindi mahanap ang libreng GCLK" msgid "Unable to init parser" msgstr "Hindi ma-init ang parser" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to initialize ADC DMA controller, ErrorCode:%d" -msgstr "" - #: shared-module/displayio/OnDiskBitmap.c msgid "Unable to read color palette data" msgstr "" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to start ADC DMA controller, ErrorCode:%d" -msgstr "" - #: ports/espressif/common-hal/mdns/Server.c #: ports/raspberrypi/common-hal/mdns/Server.c msgid "Unable to start mDNS query" @@ -2343,20 +2319,10 @@ msgstr "" msgid "WARNING: Your code filename has two extensions\n" msgstr "BABALA: Ang pangalan ng file ay may dalawang extension\n" -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "WatchDogTimer cannot be deinitialized once mode is set to RESET" msgstr "" -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer is not currently running" -msgstr "" - -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer.mode cannot be changed once set to WatchDogMode.RESET" -msgstr "" - #: py/builtinhelp.c #, c-format msgid "" @@ -4131,10 +4097,7 @@ msgstr "sintaks error sa JSON" msgid "syntax error in uctypes descriptor" msgstr "may pagkakamali sa sintaks sa uctypes descriptor" -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "timeout duration exceeded the maximum supported value" msgstr "" @@ -4241,7 +4204,8 @@ msgstr "hindi inaasahang indent" msgid "unexpected keyword argument" msgstr "hindi inaasahang argumento ng keyword" -#: py/bc.c py/objnamedtuple.c shared-bindings/traceback/__init__.c +#: py/argcheck.c py/bc.c py/objnamedtuple.c +#: shared-bindings/traceback/__init__.c msgid "unexpected keyword argument '%q'" msgstr "hindi inaasahang argumento ng keyword na '%q'" @@ -4335,10 +4299,6 @@ msgstr "" msgid "value out of range of target" msgstr "" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "watchdog not initialized" -msgstr "" - #: shared-bindings/is31fl3741/FrameBuffer.c msgid "width must be greater than zero" msgstr "" @@ -4398,10 +4358,6 @@ msgstr "maling number ng value na i-unpack" msgid "wrong output type" msgstr "" -#: ports/espressif/common-hal/audiobusio/__init__.c -msgid "xTaskCreate failed" -msgstr "" - #: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be an ndarray" msgstr "" diff --git a/locale/fr.po b/locale/fr.po index 10b20a3d5138..56bbcb466eca 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -208,6 +208,10 @@ msgstr "%q doit être 1 quand %q est True" msgid "%q must be <= %d" msgstr "%q doit être <= %d" +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c +msgid "%q must be <= %u" +msgstr "" + #: py/argcheck.c msgid "%q must be >= %d" msgstr "%q doit être >= %d" @@ -461,10 +465,6 @@ msgstr "pow() non supporté avec 3 paramètres" msgid "A hardware interrupt channel is already in use" msgstr "Un canal d'interruptions matériel est déjà utilisé" -#: ports/espressif/common-hal/analogio/AnalogIn.c -msgid "ADC2 is being used by WiFi" -msgstr "ADC2 est utilisé pars le Wifi" - #: ports/raspberrypi/common-hal/wifi/Radio.c msgid "AP could not be started" msgstr "" @@ -1213,10 +1213,6 @@ msgid "Initial set pin state conflicts with initial out pin state" msgstr "" "État initial de \"set pin\" est en conflit avec l'état initial de \"out pin\"" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "Initialization failed due to lack of memory" -msgstr "Échec d'initialisation par manque de mémoire" - #: shared-bindings/bitops/__init__.c #, c-format msgid "Input buffer length (%d) must be a multiple of the strand count (%d)" @@ -1871,11 +1867,6 @@ msgstr "Programme trop long" msgid "Pull not used when direction is output." msgstr "Le tirage 'pull' n'est pas utilisé quand la direction est 'output'." -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c -msgid "RAISE mode is not implemented" -msgstr "Mode RAISE n'est pas implémenté" - #: ports/raspberrypi/common-hal/countio/Counter.c msgid "RISE_AND_FALL not available on this chip" msgstr "RISE_AND_FALL n'est pas disponible sur cette puce" @@ -2228,11 +2219,6 @@ msgstr "Impossible d'allouer des tampons pour une conversion signée" msgid "Unable to allocate the heap." msgstr "Impossible d'allouer le tas." -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to configure ADC DMA controller, ErrorCode:%d" -msgstr "" - #: ports/espressif/common-hal/busio/I2C.c msgid "Unable to create lock" msgstr "Impossible de créer un verrou ('lock')" @@ -2251,20 +2237,10 @@ msgstr "Impossible de trouver un GCLK libre" msgid "Unable to init parser" msgstr "Impossible d'initialiser le parser" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to initialize ADC DMA controller, ErrorCode:%d" -msgstr "" - #: shared-module/displayio/OnDiskBitmap.c msgid "Unable to read color palette data" msgstr "Impossible de lire les données de la palette de couleurs" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to start ADC DMA controller, ErrorCode:%d" -msgstr "" - #: ports/espressif/common-hal/mdns/Server.c #: ports/raspberrypi/common-hal/mdns/Server.c msgid "Unable to start mDNS query" @@ -2402,24 +2378,12 @@ msgstr "La lecture de la tension a expiré" msgid "WARNING: Your code filename has two extensions\n" msgstr "ATTENTION : le nom de fichier de votre code a deux extensions\n" -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "WatchDogTimer cannot be deinitialized once mode is set to RESET" msgstr "" "WatchDogTimer ne peut pas être dés-initialisé une fois que le mode est réglé " "sur RESET" -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer is not currently running" -msgstr "WatchDogTimer n'est pas en cours d'exécution" - -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer.mode cannot be changed once set to WatchDogMode.RESET" -msgstr "" -"WatchDogTimer.mode ne peut pas être changé une fois réglé à WatchDogMode." -"RESET" - #: py/builtinhelp.c #, c-format msgid "" @@ -4208,10 +4172,7 @@ msgstr "erreur de syntaxe JSON" msgid "syntax error in uctypes descriptor" msgstr "erreur de syntaxe dans le descripteur d'uctypes" -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "timeout duration exceeded the maximum supported value" msgstr "le délai d'expiration a dépassé la valeur maximale prise en charge" @@ -4318,7 +4279,8 @@ msgstr "indentation inattendue" msgid "unexpected keyword argument" msgstr "paramètre nommé inattendu" -#: py/bc.c py/objnamedtuple.c shared-bindings/traceback/__init__.c +#: py/argcheck.c py/bc.c py/objnamedtuple.c +#: shared-bindings/traceback/__init__.c msgid "unexpected keyword argument '%q'" msgstr "paramètre nommé '%q' inattendu" @@ -4412,10 +4374,6 @@ msgstr "la valeur doit tenir dans %d octet(s)" msgid "value out of range of target" msgstr "valeur hors de porté de la cible" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "watchdog not initialized" -msgstr "chien de garde (watchdog) non initialisé" - #: shared-bindings/is31fl3741/FrameBuffer.c msgid "width must be greater than zero" msgstr "width doit être plus que zero" @@ -4475,10 +4433,6 @@ msgstr "mauvais nombre de valeurs à dégrouper" msgid "wrong output type" msgstr "type de sortie incorrect" -#: ports/espressif/common-hal/audiobusio/__init__.c -msgid "xTaskCreate failed" -msgstr "Échec de xTaskCreate" - #: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be an ndarray" msgstr "zi doit être un ndarray" @@ -4491,6 +4445,29 @@ msgstr "zi doit être de type float" msgid "zi must be of shape (n_section, 2)" msgstr "zi doit être de forme (n_section, 2)" +#~ msgid "Initialization failed due to lack of memory" +#~ msgstr "Échec d'initialisation par manque de mémoire" + +#~ msgid "RAISE mode is not implemented" +#~ msgstr "Mode RAISE n'est pas implémenté" + +#~ msgid "WatchDogTimer is not currently running" +#~ msgstr "WatchDogTimer n'est pas en cours d'exécution" + +#~ msgid "WatchDogTimer.mode cannot be changed once set to WatchDogMode.RESET" +#~ msgstr "" +#~ "WatchDogTimer.mode ne peut pas être changé une fois réglé à WatchDogMode." +#~ "RESET" + +#~ msgid "watchdog not initialized" +#~ msgstr "chien de garde (watchdog) non initialisé" + +#~ msgid "ADC2 is being used by WiFi" +#~ msgstr "ADC2 est utilisé pars le Wifi" + +#~ msgid "xTaskCreate failed" +#~ msgstr "Échec de xTaskCreate" + #~ msgid "Unable to write to address." #~ msgstr "L'écriture a échoué." diff --git a/locale/hi.po b/locale/hi.po index 87f0f9ec3569..2551d5b7259f 100644 --- a/locale/hi.po +++ b/locale/hi.po @@ -196,6 +196,10 @@ msgstr "" msgid "%q must be <= %d" msgstr "" +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c +msgid "%q must be <= %u" +msgstr "" + #: py/argcheck.c msgid "%q must be >= %d" msgstr "" @@ -447,10 +451,6 @@ msgstr "" msgid "A hardware interrupt channel is already in use" msgstr "" -#: ports/espressif/common-hal/analogio/AnalogIn.c -msgid "ADC2 is being used by WiFi" -msgstr "" - #: ports/raspberrypi/common-hal/wifi/Radio.c msgid "AP could not be started" msgstr "" @@ -1168,10 +1168,6 @@ msgstr "" msgid "Initial set pin state conflicts with initial out pin state" msgstr "" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "Initialization failed due to lack of memory" -msgstr "" - #: shared-bindings/bitops/__init__.c #, c-format msgid "Input buffer length (%d) must be a multiple of the strand count (%d)" @@ -1806,11 +1802,6 @@ msgstr "" msgid "Pull not used when direction is output." msgstr "" -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c -msgid "RAISE mode is not implemented" -msgstr "" - #: ports/raspberrypi/common-hal/countio/Counter.c msgid "RISE_AND_FALL not available on this chip" msgstr "" @@ -2156,11 +2147,6 @@ msgstr "" msgid "Unable to allocate the heap." msgstr "" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to configure ADC DMA controller, ErrorCode:%d" -msgstr "" - #: ports/espressif/common-hal/busio/I2C.c msgid "Unable to create lock" msgstr "" @@ -2179,20 +2165,10 @@ msgstr "" msgid "Unable to init parser" msgstr "" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to initialize ADC DMA controller, ErrorCode:%d" -msgstr "" - #: shared-module/displayio/OnDiskBitmap.c msgid "Unable to read color palette data" msgstr "" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to start ADC DMA controller, ErrorCode:%d" -msgstr "" - #: ports/espressif/common-hal/mdns/Server.c #: ports/raspberrypi/common-hal/mdns/Server.c msgid "Unable to start mDNS query" @@ -2327,20 +2303,10 @@ msgstr "" msgid "WARNING: Your code filename has two extensions\n" msgstr "" -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "WatchDogTimer cannot be deinitialized once mode is set to RESET" msgstr "" -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer is not currently running" -msgstr "" - -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer.mode cannot be changed once set to WatchDogMode.RESET" -msgstr "" - #: py/builtinhelp.c #, c-format msgid "" @@ -4097,10 +4063,7 @@ msgstr "" msgid "syntax error in uctypes descriptor" msgstr "" -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "timeout duration exceeded the maximum supported value" msgstr "" @@ -4207,7 +4170,8 @@ msgstr "" msgid "unexpected keyword argument" msgstr "" -#: py/bc.c py/objnamedtuple.c shared-bindings/traceback/__init__.c +#: py/argcheck.c py/bc.c py/objnamedtuple.c +#: shared-bindings/traceback/__init__.c msgid "unexpected keyword argument '%q'" msgstr "" @@ -4301,10 +4265,6 @@ msgstr "" msgid "value out of range of target" msgstr "" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "watchdog not initialized" -msgstr "" - #: shared-bindings/is31fl3741/FrameBuffer.c msgid "width must be greater than zero" msgstr "" @@ -4364,10 +4324,6 @@ msgstr "" msgid "wrong output type" msgstr "" -#: ports/espressif/common-hal/audiobusio/__init__.c -msgid "xTaskCreate failed" -msgstr "" - #: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be an ndarray" msgstr "" diff --git a/locale/it_IT.po b/locale/it_IT.po index f4b862ac4c6f..f1cffe5e4911 100644 --- a/locale/it_IT.po +++ b/locale/it_IT.po @@ -200,6 +200,10 @@ msgstr "" msgid "%q must be <= %d" msgstr "" +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c +msgid "%q must be <= %u" +msgstr "" + #: py/argcheck.c msgid "%q must be >= %d" msgstr "" @@ -452,10 +456,6 @@ msgstr "pow() con tre argmomenti non supportata" msgid "A hardware interrupt channel is already in use" msgstr "Un canale di interruzione hardware è già in uso" -#: ports/espressif/common-hal/analogio/AnalogIn.c -msgid "ADC2 is being used by WiFi" -msgstr "ADC2 sta usando il WiFi" - #: ports/raspberrypi/common-hal/wifi/Radio.c msgid "AP could not be started" msgstr "" @@ -1180,10 +1180,6 @@ msgstr "" msgid "Initial set pin state conflicts with initial out pin state" msgstr "" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "Initialization failed due to lack of memory" -msgstr "" - #: shared-bindings/bitops/__init__.c #, c-format msgid "Input buffer length (%d) must be a multiple of the strand count (%d)" @@ -1827,11 +1823,6 @@ msgstr "" msgid "Pull not used when direction is output." msgstr "" -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c -msgid "RAISE mode is not implemented" -msgstr "" - #: ports/raspberrypi/common-hal/countio/Counter.c msgid "RISE_AND_FALL not available on this chip" msgstr "" @@ -2177,11 +2168,6 @@ msgstr "Ipossibilitato ad allocare buffer per la conversione con segno" msgid "Unable to allocate the heap." msgstr "" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to configure ADC DMA controller, ErrorCode:%d" -msgstr "" - #: ports/espressif/common-hal/busio/I2C.c msgid "Unable to create lock" msgstr "" @@ -2200,20 +2186,10 @@ msgstr "Impossibile trovare un GCLK libero" msgid "Unable to init parser" msgstr "Inizilizzazione del parser non possibile" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to initialize ADC DMA controller, ErrorCode:%d" -msgstr "" - #: shared-module/displayio/OnDiskBitmap.c msgid "Unable to read color palette data" msgstr "" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to start ADC DMA controller, ErrorCode:%d" -msgstr "" - #: ports/espressif/common-hal/mdns/Server.c #: ports/raspberrypi/common-hal/mdns/Server.c msgid "Unable to start mDNS query" @@ -2350,20 +2326,10 @@ msgstr "" msgid "WARNING: Your code filename has two extensions\n" msgstr "ATTENZIONE: Il nome del sorgente ha due estensioni\n" -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "WatchDogTimer cannot be deinitialized once mode is set to RESET" msgstr "" -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer is not currently running" -msgstr "" - -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer.mode cannot be changed once set to WatchDogMode.RESET" -msgstr "" - #: py/builtinhelp.c #, c-format msgid "" @@ -4141,10 +4107,7 @@ msgstr "errore di sintassi nel JSON" msgid "syntax error in uctypes descriptor" msgstr "errore di sintassi nel descrittore uctypes" -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "timeout duration exceeded the maximum supported value" msgstr "" @@ -4251,7 +4214,8 @@ msgstr "indentazione inaspettata" msgid "unexpected keyword argument" msgstr "argomento nominato inaspettato" -#: py/bc.c py/objnamedtuple.c shared-bindings/traceback/__init__.c +#: py/argcheck.c py/bc.c py/objnamedtuple.c +#: shared-bindings/traceback/__init__.c msgid "unexpected keyword argument '%q'" msgstr "argomento nominato '%q' inaspettato" @@ -4345,10 +4309,6 @@ msgstr "" msgid "value out of range of target" msgstr "" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "watchdog not initialized" -msgstr "" - #: shared-bindings/is31fl3741/FrameBuffer.c msgid "width must be greater than zero" msgstr "" @@ -4408,10 +4368,6 @@ msgstr "numero di valori da scompattare non corretto" msgid "wrong output type" msgstr "" -#: ports/espressif/common-hal/audiobusio/__init__.c -msgid "xTaskCreate failed" -msgstr "" - #: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be an ndarray" msgstr "" @@ -4424,6 +4380,9 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "ADC2 is being used by WiFi" +#~ msgstr "ADC2 sta usando il WiFi" + #~ msgid "queue overflow" #~ msgstr "overflow della coda" diff --git a/locale/ja.po b/locale/ja.po index efe1ba664e54..07e65422a6ac 100644 --- a/locale/ja.po +++ b/locale/ja.po @@ -203,6 +203,10 @@ msgstr "" msgid "%q must be <= %d" msgstr "" +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c +msgid "%q must be <= %u" +msgstr "" + #: py/argcheck.c msgid "%q must be >= %d" msgstr "" @@ -454,10 +458,6 @@ msgstr "引数3つのpow()は非対応" msgid "A hardware interrupt channel is already in use" msgstr "ハードウェア割り込みチャネルは使用中" -#: ports/espressif/common-hal/analogio/AnalogIn.c -msgid "ADC2 is being used by WiFi" -msgstr "" - #: ports/raspberrypi/common-hal/wifi/Radio.c msgid "AP could not be started" msgstr "" @@ -1179,10 +1179,6 @@ msgstr "" msgid "Initial set pin state conflicts with initial out pin state" msgstr "" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "Initialization failed due to lack of memory" -msgstr "" - #: shared-bindings/bitops/__init__.c #, c-format msgid "Input buffer length (%d) must be a multiple of the strand count (%d)" @@ -1820,11 +1816,6 @@ msgstr "" msgid "Pull not used when direction is output." msgstr "方向がoutputのときpullは使われません" -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c -msgid "RAISE mode is not implemented" -msgstr "" - #: ports/raspberrypi/common-hal/countio/Counter.c msgid "RISE_AND_FALL not available on this chip" msgstr "" @@ -2171,11 +2162,6 @@ msgstr "" msgid "Unable to allocate the heap." msgstr "" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to configure ADC DMA controller, ErrorCode:%d" -msgstr "" - #: ports/espressif/common-hal/busio/I2C.c msgid "Unable to create lock" msgstr "" @@ -2194,20 +2180,10 @@ msgstr "" msgid "Unable to init parser" msgstr "パーザを初期化できません" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to initialize ADC DMA controller, ErrorCode:%d" -msgstr "" - #: shared-module/displayio/OnDiskBitmap.c msgid "Unable to read color palette data" msgstr "カラーパレットデータを読み込めません" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to start ADC DMA controller, ErrorCode:%d" -msgstr "" - #: ports/espressif/common-hal/mdns/Server.c #: ports/raspberrypi/common-hal/mdns/Server.c msgid "Unable to start mDNS query" @@ -2342,20 +2318,10 @@ msgstr "電圧読み取りがタイムアウト" msgid "WARNING: Your code filename has two extensions\n" msgstr "" -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "WatchDogTimer cannot be deinitialized once mode is set to RESET" msgstr "" -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer is not currently running" -msgstr "WatchDogTimerは現在動作していません" - -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer.mode cannot be changed once set to WatchDogMode.RESET" -msgstr "WatchDogTimer.modeはいったんWatchDogMode.RESETに設定すると変更不可" - #: py/builtinhelp.c #, c-format msgid "" @@ -4117,10 +4083,7 @@ msgstr "JSONに構文エラーがあります" msgid "syntax error in uctypes descriptor" msgstr "uctypedディスクリプタの構文エラー" -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "timeout duration exceeded the maximum supported value" msgstr "タイムアウト長は対応する最大値を超えています" @@ -4227,7 +4190,8 @@ msgstr "" msgid "unexpected keyword argument" msgstr "" -#: py/bc.c py/objnamedtuple.c shared-bindings/traceback/__init__.c +#: py/argcheck.c py/bc.c py/objnamedtuple.c +#: shared-bindings/traceback/__init__.c msgid "unexpected keyword argument '%q'" msgstr "キーワード引数'%q'は使えません" @@ -4321,10 +4285,6 @@ msgstr "値は%dバイトに収まらなければなりません" msgid "value out of range of target" msgstr "" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "watchdog not initialized" -msgstr "" - #: shared-bindings/is31fl3741/FrameBuffer.c msgid "width must be greater than zero" msgstr "" @@ -4384,10 +4344,6 @@ msgstr "アンパックする値の個数が不正です" msgid "wrong output type" msgstr "" -#: ports/espressif/common-hal/audiobusio/__init__.c -msgid "xTaskCreate failed" -msgstr "" - #: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be an ndarray" msgstr "ziはndarrayでなければなりません" @@ -4400,6 +4356,12 @@ msgstr "ziはfloat値でなければなりません" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "WatchDogTimer is not currently running" +#~ msgstr "WatchDogTimerは現在動作していません" + +#~ msgid "WatchDogTimer.mode cannot be changed once set to WatchDogMode.RESET" +#~ msgstr "WatchDogTimer.modeはいったんWatchDogMode.RESETに設定すると変更不可" + #~ msgid "queue overflow" #~ msgstr "キューがオーバーフローしました" diff --git a/locale/ko.po b/locale/ko.po index 1ff7ddc557c9..28e233fcf0ca 100644 --- a/locale/ko.po +++ b/locale/ko.po @@ -197,6 +197,10 @@ msgstr "" msgid "%q must be <= %d" msgstr "" +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c +msgid "%q must be <= %u" +msgstr "" + #: py/argcheck.c msgid "%q must be >= %d" msgstr "" @@ -448,10 +452,6 @@ msgstr "" msgid "A hardware interrupt channel is already in use" msgstr "" -#: ports/espressif/common-hal/analogio/AnalogIn.c -msgid "ADC2 is being used by WiFi" -msgstr "" - #: ports/raspberrypi/common-hal/wifi/Radio.c msgid "AP could not be started" msgstr "" @@ -1171,10 +1171,6 @@ msgstr "" msgid "Initial set pin state conflicts with initial out pin state" msgstr "" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "Initialization failed due to lack of memory" -msgstr "" - #: shared-bindings/bitops/__init__.c #, c-format msgid "Input buffer length (%d) must be a multiple of the strand count (%d)" @@ -1809,11 +1805,6 @@ msgstr "" msgid "Pull not used when direction is output." msgstr "" -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c -msgid "RAISE mode is not implemented" -msgstr "" - #: ports/raspberrypi/common-hal/countio/Counter.c msgid "RISE_AND_FALL not available on this chip" msgstr "" @@ -2160,11 +2151,6 @@ msgstr "" msgid "Unable to allocate the heap." msgstr "" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to configure ADC DMA controller, ErrorCode:%d" -msgstr "" - #: ports/espressif/common-hal/busio/I2C.c msgid "Unable to create lock" msgstr "" @@ -2183,20 +2169,10 @@ msgstr "" msgid "Unable to init parser" msgstr "파서를 초기화(init) 할 수 없습니다" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to initialize ADC DMA controller, ErrorCode:%d" -msgstr "" - #: shared-module/displayio/OnDiskBitmap.c msgid "Unable to read color palette data" msgstr "" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to start ADC DMA controller, ErrorCode:%d" -msgstr "" - #: ports/espressif/common-hal/mdns/Server.c #: ports/raspberrypi/common-hal/mdns/Server.c msgid "Unable to start mDNS query" @@ -2331,20 +2307,10 @@ msgstr "" msgid "WARNING: Your code filename has two extensions\n" msgstr "" -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "WatchDogTimer cannot be deinitialized once mode is set to RESET" msgstr "" -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer is not currently running" -msgstr "" - -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer.mode cannot be changed once set to WatchDogMode.RESET" -msgstr "" - #: py/builtinhelp.c #, c-format msgid "" @@ -4101,10 +4067,7 @@ msgstr "" msgid "syntax error in uctypes descriptor" msgstr "" -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "timeout duration exceeded the maximum supported value" msgstr "" @@ -4211,7 +4174,8 @@ msgstr "" msgid "unexpected keyword argument" msgstr "" -#: py/bc.c py/objnamedtuple.c shared-bindings/traceback/__init__.c +#: py/argcheck.c py/bc.c py/objnamedtuple.c +#: shared-bindings/traceback/__init__.c msgid "unexpected keyword argument '%q'" msgstr "" @@ -4305,10 +4269,6 @@ msgstr "" msgid "value out of range of target" msgstr "" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "watchdog not initialized" -msgstr "" - #: shared-bindings/is31fl3741/FrameBuffer.c msgid "width must be greater than zero" msgstr "" @@ -4368,10 +4328,6 @@ msgstr "" msgid "wrong output type" msgstr "" -#: ports/espressif/common-hal/audiobusio/__init__.c -msgid "xTaskCreate failed" -msgstr "" - #: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be an ndarray" msgstr "" diff --git a/locale/nl.po b/locale/nl.po index 6ddb299e45e2..84e4a981daf5 100644 --- a/locale/nl.po +++ b/locale/nl.po @@ -196,6 +196,10 @@ msgstr "" msgid "%q must be <= %d" msgstr "" +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c +msgid "%q must be <= %u" +msgstr "" + #: py/argcheck.c msgid "%q must be >= %d" msgstr "" @@ -447,10 +451,6 @@ msgstr "3-arg pow() niet ondersteund" msgid "A hardware interrupt channel is already in use" msgstr "Een hardware interrupt kanaal is al in gebruik" -#: ports/espressif/common-hal/analogio/AnalogIn.c -msgid "ADC2 is being used by WiFi" -msgstr "ADC2 wordt gebruikt door WiFi" - #: ports/raspberrypi/common-hal/wifi/Radio.c msgid "AP could not be started" msgstr "" @@ -1174,10 +1174,6 @@ msgstr "" msgid "Initial set pin state conflicts with initial out pin state" msgstr "" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "Initialization failed due to lack of memory" -msgstr "De initialisatie is mislukt vanwege een gebrek aan geheugen" - #: shared-bindings/bitops/__init__.c #, c-format msgid "Input buffer length (%d) must be a multiple of the strand count (%d)" @@ -1825,11 +1821,6 @@ msgstr "" msgid "Pull not used when direction is output." msgstr "Pull niet gebruikt wanneer de richting output is." -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c -msgid "RAISE mode is not implemented" -msgstr "" - #: ports/raspberrypi/common-hal/countio/Counter.c msgid "RISE_AND_FALL not available on this chip" msgstr "" @@ -2175,11 +2166,6 @@ msgstr "Niet in staat buffers voor gesigneerde conversie te alloceren" msgid "Unable to allocate the heap." msgstr "" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to configure ADC DMA controller, ErrorCode:%d" -msgstr "" - #: ports/espressif/common-hal/busio/I2C.c msgid "Unable to create lock" msgstr "Kan vergrendeling niet maken" @@ -2198,20 +2184,10 @@ msgstr "Niet in staat een vrije GCLK te vinden" msgid "Unable to init parser" msgstr "Niet in staat om de parser te initialiseren" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to initialize ADC DMA controller, ErrorCode:%d" -msgstr "" - #: shared-module/displayio/OnDiskBitmap.c msgid "Unable to read color palette data" msgstr "Niet in staat kleurenpalet data te lezen" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to start ADC DMA controller, ErrorCode:%d" -msgstr "" - #: ports/espressif/common-hal/mdns/Server.c #: ports/raspberrypi/common-hal/mdns/Server.c msgid "Unable to start mDNS query" @@ -2348,24 +2324,12 @@ msgstr "Voltage lees time-out" msgid "WARNING: Your code filename has two extensions\n" msgstr "WAARSCHUWING: De bestandsnaam van de code heeft twee extensies\n" -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "WatchDogTimer cannot be deinitialized once mode is set to RESET" msgstr "" "WatchDogTimer kan niet worden gedeïnitialiseerd zodra de modus in ingesteld " "op RESET" -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer is not currently running" -msgstr "WatchDogTimer is momenteel niet actief" - -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer.mode cannot be changed once set to WatchDogMode.RESET" -msgstr "" -"WatchDogTimer.mode kan niet worden gewijzigd zodra de modus is ingesteld op " -"WatchDogMode.RESET" - #: py/builtinhelp.c #, c-format msgid "" @@ -4129,10 +4093,7 @@ msgstr "syntaxisfout in JSON" msgid "syntax error in uctypes descriptor" msgstr "syntaxisfout in uctypes aanduiding" -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "timeout duration exceeded the maximum supported value" msgstr "time-outduur is groter dan de ondersteunde maximale waarde" @@ -4239,7 +4200,8 @@ msgstr "onverwachte inspringing" msgid "unexpected keyword argument" msgstr "onverwacht trefwoordargument" -#: py/bc.c py/objnamedtuple.c shared-bindings/traceback/__init__.c +#: py/argcheck.c py/bc.c py/objnamedtuple.c +#: shared-bindings/traceback/__init__.c msgid "unexpected keyword argument '%q'" msgstr "onverwacht trefwoordargument '%q'" @@ -4333,10 +4295,6 @@ msgstr "waarde moet in %d byte(s) passen" msgid "value out of range of target" msgstr "" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "watchdog not initialized" -msgstr "watchdog niet geïnitialiseerd" - #: shared-bindings/is31fl3741/FrameBuffer.c msgid "width must be greater than zero" msgstr "breedte moet groter dan nul zijn" @@ -4396,10 +4354,6 @@ msgstr "verkeerd aantal waarden om uit te pakken" msgid "wrong output type" msgstr "onjuist uitvoer type" -#: ports/espressif/common-hal/audiobusio/__init__.c -msgid "xTaskCreate failed" -msgstr "" - #: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be an ndarray" msgstr "zi moet een ndarray zijn" @@ -4412,6 +4366,23 @@ msgstr "zi moet van type float zijn" msgid "zi must be of shape (n_section, 2)" msgstr "zi moet vorm (n_section, 2) hebben" +#~ msgid "Initialization failed due to lack of memory" +#~ msgstr "De initialisatie is mislukt vanwege een gebrek aan geheugen" + +#~ msgid "WatchDogTimer is not currently running" +#~ msgstr "WatchDogTimer is momenteel niet actief" + +#~ msgid "WatchDogTimer.mode cannot be changed once set to WatchDogMode.RESET" +#~ msgstr "" +#~ "WatchDogTimer.mode kan niet worden gewijzigd zodra de modus is ingesteld " +#~ "op WatchDogMode.RESET" + +#~ msgid "watchdog not initialized" +#~ msgstr "watchdog niet geïnitialiseerd" + +#~ msgid "ADC2 is being used by WiFi" +#~ msgstr "ADC2 wordt gebruikt door WiFi" + #~ msgid "queue overflow" #~ msgstr "wachtrij overloop" diff --git a/locale/pl.po b/locale/pl.po index 77e5af1268f4..230e11033e6c 100644 --- a/locale/pl.po +++ b/locale/pl.po @@ -198,6 +198,10 @@ msgstr "" msgid "%q must be <= %d" msgstr "" +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c +msgid "%q must be <= %u" +msgstr "" + #: py/argcheck.c msgid "%q must be >= %d" msgstr "" @@ -449,10 +453,6 @@ msgstr "3-argumentowy pow() jest niewspierany" msgid "A hardware interrupt channel is already in use" msgstr "Kanał przerwań sprzętowych w użyciu" -#: ports/espressif/common-hal/analogio/AnalogIn.c -msgid "ADC2 is being used by WiFi" -msgstr "ADC2 jest używany przez WiFi" - #: ports/raspberrypi/common-hal/wifi/Radio.c msgid "AP could not be started" msgstr "" @@ -1174,10 +1174,6 @@ msgstr "" msgid "Initial set pin state conflicts with initial out pin state" msgstr "" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "Initialization failed due to lack of memory" -msgstr "Inicjalizacja nie powiodła się z powodu braku pamięci" - #: shared-bindings/bitops/__init__.c #, c-format msgid "Input buffer length (%d) must be a multiple of the strand count (%d)" @@ -1812,11 +1808,6 @@ msgstr "" msgid "Pull not used when direction is output." msgstr "Podciągnięcie nieużywane w trybie wyjścia." -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c -msgid "RAISE mode is not implemented" -msgstr "" - #: ports/raspberrypi/common-hal/countio/Counter.c msgid "RISE_AND_FALL not available on this chip" msgstr "" @@ -2162,11 +2153,6 @@ msgstr "Nie udała się alokacja buforów do konwersji ze znakiem" msgid "Unable to allocate the heap." msgstr "" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to configure ADC DMA controller, ErrorCode:%d" -msgstr "" - #: ports/espressif/common-hal/busio/I2C.c msgid "Unable to create lock" msgstr "" @@ -2185,20 +2171,10 @@ msgstr "Brak wolnego GCLK" msgid "Unable to init parser" msgstr "Błąd ustawienia parsera" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to initialize ADC DMA controller, ErrorCode:%d" -msgstr "" - #: shared-module/displayio/OnDiskBitmap.c msgid "Unable to read color palette data" msgstr "Nie można odczytać danych palety" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to start ADC DMA controller, ErrorCode:%d" -msgstr "" - #: ports/espressif/common-hal/mdns/Server.c #: ports/raspberrypi/common-hal/mdns/Server.c msgid "Unable to start mDNS query" @@ -2333,20 +2309,10 @@ msgstr "" msgid "WARNING: Your code filename has two extensions\n" msgstr "UWAGA: Nazwa pliku ma dwa rozszerzenia\n" -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "WatchDogTimer cannot be deinitialized once mode is set to RESET" msgstr "" -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer is not currently running" -msgstr "" - -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer.mode cannot be changed once set to WatchDogMode.RESET" -msgstr "" - #: py/builtinhelp.c #, c-format msgid "" @@ -4104,10 +4070,7 @@ msgstr "błąd składni w JSON" msgid "syntax error in uctypes descriptor" msgstr "błąd składni w deskryptorze uctypes" -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "timeout duration exceeded the maximum supported value" msgstr "" @@ -4214,7 +4177,8 @@ msgstr "złe wcięcie" msgid "unexpected keyword argument" msgstr "zły argument nazwany" -#: py/bc.c py/objnamedtuple.c shared-bindings/traceback/__init__.c +#: py/argcheck.c py/bc.c py/objnamedtuple.c +#: shared-bindings/traceback/__init__.c msgid "unexpected keyword argument '%q'" msgstr "zły argument nazwany '%q'" @@ -4308,10 +4272,6 @@ msgstr "wartość musi mieścić się w %d bajtach" msgid "value out of range of target" msgstr "" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "watchdog not initialized" -msgstr "" - #: shared-bindings/is31fl3741/FrameBuffer.c msgid "width must be greater than zero" msgstr "szerokość musi być większa niż zero" @@ -4371,10 +4331,6 @@ msgstr "zła liczba wartości do rozpakowania" msgid "wrong output type" msgstr "nieprawidłowy typ wyjścia" -#: ports/espressif/common-hal/audiobusio/__init__.c -msgid "xTaskCreate failed" -msgstr "" - #: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be an ndarray" msgstr "" @@ -4387,6 +4343,12 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "Initialization failed due to lack of memory" +#~ msgstr "Inicjalizacja nie powiodła się z powodu braku pamięci" + +#~ msgid "ADC2 is being used by WiFi" +#~ msgstr "ADC2 jest używany przez WiFi" + #~ msgid "queue overflow" #~ msgstr "przepełnienie kolejki" diff --git a/locale/pt_BR.po b/locale/pt_BR.po index a3bbce96539f..644de87ae41c 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2023-09-10 08:50+0000\n" +"PO-Revision-Date: 2023-10-05 03:10+0000\n" "Last-Translator: Wellington Terumi Uemura \n" "Language-Team: \n" "Language: pt_BR\n" @@ -14,7 +14,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n > 1;\n" -"X-Generator: Weblate 5.0.1-dev\n" +"X-Generator: Weblate 5.1-dev\n" #: main.c msgid "" @@ -209,6 +209,10 @@ msgstr "%q deve ser 1 quando %q for verdadeiro" msgid "%q must be <= %d" msgstr "%q deve ser <= %d" +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c +msgid "%q must be <= %u" +msgstr "%q deve ser <= %u" + #: py/argcheck.c msgid "%q must be >= %d" msgstr "o %q deve ser >= %d" @@ -464,10 +468,6 @@ msgstr "3-arg pow() não compatível" msgid "A hardware interrupt channel is already in use" msgstr "Um canal de interrupção de hardware já está em uso" -#: ports/espressif/common-hal/analogio/AnalogIn.c -msgid "ADC2 is being used by WiFi" -msgstr "O ADC2 está sendo usado pelo WiFi" - #: ports/raspberrypi/common-hal/wifi/Radio.c msgid "AP could not be started" msgstr "Não foi possível iniciar o AP" @@ -1206,10 +1206,6 @@ msgstr "" "A definição do estado inicial do pino está em conflito com estado do inicial " "do pino" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "Initialization failed due to lack of memory" -msgstr "A inicialização falhou devido à falta de memória" - #: shared-bindings/bitops/__init__.c #, c-format msgid "Input buffer length (%d) must be a multiple of the strand count (%d)" @@ -1864,11 +1860,6 @@ msgstr "Programa muito longo" msgid "Pull not used when direction is output." msgstr "O Pull não foi usado quando a direção for gerada." -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c -msgid "RAISE mode is not implemented" -msgstr "O modo RAISE não foi implementado" - #: ports/raspberrypi/common-hal/countio/Counter.c msgid "RISE_AND_FALL not available on this chip" msgstr "RISE_AND_FALL não está disponível neste chip" @@ -2222,11 +2213,6 @@ msgstr "Não é possível alocar buffers para conversão assinada" msgid "Unable to allocate the heap." msgstr "Não é possível alocar a área de alocação dinâmica de variáveis." -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to configure ADC DMA controller, ErrorCode:%d" -msgstr "Não foi possível configurar o controlador ADC DMA, ErrorCode:%d" - #: ports/espressif/common-hal/busio/I2C.c msgid "Unable to create lock" msgstr "Não é possível criar um lock" @@ -2245,20 +2231,10 @@ msgstr "Não é possível encontrar GCLK livre" msgid "Unable to init parser" msgstr "Não foi possível iniciar o analisador" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to initialize ADC DMA controller, ErrorCode:%d" -msgstr "Não foi possível inicializar o controlador ADC DMA, ErrorCode:%d" - #: shared-module/displayio/OnDiskBitmap.c msgid "Unable to read color palette data" msgstr "Não foi possível ler os dados da paleta de cores" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to start ADC DMA controller, ErrorCode:%d" -msgstr "Não foi possível iniciar o controlador ADC DMA, ErrorCode:%d" - #: ports/espressif/common-hal/mdns/Server.c #: ports/raspberrypi/common-hal/mdns/Server.c msgid "Unable to start mDNS query" @@ -2395,24 +2371,12 @@ msgstr "O tempo limite de leitura da tensão expirou" msgid "WARNING: Your code filename has two extensions\n" msgstr "AVISO: Seu arquivo de código tem duas extensões\n" -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "WatchDogTimer cannot be deinitialized once mode is set to RESET" msgstr "" "O WatchDogTimer não pode ser não-inicializado uma vez que o modo é definido " "como RESET" -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer is not currently running" -msgstr "O WatchDogTimer não está em execução" - -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer.mode cannot be changed once set to WatchDogMode.RESET" -msgstr "" -"O WatchDogTimer.mode não pode ser alterado uma vez definido para " -"WatchDogMode.RESET" - #: py/builtinhelp.c #, c-format msgid "" @@ -4196,10 +4160,7 @@ msgstr "erro de sintaxe no JSON" msgid "syntax error in uctypes descriptor" msgstr "houve um erro de sintaxe no descritor uctypes" -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "timeout duration exceeded the maximum supported value" msgstr "a duração do tempo limite excedeu o valor máximo suportado" @@ -4306,7 +4267,8 @@ msgstr "recuo inesperado" msgid "unexpected keyword argument" msgstr "argumento inesperado da palavra-chave" -#: py/bc.c py/objnamedtuple.c shared-bindings/traceback/__init__.c +#: py/argcheck.c py/bc.c py/objnamedtuple.c +#: shared-bindings/traceback/__init__.c msgid "unexpected keyword argument '%q'" msgstr "argumento inesperado da palavra-chave '%q'" @@ -4400,10 +4362,6 @@ msgstr "o valor deve caber em %d byte(s)" msgid "value out of range of target" msgstr "valor fora do alcance do alvo" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "watchdog not initialized" -msgstr "o watchdog não foi inicializado" - #: shared-bindings/is31fl3741/FrameBuffer.c msgid "width must be greater than zero" msgstr "a largura deve ser maior que zero" @@ -4463,10 +4421,6 @@ msgstr "quantidade incorreta dos valores para descompressão" msgid "wrong output type" msgstr "tipo da saída incorreta" -#: ports/espressif/common-hal/audiobusio/__init__.c -msgid "xTaskCreate failed" -msgstr "o xTaskCreate falhou" - #: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be an ndarray" msgstr "zi deve ser um ndarray" @@ -4479,6 +4433,41 @@ msgstr "zi deve ser de um tipo float" msgid "zi must be of shape (n_section, 2)" msgstr "zi deve estar na forma (n_section, 2)" +#~ msgid "Initialization failed due to lack of memory" +#~ msgstr "A inicialização falhou devido à falta de memória" + +#~ msgid "RAISE mode is not implemented" +#~ msgstr "O modo RAISE não foi implementado" + +#~ msgid "WatchDogTimer is not currently running" +#~ msgstr "O WatchDogTimer não está em execução" + +#~ msgid "WatchDogTimer.mode cannot be changed once set to WatchDogMode.RESET" +#~ msgstr "" +#~ "O WatchDogTimer.mode não pode ser alterado uma vez definido para " +#~ "WatchDogMode.RESET" + +#~ msgid "watchdog not initialized" +#~ msgstr "o watchdog não foi inicializado" + +#~ msgid "ADC2 is being used by WiFi" +#~ msgstr "O ADC2 está sendo usado pelo WiFi" + +#, c-format +#~ msgid "Unable to configure ADC DMA controller, ErrorCode:%d" +#~ msgstr "Não foi possível configurar o controlador ADC DMA, ErrorCode:%d" + +#, c-format +#~ msgid "Unable to initialize ADC DMA controller, ErrorCode:%d" +#~ msgstr "Não foi possível inicializar o controlador ADC DMA, ErrorCode:%d" + +#, c-format +#~ msgid "Unable to start ADC DMA controller, ErrorCode:%d" +#~ msgstr "Não foi possível iniciar o controlador ADC DMA, ErrorCode:%d" + +#~ msgid "xTaskCreate failed" +#~ msgstr "o xTaskCreate falhou" + #~ msgid "Unable to write to address." #~ msgstr "Não é possível gravar no endereço." diff --git a/locale/ru.po b/locale/ru.po index 7f4b6088bb99..2ccbb57ec4c3 100644 --- a/locale/ru.po +++ b/locale/ru.po @@ -211,6 +211,10 @@ msgstr "%q должен быть равен 1, если %q имеет значе msgid "%q must be <= %d" msgstr "%q должно быть <= %d" +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c +msgid "%q must be <= %u" +msgstr "" + #: py/argcheck.c msgid "%q must be >= %d" msgstr "%q должно быть >= %d" @@ -463,10 +467,6 @@ msgstr "Pow() с 3 аргументами не поддерживается" msgid "A hardware interrupt channel is already in use" msgstr "Канал аппаратного прерывания уже используется" -#: ports/espressif/common-hal/analogio/AnalogIn.c -msgid "ADC2 is being used by WiFi" -msgstr "ADC2 используется WiFi" - #: ports/raspberrypi/common-hal/wifi/Radio.c msgid "AP could not be started" msgstr "AP не может быть запущен" @@ -1215,10 +1215,6 @@ msgstr "" "Исходное установленное состояние контакта конфликтует с исходным состоянием " "выхода" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "Initialization failed due to lack of memory" -msgstr "Инициализация не удалась из-за нехватки памяти" - #: shared-bindings/bitops/__init__.c #, c-format msgid "Input buffer length (%d) must be a multiple of the strand count (%d)" @@ -1869,11 +1865,6 @@ msgstr "Слишком длинная программа" msgid "Pull not used when direction is output." msgstr "Тяга не используется, когда выводится направление." -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c -msgid "RAISE mode is not implemented" -msgstr "Режим RAISE не реализован" - #: ports/raspberrypi/common-hal/countio/Counter.c msgid "RISE_AND_FALL not available on this chip" msgstr "RISE_AND_FALL недоступен на этом чипе" @@ -2224,11 +2215,6 @@ msgstr "Не удается выделить буферы для подписа msgid "Unable to allocate the heap." msgstr "Невозможно выделить кучу." -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to configure ADC DMA controller, ErrorCode:%d" -msgstr "Невозможно настроить контроллер ADC DMA, код ошибки:%d" - #: ports/espressif/common-hal/busio/I2C.c msgid "Unable to create lock" msgstr "Не удается создать блокировку" @@ -2247,20 +2233,10 @@ msgstr "Не удается найти бесплатный GCLK" msgid "Unable to init parser" msgstr "Не удается инициировать синтаксический анализатор" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to initialize ADC DMA controller, ErrorCode:%d" -msgstr "Невозможно инициализировать контроллер ADC DMA, код ошибки:%d" - #: shared-module/displayio/OnDiskBitmap.c msgid "Unable to read color palette data" msgstr "Не удается прочитать данные цветовой палитры" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to start ADC DMA controller, ErrorCode:%d" -msgstr "Не удается запустить контроллер ADC DMA, код ошибки:%d" - #: ports/espressif/common-hal/mdns/Server.c #: ports/raspberrypi/common-hal/mdns/Server.c msgid "Unable to start mDNS query" @@ -2398,24 +2374,12 @@ msgstr "Истекло время ожидания считывания напр msgid "WARNING: Your code filename has two extensions\n" msgstr "ВНИМАНИЕ: Имя файла кода имеет два расширения\n" -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "WatchDogTimer cannot be deinitialized once mode is set to RESET" msgstr "" "Сторожевой таймер не может быть деинициализирован, если установлен режим " "RESET" -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer is not currently running" -msgstr "Таймер Watch Dog в настоящее время не работает" - -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer.mode cannot be changed once set to WatchDogMode.RESET" -msgstr "" -"WatchDogTimer.mode не может быть изменен после установки значения " -"WatchDogMode.RESET" - #: py/builtinhelp.c #, c-format msgid "" @@ -4202,10 +4166,7 @@ msgstr "синтаксис ошибка в JSON" msgid "syntax error in uctypes descriptor" msgstr "Синтаксическая ошибка в дескрипторе UCTYPES" -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "timeout duration exceeded the maximum supported value" msgstr "" "Продолжительность таймаута превысила максимальное поддерживаемое значение" @@ -4314,7 +4275,8 @@ msgstr "Неожиданный отступ" msgid "unexpected keyword argument" msgstr "Неожиданный аргумент ключевого слова" -#: py/bc.c py/objnamedtuple.c shared-bindings/traceback/__init__.c +#: py/argcheck.c py/bc.c py/objnamedtuple.c +#: shared-bindings/traceback/__init__.c msgid "unexpected keyword argument '%q'" msgstr "неожиданный аргумент ключевого слова '%q'" @@ -4408,10 +4370,6 @@ msgstr "Значение должно совпадать с байтами %d" msgid "value out of range of target" msgstr "Величина выходящая за пределы диапазона цели" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "watchdog not initialized" -msgstr "Сторожевой таймер не инициализирован" - #: shared-bindings/is31fl3741/FrameBuffer.c msgid "width must be greater than zero" msgstr "ширина должна быть больше нуля" @@ -4471,10 +4429,6 @@ msgstr "Неправильное количество значений для р msgid "wrong output type" msgstr "неверный тип вывода" -#: ports/espressif/common-hal/audiobusio/__init__.c -msgid "xTaskCreate failed" -msgstr "x Создать задачу не удалось" - #: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be an ndarray" msgstr "зи, должно быть, массивом ndarray" @@ -4487,6 +4441,41 @@ msgstr "zi должно быть типа float" msgid "zi must be of shape (n_section, 2)" msgstr "zi должен иметь форму (n_section, 2)" +#~ msgid "Initialization failed due to lack of memory" +#~ msgstr "Инициализация не удалась из-за нехватки памяти" + +#~ msgid "RAISE mode is not implemented" +#~ msgstr "Режим RAISE не реализован" + +#~ msgid "WatchDogTimer is not currently running" +#~ msgstr "Таймер Watch Dog в настоящее время не работает" + +#~ msgid "WatchDogTimer.mode cannot be changed once set to WatchDogMode.RESET" +#~ msgstr "" +#~ "WatchDogTimer.mode не может быть изменен после установки значения " +#~ "WatchDogMode.RESET" + +#~ msgid "watchdog not initialized" +#~ msgstr "Сторожевой таймер не инициализирован" + +#~ msgid "ADC2 is being used by WiFi" +#~ msgstr "ADC2 используется WiFi" + +#, c-format +#~ msgid "Unable to configure ADC DMA controller, ErrorCode:%d" +#~ msgstr "Невозможно настроить контроллер ADC DMA, код ошибки:%d" + +#, c-format +#~ msgid "Unable to initialize ADC DMA controller, ErrorCode:%d" +#~ msgstr "Невозможно инициализировать контроллер ADC DMA, код ошибки:%d" + +#, c-format +#~ msgid "Unable to start ADC DMA controller, ErrorCode:%d" +#~ msgstr "Не удается запустить контроллер ADC DMA, код ошибки:%d" + +#~ msgid "xTaskCreate failed" +#~ msgstr "x Создать задачу не удалось" + #~ msgid "Unable to write to address." #~ msgstr "Невозможно написать на адрес." diff --git a/locale/sv.po b/locale/sv.po index 90ba90457a5a..c4d00bd3d6b6 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2023-09-10 08:50+0000\n" +"PO-Revision-Date: 2023-10-03 15:21+0000\n" "Last-Translator: Jonny Bergdahl \n" "Language-Team: LANGUAGE \n" "Language: sv\n" @@ -14,7 +14,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 5.0.1-dev\n" +"X-Generator: Weblate 5.1-dev\n" #: main.c msgid "" @@ -208,6 +208,10 @@ msgstr "%q måste vara 1 när %q är sann" msgid "%q must be <= %d" msgstr "%q måste vara <= %d" +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c +msgid "%q must be <= %u" +msgstr "%q måste vara <= %u" + #: py/argcheck.c msgid "%q must be >= %d" msgstr "%q måste vara >= %d" @@ -461,10 +465,6 @@ msgstr "3-arguments pow() stöds inte" msgid "A hardware interrupt channel is already in use" msgstr "En kanal för hårdvaruavbrott används redan" -#: ports/espressif/common-hal/analogio/AnalogIn.c -msgid "ADC2 is being used by WiFi" -msgstr "ADC2 används av WiFi" - #: ports/raspberrypi/common-hal/wifi/Radio.c msgid "AP could not be started" msgstr "Kunde inte starta AP" @@ -1193,10 +1193,6 @@ msgstr "" "Initial inställning av pinntillstånd är i konflikt med initialt " "utpinntillstånd" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "Initialization failed due to lack of memory" -msgstr "Initieringen misslyckades på grund av minnesbrist" - #: shared-bindings/bitops/__init__.c #, c-format msgid "Input buffer length (%d) must be a multiple of the strand count (%d)" @@ -1844,11 +1840,6 @@ msgstr "Programmet är för långt" msgid "Pull not used when direction is output." msgstr "Pull används inte när riktningen är output." -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c -msgid "RAISE mode is not implemented" -msgstr "RAISE-läge är inte implementerat" - #: ports/raspberrypi/common-hal/countio/Counter.c msgid "RISE_AND_FALL not available on this chip" msgstr "RISE_AND_FALL är inte tillgängligt på detta chip" @@ -2196,11 +2187,6 @@ msgstr "Det går inte att allokera buffert för signerad konvertering" msgid "Unable to allocate the heap." msgstr "Kan inte allokera heap." -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to configure ADC DMA controller, ErrorCode:%d" -msgstr "Kan inte konfigurera ADC DMA controller, Felkod:%d" - #: ports/espressif/common-hal/busio/I2C.c msgid "Unable to create lock" msgstr "Kan inte skapa lås" @@ -2219,20 +2205,10 @@ msgstr "Det gick inte att hitta ledig GCLK" msgid "Unable to init parser" msgstr "Kan inte initiera tolken" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to initialize ADC DMA controller, ErrorCode:%d" -msgstr "Kan inte inititiera ADC DMA-controller, Felkod:%d" - #: shared-module/displayio/OnDiskBitmap.c msgid "Unable to read color palette data" msgstr "Det går inte att läsa färgpalettdata" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to start ADC DMA controller, ErrorCode:%d" -msgstr "Kan inte starta ADC DMA controller, Felkod:%d" - #: ports/espressif/common-hal/mdns/Server.c #: ports/raspberrypi/common-hal/mdns/Server.c msgid "Unable to start mDNS query" @@ -2369,21 +2345,10 @@ msgstr "Avläsning av spänning tog för lång tid" msgid "WARNING: Your code filename has two extensions\n" msgstr "VARNING: Ditt filnamn för kod har två tillägg\n" -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "WatchDogTimer cannot be deinitialized once mode is set to RESET" msgstr "WatchDogTimer kan inte avinitialiseras när läget är inställt på RESET" -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer is not currently running" -msgstr "WatchDogTimer körs för närvarande inte" - -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer.mode cannot be changed once set to WatchDogMode.RESET" -msgstr "" -"WatchDogTimer.mode kan inte ändras när den är inställd på WatchDogMode.RESET" - #: py/builtinhelp.c #, c-format msgid "" @@ -4155,10 +4120,7 @@ msgstr "syntaxfel i JSON" msgid "syntax error in uctypes descriptor" msgstr "syntaxfel i uctypes deskriptor" -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "timeout duration exceeded the maximum supported value" msgstr "timeout-längd överskred det maximala värde som stöds" @@ -4265,7 +4227,8 @@ msgstr "oväntat indrag" msgid "unexpected keyword argument" msgstr "oväntat nyckelordsargument" -#: py/bc.c py/objnamedtuple.c shared-bindings/traceback/__init__.c +#: py/argcheck.c py/bc.c py/objnamedtuple.c +#: shared-bindings/traceback/__init__.c msgid "unexpected keyword argument '%q'" msgstr "oväntat nyckelordsargument '%q'" @@ -4359,10 +4322,6 @@ msgstr "värdet måste passa i %d byte(s)" msgid "value out of range of target" msgstr "värde utanför målintervall" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "watchdog not initialized" -msgstr "watchdog är inte initierad" - #: shared-bindings/is31fl3741/FrameBuffer.c msgid "width must be greater than zero" msgstr "width måste vara större än noll" @@ -4422,10 +4381,6 @@ msgstr "fel antal värden för att packa upp" msgid "wrong output type" msgstr "fel utdatatyp" -#: ports/espressif/common-hal/audiobusio/__init__.c -msgid "xTaskCreate failed" -msgstr "xTaskCreate misslyckades" - #: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be an ndarray" msgstr "zi måste vara en ndarray" @@ -4438,6 +4393,41 @@ msgstr "zi måste vara av typ float" msgid "zi must be of shape (n_section, 2)" msgstr "zi måste vara i formen (n_section, 2)" +#~ msgid "Initialization failed due to lack of memory" +#~ msgstr "Initieringen misslyckades på grund av minnesbrist" + +#~ msgid "RAISE mode is not implemented" +#~ msgstr "RAISE-läge är inte implementerat" + +#~ msgid "WatchDogTimer is not currently running" +#~ msgstr "WatchDogTimer körs för närvarande inte" + +#~ msgid "WatchDogTimer.mode cannot be changed once set to WatchDogMode.RESET" +#~ msgstr "" +#~ "WatchDogTimer.mode kan inte ändras när den är inställd på WatchDogMode." +#~ "RESET" + +#~ msgid "watchdog not initialized" +#~ msgstr "watchdog är inte initierad" + +#~ msgid "ADC2 is being used by WiFi" +#~ msgstr "ADC2 används av WiFi" + +#, c-format +#~ msgid "Unable to configure ADC DMA controller, ErrorCode:%d" +#~ msgstr "Kan inte konfigurera ADC DMA controller, Felkod:%d" + +#, c-format +#~ msgid "Unable to initialize ADC DMA controller, ErrorCode:%d" +#~ msgstr "Kan inte inititiera ADC DMA-controller, Felkod:%d" + +#, c-format +#~ msgid "Unable to start ADC DMA controller, ErrorCode:%d" +#~ msgstr "Kan inte starta ADC DMA controller, Felkod:%d" + +#~ msgid "xTaskCreate failed" +#~ msgstr "xTaskCreate misslyckades" + #~ msgid "Unable to write to address." #~ msgstr "Det går inte att skriva till adress." diff --git a/locale/tr.po b/locale/tr.po index 66aee1321d9c..eb715370e875 100644 --- a/locale/tr.po +++ b/locale/tr.po @@ -204,6 +204,10 @@ msgstr "%q 1 olmalı, %q True olduğu zaman" msgid "%q must be <= %d" msgstr "%q <= %d olmalıdır" +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c +msgid "%q must be <= %u" +msgstr "" + #: py/argcheck.c msgid "%q must be >= %d" msgstr "%q >= %d olmalıdır" @@ -456,10 +460,6 @@ msgstr "3-argümanlı pow() desteklenmemektedir" msgid "A hardware interrupt channel is already in use" msgstr "Bir donanım kesme kanalı halihazırda kullanılmaktadır" -#: ports/espressif/common-hal/analogio/AnalogIn.c -msgid "ADC2 is being used by WiFi" -msgstr "ADC2, WiFi tarafından kullanılmaktadır" - #: ports/raspberrypi/common-hal/wifi/Radio.c msgid "AP could not be started" msgstr "" @@ -1184,10 +1184,6 @@ msgstr "İlk pin yönü, ilk çıkış pin yönüyle çakışıyor" msgid "Initial set pin state conflicts with initial out pin state" msgstr "İlk pinin durumu, ilk çıkış pininin durumu ile çakışıyor" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "Initialization failed due to lack of memory" -msgstr "Bellek yetersizliği nedeniyle başlatma başarısız oldu" - #: shared-bindings/bitops/__init__.c #, c-format msgid "Input buffer length (%d) must be a multiple of the strand count (%d)" @@ -1826,11 +1822,6 @@ msgstr "" msgid "Pull not used when direction is output." msgstr "" -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c -msgid "RAISE mode is not implemented" -msgstr "" - #: ports/raspberrypi/common-hal/countio/Counter.c msgid "RISE_AND_FALL not available on this chip" msgstr "" @@ -2176,11 +2167,6 @@ msgstr "" msgid "Unable to allocate the heap." msgstr "" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to configure ADC DMA controller, ErrorCode:%d" -msgstr "" - #: ports/espressif/common-hal/busio/I2C.c msgid "Unable to create lock" msgstr "" @@ -2199,20 +2185,10 @@ msgstr "" msgid "Unable to init parser" msgstr "" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to initialize ADC DMA controller, ErrorCode:%d" -msgstr "" - #: shared-module/displayio/OnDiskBitmap.c msgid "Unable to read color palette data" msgstr "" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to start ADC DMA controller, ErrorCode:%d" -msgstr "" - #: ports/espressif/common-hal/mdns/Server.c #: ports/raspberrypi/common-hal/mdns/Server.c msgid "Unable to start mDNS query" @@ -2347,20 +2323,10 @@ msgstr "" msgid "WARNING: Your code filename has two extensions\n" msgstr "" -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "WatchDogTimer cannot be deinitialized once mode is set to RESET" msgstr "" -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer is not currently running" -msgstr "" - -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer.mode cannot be changed once set to WatchDogMode.RESET" -msgstr "" - #: py/builtinhelp.c #, c-format msgid "" @@ -4117,10 +4083,7 @@ msgstr "" msgid "syntax error in uctypes descriptor" msgstr "" -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "timeout duration exceeded the maximum supported value" msgstr "" @@ -4227,7 +4190,8 @@ msgstr "" msgid "unexpected keyword argument" msgstr "" -#: py/bc.c py/objnamedtuple.c shared-bindings/traceback/__init__.c +#: py/argcheck.c py/bc.c py/objnamedtuple.c +#: shared-bindings/traceback/__init__.c msgid "unexpected keyword argument '%q'" msgstr "" @@ -4321,10 +4285,6 @@ msgstr "" msgid "value out of range of target" msgstr "" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "watchdog not initialized" -msgstr "" - #: shared-bindings/is31fl3741/FrameBuffer.c msgid "width must be greater than zero" msgstr "" @@ -4384,10 +4344,6 @@ msgstr "" msgid "wrong output type" msgstr "" -#: ports/espressif/common-hal/audiobusio/__init__.c -msgid "xTaskCreate failed" -msgstr "" - #: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be an ndarray" msgstr "" @@ -4400,6 +4356,12 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "Initialization failed due to lack of memory" +#~ msgstr "Bellek yetersizliği nedeniyle başlatma başarısız oldu" + +#~ msgid "ADC2 is being used by WiFi" +#~ msgstr "ADC2, WiFi tarafından kullanılmaktadır" + #~ msgid "'coroutine' object is not an iterator" #~ msgstr "'coroutine' nesnesi bir iteratör değildir" diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index 09527f8b87f6..27499137aac5 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: circuitpython-cn\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2023-08-29 18:34+0000\n" +"PO-Revision-Date: 2023-09-13 17:49+0000\n" "Last-Translator: hexthat \n" "Language-Team: Chinese Hanyu Pinyin\n" "Language: zh_Latn_pinyin\n" @@ -210,6 +210,10 @@ msgstr "sāng %q wèi True shí, %q bìxū wèi 1" msgid "%q must be <= %d" msgstr "%q bìxū <= %d" +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c +msgid "%q must be <= %u" +msgstr "" + #: py/argcheck.c msgid "%q must be >= %d" msgstr "%q bìxū >= %d" @@ -462,10 +466,6 @@ msgstr "bù zhī chí 3-arg pow()" msgid "A hardware interrupt channel is already in use" msgstr "Yìngjiàn zhōngduàn tōngdào yǐ zài shǐyòng zhōng" -#: ports/espressif/common-hal/analogio/AnalogIn.c -msgid "ADC2 is being used by WiFi" -msgstr "ADC2 zhèngzài bèi WiFi shǐ yòng" - #: ports/raspberrypi/common-hal/wifi/Radio.c msgid "AP could not be started" msgstr "wúfǎ qǐdòng AP" @@ -483,7 +483,7 @@ msgstr "bù yǔn xǔ de dì zhǐ fàn wéi" #: shared-bindings/memorymap/AddressRange.c msgid "Address range wraps around" -msgstr "" +msgstr "dìzhǐ fànwéi huánrào" #: ports/espressif/common-hal/canio/CAN.c msgid "All CAN peripherals are in use" @@ -1198,10 +1198,6 @@ msgstr "" "chū shǐ shè zhì yǐn jiǎo zhuàng tài yǔ chū shǐ chū yǐn jiǎo zhuàng tài chōng " "tū" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "Initialization failed due to lack of memory" -msgstr "yóu yú nèi cún bù zú, chū shǐ huà shī bài" - #: shared-bindings/bitops/__init__.c #, c-format msgid "Input buffer length (%d) must be a multiple of the strand count (%d)" @@ -1421,7 +1417,7 @@ msgstr "Bìxū shì %q zi lèi." #: ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.c msgid "Must provide 5/6/5 RGB pins" -msgstr "" +msgstr "bìxū tígòng 5/6/5RGB yǐnjiǎo" #: ports/mimxrt10xx/common-hal/busio/SPI.c shared-bindings/busio/SPI.c msgid "Must provide MISO or MOSI pin" @@ -1847,11 +1843,6 @@ msgstr "chéng xù tài cháng" msgid "Pull not used when direction is output." msgstr "Fāngxiàng shūchū shí Pull méiyǒu shǐyòng." -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c -msgid "RAISE mode is not implemented" -msgstr "wèi shí xiàn tí shēng mó shì" - #: ports/raspberrypi/common-hal/countio/Counter.c msgid "RISE_AND_FALL not available on this chip" msgstr "RISE_AND_FALL zài cǐ xīn piàn shàng bù kě yòng" @@ -2186,7 +2177,7 @@ msgstr "UUID zhí bùshì str,int huò zì jié huǎnchōng qū" #: ports/raspberrypi/common-hal/memorymap/AddressRange.c msgid "Unable to access unaligned IO register" -msgstr "" +msgstr "wúfǎ fǎngwèn wèi duìqí de IO jìcúnqì" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c @@ -2199,11 +2190,6 @@ msgstr "Wúfǎ fēnpèi huǎnchōng qū yòng yú qiānmíng zhuǎnhuàn" msgid "Unable to allocate the heap." msgstr "wú fǎ fēn pèi duī." -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to configure ADC DMA controller, ErrorCode:%d" -msgstr "wú fǎ pèi zhì ADC DMA kòng zhì qì, cuò wù dài mǎ:%d" - #: ports/espressif/common-hal/busio/I2C.c msgid "Unable to create lock" msgstr "Wúfǎ chuàngjiàn suǒ" @@ -2222,20 +2208,10 @@ msgstr "Wúfǎ zhǎodào miǎnfèi de GCLK" msgid "Unable to init parser" msgstr "Wúfǎ chūshǐhuà jiěxī qì" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to initialize ADC DMA controller, ErrorCode:%d" -msgstr "wú fǎ chū shǐ huà ADC DMA kòng zhì qì, cuò wù dài mǎ:%d" - #: shared-module/displayio/OnDiskBitmap.c msgid "Unable to read color palette data" msgstr "Wúfǎ dúqǔ tiáosèbǎn shùjù" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to start ADC DMA controller, ErrorCode:%d" -msgstr "wú fǎ qǐ dòng ADC DMA kòng zhì qì, cuò wù dài mǎ:%d" - #: ports/espressif/common-hal/mdns/Server.c #: ports/raspberrypi/common-hal/mdns/Server.c msgid "Unable to start mDNS query" @@ -2247,7 +2223,7 @@ msgstr "Wúfǎ xiě rù nvm." #: ports/raspberrypi/common-hal/memorymap/AddressRange.c msgid "Unable to write to read-only memory" -msgstr "" +msgstr "wúfǎ xiěrù zhǐdú nèicún" #: shared-bindings/alarm/SleepMemory.c msgid "Unable to write to sleep_memory." @@ -2372,21 +2348,10 @@ msgstr "Diànyā dòu qǔ chāoshí" msgid "WARNING: Your code filename has two extensions\n" msgstr "Jǐnggào: Nǐ de dàimǎ wénjiàn míng yǒu liǎng gè kuòzhǎn míng\n" -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "WatchDogTimer cannot be deinitialized once mode is set to RESET" msgstr "Yīdàn jiāng móshì shèzhì wèi RESET, jiù wúfǎ chūshǐhuà WatchDog Timer" -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer is not currently running" -msgstr "WatchDogTimer dāngqián wèi yùnxíng" - -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer.mode cannot be changed once set to WatchDogMode.RESET" -msgstr "" -"Yīdàn shèzhì wèi WatchDogMode.RESET, zé bùnéng gēnggǎi WatchDogTimer.Mode" - #: py/builtinhelp.c #, c-format msgid "" @@ -4160,10 +4125,7 @@ msgstr "JSON yǔfǎ cuòwù" msgid "syntax error in uctypes descriptor" msgstr "uctypes miáoshù fú zhōng de yǔfǎ cuòwù" -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "timeout duration exceeded the maximum supported value" msgstr "chāoshí shíjiān chāoguò zuìdà zhīchí zhí" @@ -4270,7 +4232,8 @@ msgstr "wèi yùliào de suō jìn" msgid "unexpected keyword argument" msgstr "yìwài de guānjiàn cí cānshù" -#: py/bc.c py/objnamedtuple.c shared-bindings/traceback/__init__.c +#: py/argcheck.c py/bc.c py/objnamedtuple.c +#: shared-bindings/traceback/__init__.c msgid "unexpected keyword argument '%q'" msgstr "yìwài de guānjiàn cí cānshù '%q'" @@ -4364,10 +4327,6 @@ msgstr "Zhí bìxū fúhé %d zì jié" msgid "value out of range of target" msgstr "zhí fàn wéi wài de mù biāo" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "watchdog not initialized" -msgstr "wèi chū shǐ huà jiān shì qì" - #: shared-bindings/is31fl3741/FrameBuffer.c msgid "width must be greater than zero" msgstr "kuāndù bìxū dàyú líng" @@ -4427,10 +4386,6 @@ msgstr "wúfǎ jiě bāo de zhí shù" msgid "wrong output type" msgstr "cuòwù de shūchū lèixíng" -#: ports/espressif/common-hal/audiobusio/__init__.c -msgid "xTaskCreate failed" -msgstr "xTaskCreate shī bài" - #: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be an ndarray" msgstr "zi bìxū shì ndarray" @@ -4443,6 +4398,40 @@ msgstr "zi bìxū wèi fú diǎn xíng" msgid "zi must be of shape (n_section, 2)" msgstr "zi bìxū jùyǒu xíngzhuàng (n_section,2)" +#~ msgid "Initialization failed due to lack of memory" +#~ msgstr "yóu yú nèi cún bù zú, chū shǐ huà shī bài" + +#~ msgid "RAISE mode is not implemented" +#~ msgstr "wèi shí xiàn tí shēng mó shì" + +#~ msgid "WatchDogTimer is not currently running" +#~ msgstr "WatchDogTimer dāngqián wèi yùnxíng" + +#~ msgid "WatchDogTimer.mode cannot be changed once set to WatchDogMode.RESET" +#~ msgstr "" +#~ "Yīdàn shèzhì wèi WatchDogMode.RESET, zé bùnéng gēnggǎi WatchDogTimer.Mode" + +#~ msgid "watchdog not initialized" +#~ msgstr "wèi chū shǐ huà jiān shì qì" + +#~ msgid "ADC2 is being used by WiFi" +#~ msgstr "ADC2 zhèngzài bèi WiFi shǐ yòng" + +#, c-format +#~ msgid "Unable to configure ADC DMA controller, ErrorCode:%d" +#~ msgstr "wú fǎ pèi zhì ADC DMA kòng zhì qì, cuò wù dài mǎ:%d" + +#, c-format +#~ msgid "Unable to initialize ADC DMA controller, ErrorCode:%d" +#~ msgstr "wú fǎ chū shǐ huà ADC DMA kòng zhì qì, cuò wù dài mǎ:%d" + +#, c-format +#~ msgid "Unable to start ADC DMA controller, ErrorCode:%d" +#~ msgstr "wú fǎ qǐ dòng ADC DMA kòng zhì qì, cuò wù dài mǎ:%d" + +#~ msgid "xTaskCreate failed" +#~ msgstr "xTaskCreate shī bài" + #~ msgid "Unable to write to address." #~ msgstr "Wú fǎ xiě rù dì zhǐ." diff --git a/main.c b/main.c index 72f9fd6fab88..3d4d665bebb7 100644 --- a/main.c +++ b/main.c @@ -219,6 +219,10 @@ STATIC void stop_mp(void) { usb_background(); #endif + // Set the qstr pool back to the const pools. The heap allocated ones will + // be overwritten. + qstr_reset(); + gc_deinit(); } @@ -241,6 +245,12 @@ void supervisor_execution_status(void) { } #endif +#if CIRCUITPY_WATCHDOG +pyexec_result_t *pyexec_result(void) { + return &_exec_result; +} +#endif + // Look for the first file that exists in the list of filenames, using mp_import_stat(). // Return its index. If no file found, return -1. STATIC const char *first_existing_file_in_list(const char *const *filenames, size_t n_filenames) { @@ -1190,7 +1200,9 @@ void NORETURN nlr_jump_fail(void *val) { #ifndef NDEBUG static void NORETURN __fatal_error(const char *msg) { + #if CIRCUITPY_DEBUG == 0 reset_into_safe_mode(SAFE_MODE_HARD_FAULT); + #endif while (true) { } } diff --git a/ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c b/ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c index 65d238ce75c8..435cfd6731bc 100644 --- a/ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c +++ b/ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c @@ -30,62 +30,71 @@ #include "shared-bindings/watchdog/__init__.h" #include "shared-bindings/watchdog/WatchDogTimer.h" +#include "shared-bindings/microcontroller/__init__.h" + #include "common-hal/watchdog/WatchDogTimer.h" #include "component/wdt.h" +#define SYNC_CTRL_WRITE while (WDT->SYNCBUSY.reg) {} + +static void watchdog_disable(void) { + // disable watchdog + WDT->CTRLA.reg = 0; + SYNC_CTRL_WRITE +} + +static void watchdog_enable(watchdog_watchdogtimer_obj_t *self) { + // disable watchdog for config + watchdog_disable(); + + int wdt_cycles = (int)(self->timeout * 1024); + if (wdt_cycles < 8) { + wdt_cycles = 8; + } + + // ceil(log2(n)) = 32 - __builtin_clz(n - 1) when n > 1 (if int is 32 bits) + int log2_wdt_cycles = (sizeof(int) * CHAR_BIT) - __builtin_clz(wdt_cycles - 1); + int setting = log2_wdt_cycles - 3; // CYC8_Val is 0 + + OSC32KCTRL->OSCULP32K.bit.EN1K = 1; // Enable out 1K (for WDT) + + WDT->INTENCLR.reg = WDT_INTENCLR_EW; // Disable early warning interrupt + WDT->CONFIG.bit.PER = setting; // Set period for chip reset + WDT->CTRLA.bit.WEN = 0; // Disable window mode + SYNC_CTRL_WRITE + common_hal_watchdog_feed(self); // Clear watchdog interval + WDT->CTRLA.bit.ENABLE = 1; // Start watchdog now! + SYNC_CTRL_WRITE +} + void common_hal_watchdog_feed(watchdog_watchdogtimer_obj_t *self) { WDT->CLEAR.reg = WDT_CLEAR_CLEAR_KEY; } void common_hal_watchdog_deinit(watchdog_watchdogtimer_obj_t *self) { - if (self->mode == WATCHDOGMODE_RESET) { - mp_raise_RuntimeError(translate("WatchDogTimer cannot be deinitialized once mode is set to RESET")); - } else { - self->mode = WATCHDOGMODE_NONE; + if (self->mode == WATCHDOGMODE_NONE) { + return; } + watchdog_disable(); + self->mode = WATCHDOGMODE_NONE; } mp_float_t common_hal_watchdog_get_timeout(watchdog_watchdogtimer_obj_t *self) { return self->timeout; } -STATIC void setup_wdt(watchdog_watchdogtimer_obj_t *self, int setting) { - OSC32KCTRL->OSCULP32K.bit.EN1K = 1; // Enable out 1K (for WDT) - - // disable watchdog for config - WDT->CTRLA.reg = 0; - while (WDT->SYNCBUSY.reg) { // Sync CTRL write - } - - WDT->INTENCLR.reg = WDT_INTENCLR_EW; // Disable early warning interrupt - WDT->CONFIG.bit.PER = setting; // Set period for chip reset - WDT->CTRLA.bit.WEN = 0; // Disable window mode - while (WDT->SYNCBUSY.reg) { // Sync CTRL write - } - common_hal_watchdog_feed(self); // Clear watchdog interval - WDT->CTRLA.bit.ENABLE = 1; // Start watchdog now! - while (WDT->SYNCBUSY.reg) { - } -} - void common_hal_watchdog_set_timeout(watchdog_watchdogtimer_obj_t *self, mp_float_t new_timeout) { - int wdt_cycles = (int)(new_timeout * 1024); - if (wdt_cycles < 8) { - wdt_cycles = 8; - } - if (wdt_cycles > 16384) { - mp_raise_ValueError(translate("timeout duration exceeded the maximum supported value")); + if (!(self->timeout < new_timeout || self->timeout > new_timeout)) { + return; } - // ceil(log2(n)) = 32 - __builtin_clz(n - 1) when n > 1 (if int is 32 bits) - int log2_wdt_cycles = (sizeof(int) * CHAR_BIT) - __builtin_clz(wdt_cycles - 1); - int setting = log2_wdt_cycles - 3; // CYC8_Val is 0 - float timeout = (8 << setting) / 1024.f; + + mp_arg_validate_int_max(new_timeout, 16, MP_QSTR_timeout); + self->timeout = new_timeout; if (self->mode == WATCHDOGMODE_RESET) { - setup_wdt(self, setting); + watchdog_enable(self); } - self->timeout = timeout; } watchdog_watchdogmode_t common_hal_watchdog_get_mode(watchdog_watchdogtimer_obj_t *self) { @@ -93,13 +102,23 @@ watchdog_watchdogmode_t common_hal_watchdog_get_mode(watchdog_watchdogtimer_obj_ } void common_hal_watchdog_set_mode(watchdog_watchdogtimer_obj_t *self, watchdog_watchdogmode_t new_mode) { - if (self->mode != new_mode) { - if (new_mode == WATCHDOGMODE_RAISE) { - mp_raise_NotImplementedError(translate("RAISE mode is not implemented")); - } else if (new_mode == WATCHDOGMODE_NONE) { + if (self->mode == new_mode) { + return; + } + + switch (new_mode) { + case WATCHDOGMODE_NONE: common_hal_watchdog_deinit(self); - } - self->mode = new_mode; - common_hal_watchdog_set_timeout(self, self->timeout); + break; + case WATCHDOGMODE_RAISE: + mp_raise_NotImplementedError(NULL); + break; + case WATCHDOGMODE_RESET: + watchdog_enable(self); + break; + default: + return; } + + self->mode = new_mode; } diff --git a/ports/atmel-samd/common-hal/watchdog/WatchDogTimer.h b/ports/atmel-samd/common-hal/watchdog/WatchDogTimer.h index ce34f0b8ab1e..ae214a95e6b0 100644 --- a/ports/atmel-samd/common-hal/watchdog/WatchDogTimer.h +++ b/ports/atmel-samd/common-hal/watchdog/WatchDogTimer.h @@ -28,6 +28,9 @@ #define MICROPY_INCLUDED_RASPBERRYPI_COMMON_HAL_WATCHDOG_WATCHDOGTIMER_H #include "py/obj.h" + +#include "shared-module/watchdog/__init__.h" + #include "shared-bindings/watchdog/WatchDogMode.h" #include "shared-bindings/watchdog/WatchDogTimer.h" @@ -37,7 +40,4 @@ struct _watchdog_watchdogtimer_obj_t { watchdog_watchdogmode_t mode; }; -// This needs to be called in order to disable the watchdog -// void watchdog_reset(void); - #endif // MICROPY_INCLUDED_RASPBERRYPI_COMMON_HAL_WATCHDOG_WATCHDOGTIMER_H diff --git a/ports/atmel-samd/supervisor/port.c b/ports/atmel-samd/supervisor/port.c index 8ae2d3740e57..4693311d1ad8 100644 --- a/ports/atmel-samd/supervisor/port.c +++ b/ports/atmel-samd/supervisor/port.c @@ -388,13 +388,16 @@ void reset_port(void) { #if CIRCUITPY_BUSIO reset_sercoms(); #endif + #if CIRCUITPY_AUDIOIO audio_dma_reset(); audioout_reset(); #endif + #if CIRCUITPY_AUDIOBUSIO pdmin_reset(); #endif + #if CIRCUITPY_AUDIOBUSIO_I2SOUT i2sout_reset(); #endif @@ -406,14 +409,18 @@ void reset_port(void) { #if CIRCUITPY_TOUCHIO && CIRCUITPY_TOUCHIO_USE_NATIVE touchin_reset(); #endif + eic_reset(); + #if CIRCUITPY_PULSEIO pulsein_reset(); pulseout_reset(); #endif + #if CIRCUITPY_PWMIO pwmout_reset(); #endif + #if CIRCUITPY_PWMIO || CIRCUITPY_AUDIOIO || CIRCUITPY_FREQUENCYIO reset_timers(); #endif @@ -423,6 +430,10 @@ void reset_port(void) { analogout_reset(); #endif + #if CIRCUITPY_WATCHDOG + watchdog_reset(); + #endif + reset_gclks(); #if CIRCUITPY_PEW diff --git a/ports/espressif/CMakeLists.txt b/ports/espressif/CMakeLists.txt index c6d180b57d02..995f8eb76a33 100644 --- a/ports/espressif/CMakeLists.txt +++ b/ports/espressif/CMakeLists.txt @@ -1,14 +1,12 @@ # The following five lines of boilerplate have to be in your project's # CMakeLists in this exact order for cmake to work correctly -cmake_minimum_required(VERSION 3.13) +cmake_minimum_required(VERSION 3.16) set(ENV{IDF_PATH} ${CMAKE_SOURCE_DIR}/esp-idf) -# The component list here determines what options we get in menuconfig and what the ninja file -# can build. -set(COMPONENTS esptool_py soc driver log main esp-tls mbedtls mdns esp_event esp_adc_cal esp_netif esp_wifi lwip ulp wpa_supplicant freertos bt usb esp32-camera esp_lcd) - -list(APPEND EXTRA_COMPONENT_DIRS "esp32-camera") +# The component list here determines what options we get in menuconfig and what the ninja file can build. +set(COMPONENTS bt driver esp-tls esp_adc_cal esp_event esp_netif esp_psram esp_wifi esptool_py freertos log lwip main mbedtls mdns soc ulp usb wpa_supplicant esp-camera esp_lcd) +set(EXTRA_COMPONENT_DIRS "esp-protocols/components/mdns" "esp-camera") include($ENV{IDF_PATH}/tools/cmake/project.cmake) project(circuitpython) diff --git a/ports/espressif/Makefile b/ports/espressif/Makefile index c103a79217cd..0622e6744793 100644 --- a/ports/espressif/Makefile +++ b/ports/espressif/Makefile @@ -27,11 +27,23 @@ include ../../py/circuitpy_mkenv.mk ifeq ($(IDF_TARGET),esp32c3) IDF_TARGET_ARCH = riscv CROSS_COMPILE = riscv32-esp-elf- +else ifeq ($(IDF_TARGET),esp32c6) +IDF_TARGET_ARCH = riscv +CROSS_COMPILE = riscv32-esp-elf- +else ifeq ($(IDF_TARGET),esp32h2) +IDF_TARGET_ARCH = riscv +CROSS_COMPILE = riscv32-esp-elf- else IDF_TARGET_ARCH = xtensa CROSS_COMPILE = xtensa-$(IDF_TARGET)-elf- endif +ifeq ($(IDF_TARGET),esp32s3) +BT_IDF_TARGET = esp32c3 +else +BT_IDF_TARGET = $(IDF_TARGET) +endif + ####################################### # CFLAGS ####################################### @@ -51,39 +63,56 @@ INC += \ -isystem esp-idf \ -isystem esp-idf/components/app_update/include \ -isystem esp-idf/components/bootloader_support/include \ - -isystem esp-idf/components/bt/include/$(IDF_TARGET)/include \ + -isystem esp-idf/components/bootloader_support/bootloader_flash/include \ + -isystem esp-idf/components/bt/include/$(BT_IDF_TARGET)/include \ -isystem esp-idf/components/bt/host/nimble/esp-hci/include \ -isystem esp-idf/components/bt/host/nimble/nimble/nimble/controller/include \ -isystem esp-idf/components/bt/host/nimble/nimble/nimble/host/include \ -isystem esp-idf/components/bt/host/nimble/nimble/nimble/host/services/gap/include \ -isystem esp-idf/components/bt/host/nimble/nimble/nimble/include \ -isystem esp-idf/components/bt/host/nimble/nimble/nimble/host/util/include \ + -isystem esp-idf/components/bt/host/nimble/nimble/nimble/transport/include \ -isystem esp-idf/components/bt/host/nimble/nimble/porting/nimble/include \ -isystem esp-idf/components/bt/host/nimble/nimble/porting/npl/freertos/include \ -isystem esp-idf/components/bt/host/nimble/port/include \ -isystem esp-idf/components/driver/include \ + -isystem esp-idf/components/driver/deprecated \ + -isystem esp-idf/components/driver/dac/include \ + -isystem esp-idf/components/driver/gpio/include \ + -isystem esp-idf/components/driver/i2c/include \ + -isystem esp-idf/components/driver/i2s/include \ -isystem esp-idf/components/driver/$(IDF_TARGET)/include \ + -isystem esp-idf/components/driver/ledc/include \ + -isystem esp-idf/components/driver/spi/include \ + -isystem esp-idf/components/driver/temperature_sensor/include \ + -isystem esp-idf/components/driver/touch_sensor/include \ + -isystem esp-idf/components/driver/touch_sensor/$(IDF_TARGET)/include \ + -isystem esp-idf/components/driver/twai/include \ -isystem esp-idf/components/efuse/include \ -isystem esp-idf/components/efuse/$(IDF_TARGET)/include \ -isystem esp-idf/components/$(IDF_TARGET)/include \ - -isystem esp-idf/components/esp_adc_cal/include \ + -isystem esp-idf/components/esp_adc/include \ + -isystem esp-idf/components/esp_adc/$(IDF_TARGET)/include \ + -isystem esp-idf/components/esp_app_format/include \ -isystem esp-idf/components/esp_common/include \ -isystem esp-idf/components/esp_event/include \ -isystem esp-idf/components/esp_hw_support/include \ -isystem esp-idf/components/esp_hw_support/include/soc \ - -isystem esp-idf/components/esp_ipc/include \ -isystem esp-idf/components/esp_netif/include \ + -isystem esp-idf/components/esp_partition/include \ -isystem esp-idf/components/esp_pm/include \ + -isystem esp-idf/components/esp_psram/include \ -isystem esp-idf/components/esp_ringbuf/include \ -isystem esp-idf/components/esp_rom/include \ -isystem esp-idf/components/esp_system/include \ -isystem esp-idf/components/esp_timer/include \ -isystem esp-idf/components/esp_wifi/include \ - -isystem esp-idf/components/freertos/include \ - -isystem esp-idf/components/freertos/include/freertos \ - -isystem esp-idf/components/freertos/include/esp_additions \ - -isystem esp-idf/components/freertos/include/esp_additions/freertos \ - -isystem esp-idf/components/freertos/port/$(IDF_TARGET_ARCH)/include \ + -isystem esp-idf/components/freertos/esp_additions/include \ + -isystem esp-idf/components/freertos/esp_additions/include/freertos \ + -isystem esp-idf/components/freertos/esp_additions/arch/$(IDF_TARGET_ARCH)/include \ + -isystem esp-idf/components/freertos/FreeRTOS-Kernel/include \ + -isystem esp-idf/components/freertos/FreeRTOS-Kernel/include/freertos \ + -isystem esp-idf/components/freertos/FreeRTOS-Kernel/portable/$(IDF_TARGET_ARCH)/include \ -isystem esp-idf/components/hal/include \ -isystem esp-idf/components/hal/$(IDF_TARGET)/include \ -isystem esp-idf/components/hal/platform_port/include \ @@ -91,7 +120,9 @@ INC += \ -isystem esp-idf/components/log/include \ -isystem esp-idf/components/lwip/include \ -isystem esp-idf/components/lwip/lwip/src/include \ - -isystem esp-idf/components/lwip/port/esp32/include \ + -isystem esp-idf/components/lwip/port/include \ + -isystem esp-idf/components/lwip/port/esp32xx/include \ + -isystem esp-idf/components/lwip/port/freertos/include \ -isystem esp-idf/components/mbedtls/esp_crt_bundle/include \ -isystem esp-idf/components/mbedtls/mbedtls/include \ -isystem esp-idf/components/mbedtls/port/include \ @@ -100,13 +131,13 @@ INC += \ -isystem esp-idf/components/soc/include \ -isystem esp-idf/components/soc/$(IDF_TARGET)/include \ -isystem esp-idf/components/spi_flash/include \ + -isystem esp-idf/components/ulp/ulp_fsm/include \ + -isystem esp-idf/components/ulp/ulp_riscv/include \ + -isystem esp-idf/components/ulp/ulp_common/include \ + -isystem esp-idf/components/ulp/ulp_common/include/$(IDF_TARGET) \ -isystem esp-idf/components/$(IDF_TARGET_ARCH)/include \ - -isystem esp-idf/components/$(IDF_TARGET_ARCH)/$(IDF_TARGET)/include - -# See https://github.com/espressif/esp-idf/issues/6906 -ifeq ($(IDF_TARGET),esp32c3) -CFLAGS += -include "esp32c3_fix.h" -endif + -isystem esp-idf/components/$(IDF_TARGET_ARCH)/$(IDF_TARGET)/include \ + -isystem esp-protocols/components/mdns/include CFLAGS += \ -DHAVE_CONFIG_H \ @@ -131,7 +162,7 @@ ifeq ($(DEBUG), 1) # You may want to enable these flags to make setting breakpoints easier. # CFLAGS += -fno-inline -fno-ipa-sra else - CFLAGS += -DNDEBUG -ggdb3 + CFLAGS += -DNDEBUG # RISC-V is larger than xtensa # Use -Os for RISC-V when it overflows ifeq ($(IDF_TARGET_ARCH),riscv) @@ -146,10 +177,16 @@ CFLAGS += $(OPTIMIZATION_FLAGS) CFLAGS += $(INC) -Werror -Wall -std=gnu11 -Wl,--gc-sections $(BASE_CFLAGS) $(C_DEFS) $(CFLAGS_MOD) $(COPT) -Werror=missing-prototypes +# Most current ESPs have nano versions of newlib in ROM so we use them. +ifneq ($(IDF_TARGET),esp32c6) + CFLAGS += --specs=nano.specs + LDFLAGS += -T$(IDF_TARGET).rom.newlib-nano.ld +endif + ifeq ($(IDF_TARGET_ARCH),xtensa) CFLAGS += -mlongcalls else ifeq ($(IDF_TARGET_ARCH),riscv) -CFLAGS += -march=rv32imc +CFLAGS += -march=rv32imac_zicsr_zifencei endif LDFLAGS = $(CFLAGS) -Wl,-nostdlib -Wl,-Map=$@.map -Wl,-cref -Wl,--undefined=uxTopUsedPriority @@ -164,7 +201,6 @@ LDFLAGS += \ -T$(IDF_TARGET).rom.ld \ -T$(IDF_TARGET).rom.api.ld \ -T$(IDF_TARGET).rom.libgcc.ld \ - -T$(IDF_TARGET).rom.newlib-nano.ld \ -Wl,-Bstatic \ -Wl,--no-warn-mismatch \ -Wl,--build-id=none \ @@ -180,6 +216,20 @@ LDFLAGS += \ -Tesp32c3.rom.newlib.ld \ -Tesp32c3.rom.version.ld \ -Tesp32c3.rom.eco3.ld +else ifeq ($(IDF_TARGET),esp32c6) +LDFLAGS += \ + -Tesp32c6.rom.phy.ld \ + -Tesp32c6.rom.pp.ld \ + -Tesp32c6.rom.net80211.ld \ + -Tesp32c6.rom.newlib.ld \ + -Tesp32c6.rom.coexist.ld \ + -Tesp32c6.rom.heap.ld \ + -Tesp32c6.rom.wdt.ld +else ifeq ($(IDF_TARGET),esp32h2) +LDFLAGS += \ + -Tesp32h2.rom.heap.ld \ + -Tesp32h2.rom.newlib.ld \ + -Tesp32h2.rom.wdt.ld else ifeq ($(IDF_TARGET),esp32s2) LDFLAGS += \ -T$(IDF_TARGET).rom.newlib-data.ld \ @@ -194,7 +244,7 @@ endif LIBS := -lgcc -lc -lstdc++ # Use toolchain libm if we're not using our own. -ifndef INTERNAL_LIBM +ifneq ($(INTERNAL_LIBM),1) LIBS += -lm endif @@ -232,22 +282,19 @@ SRC_C += \ peripherals/timer.c \ peripherals/$(IDF_TARGET)/pins.c -ifneq ($(IDF_TARGET),esp32c3) -SRC_C += \ - peripherals/pcnt.c \ - peripherals/touch.c -ifeq ($(IDF_TARGET),esp32s2) -SRC_C += \ - i2s_lcd_esp32s2_driver.c -endif +SRC_C += $(wildcard common-hal/espidf/*.c) + +ifneq ($(CIRCUITPY_ESP_USB_SERIAL_JTAG),0) +SRC_C += supervisor/usb_serial_jtag.c endif -ifeq ($(IDF_TARGET),esp32c3) -SRC_C += \ - supervisor/usb_serial_jtag.c +ifneq ($(CIRCUITPY_COUNTIO),0) +SRC_C += peripherals/pcnt.c endif -$(BUILD)/i2s_lcd_esp32s2_driver.o: CFLAGS += -Wno-sign-compare +ifneq ($(CIRCUITPY_TOUCHIO_USE_NATIVE),0) +SRC_C += peripherals/touch.c +endif ifneq ($(CIRCUITPY_USB),0) SRC_C += lib/tinyusb/src/portable/espressif/esp32sx/dcd_esp32sx.c @@ -267,8 +314,8 @@ SRC_CAMERA := \ $(wildcard common-hal/espcamera/*.c) \ $(wildcard bindings/espcamera/*.c) SRC_C += $(SRC_CAMERA) -CFLAGS += -isystem esp32-camera/driver/include -CFLAGS += -isystem esp32-camera/conversions/include +CFLAGS += -isystem esp-camera/driver/include +CFLAGS += -isystem esp-camera/conversions/include endif ifneq ($(CIRCUITPY_ESPIDF),0) @@ -290,8 +337,6 @@ SRC_ULP := \ $(wildcard common-hal/espulp/*.c) \ $(wildcard bindings/espulp/*.c) SRC_C += $(SRC_ULP) -CFLAGS += -isystem esp-idf/components/ulp/include -CFLAGS += -isystem esp-idf/components/ulp/ulp_riscv/include endif SRC_COMMON_HAL_EXPANDED = \ @@ -334,16 +379,26 @@ $(BUILD)/esp-idf: TARGET_SDKCONFIG = esp-idf-config/sdkconfig-$(IDF_TARGET).defaults + ifeq ($(CIRCUITPY_ESP_FLASH_SIZE), 2MB) - FLASH_SDKCONFIG ?= esp-idf-config/sdkconfig-$(CIRCUITPY_ESP_FLASH_SIZE)-no-ota-no-uf2.defaults + FLASH_SIZE_SDKCONFIG ?= esp-idf-config/sdkconfig-flash-$(CIRCUITPY_ESP_FLASH_SIZE)-no-ota-no-uf2.defaults else UF2_BOOTLOADER ?= $(CIRCUITPY_USB) ifeq ($(UF2_BOOTLOADER), 1) - FLASH_SDKCONFIG ?= esp-idf-config/sdkconfig-$(CIRCUITPY_ESP_FLASH_SIZE).defaults + FLASH_SIZE_SDKCONFIG ?= esp-idf-config/sdkconfig-flash-$(CIRCUITPY_ESP_FLASH_SIZE).defaults else - FLASH_SDKCONFIG ?= esp-idf-config/sdkconfig-$(CIRCUITPY_ESP_FLASH_SIZE)-no-uf2.defaults + FLASH_SIZE_SDKCONFIG ?= esp-idf-config/sdkconfig-flash-$(CIRCUITPY_ESP_FLASH_SIZE)-no-uf2.defaults endif endif +FLASH_MODE_SDKCONFIG ?= esp-idf-config/sdkconfig-flash-$(CIRCUITPY_ESP_FLASH_MODE).defaults +FLASH_SPEED_SDKCONFIG ?= esp-idf-config/sdkconfig-flash-$(CIRCUITPY_ESP_FLASH_FREQ).defaults + +ifneq ($(CIRCUITPY_ESP_PSRAM_SIZE), 0) + PSRAM_SDKCONFIG = esp-idf-config/sdkconfig-psram.defaults + PSRAM_SIZE_SDKCONFIG = esp-idf-config/sdkconfig-psram-$(CIRCUITPY_ESP_PSRAM_SIZE).defaults + PSRAM_MODE_SDKCONFIG = esp-idf-config/sdkconfig-psram-$(CIRCUITPY_ESP_PSRAM_MODE).defaults + PSRAM_SPEED_SDKCONFIG = esp-idf-config/sdkconfig-psram-$(CIRCUITPY_ESP_PSRAM_FREQ).defaults +endif ifeq ($(DEBUG), 1) DEBUG_SDKCONFIG = esp-idf-config/sdkconfig-debug.defaults @@ -351,7 +406,7 @@ else DEBUG_SDKCONFIG = esp-idf-config/sdkconfig-opt.defaults endif -SDKCONFIGS := esp-idf-config/sdkconfig.defaults;$(DEBUG_SDKCONFIG);$(FLASH_SDKCONFIG);$(TARGET_SDKCONFIG);boards/$(BOARD)/sdkconfig +SDKCONFIGS := esp-idf-config/sdkconfig.defaults;$(DEBUG_SDKCONFIG);$(FLASH_SIZE_SDKCONFIG);$(FLASH_MODE_SDKCONFIG);$(FLASH_SPEED_SDKCONFIG);$(PSRAM_SDKCONFIG);$(PSRAM_SIZE_SDKCONFIG);$(PSRAM_MODE_SDKCONFIG);$(PSRAM_SPEED_SDKCONFIG);$(TARGET_SDKCONFIG);boards/$(BOARD)/sdkconfig ifneq ($(CIRCUITPY_BLEIO),0) SDKCONFIGS := esp-idf-config/sdkconfig-ble.defaults;$(SDKCONFIGS) endif @@ -359,7 +414,7 @@ endif .PHONY: do-sdkconfig do-sdkconfig: $(BUILD)/esp-idf/config/sdkconfig.h QSTR_GLOBAL_REQUIREMENTS += $(BUILD)/esp-idf/config/sdkconfig.h -$(BUILD)/esp-idf/config/sdkconfig.h: boards/$(BOARD)/sdkconfig CMakeLists.txt | $(BUILD)/esp-idf +$(BUILD)/esp-idf/config/sdkconfig.h: boards/$(BOARD)/sdkconfig boards/$(BOARD)/mpconfigboard.mk CMakeLists.txt | $(BUILD)/esp-idf IDF_PATH=$(IDF_PATH) cmake -S . -B $(BUILD)/esp-idf -DSDKCONFIG=$(BUILD)/esp-idf/sdkconfig -DSDKCONFIG_DEFAULTS="$(SDKCONFIGS)" -DCMAKE_TOOLCHAIN_FILE=$(IDF_PATH)/tools/cmake/toolchain-$(IDF_TARGET).cmake -DIDF_TARGET=$(IDF_TARGET) -GNinja # build a lib @@ -379,25 +434,57 @@ $(BUILD)/esp-idf/partition_table/partition-table.bin: $(BUILD)/esp-idf/config/sd # run menuconfig and then remove standard settings menuconfig: $(BUILD)/esp-idf/config $(BUILD)/esp-idf/config/sdkconfig.h $(Q)ninja -C $(BUILD)/esp-idf menuconfig - # Newer versions of the idf will have save-defconfig that will only include non-default values. - # We should use that when available. For now, we sort out everything. python tools/update_sdkconfig.py --board=$(BOARD) --debug=$(DEBUG) -BINARY_WIFI_BLOBS = libcoexist.a libcore.a libespnow.a libmesh.a libnet80211.a libpp.a libsmartconfig.a libwapi.a -BINARY_BLOBS = esp-idf/components/esp_phy/lib/$(IDF_TARGET)/libphy.a $(addprefix esp-idf/components/esp_wifi/lib/$(IDF_TARGET)/, $(BINARY_WIFI_BLOBS)) +update-all-sdkconfigs: $(BUILD)/esp-idf/config/sdkconfig.h + python tools/update_sdkconfig.py --update_all --board=$(BOARD) --debug=$(DEBUG) + +update-board-sdkconfig: $(BUILD)/esp-idf/config/sdkconfig.h + python tools/update_sdkconfig.py --board=$(BOARD) --debug=$(DEBUG) + +BINARY_WIFI_BLOBS = libcore.a libespnow.a libmesh.a libnet80211.a libpp.a libsmartconfig.a libwapi.a +BINARY_BLOBS = esp-idf/components/esp_phy/lib/$(IDF_TARGET)/libphy.a +ifneq ($(CIRCUITPY_WIFI),0) + BINARY_BLOBS += esp-idf/components/esp_coex/lib/$(IDF_TARGET)/libcoexist.a $(addprefix esp-idf/components/esp_wifi/lib/$(IDF_TARGET)/, $(BINARY_WIFI_BLOBS)) +endif ifeq ($(IDF_TARGET),esp32) BINARY_BLOBS += esp-idf/components/esp_phy/lib/$(IDF_TARGET)/librtc.a endif -ESP_IDF_COMPONENTS_LINK = $(IDF_TARGET_ARCH) app_update bootloader_support driver efuse esp_adc_cal esp_common esp_event esp_hw_support esp_ipc esp_netif esp_pm esp_phy esp_ringbuf esp_rom esp_system esp_timer esp-tls esp_wifi freertos hal heap log lwip mbedtls mdns newlib nvs_flash pthread soc spi_flash vfs wpa_supplicant +ESP_IDF_COMPONENTS_LINK = $(IDF_TARGET_ARCH) app_update bootloader_support driver efuse esp_adc esp_app_format esp_common esp_event esp_hw_support esp_mm esp_partition esp_phy esp_pm esp_ringbuf esp_rom esp_system esp_timer freertos hal heap log newlib nvs_flash pthread soc spi_flash vfs +ifneq ($(CIRCUITPY_WIFI),0) + ESP_IDF_COMPONENTS_LINK += esp_coex esp_netif esp-tls esp_wifi lwip mbedtls mdns wpa_supplicant +endif ifneq ($(CIRCUITPY_BLEIO),0) + BLE_IMPL_esp32 := esp32 + BLE_IMPL_esp32s3 := esp32c3 + BLE_IMPL_esp32c2 := libble + BLE_IMPL_esp32c3 := esp32c3 + BLE_IMPL_esp32c6 := libble + BLE_IMPL_esp32h2 := libble + BLE_IMPL = $(BLE_IMPL_$(IDF_TARGET)) + ESP_IDF_COMPONENTS_LINK += bt + ifeq ($(BLE_IMPL),esp32) + BINARY_BLOBS += esp-idf/components/bt/controller/lib_esp32/$(IDF_TARGET)/libbtdm_app.a + endif + + ifeq ($(BLE_IMPL),esp32c3) + BINARY_BLOBS += esp-idf/components/esp_phy/lib/$(IDF_TARGET)/libbtbb.a \ + esp-idf/components/bt/controller/lib_esp32c3_family/$(IDF_TARGET)/libbtdm_app.a + endif + + ifeq ($(BLE_IMPL),libble) BINARY_BLOBS += esp-idf/components/esp_phy/lib/$(IDF_TARGET)/libbtbb.a \ - esp-idf/components/bt/controller/lib_esp32c3_family/$(IDF_TARGET)/libbtdm_app.a + esp-idf/components/bt/controller/lib_$(IDF_TARGET)/$(IDF_TARGET)-bt-lib/libble_app.a + endif endif ifneq ($(CIRCUITPY_ESPULP),0) ESP_IDF_COMPONENTS_LINK += ulp endif +ifneq ($(CIRCUITPY_ESP_PSRAM_SIZE),0) + ESP_IDF_COMPONENTS_LINK += esp_psram +endif ifneq ($(CIRCUITPY_DOTCLOCKFRAMEBUFFER),0) ESP_IDF_COMPONENTS_LINK += esp_lcd endif @@ -413,16 +500,21 @@ ESP_IDF_COMPONENTS_EXPANDED += esp-idf/components/xtensa/$(IDF_TARGET)/libxt_hal endif ifneq ($(CIRCUITPY_ESPCAMERA),0) -ESP_IDF_COMPONENTS_EXPANDED += $(BUILD)/esp-idf/esp-idf/esp32-camera/libesp32-camera.a +ESP_IDF_COMPONENTS_EXPANDED += $(BUILD)/esp-idf/esp-idf/esp-camera/libesp-camera.a #$(error $(ESP_IDF_COMPONENTS_EXPANDED)) endif ifneq ($(VALID_BOARD),) +# From esp-idf/components/bootloader/Kconfig.projbuild # BOOTLOADER_OFFSET is determined by chip type, based on the ROM bootloader, and is not changeable. ifeq ($(IDF_TARGET),esp32) BOOTLOADER_OFFSET = 0x1000 +else ifeq ($(IDF_TARGET),esp32h2) +BOOTLOADER_OFFSET = 0x0 else ifeq ($(IDF_TARGET),esp32c3) BOOTLOADER_OFFSET = 0x0 +else ifeq ($(IDF_TARGET),esp32c6) +BOOTLOADER_OFFSET = 0x0 else ifeq ($(IDF_TARGET),esp32s3) BOOTLOADER_OFFSET = 0x0 else ifeq ($(IDF_TARGET),esp32s2) @@ -440,9 +532,26 @@ IDF_CMAKE_TARGETS = \ PARTITION_TABLE_OFFSET = 0x8000 FIRMWARE_OFFSET = 0x10000 -ESP_AUTOGEN_LD = $(BUILD)/esp-idf/esp-idf/$(IDF_TARGET)/$(IDF_TARGET)_out.ld $(BUILD)/esp-idf/esp-idf/$(IDF_TARGET)/ld/$(IDF_TARGET).project.ld +# Map the flash's run mode to flashing mode (only dual is supported by the early bootloaders). +# https://github.com/espressif/esp-idf/blob/82cceabc6e6a0a2d8c40e2249bc59917cc5e577a/components/esptool_py/Kconfig.projbuild#L74-L87 +ifeq ($(CIRCUITPY_ESP_FLASH_MODE),dout) + ESPTOOLPY_FLASHMODE = "dout" +endif +ifeq ($(CIRCUITPY_ESP_FLASH_MODE),opi) + ESPTOOLPY_FLASHMODE = "dout" +endif +# Most modes can flash with dio +ESPTOOLPY_FLASHMODE ?= "dio" + +# Cap the flash speed to 80m. +# https://github.com/espressif/esp-idf/blob/82cceabc6e6a0a2d8c40e2249bc59917cc5e577a/components/esptool_py/Kconfig.projbuild#L74-L87 +ifeq ($(CIRCUITPY_ESP_FLASH_FREQ),120m) + ESPTOOLPY_FLASHFREQ = "80m" +else + ESPTOOLPY_FLASHFREQ = $(CIRCUITPY_ESP_FLASH_FREQ) +endif -FLASH_FLAGS = --flash_mode $(CIRCUITPY_ESP_FLASH_MODE) --flash_freq $(CIRCUITPY_ESP_FLASH_FREQ) --flash_size $(CIRCUITPY_ESP_FLASH_SIZE) +FLASH_FLAGS = --flash_mode $(ESPTOOLPY_FLASHMODE) --flash_freq $(ESPTOOLPY_FLASHFREQ) --flash_size $(CIRCUITPY_ESP_FLASH_SIZE) ESPTOOL_FLAGS ?= --before=default_reset --after=no_reset --baud 921600 @@ -460,7 +569,7 @@ esp-idf-stamp: $(BUILD)/esp-idf/config/sdkconfig.h $(BUILD)/firmware.elf: $(OBJ) | esp-idf-stamp $(IDF_CMAKE_TARGETS) $(STEPECHO) "LINK $@" - $(Q)$(CC) -o $@ $(LDFLAGS) $^ -Wl,--start-group $(ESP_IDF_COMPONENTS_EXPANDED) $(BINARY_BLOBS) $(MBEDTLS_COMPONENTS_LINK_EXPANDED) $(BUILD)/esp-idf/esp-idf/newlib/libnewlib.a -Wl,--end-group -u newlib_include_pthread_impl -u ld_include_highint_hdl -Wl,--start-group $(LIBS) -Wl,--end-group $(BUILD)/esp-idf/esp-idf/pthread/libpthread.a -u __cxx_fatal_exception + $(Q)$(CC) -o $@ $(LDFLAGS) $^ -Wl,--start-group $(ESP_IDF_COMPONENTS_EXPANDED) $(BINARY_BLOBS) $(MBEDTLS_COMPONENTS_LINK_EXPANDED) $(LIBS) -Wl,--end-group -u newlib_include_pthread_impl -u ld_include_highint_hdl -u __cxx_fatal_exception $(BUILD)/circuitpython-firmware.bin: $(BUILD)/firmware.elf | tools/build_memory_info.py $(STEPECHO) "Create $@" diff --git a/ports/espressif/README.rst b/ports/espressif/README.rst index 49f372359b6b..b8b0a097aa0e 100644 --- a/ports/espressif/README.rst +++ b/ports/espressif/README.rst @@ -9,7 +9,7 @@ Support Status: .. csv-table:: :header: SoC, Status - ESP, "beta" + ESP32, "beta" ESP32-C3, "beta" ESP32-S2, "stable" ESP32-S3, "beta" diff --git a/ports/espressif/bindings/espidf/__init__.h b/ports/espressif/bindings/espidf/__init__.h index e091a5c477ec..5ace1b3adace 100644 --- a/ports/espressif/bindings/espidf/__init__.h +++ b/ports/espressif/bindings/espidf/__init__.h @@ -31,6 +31,8 @@ #include "py/mpconfig.h" #include "py/obj.h" +#include "common-hal/espidf/__init__.h" + extern const mp_obj_type_t mp_type_espidf_IDFError; extern const mp_obj_type_t mp_type_espidf_MemoryError; diff --git a/ports/espressif/bindings/espnow/Peer.c b/ports/espressif/bindings/espnow/Peer.c index 4cceec149842..6515cb4eebfe 100644 --- a/ports/espressif/bindings/espnow/Peer.c +++ b/ports/espressif/bindings/espnow/Peer.c @@ -79,11 +79,13 @@ STATIC mp_obj_t espnow_peer_make_new(const mp_obj_type_t *type, size_t n_args, s self->peer_info.ifidx = (wifi_interface_t)mp_arg_validate_int_range(args[ARG_interface].u_int, 0, 1, MP_QSTR_interface); self->peer_info.encrypt = args[ARG_encrypted].u_bool; + self->lmk_set = false; const mp_obj_t lmk = args[ARG_lmk].u_obj; if (lmk != mp_const_none) { + self->lmk_set = true; memcpy(self->peer_info.lmk, common_hal_espnow_get_bytes_len(lmk, ESP_NOW_KEY_LEN), ESP_NOW_KEY_LEN); - } else if (self->peer_info.encrypt && !self->peer_info.lmk) { + } else if (self->peer_info.encrypt) { mp_raise_ValueError_varg(translate("%q is %q"), MP_QSTR_lmk, MP_QSTR_None); } @@ -196,7 +198,7 @@ STATIC mp_obj_t espnow_peer_set_encrypted(const mp_obj_t self_in, const mp_obj_t self->peer_info.encrypt = mp_obj_is_true(value); - if (!self->peer_info.lmk) { + if (!self->lmk_set) { mp_raise_ValueError_varg(translate("%q is %q"), MP_QSTR_lmk, MP_QSTR_None); } diff --git a/ports/espressif/bindings/espnow/Peer.h b/ports/espressif/bindings/espnow/Peer.h index e4cb828472a4..23a691b3bc97 100644 --- a/ports/espressif/bindings/espnow/Peer.h +++ b/ports/espressif/bindings/espnow/Peer.h @@ -32,6 +32,7 @@ typedef struct { mp_obj_base_t base; esp_now_peer_info_t peer_info; + bool lmk_set; } espnow_peer_obj_t; -const mp_obj_type_t espnow_peer_type; +extern const mp_obj_type_t espnow_peer_type; diff --git a/ports/espressif/boards/01space_lcd042_esp32c3/mpconfigboard.h b/ports/espressif/boards/01space_lcd042_esp32c3/mpconfigboard.h index cae80fa78c8f..7ff1fb17caf9 100644 --- a/ports/espressif/boards/01space_lcd042_esp32c3/mpconfigboard.h +++ b/ports/espressif/boards/01space_lcd042_esp32c3/mpconfigboard.h @@ -36,5 +36,3 @@ // For entering safe mode #define CIRCUITPY_BOOT_BUTTON (&pin_GPIO9) - -#define CIRCUITPY_ESP_USB_SERIAL_JTAG (1) diff --git a/ports/espressif/boards/01space_lcd042_esp32c3/mpconfigboard.mk b/ports/espressif/boards/01space_lcd042_esp32c3/mpconfigboard.mk index e4467a3bbf22..5f37ab5facad 100644 --- a/ports/espressif/boards/01space_lcd042_esp32c3/mpconfigboard.mk +++ b/ports/espressif/boards/01space_lcd042_esp32c3/mpconfigboard.mk @@ -6,3 +6,7 @@ IDF_TARGET = esp32c3 CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_USB_SERIAL_JTAG = 1 + +CIRCUITPY_BLEIO = 0 diff --git a/ports/espressif/boards/01space_lcd042_esp32c3/sdkconfig b/ports/espressif/boards/01space_lcd042_esp32c3/sdkconfig index 24f7d625ea6a..3a08db70d5f0 100644 --- a/ports/espressif/boards/01space_lcd042_esp32c3/sdkconfig +++ b/ports/espressif/boards/01space_lcd042_esp32c3/sdkconfig @@ -1,6 +1,15 @@ -# chip is ESP32-C3 FH4 +# +# Espressif IoT Development Framework Configuration +# +# +# Component config +# # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="01Space-LCD042-ESP32C3" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/adafruit_esp32s3_camera/board.c b/ports/espressif/boards/adafruit_esp32s3_camera/board.c index 65042bcea54d..83396b81a281 100644 --- a/ports/espressif/boards/adafruit_esp32s3_camera/board.c +++ b/ports/espressif/boards/adafruit_esp32s3_camera/board.c @@ -87,7 +87,7 @@ static void io_expander_backlight_init(void) { i2c_master_write_byte(cmd, AW9523_REG_SOFTRESET, true); i2c_master_write_byte(cmd, 0, true); i2c_master_stop(cmd); - i2c_master_cmd_begin(i2c_num, cmd, 1000 / portTICK_RATE_MS); + i2c_master_cmd_begin(i2c_num, cmd, 1000 / portTICK_PERIOD_MS); i2c_cmd_link_delete(cmd); cmd = i2c_cmd_link_create(); @@ -97,7 +97,7 @@ static void io_expander_backlight_init(void) { i2c_master_write_byte(cmd, AW9523_DEFAULT_CONFIG >> 8, true); i2c_master_write_byte(cmd, AW9523_DEFAULT_CONFIG & 0xff, true); i2c_master_stop(cmd); - i2c_master_cmd_begin(i2c_num, cmd, 1000 / portTICK_RATE_MS); + i2c_master_cmd_begin(i2c_num, cmd, 1000 / portTICK_PERIOD_MS); i2c_cmd_link_delete(cmd); cmd = i2c_cmd_link_create(); @@ -107,7 +107,7 @@ static void io_expander_backlight_init(void) { i2c_master_write_byte(cmd, AW9523_DEFAULT_OUTPUT >> 8, true); i2c_master_write_byte(cmd, AW9523_DEFAULT_OUTPUT & 0xff, true); i2c_master_stop(cmd); - i2c_master_cmd_begin(i2c_num, cmd, 1000 / portTICK_RATE_MS); + i2c_master_cmd_begin(i2c_num, cmd, 1000 / portTICK_PERIOD_MS); i2c_cmd_link_delete(cmd); i2c_driver_delete(i2c_num); diff --git a/ports/espressif/boards/adafruit_esp32s3_camera/mpconfigboard.mk b/ports/espressif/boards/adafruit_esp32s3_camera/mpconfigboard.mk index 6b94c979dc10..9ead7e4f21ad 100644 --- a/ports/espressif/boards/adafruit_esp32s3_camera/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_esp32s3_camera/mpconfigboard.mk @@ -5,9 +5,13 @@ USB_MANUFACTURER = "Adafruit" IDF_TARGET = esp32s3 -CIRCUITPY_ESP_FLASH_MODE = dio -CIRCUITPY_ESP_FLASH_FREQ = 40m CIRCUITPY_ESP_FLASH_SIZE = 4MB +CIRCUITPY_ESP_FLASH_MODE = dio +CIRCUITPY_ESP_FLASH_FREQ = 80m + +CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 80m FLASH_SDKCONFIG = esp-idf-config/sdkconfig-4MB-1ota.defaults CIRCUITPY_AUDIOBUSIO = 0 @@ -19,3 +23,5 @@ CIRCUITPY_ONEWIREIO = 0 CIRCUITPY_PARALLELDISPLAY = 0 CIRCUITPY_RGBMATRIX = 0 CIRCUITPY_ROTARYIO = 0 + +OPTIMIZATION_FLAGS = -Os diff --git a/ports/espressif/boards/adafruit_esp32s3_camera/sdkconfig b/ports/espressif/boards/adafruit_esp32s3_camera/sdkconfig index cf6a6def7c02..1bddb7a89fbb 100644 --- a/ports/espressif/boards/adafruit_esp32s3_camera/sdkconfig +++ b/ports/espressif/boards/adafruit_esp32s3_camera/sdkconfig @@ -1,62 +1,22 @@ -# Component config -# # -# ESP32S3-Specific -# -CONFIG_ESP32S3_SPIRAM_SUPPORT=y - +# Espressif IoT Development Framework Configuration # -# SPI RAM config # -CONFIG_SPIRAM_MODE_QUAD=y -# CONFIG_SPIRAM_MODE_OCT is not set -CONFIG_SPIRAM_TYPE_AUTO=y -# CONFIG_SPIRAM_TYPE_ESPPSRAM16 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set -CONFIG_SPIRAM_SIZE=2097152 - -# -# PSRAM Clock and CS IO for ESP32S3 +# Component config # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 -CONFIG_DEFAULT_PSRAM_CS_IO=26 -# end of PSRAM Clock and CS IO for ESP32S3 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_80M is not set -CONFIG_SPIRAM_SPEED_80M=y -# CONFIG_SPIRAM_SPEED_26M is not set -# CONFIG_SPIRAM_SPEED_20M is not set -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set -CONFIG_SPIRAM_USE_MEMMAP=y -# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set -# CONFIG_SPIRAM_USE_MALLOC is not set -CONFIG_SPIRAM_MEMTEST=y -# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# end of SPI RAM config - -# end of ESP32S3-Specific - # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3" # end of LWIP -# CONFIG_OV7670_SUPPORT is not set -# CONFIG_NT99141_SUPPORT is not set -CONFIG_OV3360_SUPPORT=n -# CONFIG_OV2640_SUPPORT is not set -CONFIG_OV5640_SUPPORT=y -# CONFIG_GC2145_SUPPORT is not set -# CONFIG_GC032A_SUPPORT is not set -# CONFIG_GC0308_SUPPORT is not set -# CONFIG_BF3005_SUPPORT is not set -# CONFIG_BF20A6_SUPPORT is not set -# CONFIG_SC101IOT_SUPPORT is not set -# CONFIG_SC030IOT_SUPPORT is not set +# +# Camera configuration +# +# CONFIG_OV7725_SUPPORT is not set +# CONFIG_OV3660_SUPPORT is not set +# end of Camera configuration + # end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/adafruit_feather_esp32_v2/board.c b/ports/espressif/boards/adafruit_feather_esp32_v2/board.c index 78341beb3b47..02c3cb2ff423 100644 --- a/ports/espressif/boards/adafruit_feather_esp32_v2/board.c +++ b/ports/espressif/boards/adafruit_feather_esp32_v2/board.c @@ -27,7 +27,7 @@ #include "supervisor/board.h" #include "mpconfigboard.h" #include "shared-bindings/microcontroller/Pin.h" -#include "components/driver/include/driver/gpio.h" +#include "components/driver/gpio/include/driver/gpio.h" #include "components/hal/include/hal/gpio_hal.h" #include "common-hal/microcontroller/Pin.h" diff --git a/ports/espressif/boards/adafruit_feather_esp32_v2/mpconfigboard.mk b/ports/espressif/boards/adafruit_feather_esp32_v2/mpconfigboard.mk index 38d689d08a6c..73b5b0095996 100644 --- a/ports/espressif/boards/adafruit_feather_esp32_v2/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_feather_esp32_v2/mpconfigboard.mk @@ -6,3 +6,7 @@ IDF_TARGET = esp32 CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 40m CIRCUITPY_ESP_FLASH_SIZE = 8MB + +CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m diff --git a/ports/espressif/boards/adafruit_feather_esp32_v2/sdkconfig b/ports/espressif/boards/adafruit_feather_esp32_v2/sdkconfig index c09d8c409a04..e69de29bb2d1 100644 --- a/ports/espressif/boards/adafruit_feather_esp32_v2/sdkconfig +++ b/ports/espressif/boards/adafruit_feather_esp32_v2/sdkconfig @@ -1,37 +0,0 @@ -CONFIG_ESP32_SPIRAM_SUPPORT=y -# SPI RAM config -# -# CONFIG_SPIRAM_TYPE_AUTO is not set -CONFIG_SPIRAM_TYPE_ESPPSRAM16=y -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set -CONFIG_SPIRAM_SIZE=2097152 -CONFIG_SPIRAM_SPEED_40M=y -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -CONFIG_SPIRAM_IGNORE_NOTFOUND=y -CONFIG_SPIRAM_USE_MEMMAP=y -# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set -# CONFIG_SPIRAM_USE_MALLOC is not set -CONFIG_SPIRAM_MEMTEST=y -# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# CONFIG_SPIRAM_ALLOW_NOINIT_SEG_EXTERNAL_MEMORY is not set -CONFIG_SPIRAM_CACHE_WORKAROUND=y - -# Uncomment (remove ###) to send ESP_LOG output to TX/RX pins -### # -### # ESP System Settings -### # -### CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT=y -### # CONFIG_ESP_SYSTEM_PANIC_SILENT_REBOOT is not set -### CONFIG_ESP_CONSOLE_UART_CUSTOM=y -### # CONFIG_ESP_CONSOLE_NONE is not set -### CONFIG_ESP_CONSOLE_UART=y -### CONFIG_ESP_CONSOLE_UART_CUSTOM_NUM_0=y -### # CONFIG_ESP_CONSOLE_UART_CUSTOM_NUM_1 is not set -### CONFIG_ESP_CONSOLE_UART_NUM=0 -### CONFIG_ESP_CONSOLE_UART_TX_GPIO=8 -### CONFIG_ESP_CONSOLE_UART_RX_GPIO=7 -### CONFIG_ESP_CONSOLE_UART_BAUDRATE=115200 -### # CONFIG_ESP_SYSTEM_CHECK_INT_LEVEL_5 is not set -### # end of ESP System Settings diff --git a/ports/espressif/boards/adafruit_feather_esp32s2/board.c b/ports/espressif/boards/adafruit_feather_esp32s2/board.c index f701d18442ec..4d64c316e1b1 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s2/board.c +++ b/ports/espressif/boards/adafruit_feather_esp32s2/board.c @@ -27,7 +27,7 @@ #include "supervisor/board.h" #include "mpconfigboard.h" #include "shared-bindings/microcontroller/Pin.h" -#include "components/driver/include/driver/gpio.h" +#include "components/driver/gpio/include/driver/gpio.h" #include "components/hal/include/hal/gpio_hal.h" #include "common-hal/microcontroller/Pin.h" diff --git a/ports/espressif/boards/adafruit_feather_esp32s2/mpconfigboard.mk b/ports/espressif/boards/adafruit_feather_esp32s2/mpconfigboard.mk index 3ba91e62fd74..a5ee61ed5504 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s2/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_feather_esp32s2/mpconfigboard.mk @@ -8,3 +8,7 @@ IDF_TARGET = esp32s2 CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 40m CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m diff --git a/ports/espressif/boards/adafruit_feather_esp32s2/sdkconfig b/ports/espressif/boards/adafruit_feather_esp32s2/sdkconfig index 37fd53424945..e69de29bb2d1 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s2/sdkconfig +++ b/ports/espressif/boards/adafruit_feather_esp32s2/sdkconfig @@ -1,47 +0,0 @@ -# -# Component config -# -# -# ESP32S2-specific -# -CONFIG_ESP32S2_SPIRAM_SUPPORT=y -# -# SPI RAM config -# -# CONFIG_SPIRAM_TYPE_AUTO is not set -CONFIG_SPIRAM_TYPE_ESPPSRAM16=y -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set -CONFIG_SPIRAM_SIZE=2097152 -# -# PSRAM clock and cs IO for ESP32S2 -# -CONFIG_DEFAULT_PSRAM_CLK_IO=30 -CONFIG_DEFAULT_PSRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S2 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_80M is not set -CONFIG_SPIRAM_SPEED_40M=y -# CONFIG_SPIRAM_SPEED_26M is not set -# CONFIG_SPIRAM_SPEED_20M is not set -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set -CONFIG_SPIRAM_USE_MEMMAP=y -# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set -# CONFIG_SPIRAM_USE_MALLOC is not set -CONFIG_SPIRAM_MEMTEST=y -# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# end of SPI RAM config - -# end of ESP32S2-specific - -# -# LWIP -# -CONFIG_LWIP_LOCAL_HOSTNAME="espressif" -# end of LWIP - -# end of Component config diff --git a/ports/espressif/boards/adafruit_feather_esp32s2_reverse_tft/mpconfigboard.mk b/ports/espressif/boards/adafruit_feather_esp32s2_reverse_tft/mpconfigboard.mk index 920b748e3da9..be2d2fb4e867 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s2_reverse_tft/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_feather_esp32s2_reverse_tft/mpconfigboard.mk @@ -9,3 +9,7 @@ IDF_TARGET = esp32s2 CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 40m CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m diff --git a/ports/espressif/boards/adafruit_feather_esp32s2_reverse_tft/sdkconfig b/ports/espressif/boards/adafruit_feather_esp32s2_reverse_tft/sdkconfig index f19afafa3d23..e69de29bb2d1 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s2_reverse_tft/sdkconfig +++ b/ports/espressif/boards/adafruit_feather_esp32s2_reverse_tft/sdkconfig @@ -1,37 +0,0 @@ -CONFIG_ESP32S2_SPIRAM_SUPPORT=y -# -# SPI RAM config -# -# CONFIG_SPIRAM_TYPE_AUTO is not set -CONFIG_SPIRAM_TYPE_ESPPSRAM16=y -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set -CONFIG_SPIRAM_SIZE=2097152 -# end of SPI RAM config - -CONFIG_DEFAULT_PSRAM_CLK_IO=30 -# -# PSRAM clock and cs IO for ESP32S2 -# -CONFIG_DEFAULT_PSRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S2 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_80M is not set -CONFIG_SPIRAM_SPEED_40M=y -# CONFIG_SPIRAM_SPEED_26M is not set -# CONFIG_SPIRAM_SPEED_20M is not set -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set -CONFIG_SPIRAM_USE_MEMMAP=y -# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set -# CONFIG_SPIRAM_USE_MALLOC is not set -CONFIG_SPIRAM_MEMTEST=y -# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# -# LWIP -# -CONFIG_LWIP_LOCAL_HOSTNAME="espressif" -# end of LWIP diff --git a/ports/espressif/boards/adafruit_feather_esp32s2_tft/mpconfigboard.mk b/ports/espressif/boards/adafruit_feather_esp32s2_tft/mpconfigboard.mk index 4b559ff1eea1..1a4d00e34b85 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s2_tft/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_feather_esp32s2_tft/mpconfigboard.mk @@ -9,3 +9,7 @@ IDF_TARGET = esp32s2 CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 40m CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m diff --git a/ports/espressif/boards/adafruit_feather_esp32s2_tft/sdkconfig b/ports/espressif/boards/adafruit_feather_esp32s2_tft/sdkconfig index f19afafa3d23..e69de29bb2d1 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s2_tft/sdkconfig +++ b/ports/espressif/boards/adafruit_feather_esp32s2_tft/sdkconfig @@ -1,37 +0,0 @@ -CONFIG_ESP32S2_SPIRAM_SUPPORT=y -# -# SPI RAM config -# -# CONFIG_SPIRAM_TYPE_AUTO is not set -CONFIG_SPIRAM_TYPE_ESPPSRAM16=y -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set -CONFIG_SPIRAM_SIZE=2097152 -# end of SPI RAM config - -CONFIG_DEFAULT_PSRAM_CLK_IO=30 -# -# PSRAM clock and cs IO for ESP32S2 -# -CONFIG_DEFAULT_PSRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S2 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_80M is not set -CONFIG_SPIRAM_SPEED_40M=y -# CONFIG_SPIRAM_SPEED_26M is not set -# CONFIG_SPIRAM_SPEED_20M is not set -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set -CONFIG_SPIRAM_USE_MEMMAP=y -# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set -# CONFIG_SPIRAM_USE_MALLOC is not set -CONFIG_SPIRAM_MEMTEST=y -# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# -# LWIP -# -CONFIG_LWIP_LOCAL_HOSTNAME="espressif" -# end of LWIP diff --git a/ports/espressif/boards/adafruit_feather_esp32s3_4mbflash_2mbpsram/board.c b/ports/espressif/boards/adafruit_feather_esp32s3_4mbflash_2mbpsram/board.c index 983d62a911b8..ba228d7b12d6 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s3_4mbflash_2mbpsram/board.c +++ b/ports/espressif/boards/adafruit_feather_esp32s3_4mbflash_2mbpsram/board.c @@ -27,7 +27,7 @@ #include "supervisor/board.h" #include "mpconfigboard.h" #include "shared-bindings/microcontroller/Pin.h" -#include "components/driver/include/driver/gpio.h" +#include "components/driver/gpio/include/driver/gpio.h" #include "components/hal/include/hal/gpio_hal.h" #include "common-hal/microcontroller/Pin.h" diff --git a/ports/espressif/boards/adafruit_feather_esp32s3_4mbflash_2mbpsram/mpconfigboard.mk b/ports/espressif/boards/adafruit_feather_esp32s3_4mbflash_2mbpsram/mpconfigboard.mk index 6d789995321d..d89c365b68e4 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s3_4mbflash_2mbpsram/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_feather_esp32s3_4mbflash_2mbpsram/mpconfigboard.mk @@ -5,8 +5,13 @@ USB_MANUFACTURER = "Adafruit" IDF_TARGET = esp32s3 -CIRCUITPY_ESP_FLASH_MODE = qio -CIRCUITPY_ESP_FLASH_FREQ = 40m CIRCUITPY_ESP_FLASH_SIZE = 4MB +CIRCUITPY_ESP_FLASH_MODE = qio +CIRCUITPY_ESP_FLASH_FREQ = 80m + +CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 80m +OPTIMIZATION_FLAGS = -Os CIRCUITPY_ESPCAMERA = 0 diff --git a/ports/espressif/boards/adafruit_feather_esp32s3_4mbflash_2mbpsram/sdkconfig b/ports/espressif/boards/adafruit_feather_esp32s3_4mbflash_2mbpsram/sdkconfig index 9a05ab0205e7..f5ef79768114 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s3_4mbflash_2mbpsram/sdkconfig +++ b/ports/espressif/boards/adafruit_feather_esp32s3_4mbflash_2mbpsram/sdkconfig @@ -1,43 +1,9 @@ # -# Component config -# -# -# ESP32S3-Specific -# -CONFIG_ESP32S3_SPIRAM_SUPPORT=y -# -# SPI RAM config +# Espressif IoT Development Framework Configuration # -CONFIG_SPIRAM_MODE_QUAD=y -# CONFIG_SPIRAM_MODE_OCT is not set -CONFIG_SPIRAM_TYPE_AUTO=y -# CONFIG_SPIRAM_TYPE_ESPPSRAM16 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set -CONFIG_SPIRAM_SIZE=2097152 # -# PSRAM Clock and CS IO for ESP32S3 +# Component config # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 -CONFIG_DEFAULT_PSRAM_CS_IO=26 -# end of PSRAM Clock and CS IO for ESP32S3 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_120M is not set -CONFIG_SPIRAM_SPEED_80M=y -# CONFIG_SPIRAM_SPEED_40M is not set -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set -CONFIG_SPIRAM_USE_MEMMAP=y -# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set -# CONFIG_SPIRAM_USE_MALLOC is not set -CONFIG_SPIRAM_MEMTEST=y -# end of SPI RAM config - -# end of ESP32S3-Specific - # # LWIP # @@ -45,3 +11,5 @@ CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3" # end of LWIP # end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/adafruit_feather_esp32s3_nopsram/board.c b/ports/espressif/boards/adafruit_feather_esp32s3_nopsram/board.c index 983d62a911b8..ba228d7b12d6 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s3_nopsram/board.c +++ b/ports/espressif/boards/adafruit_feather_esp32s3_nopsram/board.c @@ -27,7 +27,7 @@ #include "supervisor/board.h" #include "mpconfigboard.h" #include "shared-bindings/microcontroller/Pin.h" -#include "components/driver/include/driver/gpio.h" +#include "components/driver/gpio/include/driver/gpio.h" #include "components/hal/include/hal/gpio_hal.h" #include "common-hal/microcontroller/Pin.h" diff --git a/ports/espressif/boards/adafruit_feather_esp32s3_nopsram/sdkconfig b/ports/espressif/boards/adafruit_feather_esp32s3_nopsram/sdkconfig index 9d924272ec4e..f5ef79768114 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s3_nopsram/sdkconfig +++ b/ports/espressif/boards/adafruit_feather_esp32s3_nopsram/sdkconfig @@ -1,7 +1,15 @@ -CONFIG_ESP32S3_SPIRAM_SUPPORT=n - +# +# Espressif IoT Development Framework Configuration +# +# +# Component config +# # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/adafruit_feather_esp32s3_reverse_tft/mpconfigboard.mk b/ports/espressif/boards/adafruit_feather_esp32s3_reverse_tft/mpconfigboard.mk index d027443f5679..56dd344dbf95 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s3_reverse_tft/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_feather_esp32s3_reverse_tft/mpconfigboard.mk @@ -7,7 +7,13 @@ USB_MANUFACTURER = "Adafruit" IDF_TARGET = esp32s3 CIRCUITPY_ESP_FLASH_MODE = dio -CIRCUITPY_ESP_FLASH_FREQ = 40m +CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 4MB +CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 80m + CIRCUITPY_ESPCAMERA = 0 + +OPTIMIZATION_FLAGS = -Os diff --git a/ports/espressif/boards/adafruit_feather_esp32s3_reverse_tft/sdkconfig b/ports/espressif/boards/adafruit_feather_esp32s3_reverse_tft/sdkconfig index 9a05ab0205e7..f5ef79768114 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s3_reverse_tft/sdkconfig +++ b/ports/espressif/boards/adafruit_feather_esp32s3_reverse_tft/sdkconfig @@ -1,43 +1,9 @@ # -# Component config -# -# -# ESP32S3-Specific -# -CONFIG_ESP32S3_SPIRAM_SUPPORT=y -# -# SPI RAM config +# Espressif IoT Development Framework Configuration # -CONFIG_SPIRAM_MODE_QUAD=y -# CONFIG_SPIRAM_MODE_OCT is not set -CONFIG_SPIRAM_TYPE_AUTO=y -# CONFIG_SPIRAM_TYPE_ESPPSRAM16 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set -CONFIG_SPIRAM_SIZE=2097152 # -# PSRAM Clock and CS IO for ESP32S3 +# Component config # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 -CONFIG_DEFAULT_PSRAM_CS_IO=26 -# end of PSRAM Clock and CS IO for ESP32S3 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_120M is not set -CONFIG_SPIRAM_SPEED_80M=y -# CONFIG_SPIRAM_SPEED_40M is not set -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set -CONFIG_SPIRAM_USE_MEMMAP=y -# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set -# CONFIG_SPIRAM_USE_MALLOC is not set -CONFIG_SPIRAM_MEMTEST=y -# end of SPI RAM config - -# end of ESP32S3-Specific - # # LWIP # @@ -45,3 +11,5 @@ CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3" # end of LWIP # end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/adafruit_feather_esp32s3_tft/mpconfigboard.mk b/ports/espressif/boards/adafruit_feather_esp32s3_tft/mpconfigboard.mk index d801afd4931d..a94670910bb0 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s3_tft/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_feather_esp32s3_tft/mpconfigboard.mk @@ -7,7 +7,12 @@ USB_MANUFACTURER = "Adafruit" IDF_TARGET = esp32s3 CIRCUITPY_ESP_FLASH_MODE = dio -CIRCUITPY_ESP_FLASH_FREQ = 40m +CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 4MB +OPTIMIZATION_FLAGS = -Os CIRCUITPY_ESPCAMERA = 0 + +CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 80m diff --git a/ports/espressif/boards/adafruit_feather_esp32s3_tft/sdkconfig b/ports/espressif/boards/adafruit_feather_esp32s3_tft/sdkconfig index 9a05ab0205e7..f5ef79768114 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s3_tft/sdkconfig +++ b/ports/espressif/boards/adafruit_feather_esp32s3_tft/sdkconfig @@ -1,43 +1,9 @@ # -# Component config -# -# -# ESP32S3-Specific -# -CONFIG_ESP32S3_SPIRAM_SUPPORT=y -# -# SPI RAM config +# Espressif IoT Development Framework Configuration # -CONFIG_SPIRAM_MODE_QUAD=y -# CONFIG_SPIRAM_MODE_OCT is not set -CONFIG_SPIRAM_TYPE_AUTO=y -# CONFIG_SPIRAM_TYPE_ESPPSRAM16 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set -CONFIG_SPIRAM_SIZE=2097152 # -# PSRAM Clock and CS IO for ESP32S3 +# Component config # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 -CONFIG_DEFAULT_PSRAM_CS_IO=26 -# end of PSRAM Clock and CS IO for ESP32S3 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_120M is not set -CONFIG_SPIRAM_SPEED_80M=y -# CONFIG_SPIRAM_SPEED_40M is not set -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set -CONFIG_SPIRAM_USE_MEMMAP=y -# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set -# CONFIG_SPIRAM_USE_MALLOC is not set -CONFIG_SPIRAM_MEMTEST=y -# end of SPI RAM config - -# end of ESP32S3-Specific - # # LWIP # @@ -45,3 +11,5 @@ CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3" # end of LWIP # end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/adafruit_feather_huzzah32/sdkconfig b/ports/espressif/boards/adafruit_feather_huzzah32/sdkconfig index 6c0168c829de..e69de29bb2d1 100644 --- a/ports/espressif/boards/adafruit_feather_huzzah32/sdkconfig +++ b/ports/espressif/boards/adafruit_feather_huzzah32/sdkconfig @@ -1,20 +0,0 @@ -CONFIG_ESP32_ECO3_CACHE_LOCK_FIX=y -CONFIG_ESP32_SPIRAM_SUPPORT=n - -# Uncomment (remove ###) to send ESP_LOG output to TX/RX pins -### # -### # ESP System Settings -### # -### CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT=y -### # CONFIG_ESP_SYSTEM_PANIC_SILENT_REBOOT is not set -### CONFIG_ESP_CONSOLE_UART_CUSTOM=y -### CONFIG_ESP_CONSOLE_NONE is not set -### CONFIG_ESP_CONSOLE_UART=y -### CONFIG_ESP_CONSOLE_UART_CUSTOM_NUM_0=y -### # CONFIG_ESP_CONSOLE_UART_CUSTOM_NUM_1 is not set -### CONFIG_ESP_CONSOLE_UART_NUM=0 -### CONFIG_ESP_CONSOLE_UART_TX_GPIO=17 -### CONFIG_ESP_CONSOLE_UART_RX_GPIO=16 -### CONFIG_ESP_CONSOLE_UART_BAUDRATE=115200 -### # CONFIG_ESP_SYSTEM_CHECK_INT_LEVEL_5 is not set -### # end of ESP System Settings diff --git a/ports/espressif/boards/adafruit_funhouse/board.c b/ports/espressif/boards/adafruit_funhouse/board.c index b1a01b2dcbe5..daa4aa474e92 100644 --- a/ports/espressif/boards/adafruit_funhouse/board.c +++ b/ports/espressif/boards/adafruit_funhouse/board.c @@ -50,12 +50,6 @@ uint8_t display_init_sequence[] = { }; void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO37); - common_hal_never_reset_pin(&pin_GPIO38); - #endif /* DEBUG */ - displayio_fourwire_obj_t *bus = &allocate_display_bus()->fourwire_bus; busio_spi_obj_t *spi = &bus->inline_bus; common_hal_busio_spi_construct(spi, &pin_GPIO36, &pin_GPIO35, NULL, false); diff --git a/ports/espressif/boards/adafruit_funhouse/mpconfigboard.mk b/ports/espressif/boards/adafruit_funhouse/mpconfigboard.mk index 7d5c91f154da..ce85924ef7d2 100644 --- a/ports/espressif/boards/adafruit_funhouse/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_funhouse/mpconfigboard.mk @@ -12,8 +12,8 @@ CIRCUITPY_ESP_FLASH_SIZE = 4MB CIRCUITPY_ESPCAMERA = 0 # Include these Python libraries in firmware. -FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_PortalBase -FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_FakeRequests -FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Requests FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel -FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Display_Text + +CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m diff --git a/ports/espressif/boards/adafruit_funhouse/pins.c b/ports/espressif/boards/adafruit_funhouse/pins.c index 17c2ac42561f..c94aeebf2052 100644 --- a/ports/espressif/boards/adafruit_funhouse/pins.c +++ b/ports/espressif/boards/adafruit_funhouse/pins.c @@ -44,8 +44,8 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO33) }, { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO34) }, - { MP_OBJ_NEW_QSTR(MP_QSTR_DEBUG_TX), MP_ROM_PTR(&pin_GPIO37) }, - { MP_OBJ_NEW_QSTR(MP_QSTR_DEBUG_RX), MP_ROM_PTR(&pin_GPIO38) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_DEBUG_TX), MP_ROM_PTR(&pin_GPIO43) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_DEBUG_RX), MP_ROM_PTR(&pin_GPIO44) }, { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, { MP_ROM_QSTR(MP_QSTR_STEMMA_I2C), MP_ROM_PTR(&board_i2c_obj) }, diff --git a/ports/espressif/boards/adafruit_funhouse/sdkconfig b/ports/espressif/boards/adafruit_funhouse/sdkconfig index f19afafa3d23..e69de29bb2d1 100644 --- a/ports/espressif/boards/adafruit_funhouse/sdkconfig +++ b/ports/espressif/boards/adafruit_funhouse/sdkconfig @@ -1,37 +0,0 @@ -CONFIG_ESP32S2_SPIRAM_SUPPORT=y -# -# SPI RAM config -# -# CONFIG_SPIRAM_TYPE_AUTO is not set -CONFIG_SPIRAM_TYPE_ESPPSRAM16=y -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set -CONFIG_SPIRAM_SIZE=2097152 -# end of SPI RAM config - -CONFIG_DEFAULT_PSRAM_CLK_IO=30 -# -# PSRAM clock and cs IO for ESP32S2 -# -CONFIG_DEFAULT_PSRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S2 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_80M is not set -CONFIG_SPIRAM_SPEED_40M=y -# CONFIG_SPIRAM_SPEED_26M is not set -# CONFIG_SPIRAM_SPEED_20M is not set -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set -CONFIG_SPIRAM_USE_MEMMAP=y -# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set -# CONFIG_SPIRAM_USE_MALLOC is not set -CONFIG_SPIRAM_MEMTEST=y -# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# -# LWIP -# -CONFIG_LWIP_LOCAL_HOSTNAME="espressif" -# end of LWIP diff --git a/ports/espressif/boards/adafruit_huzzah32_breakout/sdkconfig b/ports/espressif/boards/adafruit_huzzah32_breakout/sdkconfig index 6c0168c829de..e69de29bb2d1 100644 --- a/ports/espressif/boards/adafruit_huzzah32_breakout/sdkconfig +++ b/ports/espressif/boards/adafruit_huzzah32_breakout/sdkconfig @@ -1,20 +0,0 @@ -CONFIG_ESP32_ECO3_CACHE_LOCK_FIX=y -CONFIG_ESP32_SPIRAM_SUPPORT=n - -# Uncomment (remove ###) to send ESP_LOG output to TX/RX pins -### # -### # ESP System Settings -### # -### CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT=y -### # CONFIG_ESP_SYSTEM_PANIC_SILENT_REBOOT is not set -### CONFIG_ESP_CONSOLE_UART_CUSTOM=y -### CONFIG_ESP_CONSOLE_NONE is not set -### CONFIG_ESP_CONSOLE_UART=y -### CONFIG_ESP_CONSOLE_UART_CUSTOM_NUM_0=y -### # CONFIG_ESP_CONSOLE_UART_CUSTOM_NUM_1 is not set -### CONFIG_ESP_CONSOLE_UART_NUM=0 -### CONFIG_ESP_CONSOLE_UART_TX_GPIO=17 -### CONFIG_ESP_CONSOLE_UART_RX_GPIO=16 -### CONFIG_ESP_CONSOLE_UART_BAUDRATE=115200 -### # CONFIG_ESP_SYSTEM_CHECK_INT_LEVEL_5 is not set -### # end of ESP System Settings diff --git a/ports/espressif/boards/adafruit_magtag_2.9_grayscale/board.c b/ports/espressif/boards/adafruit_magtag_2.9_grayscale/board.c index da070688ed70..bd5ad77c93ba 100644 --- a/ports/espressif/boards/adafruit_magtag_2.9_grayscale/board.c +++ b/ports/espressif/boards/adafruit_magtag_2.9_grayscale/board.c @@ -114,12 +114,6 @@ const uint8_t refresh_sequence[] = { }; void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ - displayio_fourwire_obj_t *bus = &allocate_display_bus()->fourwire_bus; busio_spi_obj_t *spi = &bus->inline_bus; common_hal_busio_spi_construct(spi, &pin_GPIO36, &pin_GPIO35, NULL, false); diff --git a/ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.mk b/ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.mk index d941039078d8..de31f60d76c9 100644 --- a/ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.mk @@ -18,3 +18,7 @@ FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Requests FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Display_Text FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_LIS3DH + +CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m diff --git a/ports/espressif/boards/adafruit_magtag_2.9_grayscale/sdkconfig b/ports/espressif/boards/adafruit_magtag_2.9_grayscale/sdkconfig index f19afafa3d23..e69de29bb2d1 100644 --- a/ports/espressif/boards/adafruit_magtag_2.9_grayscale/sdkconfig +++ b/ports/espressif/boards/adafruit_magtag_2.9_grayscale/sdkconfig @@ -1,37 +0,0 @@ -CONFIG_ESP32S2_SPIRAM_SUPPORT=y -# -# SPI RAM config -# -# CONFIG_SPIRAM_TYPE_AUTO is not set -CONFIG_SPIRAM_TYPE_ESPPSRAM16=y -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set -CONFIG_SPIRAM_SIZE=2097152 -# end of SPI RAM config - -CONFIG_DEFAULT_PSRAM_CLK_IO=30 -# -# PSRAM clock and cs IO for ESP32S2 -# -CONFIG_DEFAULT_PSRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S2 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_80M is not set -CONFIG_SPIRAM_SPEED_40M=y -# CONFIG_SPIRAM_SPEED_26M is not set -# CONFIG_SPIRAM_SPEED_20M is not set -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set -CONFIG_SPIRAM_USE_MEMMAP=y -# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set -# CONFIG_SPIRAM_USE_MALLOC is not set -CONFIG_SPIRAM_MEMTEST=y -# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# -# LWIP -# -CONFIG_LWIP_LOCAL_HOSTNAME="espressif" -# end of LWIP diff --git a/ports/espressif/boards/adafruit_matrixportal_s3/board.c b/ports/espressif/boards/adafruit_matrixportal_s3/board.c index a023845eb02d..a5067b98fd05 100644 --- a/ports/espressif/boards/adafruit_matrixportal_s3/board.c +++ b/ports/espressif/boards/adafruit_matrixportal_s3/board.c @@ -27,7 +27,7 @@ #include "supervisor/board.h" #include "mpconfigboard.h" #include "shared-bindings/microcontroller/Pin.h" -#include "components/driver/include/driver/gpio.h" +#include "components/driver/gpio/include/driver/gpio.h" #include "components/hal/include/hal/gpio_hal.h" #include "common-hal/microcontroller/Pin.h" diff --git a/ports/espressif/boards/adafruit_matrixportal_s3/mpconfigboard.mk b/ports/espressif/boards/adafruit_matrixportal_s3/mpconfigboard.mk index 865fc06d96ef..3488f22d614b 100644 --- a/ports/espressif/boards/adafruit_matrixportal_s3/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_matrixportal_s3/mpconfigboard.mk @@ -6,7 +6,11 @@ USB_MANUFACTURER = "Adafruit" IDF_TARGET = esp32s3 CIRCUITPY_ESP_FLASH_MODE = dio -CIRCUITPY_ESP_FLASH_FREQ = 40m +CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 80m + CIRCUITPY_ESP32_CAMERA = 0 diff --git a/ports/espressif/boards/adafruit_matrixportal_s3/sdkconfig b/ports/espressif/boards/adafruit_matrixportal_s3/sdkconfig index 2b65102e5ad7..db95a623aa92 100644 --- a/ports/espressif/boards/adafruit_matrixportal_s3/sdkconfig +++ b/ports/espressif/boards/adafruit_matrixportal_s3/sdkconfig @@ -1,39 +1,15 @@ # -# Component config -# -# -# ESP32S3-Specific +# Espressif IoT Development Framework Configuration # -CONFIG_ESP32S3_SPIRAM_SUPPORT=y # -# SPI RAM config +# Component config # -CONFIG_SPIRAM_MODE_QUAD=y -# CONFIG_SPIRAM_MODE_OCT is not set -CONFIG_SPIRAM_TYPE_AUTO=y -# CONFIG_SPIRAM_TYPE_ESPPSRAM16 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set -CONFIG_SPIRAM_SIZE=2097152 # -# PSRAM Clock and CS IO for ESP32S3 +# LWIP # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 -CONFIG_DEFAULT_PSRAM_CS_IO=26 -# end of PSRAM Clock and CS IO for ESP32S3 +CONFIG_LWIP_LOCAL_HOSTNAME="matrixportal-s3" +# end of LWIP -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_120M is not set -CONFIG_SPIRAM_SPEED_80M=y -# CONFIG_SPIRAM_SPEED_40M is not set -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set -CONFIG_SPIRAM_USE_MEMMAP=y -# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set -# CONFIG_SPIRAM_USE_MALLOC is not set -CONFIG_SPIRAM_MEMTEST=y -# end of SPI RAM config +# end of Component config -CONFIG_LWIP_LOCAL_HOSTNAME="matrixportal-s3" +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.mk b/ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.mk index 8f139315c84b..1bf5fd818b56 100644 --- a/ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.mk @@ -5,6 +5,10 @@ USB_MANUFACTURER = "Adafruit" IDF_TARGET = esp32s2 +CIRCUITPY_ESP_FLASH_SIZE = 4MB CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 40m -CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m diff --git a/ports/espressif/boards/adafruit_metro_esp32s2/sdkconfig b/ports/espressif/boards/adafruit_metro_esp32s2/sdkconfig index 9ad9e6c3bba9..e69de29bb2d1 100644 --- a/ports/espressif/boards/adafruit_metro_esp32s2/sdkconfig +++ b/ports/espressif/boards/adafruit_metro_esp32s2/sdkconfig @@ -1,37 +0,0 @@ -CONFIG_ESP32S2_SPIRAM_SUPPORT=y -# -# SPI RAM config -# -# CONFIG_SPIRAM_TYPE_AUTO is not set -CONFIG_SPIRAM_TYPE_ESPPSRAM16=y -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set -CONFIG_SPIRAM_SIZE=2097152 -# end of SPI RAM config - -CONFIG_DEFAULT_PSRAM_CLK_IO=30 -# -# PSRAM clock and cs IO for ESP32S2 -# -CONFIG_DEFAULT_PSRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S2 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_80M is not set -CONFIG_SPIRAM_SPEED_40M=y -# CONFIG_SPIRAM_SPEED_26M is not set -# CONFIG_SPIRAM_SPEED_20M is not set -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set -CONFIG_SPIRAM_USE_MEMMAP=y -# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set -# CONFIG_SPIRAM_USE_MALLOC is not set -CONFIG_SPIRAM_MEMTEST=y -# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# -# LWIP -# -CONFIG_LWIP_LOCAL_HOSTNAME="Metro-ESP32S2" -# end of LWIP diff --git a/ports/espressif/boards/adafruit_metro_esp32s3/mpconfigboard.mk b/ports/espressif/boards/adafruit_metro_esp32s3/mpconfigboard.mk index 039c689eafa2..2fd5a40f2591 100644 --- a/ports/espressif/boards/adafruit_metro_esp32s3/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_metro_esp32s3/mpconfigboard.mk @@ -5,6 +5,10 @@ USB_MANUFACTURER = "Adafruit" IDF_TARGET = esp32s3 -CIRCUITPY_ESP_FLASH_MODE = dio -CIRCUITPY_ESP_FLASH_FREQ = 40m +CIRCUITPY_ESP_FLASH_MODE = qio +CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 16MB + +CIRCUITPY_ESP_PSRAM_MODE = opi +CIRCUITPY_ESP_PSRAM_FREQ = 80m +CIRCUITPY_ESP_PSRAM_SIZE = 8MB diff --git a/ports/espressif/boards/adafruit_metro_esp32s3/sdkconfig b/ports/espressif/boards/adafruit_metro_esp32s3/sdkconfig index 2d72ed5391a9..4b1cfa36412d 100644 --- a/ports/espressif/boards/adafruit_metro_esp32s3/sdkconfig +++ b/ports/espressif/boards/adafruit_metro_esp32s3/sdkconfig @@ -1,46 +1,15 @@ # -# Component config -# -# -# ESP32S3-Specific +# Espressif IoT Development Framework Configuration # -CONFIG_ESP32S3_SPIRAM_SUPPORT=y # -# SPI RAM config +# Component config # -# CONFIG_SPIRAM_MODE_QUAD is not set -CONFIG_SPIRAM_MODE_OCT=y -CONFIG_SPIRAM_TYPE_AUTO=y -# CONFIG_SPIRAM_TYPE_ESPPSRAM16 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set -CONFIG_SPIRAM_SIZE=8388608 -# end of SPI RAM config - -# PSRAM Clock and CS IO for ESP32S3 -# -CONFIG_DEFAULT_PSRAM_CLK_IO=30 -CONFIG_DEFAULT_PSRAM_CS_IO=26 -# end of PSRAM Clock and CS IO for ESP32S3 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_120M is not set -CONFIG_SPIRAM_SPEED_80M=y -# CONFIG_SPIRAM_SPEED_40M is not set -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set -CONFIG_SPIRAM_USE_MEMMAP=y -# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set -# CONFIG_SPIRAM_USE_MALLOC is not set -CONFIG_SPIRAM_MEMTEST=y -# end of SPI RAM config - -# end of ESP32S3-Specific - # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="Metro-ESP32S3" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/adafruit_qtpy_esp32_pico/board.c b/ports/espressif/boards/adafruit_qtpy_esp32_pico/board.c index b714fd41f002..0e4504e8b8e6 100644 --- a/ports/espressif/boards/adafruit_qtpy_esp32_pico/board.c +++ b/ports/espressif/boards/adafruit_qtpy_esp32_pico/board.c @@ -27,7 +27,7 @@ #include "supervisor/board.h" #include "mpconfigboard.h" #include "shared-bindings/microcontroller/Pin.h" -#include "components/driver/include/driver/gpio.h" +#include "components/driver/gpio/include/driver/gpio.h" #include "components/hal/include/hal/gpio_hal.h" #include "common-hal/microcontroller/Pin.h" diff --git a/ports/espressif/boards/adafruit_qtpy_esp32_pico/mpconfigboard.mk b/ports/espressif/boards/adafruit_qtpy_esp32_pico/mpconfigboard.mk index de4105314665..b4b40c58c421 100644 --- a/ports/espressif/boards/adafruit_qtpy_esp32_pico/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_qtpy_esp32_pico/mpconfigboard.mk @@ -3,6 +3,10 @@ CIRCUITPY_CREATION_ID = 0x00320003 IDF_TARGET = esp32 -CIRCUITPY_ESP_FLASH_MODE = dio -CIRCUITPY_ESP_FLASH_FREQ = 40m CIRCUITPY_ESP_FLASH_SIZE = 8MB +CIRCUITPY_ESP_FLASH_MODE = qio +CIRCUITPY_ESP_FLASH_FREQ = 80m + +CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 80m diff --git a/ports/espressif/boards/adafruit_qtpy_esp32_pico/sdkconfig b/ports/espressif/boards/adafruit_qtpy_esp32_pico/sdkconfig index bec9e436b77d..e69de29bb2d1 100644 --- a/ports/espressif/boards/adafruit_qtpy_esp32_pico/sdkconfig +++ b/ports/espressif/boards/adafruit_qtpy_esp32_pico/sdkconfig @@ -1,45 +0,0 @@ -# -# SPI RAM config -# -# CONFIG_SPIRAM_TYPE_AUTO is not set -CONFIG_SPIRAM_TYPE_ESPPSRAM16=y -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set -CONFIG_SPIRAM_SIZE=2097152 -CONFIG_SPIRAM_SPEED_40M=y -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -CONFIG_SPIRAM_IGNORE_NOTFOUND=y -CONFIG_SPIRAM_USE_MEMMAP=y -# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set -# CONFIG_SPIRAM_USE_MALLOC is not set -CONFIG_SPIRAM_MEMTEST=y -# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# CONFIG_SPIRAM_ALLOW_NOINIT_SEG_EXTERNAL_MEMORY is not set -CONFIG_SPIRAM_CACHE_WORKAROUND=y - -# -# SPI RAM config -# -CONFIG_ESP32_SPIRAM_SUPPORT=y -# CONFIG_SPIRAM_TYPE_AUTO is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set - -### # Uncomment (remove ###) to send ESP_LOG output to TX/RX pins -### # -### # ESP System Settings -### # -### CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT=y -### # CONFIG_ESP_SYSTEM_PANIC_SILENT_REBOOT is not set -### CONFIG_ESP_CONSOLE_UART_CUSTOM=y -### # CONFIG_ESP_CONSOLE_NONE is not set -### CONFIG_ESP_CONSOLE_UART=y -### CONFIG_ESP_CONSOLE_UART_CUSTOM_NUM_0=y -### # CONFIG_ESP_CONSOLE_UART_CUSTOM_NUM_1 is not set -### CONFIG_ESP_CONSOLE_UART_NUM=0 -### CONFIG_ESP_CONSOLE_UART_TX_GPIO=32 -### CONFIG_ESP_CONSOLE_UART_RX_GPIO=7 -### CONFIG_ESP_CONSOLE_UART_BAUDRATE=115200 -### # CONFIG_ESP_SYSTEM_CHECK_INT_LEVEL_5 is not set -### # end of ESP System Settings diff --git a/ports/espressif/boards/adafruit_qtpy_esp32c3/mpconfigboard.h b/ports/espressif/boards/adafruit_qtpy_esp32c3/mpconfigboard.h index 32b094088134..9a9ccd8124c8 100644 --- a/ports/espressif/boards/adafruit_qtpy_esp32c3/mpconfigboard.h +++ b/ports/espressif/boards/adafruit_qtpy_esp32c3/mpconfigboard.h @@ -43,5 +43,3 @@ // For entering safe mode #define CIRCUITPY_BOOT_BUTTON (&pin_GPIO9) - -#define CIRCUITPY_ESP_USB_SERIAL_JTAG (1) diff --git a/ports/espressif/boards/adafruit_qtpy_esp32c3/mpconfigboard.mk b/ports/espressif/boards/adafruit_qtpy_esp32c3/mpconfigboard.mk index e2ce1e438d7f..df1a53faba89 100644 --- a/ports/espressif/boards/adafruit_qtpy_esp32c3/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_qtpy_esp32c3/mpconfigboard.mk @@ -6,3 +6,7 @@ IDF_TARGET = esp32c3 CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_USB_SERIAL_JTAG = 1 + +CIRCUITPY_BLEIO = 0 diff --git a/ports/espressif/boards/adafruit_qtpy_esp32c3/sdkconfig b/ports/espressif/boards/adafruit_qtpy_esp32c3/sdkconfig index b47420753cc0..aa82df2b813b 100644 --- a/ports/espressif/boards/adafruit_qtpy_esp32c3/sdkconfig +++ b/ports/espressif/boards/adafruit_qtpy_esp32c3/sdkconfig @@ -1,5 +1,15 @@ # +# Espressif IoT Development Framework Configuration +# +# +# Component config +# +# # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="Adafruit-QTPy-ESP32C3" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.mk b/ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.mk index f1bd7652fe8b..1460667b9e45 100644 --- a/ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.mk @@ -9,3 +9,7 @@ IDF_TARGET = esp32s2 CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 40m CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m diff --git a/ports/espressif/boards/adafruit_qtpy_esp32s2/sdkconfig b/ports/espressif/boards/adafruit_qtpy_esp32s2/sdkconfig index f19afafa3d23..e69de29bb2d1 100644 --- a/ports/espressif/boards/adafruit_qtpy_esp32s2/sdkconfig +++ b/ports/espressif/boards/adafruit_qtpy_esp32s2/sdkconfig @@ -1,37 +0,0 @@ -CONFIG_ESP32S2_SPIRAM_SUPPORT=y -# -# SPI RAM config -# -# CONFIG_SPIRAM_TYPE_AUTO is not set -CONFIG_SPIRAM_TYPE_ESPPSRAM16=y -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set -CONFIG_SPIRAM_SIZE=2097152 -# end of SPI RAM config - -CONFIG_DEFAULT_PSRAM_CLK_IO=30 -# -# PSRAM clock and cs IO for ESP32S2 -# -CONFIG_DEFAULT_PSRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S2 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_80M is not set -CONFIG_SPIRAM_SPEED_40M=y -# CONFIG_SPIRAM_SPEED_26M is not set -# CONFIG_SPIRAM_SPEED_20M is not set -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set -CONFIG_SPIRAM_USE_MEMMAP=y -# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set -# CONFIG_SPIRAM_USE_MALLOC is not set -CONFIG_SPIRAM_MEMTEST=y -# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# -# LWIP -# -CONFIG_LWIP_LOCAL_HOSTNAME="espressif" -# end of LWIP diff --git a/ports/espressif/boards/adafruit_qtpy_esp32s3_4mbflash_2mbpsram/board.c b/ports/espressif/boards/adafruit_qtpy_esp32s3_4mbflash_2mbpsram/board.c index 3b1f5efd8747..164430c88c92 100644 --- a/ports/espressif/boards/adafruit_qtpy_esp32s3_4mbflash_2mbpsram/board.c +++ b/ports/espressif/boards/adafruit_qtpy_esp32s3_4mbflash_2mbpsram/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/adafruit_qtpy_esp32s3_4mbflash_2mbpsram/mpconfigboard.mk b/ports/espressif/boards/adafruit_qtpy_esp32s3_4mbflash_2mbpsram/mpconfigboard.mk index 50b1394a25d4..60ed676f4475 100644 --- a/ports/espressif/boards/adafruit_qtpy_esp32s3_4mbflash_2mbpsram/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_qtpy_esp32s3_4mbflash_2mbpsram/mpconfigboard.mk @@ -10,4 +10,8 @@ CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 80m + CIRCUITPY_ESPCAMERA = 0 diff --git a/ports/espressif/boards/adafruit_qtpy_esp32s3_4mbflash_2mbpsram/sdkconfig b/ports/espressif/boards/adafruit_qtpy_esp32s3_4mbflash_2mbpsram/sdkconfig index 9a05ab0205e7..f5ef79768114 100644 --- a/ports/espressif/boards/adafruit_qtpy_esp32s3_4mbflash_2mbpsram/sdkconfig +++ b/ports/espressif/boards/adafruit_qtpy_esp32s3_4mbflash_2mbpsram/sdkconfig @@ -1,43 +1,9 @@ # -# Component config -# -# -# ESP32S3-Specific -# -CONFIG_ESP32S3_SPIRAM_SUPPORT=y -# -# SPI RAM config +# Espressif IoT Development Framework Configuration # -CONFIG_SPIRAM_MODE_QUAD=y -# CONFIG_SPIRAM_MODE_OCT is not set -CONFIG_SPIRAM_TYPE_AUTO=y -# CONFIG_SPIRAM_TYPE_ESPPSRAM16 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set -CONFIG_SPIRAM_SIZE=2097152 # -# PSRAM Clock and CS IO for ESP32S3 +# Component config # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 -CONFIG_DEFAULT_PSRAM_CS_IO=26 -# end of PSRAM Clock and CS IO for ESP32S3 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_120M is not set -CONFIG_SPIRAM_SPEED_80M=y -# CONFIG_SPIRAM_SPEED_40M is not set -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set -CONFIG_SPIRAM_USE_MEMMAP=y -# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set -# CONFIG_SPIRAM_USE_MALLOC is not set -CONFIG_SPIRAM_MEMTEST=y -# end of SPI RAM config - -# end of ESP32S3-Specific - # # LWIP # @@ -45,3 +11,5 @@ CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3" # end of LWIP # end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/board.c b/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/board.c index 3b1f5efd8747..164430c88c92 100644 --- a/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/board.c +++ b/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/sdkconfig b/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/sdkconfig index 9d924272ec4e..f5ef79768114 100644 --- a/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/sdkconfig +++ b/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/sdkconfig @@ -1,7 +1,15 @@ -CONFIG_ESP32S3_SPIRAM_SUPPORT=n - +# +# Espressif IoT Development Framework Configuration +# +# +# Component config +# # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/adafruit_qualia_s3_rgb666/mpconfigboard.h b/ports/espressif/boards/adafruit_qualia_s3_rgb666/mpconfigboard.h index 9acfe8cf0652..bb7e0ead9b1d 100644 --- a/ports/espressif/boards/adafruit_qualia_s3_rgb666/mpconfigboard.h +++ b/ports/espressif/boards/adafruit_qualia_s3_rgb666/mpconfigboard.h @@ -32,13 +32,11 @@ #define DEFAULT_I2C_BUS_SDA (&pin_GPIO8) #define DEFAULT_I2C_BUS_SCL (&pin_GPIO18) -// UART pins attached to the USB-serial converter chip -#define CIRCUITPY_CONSOLE_UART_TX (&pin_GPIO43) -#define CIRCUITPY_CONSOLE_UART_RX (&pin_GPIO44) +#define DEFAULT_SPI_BUS_SCK (&pin_GPIO5) +#define DEFAULT_SPI_BUS_MISO (&pin_GPIO6) +#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO7) -#define MICROPY_HW_NEOPIXEL (&pin_GPIO4) // also DBLTAP - -#define DOUBLE_TAP_PIN (&pin_GPIO4) // also NEOPIXEL +#define DOUBLE_TAP_PIN (&pin_GPIO4) // a 1024x768 16BPP framebuffer + some breathing room #define DEFAULT_RESERVED_PSRAM (1024 * 1024 * 2) diff --git a/ports/espressif/boards/adafruit_qualia_s3_rgb666/mpconfigboard.mk b/ports/espressif/boards/adafruit_qualia_s3_rgb666/mpconfigboard.mk index 1bde6abfe4c4..7659cd160a29 100644 --- a/ports/espressif/boards/adafruit_qualia_s3_rgb666/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_qualia_s3_rgb666/mpconfigboard.mk @@ -5,8 +5,12 @@ USB_MANUFACTURER = "Adafruit" IDF_TARGET = esp32s3 -CIRCUITPY_ESP_FLASH_MODE = dio -CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 16MB +CIRCUITPY_ESP_FLASH_MODE = qio +CIRCUITPY_ESP_FLASH_FREQ = 80m + +CIRCUITPY_ESP_PSRAM_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_MODE = opi +CIRCUITPY_ESP_PSRAM_FREQ = 120m CIRCUITPY_DOTCLOCKFRAMEBUFFER = 1 diff --git a/ports/espressif/boards/adafruit_qualia_s3_rgb666/pins.c b/ports/espressif/boards/adafruit_qualia_s3_rgb666/pins.c index 4bd25d26cbc2..758b08640a23 100644 --- a/ports/espressif/boards/adafruit_qualia_s3_rgb666/pins.c +++ b/ports/espressif/boards/adafruit_qualia_s3_rgb666/pins.c @@ -1,6 +1,28 @@ #include "py/objtuple.h" #include "shared-bindings/board/__init__.h" +#define MP_DEFINE_BYTES_OBJ(obj_name, bin) mp_obj_str_t obj_name = {{&mp_type_bytes}, 0, sizeof(bin) - 1, (const byte *)bin} + +static const char i2c_bus_init_sequence[] = { + 2, 3, 0x78, // set GPIO direction + 2, 2, 0, // disable all output inversion + 0, // trailing NUL for python bytes() representation +}; +STATIC MP_DEFINE_BYTES_OBJ(i2c_init_byte_obj, i2c_bus_init_sequence); + +STATIC const mp_rom_map_elem_t tft_io_expander_table[] = { + { MP_ROM_QSTR(MP_QSTR_i2c_address), MP_ROM_INT(0x3f)}, + { MP_ROM_QSTR(MP_QSTR_gpio_address), MP_ROM_INT(1)}, + { MP_ROM_QSTR(MP_QSTR_gpio_data_len), MP_ROM_INT(1)}, + { MP_ROM_QSTR(MP_QSTR_gpio_data), MP_ROM_INT(0xFD)}, + { MP_ROM_QSTR(MP_QSTR_cs_bit), MP_ROM_INT(1)}, + { MP_ROM_QSTR(MP_QSTR_mosi_bit), MP_ROM_INT(7)}, + { MP_ROM_QSTR(MP_QSTR_clk_bit), MP_ROM_INT(0)}, + { MP_ROM_QSTR(MP_QSTR_reset_bit), MP_ROM_INT(2)}, + { MP_ROM_QSTR(MP_QSTR_i2c_init_sequence), &i2c_init_byte_obj}, +}; +MP_DEFINE_CONST_DICT(tft_io_expander_dict, tft_io_expander_table); + STATIC const mp_rom_obj_tuple_t tft_r_pins = { {&mp_type_tuple}, 5, @@ -52,9 +74,8 @@ MP_DEFINE_CONST_DICT(tft_dict, tft_table); STATIC const mp_rom_map_elem_t board_module_globals_table[] = { CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS - { MP_ROM_QSTR(MP_QSTR_TFT), MP_ROM_PTR(&tft_dict) }, - - { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(MICROPY_HW_NEOPIXEL) }, + { MP_ROM_QSTR(MP_QSTR_TFT_PINS), MP_ROM_PTR(&tft_dict) }, + { MP_ROM_QSTR(MP_QSTR_TFT_IO_EXPANDER), MP_ROM_PTR(&tft_io_expander_dict) }, { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO43) }, { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO44) }, @@ -62,6 +83,11 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(DEFAULT_I2C_BUS_SDA) }, { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(DEFAULT_I2C_BUS_SCL) }, + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(DEFAULT_SPI_BUS_MISO) }, + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(DEFAULT_SPI_BUS_MOSI) }, + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(DEFAULT_SPI_BUS_SCK) }, + { MP_ROM_QSTR(MP_QSTR_CS), MP_ROM_PTR(&pin_GPIO15) }, + // I/O expander pin numbers { MP_ROM_QSTR(MP_QSTR_TFT_SCK), MP_ROM_INT(0) }, { MP_ROM_QSTR(MP_QSTR_TFT_CS), MP_ROM_INT(1) }, @@ -74,5 +100,6 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, { MP_ROM_QSTR(MP_QSTR_STEMMA_I2C), MP_ROM_PTR(&board_i2c_obj) }, + { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, }; MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/espressif/boards/adafruit_qualia_s3_rgb666/sdkconfig b/ports/espressif/boards/adafruit_qualia_s3_rgb666/sdkconfig index 79d78825fc1b..8e26f268e76a 100644 --- a/ports/espressif/boards/adafruit_qualia_s3_rgb666/sdkconfig +++ b/ports/espressif/boards/adafruit_qualia_s3_rgb666/sdkconfig @@ -1,41 +1,15 @@ -CONFIG_ESP32S3_SPIRAM_SUPPORT=y # -# SPI RAM config +# Espressif IoT Development Framework Configuration # -# CONFIG_SPIRAM_MODE_QUAD is not set -CONFIG_SPIRAM_MODE_OCT=y -CONFIG_SPIRAM_TYPE_AUTO=y -# end of SPI RAM config - -CONFIG_DEFAULT_PSRAM_CLK_IO=30 # -# PSRAM Clock and CS IO for ESP32S3 +# Component config # -CONFIG_DEFAULT_PSRAM_CS_IO=26 -# end of PSRAM Clock and CS IO for ESP32S3 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -CONFIG_SPIRAM_SPEED_80M=y -# CONFIG_SPIRAM_SPEED_40M is not set -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set -CONFIG_SPIRAM_USE_MEMMAP=y -# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set -# CONFIG_SPIRAM_USE_MALLOC is not set -CONFIG_SPIRAM_MEMTEST=y # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="qualia" # end of LWIP -# -# CONFIG_ESP_CONSOLE_NONE is not set -CONFIG_ESP_CONSOLE_UART_BAUDRATE=115200 -CONFIG_ESP_CONSOLE_UART_CUSTOM_NUM_0=y -CONFIG_ESP_CONSOLE_UART_CUSTOM=y -CONFIG_ESP_CONSOLE_UART_NUM=0 -CONFIG_ESP_CONSOLE_UART_RX_GPIO=44 -CONFIG_ESP_CONSOLE_UART_TX_GPIO=43 -CONFIG_ESP_CONSOLE_UART=y + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/ai_thinker_esp32-c3s-2m/board.c b/ports/espressif/boards/ai_thinker_esp32-c3s-2m/board.c index 2e09e7d9a427..9e9b34a237e2 100644 --- a/ports/espressif/boards/ai_thinker_esp32-c3s-2m/board.c +++ b/ports/espressif/boards/ai_thinker_esp32-c3s-2m/board.c @@ -28,16 +28,10 @@ #include "shared-bindings/microcontroller/Pin.h" #include "supervisor/board.h" -#include "components/driver/include/driver/gpio.h" +#include "components/driver/gpio/include/driver/gpio.h" #include "soc/usb_serial_jtag_struct.h" void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO20); - common_hal_never_reset_pin(&pin_GPIO21); - #endif - // This board has LEDs connected to the USB pins USB_SERIAL_JTAG.conf0.usb_pad_enable = 0; USB_SERIAL_JTAG.conf0.dp_pullup = 0; diff --git a/ports/espressif/boards/ai_thinker_esp32-c3s-2m/mpconfigboard.mk b/ports/espressif/boards/ai_thinker_esp32-c3s-2m/mpconfigboard.mk index 054810a0887b..fec39d79f3c7 100644 --- a/ports/espressif/boards/ai_thinker_esp32-c3s-2m/mpconfigboard.mk +++ b/ports/espressif/boards/ai_thinker_esp32-c3s-2m/mpconfigboard.mk @@ -8,3 +8,7 @@ CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 2MB CIRCUITPY_DUALBANK = 0 + +CIRCUITPY_ESP_USB_SERIAL_JTAG = 0 + +CIRCUITPY_BLEIO = 0 diff --git a/ports/espressif/boards/ai_thinker_esp32-c3s-2m/sdkconfig b/ports/espressif/boards/ai_thinker_esp32-c3s-2m/sdkconfig index 60d8719596ba..411bc17724ae 100644 --- a/ports/espressif/boards/ai_thinker_esp32-c3s-2m/sdkconfig +++ b/ports/espressif/boards/ai_thinker_esp32-c3s-2m/sdkconfig @@ -1,5 +1,15 @@ # +# Espressif IoT Development Framework Configuration +# +# +# Component config +# +# # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="AIThinker-ESP32C3S-2M" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/ai_thinker_esp32-c3s/board.c b/ports/espressif/boards/ai_thinker_esp32-c3s/board.c index 2e09e7d9a427..9e9b34a237e2 100644 --- a/ports/espressif/boards/ai_thinker_esp32-c3s/board.c +++ b/ports/espressif/boards/ai_thinker_esp32-c3s/board.c @@ -28,16 +28,10 @@ #include "shared-bindings/microcontroller/Pin.h" #include "supervisor/board.h" -#include "components/driver/include/driver/gpio.h" +#include "components/driver/gpio/include/driver/gpio.h" #include "soc/usb_serial_jtag_struct.h" void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO20); - common_hal_never_reset_pin(&pin_GPIO21); - #endif - // This board has LEDs connected to the USB pins USB_SERIAL_JTAG.conf0.usb_pad_enable = 0; USB_SERIAL_JTAG.conf0.dp_pullup = 0; diff --git a/ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.mk b/ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.mk index 3597166303b1..8bc9948aeef7 100644 --- a/ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.mk +++ b/ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.mk @@ -6,3 +6,7 @@ IDF_TARGET = esp32c3 CIRCUITPY_ESP_FLASH_MODE = qio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_USB_SERIAL_JTAG = 0 + +CIRCUITPY_BLEIO = 0 diff --git a/ports/espressif/boards/ai_thinker_esp32-c3s/sdkconfig b/ports/espressif/boards/ai_thinker_esp32-c3s/sdkconfig index 88467d9c9e44..435604eb4b8a 100644 --- a/ports/espressif/boards/ai_thinker_esp32-c3s/sdkconfig +++ b/ports/espressif/boards/ai_thinker_esp32-c3s/sdkconfig @@ -1,5 +1,15 @@ # +# Espressif IoT Development Framework Configuration +# +# +# Component config +# +# # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="AIThinker-ESP32C3S" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/ai_thinker_esp_12k_nodemcu/board.c b/ports/espressif/boards/ai_thinker_esp_12k_nodemcu/board.c index b3c8cb41914e..164430c88c92 100644 --- a/ports/espressif/boards/ai_thinker_esp_12k_nodemcu/board.c +++ b/ports/espressif/boards/ai_thinker_esp_12k_nodemcu/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.mk b/ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.mk index 4ec2175eca2f..fdb03078d4c3 100644 --- a/ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.mk +++ b/ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.mk @@ -5,6 +5,10 @@ USB_MANUFACTURER = "Ai-Thinker" IDF_TARGET = esp32s2 +CIRCUITPY_ESP_FLASH_SIZE = 4MB CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 40m -CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_PSRAM_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m diff --git a/ports/espressif/boards/ai_thinker_esp_12k_nodemcu/sdkconfig b/ports/espressif/boards/ai_thinker_esp_12k_nodemcu/sdkconfig index 49ee336ed4cd..e69de29bb2d1 100644 --- a/ports/espressif/boards/ai_thinker_esp_12k_nodemcu/sdkconfig +++ b/ports/espressif/boards/ai_thinker_esp_12k_nodemcu/sdkconfig @@ -1,37 +0,0 @@ -CONFIG_ESP32S2_SPIRAM_SUPPORT=y -# -# SPI RAM config -# -# CONFIG_SPIRAM_TYPE_AUTO is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM16 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -CONFIG_SPIRAM_TYPE_ESPPSRAM64=y -CONFIG_SPIRAM_SIZE=8388608 -# end of SPI RAM config - -CONFIG_DEFAULT_PSRAM_CLK_IO=30 -# -# PSRAM clock and cs IO for ESP32S2 -# -CONFIG_DEFAULT_PSRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S2 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_80M is not set -CONFIG_SPIRAM_SPEED_40M=y -# CONFIG_SPIRAM_SPEED_26M is not set -# CONFIG_SPIRAM_SPEED_20M is not set -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set -CONFIG_SPIRAM_USE_MEMMAP=y -# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set -# CONFIG_SPIRAM_USE_MALLOC is not set -CONFIG_SPIRAM_MEMTEST=y -# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# -# LWIP -# -CONFIG_LWIP_LOCAL_HOSTNAME="espressif" -# end of LWIP diff --git a/ports/espressif/boards/arduino_nano_esp32s3/board.c b/ports/espressif/boards/arduino_nano_esp32s3/board.c index 8952a19c5d8d..58432f9811c9 100644 --- a/ports/espressif/boards/arduino_nano_esp32s3/board.c +++ b/ports/espressif/boards/arduino_nano_esp32s3/board.c @@ -27,15 +27,7 @@ #include "supervisor/board.h" #include "mpconfigboard.h" #include "shared-bindings/microcontroller/Pin.h" -#include "components/driver/include/driver/gpio.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif -} +#include "components/driver/gpio/include/driver/gpio.h" bool espressif_board_reset_pin_number(gpio_num_t pin_number) { if (pin_number == 13) { diff --git a/ports/espressif/boards/arduino_nano_esp32s3/mpconfigboard.mk b/ports/espressif/boards/arduino_nano_esp32s3/mpconfigboard.mk index c9af3af25e73..c342e5e2cb34 100644 --- a/ports/espressif/boards/arduino_nano_esp32s3/mpconfigboard.mk +++ b/ports/espressif/boards/arduino_nano_esp32s3/mpconfigboard.mk @@ -6,9 +6,17 @@ USB_MANUFACTURER = "Arduino" IDF_TARGET = esp32s3 +# This has a u-blox® NORA-W106-10B module. + +# This flash lives outside the module. CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 80m -CIRCUITPY_ESP_FLASH_SIZE = 8MB +CIRCUITPY_ESP_FLASH_SIZE = 16MB + +# This PSRAM is in the module. +CIRCUITPY_ESP_PSRAM_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_MODE = opi +CIRCUITPY_ESP_PSRAM_FREQ = 80m INTERNAL_FLASH_FILESYSTEM = 0 QSPI_FLASH_FILESYSTEM = 1 diff --git a/ports/espressif/boards/arduino_nano_esp32s3/sdkconfig b/ports/espressif/boards/arduino_nano_esp32s3/sdkconfig index 2acf08a4a7fe..f5ef79768114 100644 --- a/ports/espressif/boards/arduino_nano_esp32s3/sdkconfig +++ b/ports/espressif/boards/arduino_nano_esp32s3/sdkconfig @@ -1,43 +1,15 @@ # -# Component config -# -# -# ESP32S3-Specific -# -CONFIG_ESP32S3_SPIRAM_SUPPORT=y - -# -# SPI RAM config +# Espressif IoT Development Framework Configuration # -# CONFIG_SPIRAM_MODE_QUAD is not set -CONFIG_SPIRAM_MODE_OCT=y -# CONFIG_SPIRAM_TYPE_AUTO is not set -CONFIG_SPIRAM_TYPE_ESPPSRAM64=y -CONFIG_SPIRAM_SIZE=8388608 # -# PSRAM Clock and CS IO for ESP32S3 +# Component config # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 -CONFIG_DEFAULT_PSRAM_CS_IO=26 -# end of PSRAM Clock and CS IO for ESP32S3 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -CONFIG_SPIRAM_SPEED_80M=y -# CONFIG_SPIRAM_SPEED_40M is not set -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set -CONFIG_SPIRAM_USE_MEMMAP=y -# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set -# CONFIG_SPIRAM_USE_MALLOC is not set -CONFIG_SPIRAM_MEMTEST=y -# end of SPI RAM config - -# end of ESP32S3-Specific - # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/arduino_nano_esp32s3_inverted_statusled/board.c b/ports/espressif/boards/arduino_nano_esp32s3_inverted_statusled/board.c index 8952a19c5d8d..58432f9811c9 100644 --- a/ports/espressif/boards/arduino_nano_esp32s3_inverted_statusled/board.c +++ b/ports/espressif/boards/arduino_nano_esp32s3_inverted_statusled/board.c @@ -27,15 +27,7 @@ #include "supervisor/board.h" #include "mpconfigboard.h" #include "shared-bindings/microcontroller/Pin.h" -#include "components/driver/include/driver/gpio.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif -} +#include "components/driver/gpio/include/driver/gpio.h" bool espressif_board_reset_pin_number(gpio_num_t pin_number) { if (pin_number == 13) { diff --git a/ports/espressif/boards/arduino_nano_esp32s3_inverted_statusled/mpconfigboard.mk b/ports/espressif/boards/arduino_nano_esp32s3_inverted_statusled/mpconfigboard.mk index 925c4ab6e2c6..70b2abfede6d 100644 --- a/ports/espressif/boards/arduino_nano_esp32s3_inverted_statusled/mpconfigboard.mk +++ b/ports/espressif/boards/arduino_nano_esp32s3_inverted_statusled/mpconfigboard.mk @@ -6,9 +6,17 @@ USB_MANUFACTURER = "Arduino" IDF_TARGET = esp32s3 +# This has a u-blox® NORA-W106-10B module. + +# This flash lives outside the module. CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 80m -CIRCUITPY_ESP_FLASH_SIZE = 8MB +CIRCUITPY_ESP_FLASH_SIZE = 16MB + +# This PSRAM is in the module. +CIRCUITPY_ESP_PSRAM_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_MODE = opi +CIRCUITPY_ESP_PSRAM_FREQ = 80m INTERNAL_FLASH_FILESYSTEM = 0 QSPI_FLASH_FILESYSTEM = 1 diff --git a/ports/espressif/boards/arduino_nano_esp32s3_inverted_statusled/sdkconfig b/ports/espressif/boards/arduino_nano_esp32s3_inverted_statusled/sdkconfig index 26a26b5fe814..b2e5c546b825 100644 --- a/ports/espressif/boards/arduino_nano_esp32s3_inverted_statusled/sdkconfig +++ b/ports/espressif/boards/arduino_nano_esp32s3_inverted_statusled/sdkconfig @@ -1,43 +1,15 @@ # -# Component config -# -# -# ESP32S3-Specific -# -CONFIG_ESP32S3_SPIRAM_SUPPORT=y - -# -# SPI RAM config +# Espressif IoT Development Framework Configuration # -# CONFIG_SPIRAM_MODE_QUAD is not set -CONFIG_SPIRAM_MODE_OCT=y -# CONFIG_SPIRAM_TYPE_AUTO is not set -CONFIG_SPIRAM_TYPE_ESPPSRAM64=y -CONFIG_SPIRAM_SIZE=8388608 # -# PSRAM Clock and CS IO for ESP32S3 +# Component config # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 -CONFIG_DEFAULT_PSRAM_CS_IO=26 -# end of PSRAM Clock and CS IO for ESP32S3 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -CONFIG_SPIRAM_SPEED_80M=y -# CONFIG_SPIRAM_SPEED_40M is not set -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set -CONFIG_SPIRAM_USE_MEMMAP=y -# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set -# CONFIG_SPIRAM_USE_MALLOC is not set -CONFIG_SPIRAM_MEMTEST=y -# end of SPI RAM config - -# end of ESP32S3-Specific - # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="nano-esp32" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/artisense_rd00/board.c b/ports/espressif/boards/artisense_rd00/board.c index fb3f6befc9c7..a23fe0765bbb 100644 --- a/ports/espressif/boards/artisense_rd00/board.c +++ b/ports/espressif/boards/artisense_rd00/board.c @@ -29,12 +29,6 @@ #include "shared-bindings/microcontroller/Pin.h" void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ - // Crystal common_hal_never_reset_pin(&pin_GPIO15); common_hal_never_reset_pin(&pin_GPIO16); diff --git a/ports/espressif/boards/artisense_rd00/mpconfigboard.mk b/ports/espressif/boards/artisense_rd00/mpconfigboard.mk index 1011143972c1..307169412f49 100644 --- a/ports/espressif/boards/artisense_rd00/mpconfigboard.mk +++ b/ports/espressif/boards/artisense_rd00/mpconfigboard.mk @@ -8,3 +8,7 @@ IDF_TARGET = esp32s2 CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 40m CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m diff --git a/ports/espressif/boards/artisense_rd00/sdkconfig b/ports/espressif/boards/artisense_rd00/sdkconfig index cd57f0d11867..36749a928bd1 100644 --- a/ports/espressif/boards/artisense_rd00/sdkconfig +++ b/ports/espressif/boards/artisense_rd00/sdkconfig @@ -1,37 +1,15 @@ -CONFIG_ESP32S2_SPIRAM_SUPPORT=y # -# SPI RAM config +# Espressif IoT Development Framework Configuration # -# CONFIG_SPIRAM_TYPE_AUTO is not set -CONFIG_SPIRAM_TYPE_ESPPSRAM16=y -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set -CONFIG_SPIRAM_SIZE=2097152 -# end of SPI RAM config - -CONFIG_DEFAULT_PSRAM_CLK_IO=30 # -# PSRAM clock and cs IO for ESP32S2 +# Component config # -CONFIG_DEFAULT_PSRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S2 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_80M is not set -CONFIG_SPIRAM_SPEED_40M=y -# CONFIG_SPIRAM_SPEED_26M is not set -# CONFIG_SPIRAM_SPEED_20M is not set -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set -CONFIG_SPIRAM_USE_MEMMAP=y -# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set -# CONFIG_SPIRAM_USE_MALLOC is not set -CONFIG_SPIRAM_MEMTEST=y -# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="RD00-ESP32S2" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/atmegazero_esp32s2/board.c b/ports/espressif/boards/atmegazero_esp32s2/board.c index b3c8cb41914e..164430c88c92 100644 --- a/ports/espressif/boards/atmegazero_esp32s2/board.c +++ b/ports/espressif/boards/atmegazero_esp32s2/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.mk b/ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.mk index 53593be38b85..aea0315c7a26 100644 --- a/ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.mk +++ b/ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.mk @@ -8,3 +8,7 @@ IDF_TARGET = esp32s2 CIRCUITPY_ESP_FLASH_MODE = qio CIRCUITPY_ESP_FLASH_FREQ = 40m CIRCUITPY_ESP_FLASH_SIZE = 16MB + +CIRCUITPY_ESP_PSRAM_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m diff --git a/ports/espressif/boards/atmegazero_esp32s2/sdkconfig b/ports/espressif/boards/atmegazero_esp32s2/sdkconfig index b528b9f343a7..0748a66c5ca1 100644 --- a/ports/espressif/boards/atmegazero_esp32s2/sdkconfig +++ b/ports/espressif/boards/atmegazero_esp32s2/sdkconfig @@ -1,37 +1,15 @@ -CONFIG_ESP32S2_SPIRAM_SUPPORT=y # -# SPI RAM config +# Espressif IoT Development Framework Configuration # -# CONFIG_SPIRAM_TYPE_AUTO is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM16 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -CONFIG_SPIRAM_TYPE_ESPPSRAM64=y -CONFIG_SPIRAM_SIZE=8388608 -# end of SPI RAM config - -CONFIG_DEFAULT_PSRAM_CLK_IO=30 # -# PSRAM clock and cs IO for ESP32S2 +# Component config # -CONFIG_DEFAULT_PSRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S2 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_80M is not set -CONFIG_SPIRAM_SPEED_40M=y -# CONFIG_SPIRAM_SPEED_26M is not set -# CONFIG_SPIRAM_SPEED_20M is not set -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set -CONFIG_SPIRAM_USE_MEMMAP=y -# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set -# CONFIG_SPIRAM_USE_MALLOC is not set -CONFIG_SPIRAM_MEMTEST=y -# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="ATMegaZero-Esp32s2" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/beetle-esp32-c3/mpconfigboard.h b/ports/espressif/boards/beetle-esp32-c3/mpconfigboard.h index 2cdf48fad3f1..7b93665ceebf 100644 --- a/ports/espressif/boards/beetle-esp32-c3/mpconfigboard.h +++ b/ports/espressif/boards/beetle-esp32-c3/mpconfigboard.h @@ -40,5 +40,3 @@ #define CIRCUITPY_BOARD_UART (1) #define CIRCUITPY_BOARD_UART_PIN {{.tx = &pin_GPIO21, .rx = &pin_GPIO20}} - -#define CIRCUITPY_ESP_USB_SERIAL_JTAG (1) diff --git a/ports/espressif/boards/beetle-esp32-c3/mpconfigboard.mk b/ports/espressif/boards/beetle-esp32-c3/mpconfigboard.mk index b3fc9f5252a7..034d94bb5f9d 100644 --- a/ports/espressif/boards/beetle-esp32-c3/mpconfigboard.mk +++ b/ports/espressif/boards/beetle-esp32-c3/mpconfigboard.mk @@ -7,3 +7,7 @@ IDF_TARGET = esp32c3 CIRCUITPY_ESP_FLASH_MODE=qio CIRCUITPY_ESP_FLASH_FREQ=80m CIRCUITPY_ESP_FLASH_SIZE=4MB + +CIRCUITPY_ESP_USB_SERIAL_JTAG = 1 + +CIRCUITPY_BLEIO = 0 diff --git a/ports/espressif/boards/beetle-esp32-c3/sdkconfig b/ports/espressif/boards/beetle-esp32-c3/sdkconfig index 69da6d30fda7..2b4299082a22 100644 --- a/ports/espressif/boards/beetle-esp32-c3/sdkconfig +++ b/ports/espressif/boards/beetle-esp32-c3/sdkconfig @@ -1,5 +1,15 @@ # +# Espressif IoT Development Framework Configuration +# +# +# Component config +# +# # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="beetle-esp32-c3" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/bpi_bit_s2/board.c b/ports/espressif/boards/bpi_bit_s2/board.c index 22cdb318982d..164430c88c92 100644 --- a/ports/espressif/boards/bpi_bit_s2/board.c +++ b/ports/espressif/boards/bpi_bit_s2/board.c @@ -25,14 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/bpi_bit_s2/mpconfigboard.mk b/ports/espressif/boards/bpi_bit_s2/mpconfigboard.mk index 2c793ba5fb07..ca2d074434cd 100644 --- a/ports/espressif/boards/bpi_bit_s2/mpconfigboard.mk +++ b/ports/espressif/boards/bpi_bit_s2/mpconfigboard.mk @@ -11,3 +11,7 @@ CIRCUITPY_ESP_FLASH_SIZE=4MB # Include these Python libraries in firmware. FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel + +CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m diff --git a/ports/espressif/boards/bpi_bit_s2/sdkconfig b/ports/espressif/boards/bpi_bit_s2/sdkconfig index 91758051d376..c9b6f75868d8 100644 --- a/ports/espressif/boards/bpi_bit_s2/sdkconfig +++ b/ports/espressif/boards/bpi_bit_s2/sdkconfig @@ -1,37 +1,15 @@ -CONFIG_ESP32S2_SPIRAM_SUPPORT=y # -# SPI RAM config +# Espressif IoT Development Framework Configuration # -CONFIG_SPIRAM_MODE_QUAD=y -# CONFIG_SPIRAM_MODE_OCT is not set -# CONFIG_SPIRAM_TYPE_AUTO is not set -CONFIG_SPIRAM_TYPE_ESPPSRAM16=y -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set -CONFIG_SPIRAM_SIZE=2097152 -# end of SPI RAM config - -CONFIG_DEFAULT_PSRAM_CLK_IO=30 # -# PSRAM Clock and CS IO for ESP32S3 +# Component config # -CONFIG_DEFAULT_PSRAM_CS_IO=26 -# end of PSRAM Clock and CS IO for ESP32S3 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_120M is not set -# CONFIG_SPIRAM_SPEED_80M is not set -CONFIG_SPIRAM_SPEED_40M=y -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set -CONFIG_SPIRAM_USE_MEMMAP=y -# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set -# CONFIG_SPIRAM_USE_MALLOC is not set -CONFIG_SPIRAM_MEMTEST=y # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="BPI-BIT-S2" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/bpi_leaf_s3/board.c b/ports/espressif/boards/bpi_leaf_s3/board.c index 3b1f5efd8747..164430c88c92 100644 --- a/ports/espressif/boards/bpi_leaf_s3/board.c +++ b/ports/espressif/boards/bpi_leaf_s3/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/bpi_leaf_s3/mpconfigboard.h b/ports/espressif/boards/bpi_leaf_s3/mpconfigboard.h index fd6aae04ea5b..4deba7de0cd6 100644 --- a/ports/espressif/boards/bpi_leaf_s3/mpconfigboard.h +++ b/ports/espressif/boards/bpi_leaf_s3/mpconfigboard.h @@ -40,3 +40,5 @@ #define DEFAULT_UART_BUS_RX (&pin_GPIO44) #define DEFAULT_UART_BUS_TX (&pin_GPIO43) + +#define DOUBLE_TAP_PIN (&pin_GPIO34) diff --git a/ports/espressif/boards/bpi_leaf_s3/mpconfigboard.mk b/ports/espressif/boards/bpi_leaf_s3/mpconfigboard.mk index e2cd18805997..705577187e20 100644 --- a/ports/espressif/boards/bpi_leaf_s3/mpconfigboard.mk +++ b/ports/espressif/boards/bpi_leaf_s3/mpconfigboard.mk @@ -5,9 +5,13 @@ USB_MANUFACTURER = "BananaPi" IDF_TARGET = esp32s3 +CIRCUITPY_ESP_FLASH_SIZE=8MB CIRCUITPY_ESP_FLASH_MODE=dio CIRCUITPY_ESP_FLASH_FREQ=80m -CIRCUITPY_ESP_FLASH_SIZE=8MB + +CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 80m # Include these Python libraries in firmware. FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel diff --git a/ports/espressif/boards/bpi_leaf_s3/sdkconfig b/ports/espressif/boards/bpi_leaf_s3/sdkconfig index e9c767ea8510..6b3f2584c712 100644 --- a/ports/espressif/boards/bpi_leaf_s3/sdkconfig +++ b/ports/espressif/boards/bpi_leaf_s3/sdkconfig @@ -1,43 +1,9 @@ # -# Component config -# -# -# ESP32S3-Specific -# -CONFIG_ESP32S3_SPIRAM_SUPPORT=y -# -# SPI RAM config +# Espressif IoT Development Framework Configuration # -CONFIG_SPIRAM_MODE_QUAD=y -# CONFIG_SPIRAM_MODE_OCT is not set -# CONFIG_SPIRAM_TYPE_AUTO is not set -CONFIG_SPIRAM_TYPE_ESPPSRAM16=y -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set -CONFIG_SPIRAM_SIZE=2097152 # -# PSRAM Clock and CS IO for ESP32S3 +# Component config # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 -CONFIG_DEFAULT_PSRAM_CS_IO=26 -# end of PSRAM Clock and CS IO for ESP32S3 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_120M is not set -CONFIG_SPIRAM_SPEED_80M=y -# CONFIG_SPIRAM_SPEED_40M is not set -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set -CONFIG_SPIRAM_USE_MEMMAP=y -# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set -# CONFIG_SPIRAM_USE_MALLOC is not set -CONFIG_SPIRAM_MEMTEST=y -# end of SPI RAM config - -# end of ESP32S3-Specific - # # LWIP # @@ -45,3 +11,5 @@ CONFIG_LWIP_LOCAL_HOSTNAME="BPI-Leaf-S3" # end of LWIP # end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/bpi_picow_s3/board.c b/ports/espressif/boards/bpi_picow_s3/board.c index b3c8cb41914e..164430c88c92 100644 --- a/ports/espressif/boards/bpi_picow_s3/board.c +++ b/ports/espressif/boards/bpi_picow_s3/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/bpi_picow_s3/mpconfigboard.mk b/ports/espressif/boards/bpi_picow_s3/mpconfigboard.mk index 6d77a94b0805..02969c05c2f7 100644 --- a/ports/espressif/boards/bpi_picow_s3/mpconfigboard.mk +++ b/ports/espressif/boards/bpi_picow_s3/mpconfigboard.mk @@ -12,9 +12,13 @@ LONGINT_IMPL = MPZ # so increase it to 32. CFLAGS += -DCFG_TUD_TASK_QUEUE_SZ=32 +CIRCUITPY_ESP_FLASH_SIZE = 8MB CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 80m -CIRCUITPY_ESP_FLASH_SIZE = 8MB + +CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 80m # Include these Python libraries in firmware. FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel diff --git a/ports/espressif/boards/bpi_picow_s3/sdkconfig b/ports/espressif/boards/bpi_picow_s3/sdkconfig index 04ab11892407..914b07726400 100644 --- a/ports/espressif/boards/bpi_picow_s3/sdkconfig +++ b/ports/espressif/boards/bpi_picow_s3/sdkconfig @@ -1,43 +1,9 @@ # -# Component config -# -# -# ESP32S3-Specific -# -CONFIG_ESP32S3_SPIRAM_SUPPORT=y -# -# SPI RAM config +# Espressif IoT Development Framework Configuration # -CONFIG_SPIRAM_MODE_QUAD=y -# CONFIG_SPIRAM_MODE_OCT is not set -# CONFIG_SPIRAM_TYPE_AUTO is not set -CONFIG_SPIRAM_TYPE_ESPPSRAM16=y -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set -CONFIG_SPIRAM_SIZE=2097152 # -# PSRAM Clock and CS IO for ESP32S3 +# Component config # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 -CONFIG_DEFAULT_PSRAM_CS_IO=26 -# end of PSRAM Clock and CS IO for ESP32S3 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_120M is not set -CONFIG_SPIRAM_SPEED_80M=y -# CONFIG_SPIRAM_SPEED_40M is not set -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set -CONFIG_SPIRAM_USE_MEMMAP=y -# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set -# CONFIG_SPIRAM_USE_MALLOC is not set -CONFIG_SPIRAM_MEMTEST=y -# end of SPI RAM config - -# end of ESP32S3-Specific - # # LWIP # @@ -45,3 +11,5 @@ CONFIG_LWIP_LOCAL_HOSTNAME="BPI-PicoW-S3" # end of LWIP # end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/brainboardz_neuron/board.c b/ports/espressif/boards/brainboardz_neuron/board.c index 3b1f5efd8747..164430c88c92 100755 --- a/ports/espressif/boards/brainboardz_neuron/board.c +++ b/ports/espressif/boards/brainboardz_neuron/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/brainboardz_neuron/mpconfigboard.mk b/ports/espressif/boards/brainboardz_neuron/mpconfigboard.mk index 1083b1826464..c7ee91cb3ec2 100755 --- a/ports/espressif/boards/brainboardz_neuron/mpconfigboard.mk +++ b/ports/espressif/boards/brainboardz_neuron/mpconfigboard.mk @@ -6,6 +6,10 @@ USB_MANUFACTURER = "BrainBoardz" IDF_TARGET = esp32s3 -CIRCUITPY_ESP_FLASH_MODE=dio -CIRCUITPY_ESP_FLASH_FREQ=80m -CIRCUITPY_ESP_FLASH_SIZE=8MB +CIRCUITPY_ESP_FLASH_SIZE = 8MB +CIRCUITPY_ESP_FLASH_MODE = dio +CIRCUITPY_ESP_FLASH_FREQ = 80m + +CIRCUITPY_ESP_PSRAM_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_MODE = opi +CIRCUITPY_ESP_PSRAM_FREQ = 80m diff --git a/ports/espressif/boards/brainboardz_neuron/sdkconfig b/ports/espressif/boards/brainboardz_neuron/sdkconfig index 39bd2cdb4e61..e553af17769f 100755 --- a/ports/espressif/boards/brainboardz_neuron/sdkconfig +++ b/ports/espressif/boards/brainboardz_neuron/sdkconfig @@ -1,34 +1,15 @@ -CONFIG_ESP32S3_SPIRAM_SUPPORT=y # -# SPI RAM config +# Espressif IoT Development Framework Configuration # -# CONFIG_SPIRAM_MODE_QUAD is not set -CONFIG_SPIRAM_MODE_OCT=y -# CONFIG_SPIRAM_TYPE_AUTO is not set -CONFIG_SPIRAM_TYPE_ESPPSRAM64=y -CONFIG_SPIRAM_SIZE=8388608 -# end of SPI RAM config - -CONFIG_DEFAULT_PSRAM_CLK_IO=30 # -# PSRAM Clock and CS IO for ESP32S3 +# Component config # -CONFIG_DEFAULT_PSRAM_CS_IO=26 -# end of PSRAM Clock and CS IO for ESP32S3 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -CONFIG_SPIRAM_SPEED_80M=y -# CONFIG_SPIRAM_SPEED_40M is not set -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set -CONFIG_SPIRAM_USE_MEMMAP=y -# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set -# CONFIG_SPIRAM_USE_MALLOC is not set -CONFIG_SPIRAM_MEMTEST=y # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="BrainBoardzNeuron" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/crcibernetica-ideaboard/sdkconfig b/ports/espressif/boards/crcibernetica-ideaboard/sdkconfig index 6c0168c829de..e69de29bb2d1 100644 --- a/ports/espressif/boards/crcibernetica-ideaboard/sdkconfig +++ b/ports/espressif/boards/crcibernetica-ideaboard/sdkconfig @@ -1,20 +0,0 @@ -CONFIG_ESP32_ECO3_CACHE_LOCK_FIX=y -CONFIG_ESP32_SPIRAM_SUPPORT=n - -# Uncomment (remove ###) to send ESP_LOG output to TX/RX pins -### # -### # ESP System Settings -### # -### CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT=y -### # CONFIG_ESP_SYSTEM_PANIC_SILENT_REBOOT is not set -### CONFIG_ESP_CONSOLE_UART_CUSTOM=y -### CONFIG_ESP_CONSOLE_NONE is not set -### CONFIG_ESP_CONSOLE_UART=y -### CONFIG_ESP_CONSOLE_UART_CUSTOM_NUM_0=y -### # CONFIG_ESP_CONSOLE_UART_CUSTOM_NUM_1 is not set -### CONFIG_ESP_CONSOLE_UART_NUM=0 -### CONFIG_ESP_CONSOLE_UART_TX_GPIO=17 -### CONFIG_ESP_CONSOLE_UART_RX_GPIO=16 -### CONFIG_ESP_CONSOLE_UART_BAUDRATE=115200 -### # CONFIG_ESP_SYSTEM_CHECK_INT_LEVEL_5 is not set -### # end of ESP System Settings diff --git a/ports/espressif/boards/crumpspace_crumps2/board.c b/ports/espressif/boards/crumpspace_crumps2/board.c index b3c8cb41914e..164430c88c92 100644 --- a/ports/espressif/boards/crumpspace_crumps2/board.c +++ b/ports/espressif/boards/crumpspace_crumps2/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/crumpspace_crumps2/mpconfigboard.mk b/ports/espressif/boards/crumpspace_crumps2/mpconfigboard.mk index aca5950f9ded..a57c81fdf259 100644 --- a/ports/espressif/boards/crumpspace_crumps2/mpconfigboard.mk +++ b/ports/espressif/boards/crumpspace_crumps2/mpconfigboard.mk @@ -13,3 +13,7 @@ CIRCUITPY_BITBANG_APA102 = 1 # Include these Python libraries in firmware. # FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_DotStar + +CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m diff --git a/ports/espressif/boards/crumpspace_crumps2/sdkconfig b/ports/espressif/boards/crumpspace_crumps2/sdkconfig index 94158d85c54e..e1f568a2d8d2 100644 --- a/ports/espressif/boards/crumpspace_crumps2/sdkconfig +++ b/ports/espressif/boards/crumpspace_crumps2/sdkconfig @@ -1,37 +1,15 @@ -CONFIG_ESP32S2_SPIRAM_SUPPORT=y # -# SPI RAM config +# Espressif IoT Development Framework Configuration # -# CONFIG_SPIRAM_TYPE_AUTO is not set -CONFIG_SPIRAM_TYPE_ESPPSRAM16=y -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set -CONFIG_SPIRAM_SIZE=2097152 -# end of SPI RAM config - -CONFIG_DEFAULT_PSRAM_CLK_IO=30 # -# PSRAM clock and cs IO for ESP32S2 +# Component config # -CONFIG_DEFAULT_PSRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S2 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_80M is not set -CONFIG_SPIRAM_SPEED_40M=y -# CONFIG_SPIRAM_SPEED_26M is not set -# CONFIG_SPIRAM_SPEED_20M is not set -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set -CONFIG_SPIRAM_USE_MEMMAP=y -# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set -# CONFIG_SPIRAM_USE_MALLOC is not set -CONFIG_SPIRAM_MEMTEST=y -# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="CrumpS2" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/cytron_maker_feather_aiot_s3/board.c b/ports/espressif/boards/cytron_maker_feather_aiot_s3/board.c index 1f9ef3c4e74d..8f1a584194c3 100644 --- a/ports/espressif/boards/cytron_maker_feather_aiot_s3/board.c +++ b/ports/espressif/boards/cytron_maker_feather_aiot_s3/board.c @@ -27,7 +27,7 @@ #include "supervisor/board.h" #include "mpconfigboard.h" #include "shared-bindings/microcontroller/Pin.h" -#include "components/driver/include/driver/gpio.h" +#include "components/driver/gpio/include/driver/gpio.h" #include "components/hal/include/hal/gpio_hal.h" #include "common-hal/microcontroller/Pin.h" diff --git a/ports/espressif/boards/cytron_maker_feather_aiot_s3/mpconfigboard.mk b/ports/espressif/boards/cytron_maker_feather_aiot_s3/mpconfigboard.mk index 53e975046360..98ed6a50fcb8 100644 --- a/ports/espressif/boards/cytron_maker_feather_aiot_s3/mpconfigboard.mk +++ b/ports/espressif/boards/cytron_maker_feather_aiot_s3/mpconfigboard.mk @@ -5,9 +5,13 @@ USB_MANUFACTURER = "Cytron" IDF_TARGET = esp32s3 +CIRCUITPY_ESP_FLASH_SIZE = 8MB CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 80m -CIRCUITPY_ESP_FLASH_SIZE = 8MB + +CIRCUITPY_ESP_PSRAM_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_MODE = opi +CIRCUITPY_ESP_PSRAM_FREQ = 80m # Include these Python libraries in firmware. FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel diff --git a/ports/espressif/boards/cytron_maker_feather_aiot_s3/sdkconfig b/ports/espressif/boards/cytron_maker_feather_aiot_s3/sdkconfig index f508f4a67c3f..f5ef79768114 100644 --- a/ports/espressif/boards/cytron_maker_feather_aiot_s3/sdkconfig +++ b/ports/espressif/boards/cytron_maker_feather_aiot_s3/sdkconfig @@ -1,34 +1,15 @@ -CONFIG_ESP32S3_SPIRAM_SUPPORT=y # -# SPI RAM config +# Espressif IoT Development Framework Configuration # -# CONFIG_SPIRAM_MODE_QUAD is not set -CONFIG_SPIRAM_MODE_OCT=y -# CONFIG_SPIRAM_TYPE_AUTO is not set -CONFIG_SPIRAM_TYPE_ESPPSRAM64=y -CONFIG_SPIRAM_SIZE=8388608 -# end of SPI RAM config - -CONFIG_DEFAULT_PSRAM_CLK_IO=30 # -# PSRAM Clock and CS IO for ESP32S3 +# Component config # -CONFIG_DEFAULT_PSRAM_CS_IO=26 -# end of PSRAM Clock and CS IO for ESP32S3 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -CONFIG_SPIRAM_SPEED_80M=y -# CONFIG_SPIRAM_SPEED_40M is not set -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set -CONFIG_SPIRAM_USE_MEMMAP=y -# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set -# CONFIG_SPIRAM_USE_MALLOC is not set -CONFIG_SPIRAM_MEMTEST=y # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/deneyap_kart/board.c b/ports/espressif/boards/deneyap_kart/board.c index 8c0c8b8b0b57..12d8928cd5ee 100644 --- a/ports/espressif/boards/deneyap_kart/board.c +++ b/ports/espressif/boards/deneyap_kart/board.c @@ -27,7 +27,7 @@ #include "supervisor/board.h" #include "mpconfigboard.h" #include "shared-bindings/microcontroller/Pin.h" -#include "components/driver/include/driver/gpio.h" +#include "components/driver/gpio/include/driver/gpio.h" #include "components/hal/include/hal/gpio_hal.h" #include "common-hal/microcontroller/Pin.h" diff --git a/ports/espressif/boards/deneyap_kart/mpconfigboard.mk b/ports/espressif/boards/deneyap_kart/mpconfigboard.mk index ea8c9a852229..c0667ee4fe2d 100644 --- a/ports/espressif/boards/deneyap_kart/mpconfigboard.mk +++ b/ports/espressif/boards/deneyap_kart/mpconfigboard.mk @@ -6,3 +6,7 @@ IDF_TARGET = esp32 CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_PSRAM_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 80m diff --git a/ports/espressif/boards/deneyap_kart/sdkconfig b/ports/espressif/boards/deneyap_kart/sdkconfig index 7ec0461dcf6f..e69de29bb2d1 100644 --- a/ports/espressif/boards/deneyap_kart/sdkconfig +++ b/ports/espressif/boards/deneyap_kart/sdkconfig @@ -1,19 +0,0 @@ -CONFIG_ESP32_SPIRAM_SUPPORT=y -# -# SPI RAM config -CONFIG_SPIRAM_TYPE_AUTO=y -# CONFIG_SPIRAM_TYPE_ESPPSRAM16 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set -CONFIG_SPIRAM_SIZE=8388608 -CONFIG_SPIRAM_SPEED_80M=y -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -CONFIG_SPIRAM_IGNORE_NOTFOUND=y -CONFIG_SPIRAM_USE_MEMMAP=y -# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set -# CONFIG_SPIRAM_USE_MALLOC is not set -CONFIG_SPIRAM_MEMTEST=y -# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# CONFIG_SPIRAM_ALLOW_NOINIT_SEG_EXTERNAL_MEMORY is not set -CONFIG_SPIRAM_CACHE_WORKAROUND=y diff --git a/ports/espressif/boards/deneyap_kart_1a/board.c b/ports/espressif/boards/deneyap_kart_1a/board.c index 8c0c8b8b0b57..12d8928cd5ee 100644 --- a/ports/espressif/boards/deneyap_kart_1a/board.c +++ b/ports/espressif/boards/deneyap_kart_1a/board.c @@ -27,7 +27,7 @@ #include "supervisor/board.h" #include "mpconfigboard.h" #include "shared-bindings/microcontroller/Pin.h" -#include "components/driver/include/driver/gpio.h" +#include "components/driver/gpio/include/driver/gpio.h" #include "components/hal/include/hal/gpio_hal.h" #include "common-hal/microcontroller/Pin.h" diff --git a/ports/espressif/boards/deneyap_kart_1a/mpconfigboard.mk b/ports/espressif/boards/deneyap_kart_1a/mpconfigboard.mk index 976083217ed4..423ee1e3e591 100644 --- a/ports/espressif/boards/deneyap_kart_1a/mpconfigboard.mk +++ b/ports/espressif/boards/deneyap_kart_1a/mpconfigboard.mk @@ -6,3 +6,7 @@ IDF_TARGET = esp32 CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_PSRAM_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 80m diff --git a/ports/espressif/boards/deneyap_kart_1a/sdkconfig b/ports/espressif/boards/deneyap_kart_1a/sdkconfig index 7ec0461dcf6f..e69de29bb2d1 100644 --- a/ports/espressif/boards/deneyap_kart_1a/sdkconfig +++ b/ports/espressif/boards/deneyap_kart_1a/sdkconfig @@ -1,19 +0,0 @@ -CONFIG_ESP32_SPIRAM_SUPPORT=y -# -# SPI RAM config -CONFIG_SPIRAM_TYPE_AUTO=y -# CONFIG_SPIRAM_TYPE_ESPPSRAM16 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set -CONFIG_SPIRAM_SIZE=8388608 -CONFIG_SPIRAM_SPEED_80M=y -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -CONFIG_SPIRAM_IGNORE_NOTFOUND=y -CONFIG_SPIRAM_USE_MEMMAP=y -# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set -# CONFIG_SPIRAM_USE_MALLOC is not set -CONFIG_SPIRAM_MEMTEST=y -# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# CONFIG_SPIRAM_ALLOW_NOINIT_SEG_EXTERNAL_MEMORY is not set -CONFIG_SPIRAM_CACHE_WORKAROUND=y diff --git a/ports/espressif/boards/deneyap_kart_1a_v2/mpconfigboard.mk b/ports/espressif/boards/deneyap_kart_1a_v2/mpconfigboard.mk index 5fa5d4822f8d..fb36bbf0db6d 100644 --- a/ports/espressif/boards/deneyap_kart_1a_v2/mpconfigboard.mk +++ b/ports/espressif/boards/deneyap_kart_1a_v2/mpconfigboard.mk @@ -9,4 +9,11 @@ IDF_TARGET = esp32s3 CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_PSRAM_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_MODE = opi +CIRCUITPY_ESP_PSRAM_FREQ = 80m + CIRCUITPY_ESPCAMERA = 0 + +OPTIMIZATION_FLAGS = -Os diff --git a/ports/espressif/boards/deneyap_kart_1a_v2/sdkconfig b/ports/espressif/boards/deneyap_kart_1a_v2/sdkconfig index 2cdb172e06d1..2d5e06f98510 100644 --- a/ports/espressif/boards/deneyap_kart_1a_v2/sdkconfig +++ b/ports/espressif/boards/deneyap_kart_1a_v2/sdkconfig @@ -1,43 +1,9 @@ # -# Component config -# -# -# ESP32S3-Specific -# -CONFIG_ESP32S3_SPIRAM_SUPPORT=y -# -# SPI RAM config +# Espressif IoT Development Framework Configuration # -# CONFIG_SPIRAM_MODE_QUAD is not set -CONFIG_SPIRAM_MODE_OCT=y -# CONFIG_SPIRAM_TYPE_AUTO is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM16 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -CONFIG_SPIRAM_TYPE_ESPPSRAM64=y -CONFIG_SPIRAM_SIZE=8388608 # -# PSRAM Clock and CS IO for ESP32S3 +# Component config # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 -CONFIG_DEFAULT_PSRAM_CS_IO=26 -# end of PSRAM Clock and CS IO for ESP32S3 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_120M is not set -CONFIG_SPIRAM_SPEED_80M=y -# CONFIG_SPIRAM_SPEED_40M is not set -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set -CONFIG_SPIRAM_USE_MEMMAP=y -# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set -# CONFIG_SPIRAM_USE_MALLOC is not set -CONFIG_SPIRAM_MEMTEST=y -# end of SPI RAM config - -# end of ESP32S3-Specific - # # LWIP # @@ -45,3 +11,5 @@ CONFIG_LWIP_LOCAL_HOSTNAME="DeneyapKart1A_v2" # end of LWIP # end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/deneyap_kart_g/mpconfigboard.h b/ports/espressif/boards/deneyap_kart_g/mpconfigboard.h index ce2969bbda04..d882e10861a1 100644 --- a/ports/espressif/boards/deneyap_kart_g/mpconfigboard.h +++ b/ports/espressif/boards/deneyap_kart_g/mpconfigboard.h @@ -40,5 +40,3 @@ // For entering safe mode #define CIRCUITPY_BOOT_BUTTON (&pin_GPIO9) - -#define CIRCUITPY_ESP_USB_SERIAL_JTAG (1) diff --git a/ports/espressif/boards/deneyap_kart_g/mpconfigboard.mk b/ports/espressif/boards/deneyap_kart_g/mpconfigboard.mk index a470d7a088da..98e4e4c9a5e9 100644 --- a/ports/espressif/boards/deneyap_kart_g/mpconfigboard.mk +++ b/ports/espressif/boards/deneyap_kart_g/mpconfigboard.mk @@ -6,3 +6,7 @@ IDF_TARGET = esp32c3 CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_USB_SERIAL_JTAG = 1 + +CIRCUITPY_BLEIO = 0 diff --git a/ports/espressif/boards/deneyap_kart_g/sdkconfig b/ports/espressif/boards/deneyap_kart_g/sdkconfig index a988de5fea87..f239c3140522 100644 --- a/ports/espressif/boards/deneyap_kart_g/sdkconfig +++ b/ports/espressif/boards/deneyap_kart_g/sdkconfig @@ -1,5 +1,15 @@ # +# Espressif IoT Development Framework Configuration +# +# +# Component config +# +# # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="DeneyapKartG" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/deneyap_mini/sdkconfig b/ports/espressif/boards/deneyap_mini/sdkconfig index 7dfaf3052cc0..3bcde1ab9e68 100644 --- a/ports/espressif/boards/deneyap_mini/sdkconfig +++ b/ports/espressif/boards/deneyap_mini/sdkconfig @@ -1,4 +1,15 @@ +# +# Espressif IoT Development Framework Configuration +# +# +# Component config +# +# # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="DeneyapMini" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/deneyap_mini_v2/mpconfigboard.mk b/ports/espressif/boards/deneyap_mini_v2/mpconfigboard.mk index fa9c6b40ea50..08d5f8a7dd28 100644 --- a/ports/espressif/boards/deneyap_mini_v2/mpconfigboard.mk +++ b/ports/espressif/boards/deneyap_mini_v2/mpconfigboard.mk @@ -6,6 +6,10 @@ USB_MANUFACTURER = "Turkish Technology Team Foundation" IDF_TARGET = esp32s2 +CIRCUITPY_ESP_FLASH_SIZE = 4MB CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 80m -CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m diff --git a/ports/espressif/boards/deneyap_mini_v2/sdkconfig b/ports/espressif/boards/deneyap_mini_v2/sdkconfig index 613b744ef22d..be30fb4463d9 100644 --- a/ports/espressif/boards/deneyap_mini_v2/sdkconfig +++ b/ports/espressif/boards/deneyap_mini_v2/sdkconfig @@ -1,37 +1,15 @@ -CONFIG_ESP32S2_SPIRAM_SUPPORT=y # -# SPI RAM config +# Espressif IoT Development Framework Configuration # -# CONFIG_SPIRAM_TYPE_AUTO is not set -CONFIG_SPIRAM_TYPE_ESPPSRAM16=y -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set -CONFIG_SPIRAM_SIZE=2097152 -# end of SPI RAM config - -CONFIG_DEFAULT_PSRAM_CLK_IO=30 # -# PSRAM clock and cs IO for ESP32S2 +# Component config # -CONFIG_DEFAULT_PSRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S2 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_80M is not set -CONFIG_SPIRAM_SPEED_40M=y -# CONFIG_SPIRAM_SPEED_26M is not set -# CONFIG_SPIRAM_SPEED_20M is not set -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set -CONFIG_SPIRAM_USE_MEMMAP=y -# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set -# CONFIG_SPIRAM_USE_MALLOC is not set -CONFIG_SPIRAM_MEMTEST=y -# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="DeneyapMini_v2" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/doit_esp32_devkit_v1/sdkconfig b/ports/espressif/boards/doit_esp32_devkit_v1/sdkconfig index 6c0168c829de..e69de29bb2d1 100644 --- a/ports/espressif/boards/doit_esp32_devkit_v1/sdkconfig +++ b/ports/espressif/boards/doit_esp32_devkit_v1/sdkconfig @@ -1,20 +0,0 @@ -CONFIG_ESP32_ECO3_CACHE_LOCK_FIX=y -CONFIG_ESP32_SPIRAM_SUPPORT=n - -# Uncomment (remove ###) to send ESP_LOG output to TX/RX pins -### # -### # ESP System Settings -### # -### CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT=y -### # CONFIG_ESP_SYSTEM_PANIC_SILENT_REBOOT is not set -### CONFIG_ESP_CONSOLE_UART_CUSTOM=y -### CONFIG_ESP_CONSOLE_NONE is not set -### CONFIG_ESP_CONSOLE_UART=y -### CONFIG_ESP_CONSOLE_UART_CUSTOM_NUM_0=y -### # CONFIG_ESP_CONSOLE_UART_CUSTOM_NUM_1 is not set -### CONFIG_ESP_CONSOLE_UART_NUM=0 -### CONFIG_ESP_CONSOLE_UART_TX_GPIO=17 -### CONFIG_ESP_CONSOLE_UART_RX_GPIO=16 -### CONFIG_ESP_CONSOLE_UART_BAUDRATE=115200 -### # CONFIG_ESP_SYSTEM_CHECK_INT_LEVEL_5 is not set -### # end of ESP System Settings diff --git a/ports/espressif/boards/electroniccats_bastwifi/board.c b/ports/espressif/boards/electroniccats_bastwifi/board.c index b3c8cb41914e..164430c88c92 100644 --- a/ports/espressif/boards/electroniccats_bastwifi/board.c +++ b/ports/espressif/boards/electroniccats_bastwifi/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/electroniccats_bastwifi/sdkconfig b/ports/espressif/boards/electroniccats_bastwifi/sdkconfig index 5b9c86dcc346..e69de29bb2d1 100644 --- a/ports/espressif/boards/electroniccats_bastwifi/sdkconfig +++ b/ports/espressif/boards/electroniccats_bastwifi/sdkconfig @@ -1,6 +0,0 @@ -# CONFIG_ESP32S2_SPIRAM_SUPPORT is not set -# -# LWIP -# -CONFIG_LWIP_LOCAL_HOSTNAME="espressif" -# end of LWIP diff --git a/ports/espressif/boards/es3ink/mpconfigboard.mk b/ports/espressif/boards/es3ink/mpconfigboard.mk index bd55e6837983..bb102bf2021f 100644 --- a/ports/espressif/boards/es3ink/mpconfigboard.mk +++ b/ports/espressif/boards/es3ink/mpconfigboard.mk @@ -8,3 +8,7 @@ IDF_TARGET = esp32s3 CIRCUITPY_ESP_FLASH_MODE=dio CIRCUITPY_ESP_FLASH_FREQ=80m CIRCUITPY_ESP_FLASH_SIZE=16MB + +CIRCUITPY_ESP_PSRAM_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_MODE = opi +CIRCUITPY_ESP_PSRAM_FREQ = 80m diff --git a/ports/espressif/boards/es3ink/sdkconfig b/ports/espressif/boards/es3ink/sdkconfig index 89d29d8ea9ca..b023c59d0357 100644 --- a/ports/espressif/boards/es3ink/sdkconfig +++ b/ports/espressif/boards/es3ink/sdkconfig @@ -1,16 +1,15 @@ -CONFIG_ESP32S3_SPIRAM_SUPPORT=y - -CONFIG_SPIRAM_TYPE_ESPPSRAM64=y -CONFIG_SPIRAM_SIZE=8388608 -CONFIG_SPIRAM_MODE_OCT=y -CONFIG_SPIRAM_SPEED_80M=y - -CONFIG_DEFAULT_PSRAM_CLK_IO=30 -CONFIG_DEFAULT_PSRAM_CS_IO=26 +# +# Espressif IoT Development Framework Configuration +# +# +# Component config +# +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="es3ink" +# end of LWIP -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -CONFIG_SPIRAM_USE_MEMMAP=y -CONFIG_SPIRAM_MEMTEST=y +# end of Component config -CONFIG_LWIP_LOCAL_HOSTNAME="es3ink" +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/espressif_esp32_eye/board.c b/ports/espressif/boards/espressif_esp32_eye/board.c index 1c09fb131608..b37123db0450 100644 --- a/ports/espressif/boards/espressif_esp32_eye/board.c +++ b/ports/espressif/boards/espressif_esp32_eye/board.c @@ -27,7 +27,7 @@ #include "supervisor/board.h" #include "mpconfigboard.h" #include "shared-bindings/microcontroller/Pin.h" -#include "components/driver/include/driver/gpio.h" +#include "components/driver/gpio/include/driver/gpio.h" #include "components/hal/include/hal/gpio_hal.h" #include "common-hal/microcontroller/Pin.h" diff --git a/ports/espressif/boards/espressif_esp32_eye/mpconfigboard.mk b/ports/espressif/boards/espressif_esp32_eye/mpconfigboard.mk index e29ca687c617..65198b8936d6 100644 --- a/ports/espressif/boards/espressif_esp32_eye/mpconfigboard.mk +++ b/ports/espressif/boards/espressif_esp32_eye/mpconfigboard.mk @@ -3,6 +3,10 @@ CIRCUITPY_CREATION_ID = 0x00320001 IDF_TARGET = esp32 +CIRCUITPY_ESP_FLASH_SIZE = 4MB CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 40m -CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_PSRAM_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m diff --git a/ports/espressif/boards/espressif_esp32_eye/sdkconfig b/ports/espressif/boards/espressif_esp32_eye/sdkconfig index 26db1e808768..dc4ef1fc52cf 100644 --- a/ports/espressif/boards/espressif_esp32_eye/sdkconfig +++ b/ports/espressif/boards/espressif_esp32_eye/sdkconfig @@ -1,71 +1,24 @@ -# Automatically generated file. DO NOT EDIT. -# Espressif IoT Development Framework (ESP-IDF) Project Configuration # +# Espressif IoT Development Framework Configuration # -# Component config -# -# -# ESP32-specific -# -CONFIG_ESP32_SPIRAM_SUPPORT=y -# -# SPI RAM config -# -CONFIG_SPIRAM_TYPE_AUTO=y -# CONFIG_SPIRAM_TYPE_ESPPSRAM16 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set -CONFIG_SPIRAM_SIZE=-1 -CONFIG_SPIRAM_SPEED_40M=y -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -CONFIG_SPIRAM_IGNORE_NOTFOUND=y -CONFIG_SPIRAM_USE_MEMMAP=y -# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set -# CONFIG_SPIRAM_USE_MALLOC is not set -CONFIG_SPIRAM_MEMTEST=y -# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# CONFIG_SPIRAM_ALLOW_NOINIT_SEG_EXTERNAL_MEMORY is not set -CONFIG_SPIRAM_CACHE_WORKAROUND=y -# CONFIG_SPIRAM_BANKSWITCH_ENABLE is not set -# end of SPI RAM config - -# end of ESP32-specific - # -# NVS +# Component config # -# CONFIG_NVS_ASSERT_ERROR_CHECK is not set -# end of NVS - # # Camera configuration # CONFIG_OV7670_SUPPORT=y -CONFIG_OV7725_SUPPORT=y CONFIG_NT99141_SUPPORT=y CONFIG_OV2640_SUPPORT=y -CONFIG_OV3660_SUPPORT=y -CONFIG_OV5640_SUPPORT=y CONFIG_GC2145_SUPPORT=y CONFIG_GC032A_SUPPORT=y CONFIG_GC0308_SUPPORT=y CONFIG_BF3005_SUPPORT=y CONFIG_BF20A6_SUPPORT=y -# CONFIG_SC101IOT_SUPPORT is not set CONFIG_SC030IOT_SUPPORT=y -# CONFIG_SCCB_HARDWARE_I2C_PORT0 is not set -CONFIG_SCCB_HARDWARE_I2C_PORT1=y -CONFIG_SCCB_CLK_FREQ=100000 -# CONFIG_GC_SENSOR_WINDOWING_MODE is not set CONFIG_GC_SENSOR_SUBSAMPLE_MODE=y -CONFIG_CAMERA_CORE0=y -# CONFIG_CAMERA_CORE1 is not set -# CONFIG_CAMERA_NO_AFFINITY is not set -CONFIG_CAMERA_DMA_BUFFER_SIZE_MAX=32768 # end of Camera configuration # end of Component config -# -CONFIG_ESP_CONSOLE_UART_TX_GPIO=1 -CONFIG_ESP_CONSOLE_UART_RX_GPIO=3 + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/espressif_esp32_lyrat/board.c b/ports/espressif/boards/espressif_esp32_lyrat/board.c index 8c0c8b8b0b57..12d8928cd5ee 100644 --- a/ports/espressif/boards/espressif_esp32_lyrat/board.c +++ b/ports/espressif/boards/espressif_esp32_lyrat/board.c @@ -27,7 +27,7 @@ #include "supervisor/board.h" #include "mpconfigboard.h" #include "shared-bindings/microcontroller/Pin.h" -#include "components/driver/include/driver/gpio.h" +#include "components/driver/gpio/include/driver/gpio.h" #include "components/hal/include/hal/gpio_hal.h" #include "common-hal/microcontroller/Pin.h" diff --git a/ports/espressif/boards/espressif_esp32_lyrat/mpconfigboard.mk b/ports/espressif/boards/espressif_esp32_lyrat/mpconfigboard.mk index e9fcd24e61d6..57f3f8da8108 100644 --- a/ports/espressif/boards/espressif_esp32_lyrat/mpconfigboard.mk +++ b/ports/espressif/boards/espressif_esp32_lyrat/mpconfigboard.mk @@ -3,8 +3,12 @@ CIRCUITPY_CREATION_ID = 0x0032A000 IDF_TARGET = esp32 +CIRCUITPY_ESP_FLASH_SIZE = 4MB CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 40m -CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_PSRAM_SIZE = 4MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m CIRCUITPY_ESPCAMERA = 0 diff --git a/ports/espressif/boards/espressif_esp32_lyrat/sdkconfig b/ports/espressif/boards/espressif_esp32_lyrat/sdkconfig index 4b2981ba62a9..e69de29bb2d1 100644 --- a/ports/espressif/boards/espressif_esp32_lyrat/sdkconfig +++ b/ports/espressif/boards/espressif_esp32_lyrat/sdkconfig @@ -1,37 +0,0 @@ -CONFIG_ESP32_SPIRAM_SUPPORT=y -# SPI RAM config -# -CONFIG_SPIRAM_TYPE_AUTO=y -# CONFIG_SPIRAM_TYPE_ESPPSRAM16 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set -CONFIG_SPIRAM_SIZE=4194304 -CONFIG_SPIRAM_SPEED_40M=y -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -CONFIG_SPIRAM_IGNORE_NOTFOUND=y -CONFIG_SPIRAM_USE_MEMMAP=y -# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set -# CONFIG_SPIRAM_USE_MALLOC is not set -CONFIG_SPIRAM_MEMTEST=y -# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# CONFIG_SPIRAM_ALLOW_NOINIT_SEG_EXTERNAL_MEMORY is not set -CONFIG_SPIRAM_CACHE_WORKAROUND=y - -# Uncomment (remove ###) to send ESP_LOG output to TX/RX pins -### # -### # ESP System Settings -### # -### CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT=y -### # CONFIG_ESP_SYSTEM_PANIC_SILENT_REBOOT is not set -### CONFIG_ESP_CONSOLE_UART_CUSTOM=y -### # CONFIG_ESP_CONSOLE_NONE is not set -### CONFIG_ESP_CONSOLE_UART=y -### CONFIG_ESP_CONSOLE_UART_CUSTOM_NUM_0=y -### # CONFIG_ESP_CONSOLE_UART_CUSTOM_NUM_1 is not set -### CONFIG_ESP_CONSOLE_UART_NUM=0 -### CONFIG_ESP_CONSOLE_UART_TX_GPIO=8 -### CONFIG_ESP_CONSOLE_UART_RX_GPIO=7 -### CONFIG_ESP_CONSOLE_UART_BAUDRATE=115200 -### # CONFIG_ESP_SYSTEM_CHECK_INT_LEVEL_5 is not set -### # end of ESP System Settings diff --git a/ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/board.c b/ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/board.c index b155ed7a7bf0..f749ee60d2be 100644 --- a/ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/board.c +++ b/ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/board.c @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -#include "shared-bindings/microcontroller/Pin.h" #include "supervisor/board.h" -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO20); - common_hal_never_reset_pin(&pin_GPIO21); - #endif -} - // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.mk b/ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.mk index cd517e75b4bd..c3e0b6001d84 100644 --- a/ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.mk +++ b/ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.mk @@ -3,6 +3,10 @@ CIRCUITPY_CREATION_ID = 0x00C30001 IDF_TARGET = esp32c3 -CIRCUITPY_ESP_FLASH_MODE = dio +CIRCUITPY_ESP_FLASH_MODE = qio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_USB_SERIAL_JTAG = 0 + +CIRCUITPY_BLEIO = 0 diff --git a/ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/sdkconfig b/ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/sdkconfig index 0e24f8dc77d6..c4def86e6971 100644 --- a/ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/sdkconfig +++ b/ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/sdkconfig @@ -1,5 +1,15 @@ # +# Espressif IoT Development Framework Configuration +# +# +# Component config +# +# # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="ESP32-C3-DevKitM-1" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/espressif_esp32c6_devkitc_1_n8/board.c b/ports/espressif/boards/espressif_esp32c6_devkitc_1_n8/board.c new file mode 100644 index 000000000000..164430c88c92 --- /dev/null +++ b/ports/espressif/boards/espressif_esp32c6_devkitc_1_n8/board.c @@ -0,0 +1,29 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2020 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" + +// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/espressif_esp32c6_devkitc_1_n8/mpconfigboard.h b/ports/espressif/boards/espressif_esp32c6_devkitc_1_n8/mpconfigboard.h new file mode 100644 index 000000000000..68fa84c75c44 --- /dev/null +++ b/ports/espressif/boards/espressif_esp32c6_devkitc_1_n8/mpconfigboard.h @@ -0,0 +1,35 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2019 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +// Micropython setup + +#define MICROPY_HW_BOARD_NAME "ESP32-C6-DevKitC-1-N8" +#define MICROPY_HW_MCU_NAME "ESP32C6" + +#define MICROPY_HW_NEOPIXEL (&pin_GPIO8) + +#define DEFAULT_UART_BUS_RX (&pin_GPIO17) +#define DEFAULT_UART_BUS_TX (&pin_GPIO16) diff --git a/ports/espressif/boards/espressif_esp32c6_devkitc_1_n8/mpconfigboard.mk b/ports/espressif/boards/espressif_esp32c6_devkitc_1_n8/mpconfigboard.mk new file mode 100644 index 000000000000..e15d2bf41e8d --- /dev/null +++ b/ports/espressif/boards/espressif_esp32c6_devkitc_1_n8/mpconfigboard.mk @@ -0,0 +1,8 @@ +CIRCUITPY_CREATOR_ID = 0x000C303A +CIRCUITPY_CREATION_ID = 0x00C60002 + +IDF_TARGET = esp32c6 + +CIRCUITPY_ESP_FLASH_MODE = qio +CIRCUITPY_ESP_FLASH_FREQ = 80m +CIRCUITPY_ESP_FLASH_SIZE = 8MB diff --git a/ports/espressif/boards/espressif_esp32c6_devkitc_1_n8/pins.c b/ports/espressif/boards/espressif_esp32c6_devkitc_1_n8/pins.c new file mode 100644 index 000000000000..441bf33909db --- /dev/null +++ b/ports/espressif/boards/espressif_esp32c6_devkitc_1_n8/pins.c @@ -0,0 +1,36 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS + + { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_IO2), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_IO3), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_IO4), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_IO5), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_IO6), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_IO7), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_IO8), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_IO9), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_IO10), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_IO11), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_IO12), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_IO13), MP_ROM_PTR(&pin_GPIO13) }, + + { MP_ROM_QSTR(MP_QSTR_IO15), MP_ROM_PTR(&pin_GPIO15) }, + + { MP_ROM_QSTR(MP_QSTR_IO18), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_IO19), MP_ROM_PTR(&pin_GPIO19) }, + { MP_ROM_QSTR(MP_QSTR_IO20), MP_ROM_PTR(&pin_GPIO20) }, + { MP_ROM_QSTR(MP_QSTR_IO21), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_IO22), MP_ROM_PTR(&pin_GPIO22) }, + { MP_ROM_QSTR(MP_QSTR_IO23), MP_ROM_PTR(&pin_GPIO23) }, + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO8) }, + + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO17) }, + + { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/espressif/boards/espressif_esp32c6_devkitc_1_n8/sdkconfig b/ports/espressif/boards/espressif_esp32c6_devkitc_1_n8/sdkconfig new file mode 100644 index 000000000000..54a547307565 --- /dev/null +++ b/ports/espressif/boards/espressif_esp32c6_devkitc_1_n8/sdkconfig @@ -0,0 +1,15 @@ +# +# Espressif IoT Development Framework Configuration +# +# +# Component config +# +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32c6" +# end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/espressif_esp32c6_devkitm_1_n4/board.c b/ports/espressif/boards/espressif_esp32c6_devkitm_1_n4/board.c new file mode 100644 index 000000000000..f749ee60d2be --- /dev/null +++ b/ports/espressif/boards/espressif_esp32c6_devkitm_1_n4/board.c @@ -0,0 +1,29 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 microDev + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" + +// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/esp32c3_fix.h b/ports/espressif/boards/espressif_esp32c6_devkitm_1_n4/mpconfigboard.h similarity index 77% rename from ports/espressif/esp32c3_fix.h rename to ports/espressif/boards/espressif_esp32c6_devkitm_1_n4/mpconfigboard.h index cbd36ef2fbab..dd6b260e5121 100644 --- a/ports/espressif/esp32c3_fix.h +++ b/ports/espressif/boards/espressif_esp32c6_devkitm_1_n4/mpconfigboard.h @@ -24,19 +24,14 @@ * THE SOFTWARE. */ -// See https://github.com/espressif/esp-idf/issues/6906 +// Board setup +#define MICROPY_HW_BOARD_NAME "ESP32-C6-DevKitM-1" +#define MICROPY_HW_MCU_NAME "ESP32-C6N4" -#ifndef MICROPY_INCLUDED_ESPRESSIF_ESP32C3_FIX_H -#define MICROPY_INCLUDED_ESPRESSIF_ESP32C3_FIX_H +// Status LED +#define MICROPY_HW_NEOPIXEL (&pin_GPIO8) +#define MICROPY_HW_NEOPIXEL_COUNT (1) -#ifdef __riscv - -#undef __INT32_TYPE__ -#define __INT32_TYPE__ int - -#undef __UINT32_TYPE__ -#define __UINT32_TYPE__ unsigned int - -#endif // __riscv - -#endif // MICROPY_INCLUDED_ESPRESSIF_ESP32C3_FIX_H +// Default bus pins +#define DEFAULT_UART_BUS_RX (&pin_GPIO16) +#define DEFAULT_UART_BUS_TX (&pin_GPIO17) diff --git a/ports/espressif/boards/espressif_esp32c6_devkitm_1_n4/mpconfigboard.mk b/ports/espressif/boards/espressif_esp32c6_devkitm_1_n4/mpconfigboard.mk new file mode 100644 index 000000000000..358855642777 --- /dev/null +++ b/ports/espressif/boards/espressif_esp32c6_devkitm_1_n4/mpconfigboard.mk @@ -0,0 +1,10 @@ +CIRCUITPY_CREATOR_ID = 0x000C303A +CIRCUITPY_CREATION_ID = 0x00C60001 + +IDF_TARGET = esp32c6 + +CIRCUITPY_ESP_FLASH_MODE = qio +CIRCUITPY_ESP_FLASH_FREQ = 80m +CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_BLEIO = 0 diff --git a/ports/espressif/boards/espressif_esp32c6_devkitm_1_n4/pins.c b/ports/espressif/boards/espressif_esp32c6_devkitm_1_n4/pins.c new file mode 100644 index 000000000000..243b6040d09d --- /dev/null +++ b/ports/espressif/boards/espressif_esp32c6_devkitm_1_n4/pins.c @@ -0,0 +1,61 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 microDev + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS + + { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_IO2), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_IO3), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_IO4), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_IO5), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_IO6), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_IO7), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_IO8), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_IO9), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_IO10), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_IO18), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_IO19), MP_ROM_PTR(&pin_GPIO19) }, + { MP_ROM_QSTR(MP_QSTR_IO20), MP_ROM_PTR(&pin_GPIO20) }, + { MP_ROM_QSTR(MP_QSTR_IO21), MP_ROM_PTR(&pin_GPIO21) }, + + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO20) }, + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO21) }, + + { MP_ROM_QSTR(MP_QSTR_MTMS), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_MTDI), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_MTCK), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_MTDO), MP_ROM_PTR(&pin_GPIO7) }, + + { MP_ROM_QSTR(MP_QSTR_BUTTON), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO8) }, + + { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/espressif/boards/espressif_esp32c6_devkitm_1_n4/sdkconfig b/ports/espressif/boards/espressif_esp32c6_devkitm_1_n4/sdkconfig new file mode 100644 index 000000000000..30a4bea2cc68 --- /dev/null +++ b/ports/espressif/boards/espressif_esp32c6_devkitm_1_n4/sdkconfig @@ -0,0 +1,15 @@ +# +# Espressif IoT Development Framework Configuration +# +# +# Component config +# +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="ESP32-C6-DevKitM-1" +# end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/espressif_esp32h2_devkitm_1_n4/board.c b/ports/espressif/boards/espressif_esp32h2_devkitm_1_n4/board.c new file mode 100644 index 000000000000..f749ee60d2be --- /dev/null +++ b/ports/espressif/boards/espressif_esp32h2_devkitm_1_n4/board.c @@ -0,0 +1,29 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 microDev + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" + +// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/espressif_esp32h2_devkitm_1_n4/mpconfigboard.h b/ports/espressif/boards/espressif_esp32h2_devkitm_1_n4/mpconfigboard.h new file mode 100644 index 000000000000..1536f4296dae --- /dev/null +++ b/ports/espressif/boards/espressif_esp32h2_devkitm_1_n4/mpconfigboard.h @@ -0,0 +1,37 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 microDev + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +// Board setup +#define MICROPY_HW_BOARD_NAME "ESP32-H2-DevKitM-1" +#define MICROPY_HW_MCU_NAME "ESP32-H2N4" + +// Status LED +#define MICROPY_HW_NEOPIXEL (&pin_GPIO8) +#define MICROPY_HW_NEOPIXEL_COUNT (1) + +// Default bus pins +#define DEFAULT_UART_BUS_RX (&pin_GPIO23) +#define DEFAULT_UART_BUS_TX (&pin_GPIO24) diff --git a/ports/espressif/boards/espressif_esp32h2_devkitm_1_n4/mpconfigboard.mk b/ports/espressif/boards/espressif_esp32h2_devkitm_1_n4/mpconfigboard.mk new file mode 100644 index 000000000000..82eb611bdf3d --- /dev/null +++ b/ports/espressif/boards/espressif_esp32h2_devkitm_1_n4/mpconfigboard.mk @@ -0,0 +1,8 @@ +CIRCUITPY_CREATOR_ID = 0x000C303A +CIRCUITPY_CREATION_ID = 0x01420001 + +IDF_TARGET = esp32h2 + +CIRCUITPY_ESP_FLASH_MODE = qio +CIRCUITPY_ESP_FLASH_FREQ = 48m +CIRCUITPY_ESP_FLASH_SIZE = 4MB diff --git a/ports/espressif/boards/espressif_esp32h2_devkitm_1_n4/pins.c b/ports/espressif/boards/espressif_esp32h2_devkitm_1_n4/pins.c new file mode 100644 index 000000000000..466962a34f42 --- /dev/null +++ b/ports/espressif/boards/espressif_esp32h2_devkitm_1_n4/pins.c @@ -0,0 +1,62 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 microDev + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS + + { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_IO2), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_IO3), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_IO4), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_IO5), MP_ROM_PTR(&pin_GPIO5) }, + + { MP_ROM_QSTR(MP_QSTR_IO8), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_IO9), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_IO10), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_IO11), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_IO12), MP_ROM_PTR(&pin_GPIO12) }, + + { MP_ROM_QSTR(MP_QSTR_IO22), MP_ROM_PTR(&pin_GPIO22) }, + + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO23) }, + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO24) }, + + { MP_ROM_QSTR(MP_QSTR_IO25), MP_ROM_PTR(&pin_GPIO25) }, + + { MP_ROM_QSTR(MP_QSTR_MTMS), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_MTDO), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_MTCK), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_MTDI), MP_ROM_PTR(&pin_GPIO5) }, + + { MP_ROM_QSTR(MP_QSTR_BUTTON), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO8) }, + + { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/espressif/boards/espressif_esp32h2_devkitm_1_n4/sdkconfig b/ports/espressif/boards/espressif_esp32h2_devkitm_1_n4/sdkconfig new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/ports/espressif/boards/espressif_esp32s2_devkitc_1_n4/board.c b/ports/espressif/boards/espressif_esp32s2_devkitc_1_n4/board.c index b3c8cb41914e..164430c88c92 100644 --- a/ports/espressif/boards/espressif_esp32s2_devkitc_1_n4/board.c +++ b/ports/espressif/boards/espressif_esp32s2_devkitc_1_n4/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/espressif_esp32s2_devkitc_1_n4/sdkconfig b/ports/espressif/boards/espressif_esp32s2_devkitc_1_n4/sdkconfig index 1aad0eadd184..57f0da698aa1 100644 --- a/ports/espressif/boards/espressif_esp32s2_devkitc_1_n4/sdkconfig +++ b/ports/espressif/boards/espressif_esp32s2_devkitc_1_n4/sdkconfig @@ -1,5 +1,15 @@ # +# Espressif IoT Development Framework Configuration +# +# +# Component config +# +# # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s2" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/espressif_esp32s2_devkitc_1_n4r2/board.c b/ports/espressif/boards/espressif_esp32s2_devkitc_1_n4r2/board.c index b3c8cb41914e..164430c88c92 100644 --- a/ports/espressif/boards/espressif_esp32s2_devkitc_1_n4r2/board.c +++ b/ports/espressif/boards/espressif_esp32s2_devkitc_1_n4r2/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/espressif_esp32s2_devkitc_1_n4r2/mpconfigboard.mk b/ports/espressif/boards/espressif_esp32s2_devkitc_1_n4r2/mpconfigboard.mk index aef3ce0dc7fd..51abedf36a24 100644 --- a/ports/espressif/boards/espressif_esp32s2_devkitc_1_n4r2/mpconfigboard.mk +++ b/ports/espressif/boards/espressif_esp32s2_devkitc_1_n4r2/mpconfigboard.mk @@ -5,6 +5,10 @@ USB_MANUFACTURER = "Espressif" IDF_TARGET = esp32s2 -CIRCUITPY_ESP_FLASH_MODE = dio -CIRCUITPY_ESP_FLASH_FREQ = 40m CIRCUITPY_ESP_FLASH_SIZE = 4MB +CIRCUITPY_ESP_FLASH_MODE = qio +CIRCUITPY_ESP_FLASH_FREQ = 80m + +CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 80m diff --git a/ports/espressif/boards/espressif_esp32s2_devkitc_1_n4r2/sdkconfig b/ports/espressif/boards/espressif_esp32s2_devkitc_1_n4r2/sdkconfig index 926a7813bac8..57f0da698aa1 100644 --- a/ports/espressif/boards/espressif_esp32s2_devkitc_1_n4r2/sdkconfig +++ b/ports/espressif/boards/espressif_esp32s2_devkitc_1_n4r2/sdkconfig @@ -1,37 +1,15 @@ -CONFIG_ESP32S2_SPIRAM_SUPPORT=y # -# SPI RAM config +# Espressif IoT Development Framework Configuration # -CONFIG_SPIRAM_MODE_QUAD=y -# CONFIG_SPIRAM_MODE_OCT is not set -# CONFIG_SPIRAM_TYPE_AUTO is not set -CONFIG_SPIRAM_TYPE_ESPPSRAM16=y -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set -CONFIG_SPIRAM_SIZE=2097152 -# end of SPI RAM config - -CONFIG_DEFAULT_PSRAM_CLK_IO=30 # -# PSRAM Clock and CS IO for ESP32S3 +# Component config # -CONFIG_DEFAULT_PSRAM_CS_IO=26 -# end of PSRAM Clock and CS IO for ESP32S3 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_120M is not set -# CONFIG_SPIRAM_SPEED_80M is not set -CONFIG_SPIRAM_SPEED_40M=y -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set -CONFIG_SPIRAM_USE_MEMMAP=y -# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set -# CONFIG_SPIRAM_USE_MALLOC is not set -CONFIG_SPIRAM_MEMTEST=y # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s2" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/espressif_esp32s2_devkitc_1_n8r2/board.c b/ports/espressif/boards/espressif_esp32s2_devkitc_1_n8r2/board.c index b3c8cb41914e..164430c88c92 100644 --- a/ports/espressif/boards/espressif_esp32s2_devkitc_1_n8r2/board.c +++ b/ports/espressif/boards/espressif_esp32s2_devkitc_1_n8r2/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/espressif_esp32s2_devkitc_1_n8r2/mpconfigboard.mk b/ports/espressif/boards/espressif_esp32s2_devkitc_1_n8r2/mpconfigboard.mk index 883df304f435..d274e3e6dd6f 100644 --- a/ports/espressif/boards/espressif_esp32s2_devkitc_1_n8r2/mpconfigboard.mk +++ b/ports/espressif/boards/espressif_esp32s2_devkitc_1_n8r2/mpconfigboard.mk @@ -8,3 +8,7 @@ IDF_TARGET = esp32s2 CIRCUITPY_ESP_FLASH_MODE=dio CIRCUITPY_ESP_FLASH_FREQ=40m CIRCUITPY_ESP_FLASH_SIZE=8MB + +CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m diff --git a/ports/espressif/boards/espressif_esp32s2_devkitc_1_n8r2/sdkconfig b/ports/espressif/boards/espressif_esp32s2_devkitc_1_n8r2/sdkconfig index 926a7813bac8..57f0da698aa1 100644 --- a/ports/espressif/boards/espressif_esp32s2_devkitc_1_n8r2/sdkconfig +++ b/ports/espressif/boards/espressif_esp32s2_devkitc_1_n8r2/sdkconfig @@ -1,37 +1,15 @@ -CONFIG_ESP32S2_SPIRAM_SUPPORT=y # -# SPI RAM config +# Espressif IoT Development Framework Configuration # -CONFIG_SPIRAM_MODE_QUAD=y -# CONFIG_SPIRAM_MODE_OCT is not set -# CONFIG_SPIRAM_TYPE_AUTO is not set -CONFIG_SPIRAM_TYPE_ESPPSRAM16=y -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set -CONFIG_SPIRAM_SIZE=2097152 -# end of SPI RAM config - -CONFIG_DEFAULT_PSRAM_CLK_IO=30 # -# PSRAM Clock and CS IO for ESP32S3 +# Component config # -CONFIG_DEFAULT_PSRAM_CS_IO=26 -# end of PSRAM Clock and CS IO for ESP32S3 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_120M is not set -# CONFIG_SPIRAM_SPEED_80M is not set -CONFIG_SPIRAM_SPEED_40M=y -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set -CONFIG_SPIRAM_USE_MEMMAP=y -# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set -# CONFIG_SPIRAM_USE_MALLOC is not set -CONFIG_SPIRAM_MEMTEST=y # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s2" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/espressif_esp32s3_box/board.c b/ports/espressif/boards/espressif_esp32s3_box/board.c index a91a924d048e..4a2ce0efedb6 100644 --- a/ports/espressif/boards/espressif_esp32s3_box/board.c +++ b/ports/espressif/boards/espressif_esp32s3_box/board.c @@ -88,12 +88,6 @@ void board_init(void) { true, // backlight_on_high false, // SH1107_addressing 50000); // backlight pwm frequency - - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif } // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.mk b/ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.mk index 5a2a4794bd8e..5f357ec5037e 100644 --- a/ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.mk +++ b/ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.mk @@ -5,8 +5,12 @@ USB_MANUFACTURER = "Espressif" IDF_TARGET = esp32s3 +CIRCUITPY_ESP_FLASH_SIZE = 16MB CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 40m -CIRCUITPY_ESP_FLASH_SIZE = 16MB + +CIRCUITPY_ESP_PSRAM_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_MODE = opi +CIRCUITPY_ESP_PSRAM_FREQ = 80m CIRCUITPY_ESPCAMERA = 0 diff --git a/ports/espressif/boards/espressif_esp32s3_box/sdkconfig b/ports/espressif/boards/espressif_esp32s3_box/sdkconfig index 6884299abe77..f5ef79768114 100644 --- a/ports/espressif/boards/espressif_esp32s3_box/sdkconfig +++ b/ports/espressif/boards/espressif_esp32s3_box/sdkconfig @@ -1,14 +1,15 @@ -CONFIG_ESP32S3_SPIRAM_SUPPORT=y -CONFIG_SPIRAM=y -CONFIG_SPIRAM_MODE_OCT=y -CONFIG_SPIRAM_SPEED_80M=y -CONFIG_SPIRAM_TYPE_AUTO=y - -CONFIG_SPIRAM_BOOT_INIT=y -CONFIG_SPIRAM_USE_MEMMAP=y - +# +# Espressif IoT Development Framework Configuration +# +# +# Component config +# # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/espressif_esp32s3_box_lite/board.c b/ports/espressif/boards/espressif_esp32s3_box_lite/board.c index ddfab4979777..1917e6df4cbf 100644 --- a/ports/espressif/boards/espressif_esp32s3_box_lite/board.c +++ b/ports/espressif/boards/espressif_esp32s3_box_lite/board.c @@ -89,12 +89,6 @@ void board_init(void) { false, // backlight_on_high false, // SH1107_addressing 50000); // backlight pwm frequency - - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif } // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/espressif_esp32s3_box_lite/mpconfigboard.mk b/ports/espressif/boards/espressif_esp32s3_box_lite/mpconfigboard.mk index a4bd29fa522d..af4d8840a078 100644 --- a/ports/espressif/boards/espressif_esp32s3_box_lite/mpconfigboard.mk +++ b/ports/espressif/boards/espressif_esp32s3_box_lite/mpconfigboard.mk @@ -5,8 +5,12 @@ USB_MANUFACTURER = "Espressif" IDF_TARGET = esp32s3 +CIRCUITPY_ESP_FLASH_SIZE = 16MB CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 40m -CIRCUITPY_ESP_FLASH_SIZE = 16MB + +CIRCUITPY_ESP_PSRAM_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_MODE = opi +CIRCUITPY_ESP_PSRAM_FREQ = 80m CIRCUITPY_ESPCAMERA = 0 diff --git a/ports/espressif/boards/espressif_esp32s3_box_lite/sdkconfig b/ports/espressif/boards/espressif_esp32s3_box_lite/sdkconfig index 6884299abe77..f5ef79768114 100644 --- a/ports/espressif/boards/espressif_esp32s3_box_lite/sdkconfig +++ b/ports/espressif/boards/espressif_esp32s3_box_lite/sdkconfig @@ -1,14 +1,15 @@ -CONFIG_ESP32S3_SPIRAM_SUPPORT=y -CONFIG_SPIRAM=y -CONFIG_SPIRAM_MODE_OCT=y -CONFIG_SPIRAM_SPEED_80M=y -CONFIG_SPIRAM_TYPE_AUTO=y - -CONFIG_SPIRAM_BOOT_INIT=y -CONFIG_SPIRAM_USE_MEMMAP=y - +# +# Espressif IoT Development Framework Configuration +# +# +# Component config +# # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n32r8/board.c b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n32r8/board.c index ff9418ec86cb..164430c88c92 100644 --- a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n32r8/board.c +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n32r8/board.c @@ -25,24 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif -} - -bool board_requests_safe_mode(void) { - return false; -} - -void reset_board(void) { - -} - -void board_deinit(void) { -} +// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n32r8/mpconfigboard.mk b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n32r8/mpconfigboard.mk index 78423955bb6f..223c3af6bfb7 100644 --- a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n32r8/mpconfigboard.mk +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n32r8/mpconfigboard.mk @@ -5,6 +5,10 @@ USB_MANUFACTURER = "Espressif" IDF_TARGET = esp32s3 -CIRCUITPY_ESP_FLASH_MODE=dout -CIRCUITPY_ESP_FLASH_FREQ=80m -CIRCUITPY_ESP_FLASH_SIZE=32MB +CIRCUITPY_ESP_FLASH_SIZE = 32MB +CIRCUITPY_ESP_FLASH_MODE = opi +CIRCUITPY_ESP_FLASH_FREQ = 80m + +CIRCUITPY_ESP_PSRAM_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_MODE = opi +CIRCUITPY_ESP_PSRAM_FREQ = 80m diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n32r8/sdkconfig b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n32r8/sdkconfig index f915462e113d..f5ef79768114 100644 --- a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n32r8/sdkconfig +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n32r8/sdkconfig @@ -1,77 +1,15 @@ -CONFIG_ESP32S3_SPIRAM_SUPPORT=y # -# SPI RAM config +# Espressif IoT Development Framework Configuration # -# CONFIG_SPIRAM_MODE_QUAD is not set -CONFIG_SPIRAM_MODE_OCT=y -# CONFIG_SPIRAM_TYPE_AUTO is not set -CONFIG_SPIRAM_TYPE_ESPPSRAM64=y -CONFIG_SPIRAM_SIZE=8388608 -# end of SPI RAM config - -CONFIG_DEFAULT_PSRAM_CLK_IO=30 -# -# PSRAM Clock and CS IO for ESP32S3 -# -CONFIG_DEFAULT_PSRAM_CS_IO=26 -# end of PSRAM Clock and CS IO for ESP32S3 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -CONFIG_SPIRAM_SPEED_80M=y -# CONFIG_SPIRAM_SPEED_40M is not set -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set -CONFIG_SPIRAM_USE_MEMMAP=y -# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set -# CONFIG_SPIRAM_USE_MALLOC is not set -CONFIG_SPIRAM_MEMTEST=y - # -# Serial flasher config +# Component config # -CONFIG_ESPTOOLPY_BAUD_OTHER_VAL=115200 -# CONFIG_ESPTOOLPY_NO_STUB is not set -CONFIG_ESPTOOLPY_OCT_FLASH=y -CONFIG_ESPTOOLPY_FLASHMODE_OPI=y -# CONFIG_ESPTOOLPY_FLASH_SAMPLE_MODE_STR is not set -CONFIG_ESPTOOLPY_FLASH_SAMPLE_MODE_DTR=y -CONFIG_ESPTOOLPY_FLASHMODE="dout" -CONFIG_ESPTOOLPY_FLASHFREQ_80M=y -# CONFIG_ESPTOOLPY_FLASHFREQ_40M is not set -# CONFIG_ESPTOOLPY_FLASHFREQ_20M is not set -CONFIG_ESPTOOLPY_FLASHFREQ="80m" -# CONFIG_ESPTOOLPY_FLASHSIZE_1MB is not set -# CONFIG_ESPTOOLPY_FLASHSIZE_2MB is not set -# CONFIG_ESPTOOLPY_FLASHSIZE_4MB is not set -# CONFIG_ESPTOOLPY_FLASHSIZE_8MB is not set -# CONFIG_ESPTOOLPY_FLASHSIZE_16MB is not set -CONFIG_ESPTOOLPY_FLASHSIZE_32MB=y -# CONFIG_ESPTOOLPY_FLASHSIZE_64MB is not set -# CONFIG_ESPTOOLPY_FLASHSIZE_128MB is not set -CONFIG_ESPTOOLPY_FLASHSIZE="32MB" -CONFIG_ESPTOOLPY_FLASHSIZE_DETECT=y -CONFIG_ESPTOOLPY_BEFORE_RESET=y -# CONFIG_ESPTOOLPY_BEFORE_NORESET is not set -CONFIG_ESPTOOLPY_BEFORE="default_reset" -CONFIG_ESPTOOLPY_AFTER_RESET=y -# CONFIG_ESPTOOLPY_AFTER_NORESET is not set -CONFIG_ESPTOOLPY_AFTER="hard_reset" -# CONFIG_ESPTOOLPY_MONITOR_BAUD_CONSOLE is not set -# CONFIG_ESPTOOLPY_MONITOR_BAUD_9600B is not set -# CONFIG_ESPTOOLPY_MONITOR_BAUD_57600B is not set -CONFIG_ESPTOOLPY_MONITOR_BAUD_115200B=y -# CONFIG_ESPTOOLPY_MONITOR_BAUD_230400B is not set -# CONFIG_ESPTOOLPY_MONITOR_BAUD_921600B is not set -# CONFIG_ESPTOOLPY_MONITOR_BAUD_2MB is not set -# CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER is not set -CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER_VAL=115200 -CONFIG_ESPTOOLPY_MONITOR_BAUD=115200 -# end of Serial flasher config - # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/board.c b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/board.c index 3b1f5efd8747..164430c88c92 100644 --- a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/board.c +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/sdkconfig b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/sdkconfig index a0a61d8392ec..f5ef79768114 100644 --- a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/sdkconfig +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/sdkconfig @@ -1,6 +1,15 @@ -# CONFIG_ESP32S3_SPIRAM_SUPPORT is not set +# +# Espressif IoT Development Framework Configuration +# +# +# Component config +# # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/board.c b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/board.c index 3b1f5efd8747..164430c88c92 100644 --- a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/board.c +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.mk b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.mk index 7d5afe9a9f1a..bcc614c50052 100644 --- a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.mk +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.mk @@ -5,6 +5,10 @@ USB_MANUFACTURER = "Espressif" IDF_TARGET = esp32s3 +CIRCUITPY_ESP_FLASH_SIZE = 8MB CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 80m -CIRCUITPY_ESP_FLASH_SIZE = 8MB + +CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 80m diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/sdkconfig b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/sdkconfig index 3e366f01720a..f5ef79768114 100644 --- a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/sdkconfig +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/sdkconfig @@ -1,43 +1,9 @@ # -# Component config -# -# -# ESP32S3-Specific -# -CONFIG_ESP32S3_SPIRAM_SUPPORT=y -# -# SPI RAM config +# Espressif IoT Development Framework Configuration # -CONFIG_SPIRAM_MODE_QUAD=y -# CONFIG_SPIRAM_MODE_OCT is not set -# CONFIG_SPIRAM_TYPE_AUTO is not set -CONFIG_SPIRAM_TYPE_ESPPSRAM16=y -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set -CONFIG_SPIRAM_SIZE=2097152 # -# PSRAM Clock and CS IO for ESP32S3 +# Component config # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 -CONFIG_DEFAULT_PSRAM_CS_IO=26 -# end of PSRAM Clock and CS IO for ESP32S3 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_120M is not set -CONFIG_SPIRAM_SPEED_80M=y -# CONFIG_SPIRAM_SPEED_40M is not set -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set -CONFIG_SPIRAM_USE_MEMMAP=y -# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set -# CONFIG_SPIRAM_USE_MALLOC is not set -CONFIG_SPIRAM_MEMTEST=y -# end of SPI RAM config - -# end of ESP32S3-Specific - # # LWIP # @@ -45,3 +11,5 @@ CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3" # end of LWIP # end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/board.c b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/board.c index 3b1f5efd8747..164430c88c92 100644 --- a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/board.c +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/mpconfigboard.mk b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/mpconfigboard.mk index 95fa2d0324be..b71b35483933 100644 --- a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/mpconfigboard.mk +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/mpconfigboard.mk @@ -5,6 +5,10 @@ USB_MANUFACTURER = "Espressif" IDF_TARGET = esp32s3 +CIRCUITPY_ESP_FLASH_SIZE = 8MB CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 80m -CIRCUITPY_ESP_FLASH_SIZE = 8MB + +CIRCUITPY_ESP_PSRAM_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_MODE = opi +CIRCUITPY_ESP_PSRAM_FREQ = 80m diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/sdkconfig b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/sdkconfig index f508f4a67c3f..f5ef79768114 100644 --- a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/sdkconfig +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/sdkconfig @@ -1,34 +1,15 @@ -CONFIG_ESP32S3_SPIRAM_SUPPORT=y # -# SPI RAM config +# Espressif IoT Development Framework Configuration # -# CONFIG_SPIRAM_MODE_QUAD is not set -CONFIG_SPIRAM_MODE_OCT=y -# CONFIG_SPIRAM_TYPE_AUTO is not set -CONFIG_SPIRAM_TYPE_ESPPSRAM64=y -CONFIG_SPIRAM_SIZE=8388608 -# end of SPI RAM config - -CONFIG_DEFAULT_PSRAM_CLK_IO=30 # -# PSRAM Clock and CS IO for ESP32S3 +# Component config # -CONFIG_DEFAULT_PSRAM_CS_IO=26 -# end of PSRAM Clock and CS IO for ESP32S3 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -CONFIG_SPIRAM_SPEED_80M=y -# CONFIG_SPIRAM_SPEED_40M is not set -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set -CONFIG_SPIRAM_USE_MEMMAP=y -# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set -# CONFIG_SPIRAM_USE_MALLOC is not set -CONFIG_SPIRAM_MEMTEST=y # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8_hacktablet/mpconfigboard.mk b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8_hacktablet/mpconfigboard.mk index 1bd9c0ac8de2..99daa4ab98f3 100644 --- a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8_hacktablet/mpconfigboard.mk +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8_hacktablet/mpconfigboard.mk @@ -9,4 +9,8 @@ CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_MODE = opi +CIRCUITPY_ESP_PSRAM_FREQ = 80m + CIRCUITPY_DOTCLOCKFRAMEBUFFER = 1 diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8_hacktablet/sdkconfig b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8_hacktablet/sdkconfig index 40da78d50656..0452053c1ea3 100644 --- a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8_hacktablet/sdkconfig +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8_hacktablet/sdkconfig @@ -1,48 +1,21 @@ # -# Component config -# -# -# ESP32S3-Specific +# Espressif IoT Development Framework Configuration # -CONFIG_ESP32S3_SPIRAM_SUPPORT=y # -# SPI RAM config +# Component config # -#CONFIG_SPIRAM_MODE_QUAD=y -### NEW ### -CONFIG_SPIRAM_MODE_OCT=y -CONFIG_SPIRAM_TYPE_AUTO=y -####### -# CONFIG_SPIRAM_MODE_OCT is not set -# CONFIG_SPIRAM_TYPE_AUTO is not set -#CONFIG_SPIRAM_TYPE_ESPPSRAM16=y -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set -#CONFIG_SPIRAM_SIZE=2097152 -CONFIG_SPIRAM_TYPE_ESPPSRAM64=y -CONFIG_SPIRAM_SIZE=8388608 # -# PSRAM Clock and CS IO for ESP32S3 +# ESP System Settings # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 -CONFIG_DEFAULT_PSRAM_CS_IO=26 -# end of PSRAM Clock and CS IO for ESP32S3 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_120M is not set -CONFIG_SPIRAM_SPEED_80M=y -# CONFIG_SPIRAM_SPEED_40M is not set -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set -CONFIG_SPIRAM_USE_MEMMAP=y -# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set -# CONFIG_SPIRAM_USE_MALLOC is not set -CONFIG_SPIRAM_MEMTEST=y -# end of SPI RAM config - -# end of ESP32S3-Specific +CONFIG_ESP_CONSOLE_UART_CUSTOM=y +# CONFIG_ESP_CONSOLE_NONE is not set +CONFIG_ESP_CONSOLE_UART=y +CONFIG_ESP_CONSOLE_UART_CUSTOM_NUM_0=y +CONFIG_ESP_CONSOLE_UART_NUM=0 +CONFIG_ESP_CONSOLE_UART_TX_GPIO=43 +CONFIG_ESP_CONSOLE_UART_RX_GPIO=44 +CONFIG_ESP_CONSOLE_UART_BAUDRATE=115200 +# end of ESP System Settings # # LWIP @@ -50,13 +23,6 @@ CONFIG_SPIRAM_MEMTEST=y CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3-hacktablet" # end of LWIP -# CONFIG_ESP_CONSOLE_NONE is not set -CONFIG_ESP_CONSOLE_UART_BAUDRATE=115200 -CONFIG_ESP_CONSOLE_UART_CUSTOM_NUM_0=y -CONFIG_ESP_CONSOLE_UART_CUSTOM=y -CONFIG_ESP_CONSOLE_UART_NUM=0 -CONFIG_ESP_CONSOLE_UART_RX_GPIO=44 -CONFIG_ESP_CONSOLE_UART_TX_GPIO=43 -CONFIG_ESP_CONSOLE_UART=y - # end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/espressif_esp32s3_devkitm_1_n8/board.c b/ports/espressif/boards/espressif_esp32s3_devkitm_1_n8/board.c index 3b1f5efd8747..164430c88c92 100644 --- a/ports/espressif/boards/espressif_esp32s3_devkitm_1_n8/board.c +++ b/ports/espressif/boards/espressif_esp32s3_devkitm_1_n8/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/espressif_esp32s3_devkitm_1_n8/sdkconfig b/ports/espressif/boards/espressif_esp32s3_devkitm_1_n8/sdkconfig index a0a61d8392ec..f5ef79768114 100644 --- a/ports/espressif/boards/espressif_esp32s3_devkitm_1_n8/sdkconfig +++ b/ports/espressif/boards/espressif_esp32s3_devkitm_1_n8/sdkconfig @@ -1,6 +1,15 @@ -# CONFIG_ESP32S3_SPIRAM_SUPPORT is not set +# +# Espressif IoT Development Framework Configuration +# +# +# Component config +# # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/espressif_esp32s3_eye/mpconfigboard.mk b/ports/espressif/boards/espressif_esp32s3_eye/mpconfigboard.mk index 4711f28aaf93..0619284e83c5 100644 --- a/ports/espressif/boards/espressif_esp32s3_eye/mpconfigboard.mk +++ b/ports/espressif/boards/espressif_esp32s3_eye/mpconfigboard.mk @@ -5,6 +5,10 @@ USB_MANUFACTURER = "Espressif" IDF_TARGET = esp32s3 +CIRCUITPY_ESP_FLASH_SIZE = 8MB CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 80m -CIRCUITPY_ESP_FLASH_SIZE = 8MB + +CIRCUITPY_ESP_PSRAM_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_MODE = opi +CIRCUITPY_ESP_PSRAM_FREQ = 80m diff --git a/ports/espressif/boards/espressif_esp32s3_eye/sdkconfig b/ports/espressif/boards/espressif_esp32s3_eye/sdkconfig index 1a24832767d1..71778c5e6e65 100644 --- a/ports/espressif/boards/espressif_esp32s3_eye/sdkconfig +++ b/ports/espressif/boards/espressif_esp32s3_eye/sdkconfig @@ -1,34 +1,15 @@ -CONFIG_ESP32S3_SPIRAM_SUPPORT=y # -# SPI RAM config +# Espressif IoT Development Framework Configuration # -# CONFIG_SPIRAM_MODE_QUAD is not set -CONFIG_SPIRAM_MODE_OCT=y -# CONFIG_SPIRAM_TYPE_AUTO is not set -CONFIG_SPIRAM_TYPE_ESPPSRAM64=y -CONFIG_SPIRAM_SIZE=8388608 -# end of SPI RAM config - -CONFIG_DEFAULT_PSRAM_CLK_IO=30 # -# PSRAM Clock and CS IO for ESP32S3 +# Component config # -CONFIG_DEFAULT_PSRAM_CS_IO=26 -# end of PSRAM Clock and CS IO for ESP32S3 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -CONFIG_SPIRAM_SPEED_80M=y -# CONFIG_SPIRAM_SPEED_40M is not set -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set -CONFIG_SPIRAM_USE_MEMMAP=y -# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set -# CONFIG_SPIRAM_USE_MALLOC is not set -CONFIG_SPIRAM_MEMTEST=y # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3-eye" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/espressif_esp32s3_lcd_ev/board.c b/ports/espressif/boards/espressif_esp32s3_lcd_ev/board.c index 0639737c3539..726012d1f73b 100644 --- a/ports/espressif/boards/espressif_esp32s3_lcd_ev/board.c +++ b/ports/espressif/boards/espressif_esp32s3_lcd_ev/board.c @@ -26,9 +26,134 @@ #include "supervisor/board.h" #include "mpconfigboard.h" +#include "shared-bindings/board/__init__.h" +#include "shared-bindings/busio/I2C.h" +#include "shared-bindings/dotclockframebuffer/DotClockFramebuffer.h" +#include "shared-bindings/dotclockframebuffer/__init__.h" +#include "shared-bindings/framebufferio/FramebufferDisplay.h" #include "shared-bindings/microcontroller/Pin.h" +#include "shared-module/displayio/__init__.h" +#include "boards/espressif_esp32s3_lcd_ev/board.h" +#define MP_DEFINE_BYTES_OBJ(obj_name, bin) mp_obj_str_t obj_name = {{&mp_type_bytes}, 0, sizeof(bin) - 1, (const byte *)bin} + +static const uint8_t display_init_sequence[] = { + 0xf0, 5, 0x55, 0xaa, 0x52, 0x08, 0x00, + 0xf6, 2, 0x5a, 0x87, + 0xc1, 1, 0x3f, + 0xc2, 1, 0x0e, + 0xc6, 1, 0xf8, + 0xc9, 1, 0x10, + 0xcd, 1, 0x25, + 0xf8, 1, 0x8a, + 0xac, 1, 0x45, + 0xa0, 1, 0xdd, + 0xa7, 1, 0x47, + 0xfa, 4, 0x00, 0x00, 0x00, 0x04, + 0x86, 4, 0x99, 0xa3, 0xa3, 0x51, + 0xa3, 1, 0xee, + 0xfd, 3, 0x3c, 0x3c, 0x00, + 0x71, 1, 0x48, + 0x72, 1, 0x48, + 0x73, 2, 0x00, 0x44, + 0x97, 1, 0xee, + 0x83, 1, 0x93, + 0x9a, 1, 0x72, + 0x9b, 1, 0x5a, + 0x82, 2, 0x2c, 0x2c, + 0xb1, 1, 0x10, + 0x6d, 32, 0x00, 0x1f, 0x19, 0x1a, 0x10, 0x0e, 0x0c, 0x0a, 0x02, 0x07, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x08, 0x01, 0x09, 0x0b, 0x0d, 0x0f, 0x1a, 0x19, 0x1f, 0x00, + 0x64, 16, 0x38, 0x05, 0x01, 0xdb, 0x03, 0x03, 0x38, 0x04, 0x01, 0xdc, 0x03, 0x03, 0x7a, 0x7a, 0x7a, 0x7a, + 0x65, 16, 0x38, 0x03, 0x01, 0xdd, 0x03, 0x03, 0x38, 0x02, 0x01, 0xde, 0x03, 0x03, 0x7a, 0x7a, 0x7a, 0x7a, + 0x66, 16, 0x38, 0x01, 0x01, 0xdf, 0x03, 0x03, 0x38, 0x00, 0x01, 0xe0, 0x03, 0x03, 0x7a, 0x7a, 0x7a, 0x7a, + 0x67, 16, 0x30, 0x01, 0x01, 0xe1, 0x03, 0x03, 0x30, 0x02, 0x01, 0xe2, 0x03, 0x03, 0x7a, 0x7a, 0x7a, 0x7a, + 0x68, 13, 0x00, 0x08, 0x15, 0x08, 0x15, 0x7a, 0x7a, 0x08, 0x15, 0x08, 0x15, 0x7a, 0x7a, + 0x60, 8, 0x38, 0x08, 0x7a, 0x7a, 0x38, 0x09, 0x7a, 0x7a, + 0x63, 8, 0x31, 0xe4, 0x7a, 0x7a, 0x31, 0xe5, 0x7a, 0x7a, + 0x69, 7, 0x04, 0x22, 0x14, 0x22, 0x14, 0x22, 0x08, + 0x6b, 1, 0x07, + 0x7a, 2, 0x08, 0x13, + 0x7b, 2, 0x08, 0x13, + 0xd1, 52, 0x00, 0x00, 0x00, 0x04, 0x00, 0x12, 0x00, 0x18, 0x00, 0x21, 0x00, 0x2a, 0x00, 0x35, 0x00, 0x47, 0x00, 0x56, 0x00, 0x90, 0x00, 0xe5, 0x01, 0x68, 0x01, 0xd5, 0x01, 0xd7, 0x02, 0x36, 0x02, 0xa6, 0x02, 0xee, 0x03, 0x48, 0x03, 0xa0, 0x03, 0xba, 0x03, 0xc5, 0x03, 0xd0, 0x03, 0xe0, 0x03, 0xea, 0x03, 0xfa, 0x03, 0xff, + 0xd2, 52, 0x00, 0x00, 0x00, 0x04, 0x00, 0x12, 0x00, 0x18, 0x00, 0x21, 0x00, 0x2a, 0x00, 0x35, 0x00, 0x47, 0x00, 0x56, 0x00, 0x90, 0x00, 0xe5, 0x01, 0x68, 0x01, 0xd5, 0x01, 0xd7, 0x02, 0x36, 0x02, 0xa6, 0x02, 0xee, 0x03, 0x48, 0x03, 0xa0, 0x03, 0xba, 0x03, 0xc5, 0x03, 0xd0, 0x03, 0xe0, 0x03, 0xea, 0x03, 0xfa, 0x03, 0xff, + 0xd3, 52, 0x00, 0x00, 0x00, 0x04, 0x00, 0x12, 0x00, 0x18, 0x00, 0x21, 0x00, 0x2a, 0x00, 0x35, 0x00, 0x47, 0x00, 0x56, 0x00, 0x90, 0x00, 0xe5, 0x01, 0x68, 0x01, 0xd5, 0x01, 0xd7, 0x02, 0x36, 0x02, 0xa6, 0x02, 0xee, 0x03, 0x48, 0x03, 0xa0, 0x03, 0xba, 0x03, 0xc5, 0x03, 0xd0, 0x03, 0xe0, 0x03, 0xea, 0x03, 0xfa, 0x03, 0xff, + 0xd4, 52, 0x00, 0x00, 0x00, 0x04, 0x00, 0x12, 0x00, 0x18, 0x00, 0x21, 0x00, 0x2a, 0x00, 0x35, 0x00, 0x47, 0x00, 0x56, 0x00, 0x90, 0x00, 0xe5, 0x01, 0x68, 0x01, 0xd5, 0x01, 0xd7, 0x02, 0x36, 0x02, 0xa6, 0x02, 0xee, 0x03, 0x48, 0x03, 0xa0, 0x03, 0xba, 0x03, 0xc5, 0x03, 0xd0, 0x03, 0xe0, 0x03, 0xea, 0x03, 0xfa, 0x03, 0xff, + 0xd5, 52, 0x00, 0x00, 0x00, 0x04, 0x00, 0x12, 0x00, 0x18, 0x00, 0x21, 0x00, 0x2a, 0x00, 0x35, 0x00, 0x47, 0x00, 0x56, 0x00, 0x90, 0x00, 0xe5, 0x01, 0x68, 0x01, 0xd5, 0x01, 0xd7, 0x02, 0x36, 0x02, 0xa6, 0x02, 0xee, 0x03, 0x48, 0x03, 0xa0, 0x03, 0xba, 0x03, 0xc5, 0x03, 0xd0, 0x03, 0xe0, 0x03, 0xea, 0x03, 0xfa, 0x03, 0xff, + 0xd6, 52, 0x00, 0x00, 0x00, 0x04, 0x00, 0x12, 0x00, 0x18, 0x00, 0x21, 0x00, 0x2a, 0x00, 0x35, 0x00, 0x47, 0x00, 0x56, 0x00, 0x90, 0x00, 0xe5, 0x01, 0x68, 0x01, 0xd5, 0x01, 0xd7, 0x02, 0x36, 0x02, 0xa6, 0x02, 0xee, 0x03, 0x48, 0x03, 0xa0, 0x03, 0xba, 0x03, 0xc5, 0x03, 0xd0, 0x03, 0xe0, 0x03, 0xea, 0x03, 0xfa, 0x03, 0xff, + 0x3a, 1, 0x66, + 0x3a, 1, 0x66, + 0x11, 0x80, 120, + 0x29, 0x0, + 0, // trailing NUL for Python bytes() representation +}; +MP_DEFINE_BYTES_OBJ(display_init_byte_obj, display_init_sequence); + +static const char i2c_bus_init_sequence[] = { + 2, 3, 0xf1, // set GPIO direction + 2, 2, 0, // disable all output inversion + 0, // trailing NUL for Python bytes() representation +}; +MP_DEFINE_BYTES_OBJ(i2c_init_byte_obj, i2c_bus_init_sequence); + +static const mcu_pin_obj_t *red_pins[] = { + &pin_GPIO1, &pin_GPIO2, &pin_GPIO42, &pin_GPIO41, &pin_GPIO40 +}; +static const mcu_pin_obj_t *green_pins[] = { + &pin_GPIO21, &pin_GPIO47, &pin_GPIO48, &pin_GPIO45, &pin_GPIO38, &pin_GPIO39 +}; +static const mcu_pin_obj_t *blue_pins[] = { + &pin_GPIO10, &pin_GPIO11, &pin_GPIO12, &pin_GPIO13, &pin_GPIO14 +}; void board_init(void) { + dotclockframebuffer_framebuffer_obj_t *framebuffer = &allocate_display_bus_or_raise()->dotclock; + framebuffer->base.type = &dotclockframebuffer_framebuffer_type; + + common_hal_dotclockframebuffer_framebuffer_construct( + framebuffer, + /* de */ &pin_GPIO17, + /* vsync */ &pin_GPIO3, + /* hsync */ &pin_GPIO46, + /* dclk */ &pin_GPIO9, + /* data */ red_pins, MP_ARRAY_SIZE(red_pins), green_pins, MP_ARRAY_SIZE(green_pins), blue_pins, MP_ARRAY_SIZE(blue_pins), + /* frequency */ 12000000, + /* width x height */ 480, 480, + /* horizontal: pulse, back & front porch, idle */ 13, 20, 40, false, + /* vertical: pulse, back & front porch, idle */ 15, 20, 40, false, + /* de_idle_high */ false, + /* pclk_active_high */ true, + /* pclk_idle_high */ false, + /* overscan_left */ 0 + ); + + framebufferio_framebufferdisplay_obj_t *disp = &allocate_display_or_raise()->framebuffer_display; + disp->base.type = &framebufferio_framebufferdisplay_type; + common_hal_framebufferio_framebufferdisplay_construct( + disp, + framebuffer, + 0, + true + ); + + busio_i2c_obj_t i2c; + i2c.base.type = &busio_i2c_type; + common_hal_busio_i2c_construct(&i2c, DEFAULT_I2C_BUS_SCL, DEFAULT_I2C_BUS_SDA, 400000, 255); + const int i2c_device_address = 32; + + dotclockframebuffer_ioexpander_spi_bus spibus = { + .bus = &i2c, + .i2c_device_address = i2c_device_address, + .i2c_write_size = 2, + .addr_reg_shadow = { .u32 = 1 }, // GPIO data at register 1 + .cs_mask = 0x100 << 1, // data payload is at byte 2 + .mosi_mask = 0x100 << 3, + .clk_mask = 0x100 << 2, + }; + + static const mp_buffer_info_t bufinfo_display_init = { (void *)display_init_sequence, sizeof(display_init_sequence) - 1 }; + static const mp_buffer_info_t bufinfo_i2c_bus_init = { (void *)i2c_bus_init_sequence, sizeof(i2c_bus_init_sequence) - 1 }; + dotclockframebuffer_ioexpander_send_init_sequence(&spibus, &bufinfo_i2c_bus_init, &bufinfo_display_init); + + common_hal_busio_i2c_deinit(&i2c); } // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/espressif_esp32s3_lcd_ev/board.h b/ports/espressif/boards/espressif_esp32s3_lcd_ev/board.h new file mode 100644 index 000000000000..e8f528654252 --- /dev/null +++ b/ports/espressif/boards/espressif_esp32s3_lcd_ev/board.h @@ -0,0 +1,31 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2023 Jeff Epler for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#pragma once + +#include "py/objstr.h" + +extern mp_obj_str_t display_init_byte_obj, i2c_init_byte_obj; diff --git a/ports/espressif/boards/espressif_esp32s3_lcd_ev/mpconfigboard.mk b/ports/espressif/boards/espressif_esp32s3_lcd_ev/mpconfigboard.mk index cec65ead856a..183103f17e0c 100644 --- a/ports/espressif/boards/espressif_esp32s3_lcd_ev/mpconfigboard.mk +++ b/ports/espressif/boards/espressif_esp32s3_lcd_ev/mpconfigboard.mk @@ -9,5 +9,9 @@ CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 16MB +CIRCUITPY_ESP_PSRAM_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_MODE = opi +CIRCUITPY_ESP_PSRAM_FREQ = 120m + CIRCUITPY_DOTCLOCKFRAMEBUFFER = 1 UF2_BOOTLOADER = 0 diff --git a/ports/espressif/boards/espressif_esp32s3_lcd_ev/pins.c b/ports/espressif/boards/espressif_esp32s3_lcd_ev/pins.c index 59da0cb91072..da25b509a98c 100644 --- a/ports/espressif/boards/espressif_esp32s3_lcd_ev/pins.c +++ b/ports/espressif/boards/espressif_esp32s3_lcd_ev/pins.c @@ -1,15 +1,29 @@ #include "py/objtuple.h" +#include "boards/espressif_esp32s3_lcd_ev/board.h" #include "shared-bindings/board/__init__.h" +#include "shared-module/displayio/__init__.h" + +STATIC const mp_rom_map_elem_t tft_io_expander_table[] = { + { MP_ROM_QSTR(MP_QSTR_i2c_address), MP_ROM_INT(0x20)}, + { MP_ROM_QSTR(MP_QSTR_gpio_address), MP_ROM_INT(1)}, + { MP_ROM_QSTR(MP_QSTR_gpio_data_len), MP_ROM_INT(1)}, + { MP_ROM_QSTR(MP_QSTR_gpio_data), MP_ROM_INT(0xF1)}, + { MP_ROM_QSTR(MP_QSTR_cs_bit), MP_ROM_INT(1)}, + { MP_ROM_QSTR(MP_QSTR_mosi_bit), MP_ROM_INT(3)}, + { MP_ROM_QSTR(MP_QSTR_clk_bit), MP_ROM_INT(2)}, + { MP_ROM_QSTR(MP_QSTR_i2c_init_sequence), &i2c_init_byte_obj}, +}; +MP_DEFINE_CONST_DICT(tft_io_expander_dict, tft_io_expander_table); STATIC const mp_rom_obj_tuple_t tft_r_pins = { {&mp_type_tuple}, 5, { - MP_ROM_PTR(&pin_GPIO10), - MP_ROM_PTR(&pin_GPIO11), - MP_ROM_PTR(&pin_GPIO12), - MP_ROM_PTR(&pin_GPIO13), - MP_ROM_PTR(&pin_GPIO14), + MP_ROM_PTR(&pin_GPIO1), + MP_ROM_PTR(&pin_GPIO2), + MP_ROM_PTR(&pin_GPIO42), + MP_ROM_PTR(&pin_GPIO41), + MP_ROM_PTR(&pin_GPIO40), } }; @@ -30,35 +44,55 @@ STATIC const mp_rom_obj_tuple_t tft_b_pins = { {&mp_type_tuple}, 5, { - MP_ROM_PTR(&pin_GPIO40), - MP_ROM_PTR(&pin_GPIO41), - MP_ROM_PTR(&pin_GPIO42), - MP_ROM_PTR(&pin_GPIO2), - MP_ROM_PTR(&pin_GPIO1), + MP_ROM_PTR(&pin_GPIO10), + MP_ROM_PTR(&pin_GPIO11), + MP_ROM_PTR(&pin_GPIO12), + MP_ROM_PTR(&pin_GPIO13), + MP_ROM_PTR(&pin_GPIO14), } }; -STATIC const mp_rom_map_elem_t tft_table[] = { +STATIC const mp_rom_map_elem_t tft_pins_table[] = { { MP_ROM_QSTR(MP_QSTR_de), MP_ROM_PTR(&pin_GPIO17) }, - { MP_ROM_QSTR(MP_QSTR_vsync), MP_ROM_PTR(&pin_GPIO46) }, - { MP_ROM_QSTR(MP_QSTR_hsync), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_vsync), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_hsync), MP_ROM_PTR(&pin_GPIO46) }, { MP_ROM_QSTR(MP_QSTR_dclk), MP_ROM_PTR(&pin_GPIO9) }, { MP_ROM_QSTR(MP_QSTR_red), MP_ROM_PTR(&tft_r_pins) }, { MP_ROM_QSTR(MP_QSTR_green), MP_ROM_PTR(&tft_g_pins) }, { MP_ROM_QSTR(MP_QSTR_blue), MP_ROM_PTR(&tft_b_pins) }, - { MP_ROM_QSTR(MP_QSTR_frequency), MP_ROM_INT(9000000) }, }; -MP_DEFINE_CONST_DICT(tft_dict, tft_table); +MP_DEFINE_CONST_DICT(tft_pins_dict, tft_pins_table); + +STATIC const mp_rom_map_elem_t tft_timings_table[] = { + { MP_ROM_QSTR(MP_QSTR_frequency), MP_ROM_INT(6500000) }, // nominal 16MHz, but display is unstable/tears at that frequency + { MP_ROM_QSTR(MP_QSTR_width), MP_ROM_INT(480) }, + { MP_ROM_QSTR(MP_QSTR_height), MP_ROM_INT(480) }, + { MP_ROM_QSTR(MP_QSTR_hsync_pulse_width), MP_ROM_INT(13) }, + { MP_ROM_QSTR(MP_QSTR_hsync_front_porch), MP_ROM_INT(20) }, + { MP_ROM_QSTR(MP_QSTR_hsync_back_porch), MP_ROM_INT(40) }, + { MP_ROM_QSTR(MP_QSTR_hsync_idle_low), MP_ROM_FALSE }, + { MP_ROM_QSTR(MP_QSTR_vsync_pulse_width), MP_ROM_INT(15) }, + { MP_ROM_QSTR(MP_QSTR_vsync_front_porch), MP_ROM_INT(20) }, + { MP_ROM_QSTR(MP_QSTR_vsync_back_porch), MP_ROM_INT(40) }, + { MP_ROM_QSTR(MP_QSTR_vsync_idle_low), MP_ROM_FALSE }, + { MP_ROM_QSTR(MP_QSTR_de_idle_high), MP_ROM_FALSE }, + { MP_ROM_QSTR(MP_QSTR_pclk_active_high), MP_ROM_FALSE }, + { MP_ROM_QSTR(MP_QSTR_pclk_idle_high), MP_ROM_FALSE }, +}; +MP_DEFINE_CONST_DICT(tft_timings_dict, tft_timings_table); STATIC const mp_rom_map_elem_t board_module_globals_table[] = { CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS - { MP_ROM_QSTR(MP_QSTR_TFT), MP_ROM_PTR(&tft_dict) }, - { MP_ROM_QSTR(MP_QSTR_BACKLIGHT), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_TFT_PINS), MP_ROM_PTR(&tft_pins_dict) }, + { MP_ROM_QSTR(MP_QSTR_TFT_TIMINGS), MP_ROM_PTR(&tft_timings_dict) }, + { MP_ROM_QSTR(MP_QSTR_TFT_IO_EXPANDER), MP_ROM_PTR(&tft_io_expander_dict) }, + { MP_ROM_QSTR(MP_QSTR_TFT_INIT_SEQUENCE), &display_init_byte_obj}, - { MP_ROM_QSTR(MP_QSTR_I2S_SCK), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_I2S_SCK), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_I2S_MCLK), MP_ROM_PTR(&pin_GPIO5) }, { MP_ROM_QSTR(MP_QSTR_I2S_WS), MP_ROM_PTR(&pin_GPIO7) }, - { MP_ROM_QSTR(MP_QSTR_I2S_SDO), MP_ROM_PTR(&pin_GPIO15) }, + { MP_ROM_QSTR(MP_QSTR_I2S_SDO), MP_ROM_PTR(&pin_GPIO6) }, { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO43) }, { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO44) }, @@ -66,14 +100,11 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(DEFAULT_I2C_BUS_SCL) }, { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(DEFAULT_I2C_BUS_SDA) }, - { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO11) }, - { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO13) }, - { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_DISPLAY), MP_ROM_PTR(&displays[0].display) }, // boot mode button can be used in SW as well { MP_ROM_QSTR(MP_QSTR_BUTTON), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, - { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, }; MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/espressif/boards/espressif_esp32s3_lcd_ev/sdkconfig b/ports/espressif/boards/espressif_esp32s3_lcd_ev/sdkconfig index bc1b20063b9a..ec582be223ac 100644 --- a/ports/espressif/boards/espressif_esp32s3_lcd_ev/sdkconfig +++ b/ports/espressif/boards/espressif_esp32s3_lcd_ev/sdkconfig @@ -1,41 +1,28 @@ -CONFIG_ESP32S3_SPIRAM_SUPPORT=y # -# SPI RAM config +# Espressif IoT Development Framework Configuration # -# CONFIG_SPIRAM_MODE_QUAD is not set -CONFIG_SPIRAM_MODE_OCT=y -CONFIG_SPIRAM_TYPE_AUTO=y -# end of SPI RAM config - -CONFIG_DEFAULT_PSRAM_CLK_IO=30 -# -# PSRAM Clock and CS IO for ESP32S3 # -CONFIG_DEFAULT_PSRAM_CS_IO=26 -# end of PSRAM Clock and CS IO for ESP32S3 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -CONFIG_SPIRAM_SPEED_80M=y -# CONFIG_SPIRAM_SPEED_40M is not set -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set -CONFIG_SPIRAM_USE_MEMMAP=y -# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set -# CONFIG_SPIRAM_USE_MALLOC is not set -CONFIG_SPIRAM_MEMTEST=y +# Component config # -# LWIP # -CONFIG_LWIP_LOCAL_HOSTNAME="circuitpy" -# end of LWIP +# ESP System Settings # +CONFIG_ESP_CONSOLE_UART_CUSTOM=y # CONFIG_ESP_CONSOLE_NONE is not set -CONFIG_ESP_CONSOLE_UART_BAUDRATE=115200 +CONFIG_ESP_CONSOLE_UART=y CONFIG_ESP_CONSOLE_UART_CUSTOM_NUM_0=y -CONFIG_ESP_CONSOLE_UART_CUSTOM=y CONFIG_ESP_CONSOLE_UART_NUM=0 -CONFIG_ESP_CONSOLE_UART_RX_GPIO=44 CONFIG_ESP_CONSOLE_UART_TX_GPIO=43 -CONFIG_ESP_CONSOLE_UART=y +CONFIG_ESP_CONSOLE_UART_RX_GPIO=44 +CONFIG_ESP_CONSOLE_UART_BAUDRATE=115200 +# end of ESP System Settings + +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="circuitpy" +# end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/espressif_esp32s3_usb_otg_n8/board.c b/ports/espressif/boards/espressif_esp32s3_usb_otg_n8/board.c index afbb5ae8fbe9..197dea0a4982 100644 --- a/ports/espressif/boards/espressif_esp32s3_usb_otg_n8/board.c +++ b/ports/espressif/boards/espressif_esp32s3_usb_otg_n8/board.c @@ -116,10 +116,6 @@ void board_init(void) { true, // backlight_on_high false, // SH1107_addressing 50000); // backlight pwm frequency - - #if CIRCUITPY_DEBUG - common_hal_never_reset_pin(DEFAULT_UART_BUS_TX); - #endif } bool espressif_board_reset_pin_number(gpio_num_t pin_number) { diff --git a/ports/espressif/boards/espressif_esp32s3_usb_otg_n8/sdkconfig b/ports/espressif/boards/espressif_esp32s3_usb_otg_n8/sdkconfig index a0a61d8392ec..f5ef79768114 100644 --- a/ports/espressif/boards/espressif_esp32s3_usb_otg_n8/sdkconfig +++ b/ports/espressif/boards/espressif_esp32s3_usb_otg_n8/sdkconfig @@ -1,6 +1,15 @@ -# CONFIG_ESP32S3_SPIRAM_SUPPORT is not set +# +# Espressif IoT Development Framework Configuration +# +# +# Component config +# # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.mk b/ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.mk index 60ff9fd5a1ec..7203fe0db274 100644 --- a/ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.mk +++ b/ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.mk @@ -8,3 +8,7 @@ IDF_TARGET = esp32s2 CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m diff --git a/ports/espressif/boards/espressif_hmi_devkit_1/sdkconfig b/ports/espressif/boards/espressif_hmi_devkit_1/sdkconfig index f19afafa3d23..e69de29bb2d1 100644 --- a/ports/espressif/boards/espressif_hmi_devkit_1/sdkconfig +++ b/ports/espressif/boards/espressif_hmi_devkit_1/sdkconfig @@ -1,37 +0,0 @@ -CONFIG_ESP32S2_SPIRAM_SUPPORT=y -# -# SPI RAM config -# -# CONFIG_SPIRAM_TYPE_AUTO is not set -CONFIG_SPIRAM_TYPE_ESPPSRAM16=y -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set -CONFIG_SPIRAM_SIZE=2097152 -# end of SPI RAM config - -CONFIG_DEFAULT_PSRAM_CLK_IO=30 -# -# PSRAM clock and cs IO for ESP32S2 -# -CONFIG_DEFAULT_PSRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S2 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_80M is not set -CONFIG_SPIRAM_SPEED_40M=y -# CONFIG_SPIRAM_SPEED_26M is not set -# CONFIG_SPIRAM_SPEED_20M is not set -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set -CONFIG_SPIRAM_USE_MEMMAP=y -# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set -# CONFIG_SPIRAM_USE_MALLOC is not set -CONFIG_SPIRAM_MEMTEST=y -# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# -# LWIP -# -CONFIG_LWIP_LOCAL_HOSTNAME="espressif" -# end of LWIP diff --git a/ports/espressif/boards/espressif_kaluga_1.3/board.c b/ports/espressif/boards/espressif_kaluga_1.3/board.c index b3c8cb41914e..164430c88c92 100644 --- a/ports/espressif/boards/espressif_kaluga_1.3/board.c +++ b/ports/espressif/boards/espressif_kaluga_1.3/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.mk b/ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.mk index 23578067ac14..c442581bdd15 100644 --- a/ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.mk +++ b/ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.mk @@ -8,3 +8,7 @@ IDF_TARGET = esp32s2 CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m diff --git a/ports/espressif/boards/espressif_kaluga_1.3/sdkconfig b/ports/espressif/boards/espressif_kaluga_1.3/sdkconfig index f19afafa3d23..e69de29bb2d1 100644 --- a/ports/espressif/boards/espressif_kaluga_1.3/sdkconfig +++ b/ports/espressif/boards/espressif_kaluga_1.3/sdkconfig @@ -1,37 +0,0 @@ -CONFIG_ESP32S2_SPIRAM_SUPPORT=y -# -# SPI RAM config -# -# CONFIG_SPIRAM_TYPE_AUTO is not set -CONFIG_SPIRAM_TYPE_ESPPSRAM16=y -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set -CONFIG_SPIRAM_SIZE=2097152 -# end of SPI RAM config - -CONFIG_DEFAULT_PSRAM_CLK_IO=30 -# -# PSRAM clock and cs IO for ESP32S2 -# -CONFIG_DEFAULT_PSRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S2 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_80M is not set -CONFIG_SPIRAM_SPEED_40M=y -# CONFIG_SPIRAM_SPEED_26M is not set -# CONFIG_SPIRAM_SPEED_20M is not set -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set -CONFIG_SPIRAM_USE_MEMMAP=y -# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set -# CONFIG_SPIRAM_USE_MALLOC is not set -CONFIG_SPIRAM_MEMTEST=y -# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# -# LWIP -# -CONFIG_LWIP_LOCAL_HOSTNAME="espressif" -# end of LWIP diff --git a/ports/espressif/boards/espressif_kaluga_1/board.c b/ports/espressif/boards/espressif_kaluga_1/board.c index b3c8cb41914e..164430c88c92 100644 --- a/ports/espressif/boards/espressif_kaluga_1/board.c +++ b/ports/espressif/boards/espressif_kaluga_1/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/espressif_kaluga_1/mpconfigboard.mk b/ports/espressif/boards/espressif_kaluga_1/mpconfigboard.mk index 23578067ac14..c442581bdd15 100644 --- a/ports/espressif/boards/espressif_kaluga_1/mpconfigboard.mk +++ b/ports/espressif/boards/espressif_kaluga_1/mpconfigboard.mk @@ -8,3 +8,7 @@ IDF_TARGET = esp32s2 CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m diff --git a/ports/espressif/boards/espressif_kaluga_1/sdkconfig b/ports/espressif/boards/espressif_kaluga_1/sdkconfig index f19afafa3d23..e69de29bb2d1 100644 --- a/ports/espressif/boards/espressif_kaluga_1/sdkconfig +++ b/ports/espressif/boards/espressif_kaluga_1/sdkconfig @@ -1,37 +0,0 @@ -CONFIG_ESP32S2_SPIRAM_SUPPORT=y -# -# SPI RAM config -# -# CONFIG_SPIRAM_TYPE_AUTO is not set -CONFIG_SPIRAM_TYPE_ESPPSRAM16=y -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set -CONFIG_SPIRAM_SIZE=2097152 -# end of SPI RAM config - -CONFIG_DEFAULT_PSRAM_CLK_IO=30 -# -# PSRAM clock and cs IO for ESP32S2 -# -CONFIG_DEFAULT_PSRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S2 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_80M is not set -CONFIG_SPIRAM_SPEED_40M=y -# CONFIG_SPIRAM_SPEED_26M is not set -# CONFIG_SPIRAM_SPEED_20M is not set -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set -CONFIG_SPIRAM_USE_MEMMAP=y -# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set -# CONFIG_SPIRAM_USE_MALLOC is not set -CONFIG_SPIRAM_MEMTEST=y -# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# -# LWIP -# -CONFIG_LWIP_LOCAL_HOSTNAME="espressif" -# end of LWIP diff --git a/ports/espressif/boards/espressif_saola_1_wroom/board.c b/ports/espressif/boards/espressif_saola_1_wroom/board.c index b3c8cb41914e..164430c88c92 100644 --- a/ports/espressif/boards/espressif_saola_1_wroom/board.c +++ b/ports/espressif/boards/espressif_saola_1_wroom/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/espressif_saola_1_wroom/sdkconfig b/ports/espressif/boards/espressif_saola_1_wroom/sdkconfig index 5b9c86dcc346..e69de29bb2d1 100644 --- a/ports/espressif/boards/espressif_saola_1_wroom/sdkconfig +++ b/ports/espressif/boards/espressif_saola_1_wroom/sdkconfig @@ -1,6 +0,0 @@ -# CONFIG_ESP32S2_SPIRAM_SUPPORT is not set -# -# LWIP -# -CONFIG_LWIP_LOCAL_HOSTNAME="espressif" -# end of LWIP diff --git a/ports/espressif/boards/espressif_saola_1_wrover/board.c b/ports/espressif/boards/espressif_saola_1_wrover/board.c index b3c8cb41914e..164430c88c92 100644 --- a/ports/espressif/boards/espressif_saola_1_wrover/board.c +++ b/ports/espressif/boards/espressif_saola_1_wrover/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/espressif_saola_1_wrover/mpconfigboard.mk b/ports/espressif/boards/espressif_saola_1_wrover/mpconfigboard.mk index 5156a5b6cef9..b1614e658240 100644 --- a/ports/espressif/boards/espressif_saola_1_wrover/mpconfigboard.mk +++ b/ports/espressif/boards/espressif_saola_1_wrover/mpconfigboard.mk @@ -8,3 +8,7 @@ IDF_TARGET = esp32s2 CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 40m CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m diff --git a/ports/espressif/boards/espressif_saola_1_wrover/sdkconfig b/ports/espressif/boards/espressif_saola_1_wrover/sdkconfig index f19afafa3d23..e69de29bb2d1 100644 --- a/ports/espressif/boards/espressif_saola_1_wrover/sdkconfig +++ b/ports/espressif/boards/espressif_saola_1_wrover/sdkconfig @@ -1,37 +0,0 @@ -CONFIG_ESP32S2_SPIRAM_SUPPORT=y -# -# SPI RAM config -# -# CONFIG_SPIRAM_TYPE_AUTO is not set -CONFIG_SPIRAM_TYPE_ESPPSRAM16=y -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set -CONFIG_SPIRAM_SIZE=2097152 -# end of SPI RAM config - -CONFIG_DEFAULT_PSRAM_CLK_IO=30 -# -# PSRAM clock and cs IO for ESP32S2 -# -CONFIG_DEFAULT_PSRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S2 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_80M is not set -CONFIG_SPIRAM_SPEED_40M=y -# CONFIG_SPIRAM_SPEED_26M is not set -# CONFIG_SPIRAM_SPEED_20M is not set -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set -CONFIG_SPIRAM_USE_MEMMAP=y -# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set -# CONFIG_SPIRAM_USE_MALLOC is not set -CONFIG_SPIRAM_MEMTEST=y -# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# -# LWIP -# -CONFIG_LWIP_LOCAL_HOSTNAME="espressif" -# end of LWIP diff --git a/ports/espressif/boards/franzininho_wifi_wroom/board.c b/ports/espressif/boards/franzininho_wifi_wroom/board.c index b3c8cb41914e..164430c88c92 100644 --- a/ports/espressif/boards/franzininho_wifi_wroom/board.c +++ b/ports/espressif/boards/franzininho_wifi_wroom/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/franzininho_wifi_wroom/sdkconfig b/ports/espressif/boards/franzininho_wifi_wroom/sdkconfig index 5b9c86dcc346..e69de29bb2d1 100644 --- a/ports/espressif/boards/franzininho_wifi_wroom/sdkconfig +++ b/ports/espressif/boards/franzininho_wifi_wroom/sdkconfig @@ -1,6 +0,0 @@ -# CONFIG_ESP32S2_SPIRAM_SUPPORT is not set -# -# LWIP -# -CONFIG_LWIP_LOCAL_HOSTNAME="espressif" -# end of LWIP diff --git a/ports/espressif/boards/franzininho_wifi_wrover/board.c b/ports/espressif/boards/franzininho_wifi_wrover/board.c index b3c8cb41914e..164430c88c92 100644 --- a/ports/espressif/boards/franzininho_wifi_wrover/board.c +++ b/ports/espressif/boards/franzininho_wifi_wrover/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/franzininho_wifi_wrover/mpconfigboard.mk b/ports/espressif/boards/franzininho_wifi_wrover/mpconfigboard.mk index 2a09bc99eb30..a14512cb74b3 100644 --- a/ports/espressif/boards/franzininho_wifi_wrover/mpconfigboard.mk +++ b/ports/espressif/boards/franzininho_wifi_wrover/mpconfigboard.mk @@ -8,3 +8,7 @@ IDF_TARGET = esp32s2 CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 40m CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m diff --git a/ports/espressif/boards/franzininho_wifi_wrover/sdkconfig b/ports/espressif/boards/franzininho_wifi_wrover/sdkconfig index f19afafa3d23..e69de29bb2d1 100644 --- a/ports/espressif/boards/franzininho_wifi_wrover/sdkconfig +++ b/ports/espressif/boards/franzininho_wifi_wrover/sdkconfig @@ -1,37 +0,0 @@ -CONFIG_ESP32S2_SPIRAM_SUPPORT=y -# -# SPI RAM config -# -# CONFIG_SPIRAM_TYPE_AUTO is not set -CONFIG_SPIRAM_TYPE_ESPPSRAM16=y -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set -CONFIG_SPIRAM_SIZE=2097152 -# end of SPI RAM config - -CONFIG_DEFAULT_PSRAM_CLK_IO=30 -# -# PSRAM clock and cs IO for ESP32S2 -# -CONFIG_DEFAULT_PSRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S2 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_80M is not set -CONFIG_SPIRAM_SPEED_40M=y -# CONFIG_SPIRAM_SPEED_26M is not set -# CONFIG_SPIRAM_SPEED_20M is not set -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set -CONFIG_SPIRAM_USE_MEMMAP=y -# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set -# CONFIG_SPIRAM_USE_MALLOC is not set -CONFIG_SPIRAM_MEMTEST=y -# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# -# LWIP -# -CONFIG_LWIP_LOCAL_HOSTNAME="espressif" -# end of LWIP diff --git a/ports/espressif/boards/gravitech_cucumber_m/board.c b/ports/espressif/boards/gravitech_cucumber_m/board.c index b3c8cb41914e..164430c88c92 100644 --- a/ports/espressif/boards/gravitech_cucumber_m/board.c +++ b/ports/espressif/boards/gravitech_cucumber_m/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/gravitech_cucumber_m/sdkconfig b/ports/espressif/boards/gravitech_cucumber_m/sdkconfig index 7b07033d7bf6..ec6db5c72ea1 100644 --- a/ports/espressif/boards/gravitech_cucumber_m/sdkconfig +++ b/ports/espressif/boards/gravitech_cucumber_m/sdkconfig @@ -1,6 +1,15 @@ -# CONFIG_ESP32S2_SPIRAM_SUPPORT is not set +# +# Espressif IoT Development Framework Configuration +# +# +# Component config +# # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="cucumber_m" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/gravitech_cucumber_ms/board.c b/ports/espressif/boards/gravitech_cucumber_ms/board.c index b3c8cb41914e..164430c88c92 100644 --- a/ports/espressif/boards/gravitech_cucumber_ms/board.c +++ b/ports/espressif/boards/gravitech_cucumber_ms/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/gravitech_cucumber_ms/sdkconfig b/ports/espressif/boards/gravitech_cucumber_ms/sdkconfig index b31dd447e1df..f3cc39cc6780 100644 --- a/ports/espressif/boards/gravitech_cucumber_ms/sdkconfig +++ b/ports/espressif/boards/gravitech_cucumber_ms/sdkconfig @@ -1,6 +1,15 @@ -# CONFIG_ESP32S2_SPIRAM_SUPPORT is not set +# +# Espressif IoT Development Framework Configuration +# +# +# Component config +# # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="cucumber_ms" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/gravitech_cucumber_r/board.c b/ports/espressif/boards/gravitech_cucumber_r/board.c index b3c8cb41914e..164430c88c92 100644 --- a/ports/espressif/boards/gravitech_cucumber_r/board.c +++ b/ports/espressif/boards/gravitech_cucumber_r/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/gravitech_cucumber_r/mpconfigboard.mk b/ports/espressif/boards/gravitech_cucumber_r/mpconfigboard.mk index d3e40f2df6f0..88729e7a4472 100644 --- a/ports/espressif/boards/gravitech_cucumber_r/mpconfigboard.mk +++ b/ports/espressif/boards/gravitech_cucumber_r/mpconfigboard.mk @@ -8,3 +8,7 @@ IDF_TARGET = esp32s2 CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 40m CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m diff --git a/ports/espressif/boards/gravitech_cucumber_r/sdkconfig b/ports/espressif/boards/gravitech_cucumber_r/sdkconfig index fe0857c4fb74..e817a86205a1 100644 --- a/ports/espressif/boards/gravitech_cucumber_r/sdkconfig +++ b/ports/espressif/boards/gravitech_cucumber_r/sdkconfig @@ -1,37 +1,15 @@ -CONFIG_ESP32S2_SPIRAM_SUPPORT=y # -# SPI RAM config +# Espressif IoT Development Framework Configuration # -# CONFIG_SPIRAM_TYPE_AUTO is not set -CONFIG_SPIRAM_TYPE_ESPPSRAM16=y -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set -CONFIG_SPIRAM_SIZE=2097152 -# end of SPI RAM config - -CONFIG_DEFAULT_PSRAM_CLK_IO=30 # -# PSRAM clock and cs IO for ESP32S2 +# Component config # -CONFIG_DEFAULT_PSRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S2 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_80M is not set -CONFIG_SPIRAM_SPEED_40M=y -# CONFIG_SPIRAM_SPEED_26M is not set -# CONFIG_SPIRAM_SPEED_20M is not set -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set -CONFIG_SPIRAM_USE_MEMMAP=y -# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set -# CONFIG_SPIRAM_USE_MALLOC is not set -CONFIG_SPIRAM_MEMTEST=y -# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="cucumber_r" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/gravitech_cucumber_rs/board.c b/ports/espressif/boards/gravitech_cucumber_rs/board.c index b3c8cb41914e..164430c88c92 100644 --- a/ports/espressif/boards/gravitech_cucumber_rs/board.c +++ b/ports/espressif/boards/gravitech_cucumber_rs/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/gravitech_cucumber_rs/mpconfigboard.mk b/ports/espressif/boards/gravitech_cucumber_rs/mpconfigboard.mk index e0b3f35d44ae..9ef503886d05 100644 --- a/ports/espressif/boards/gravitech_cucumber_rs/mpconfigboard.mk +++ b/ports/espressif/boards/gravitech_cucumber_rs/mpconfigboard.mk @@ -8,3 +8,7 @@ IDF_TARGET = esp32s2 CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 40m CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m diff --git a/ports/espressif/boards/gravitech_cucumber_rs/sdkconfig b/ports/espressif/boards/gravitech_cucumber_rs/sdkconfig index 23b3eea78d12..873eb7207a0f 100644 --- a/ports/espressif/boards/gravitech_cucumber_rs/sdkconfig +++ b/ports/espressif/boards/gravitech_cucumber_rs/sdkconfig @@ -1,37 +1,15 @@ -CONFIG_ESP32S2_SPIRAM_SUPPORT=y # -# SPI RAM config +# Espressif IoT Development Framework Configuration # -# CONFIG_SPIRAM_TYPE_AUTO is not set -CONFIG_SPIRAM_TYPE_ESPPSRAM16=y -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set -CONFIG_SPIRAM_SIZE=2097152 -# end of SPI RAM config - -CONFIG_DEFAULT_PSRAM_CLK_IO=30 # -# PSRAM clock and cs IO for ESP32S2 +# Component config # -CONFIG_DEFAULT_PSRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S2 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_80M is not set -CONFIG_SPIRAM_SPEED_40M=y -# CONFIG_SPIRAM_SPEED_26M is not set -# CONFIG_SPIRAM_SPEED_20M is not set -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set -CONFIG_SPIRAM_USE_MEMMAP=y -# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set -# CONFIG_SPIRAM_USE_MALLOC is not set -CONFIG_SPIRAM_MEMTEST=y -# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="cucumber_rs" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/hardkernel_odroid_go/mpconfigboard.mk b/ports/espressif/boards/hardkernel_odroid_go/mpconfigboard.mk index ead48189fae9..83fc7650fdcd 100644 --- a/ports/espressif/boards/hardkernel_odroid_go/mpconfigboard.mk +++ b/ports/espressif/boards/hardkernel_odroid_go/mpconfigboard.mk @@ -3,6 +3,10 @@ CIRCUITPY_CREATION_ID = 0x00320060 IDF_TARGET = esp32 +CIRCUITPY_ESP_FLASH_SIZE = 16MB CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 40m -CIRCUITPY_ESP_FLASH_SIZE = 16MB + +CIRCUITPY_ESP_PSRAM_SIZE = 4MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m diff --git a/ports/espressif/boards/hardkernel_odroid_go/sdkconfig b/ports/espressif/boards/hardkernel_odroid_go/sdkconfig index f4fea0c732e3..e69de29bb2d1 100644 --- a/ports/espressif/boards/hardkernel_odroid_go/sdkconfig +++ b/ports/espressif/boards/hardkernel_odroid_go/sdkconfig @@ -1,37 +0,0 @@ -CONFIG_ESP32_SPIRAM_SUPPORT=y -# SPI RAM config -# -# CONFIG_SPIRAM_TYPE_AUTO is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM16 is not set -CONFIG_SPIRAM_TYPE_ESPPSRAM32=y -# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set -CONFIG_SPIRAM_SIZE=4194304 -CONFIG_SPIRAM_SPEED_40M=y -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -CONFIG_SPIRAM_IGNORE_NOTFOUND=y -CONFIG_SPIRAM_USE_MEMMAP=y -# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set -# CONFIG_SPIRAM_USE_MALLOC is not set -CONFIG_SPIRAM_MEMTEST=y -# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# CONFIG_SPIRAM_ALLOW_NOINIT_SEG_EXTERNAL_MEMORY is not set -CONFIG_SPIRAM_CACHE_WORKAROUND=y - -# Uncomment (remove ###) to send ESP_LOG output to TX/RX pins -### # -### # ESP System Settings -### # -### CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT=y -### # CONFIG_ESP_SYSTEM_PANIC_SILENT_REBOOT is not set -### CONFIG_ESP_CONSOLE_UART_CUSTOM=y -### # CONFIG_ESP_CONSOLE_NONE is not set -### CONFIG_ESP_CONSOLE_UART=y -### nCONFIG_ESP_CONSOLE_UART_CUSTOM_NUM_0=y -### # CONFIG_ESP_CONSOLE_UART_CUSTOM_NUM_1 is not set -### CONFIG_ESP_CONSOLE_UART_NUM=0 -### CONFIG_ESP_CONSOLE_UART_TX_GPIO=12 -### CONFIG_ESP_CONSOLE_UART_RX_GPIO=15 -### CONFIG_ESP_CONSOLE_UART_BAUDRATE=115200 -### # CONFIG_ESP_SYSTEM_CHECK_INT_LEVEL_5 is not set -### # end of ESP System Settings diff --git a/ports/espressif/boards/hexky_s2/mpconfigboard.mk b/ports/espressif/boards/hexky_s2/mpconfigboard.mk index 043dec582414..fa7ae64a2499 100644 --- a/ports/espressif/boards/hexky_s2/mpconfigboard.mk +++ b/ports/espressif/boards/hexky_s2/mpconfigboard.mk @@ -11,3 +11,7 @@ CIRCUITPY_ESP_FLASH_FREQ = 40m CIRCUITPY_ESP_FLASH_SIZE = 4MB FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel + +CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m diff --git a/ports/espressif/boards/hexky_s2/sdkconfig b/ports/espressif/boards/hexky_s2/sdkconfig index f19afafa3d23..e69de29bb2d1 100644 --- a/ports/espressif/boards/hexky_s2/sdkconfig +++ b/ports/espressif/boards/hexky_s2/sdkconfig @@ -1,37 +0,0 @@ -CONFIG_ESP32S2_SPIRAM_SUPPORT=y -# -# SPI RAM config -# -# CONFIG_SPIRAM_TYPE_AUTO is not set -CONFIG_SPIRAM_TYPE_ESPPSRAM16=y -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set -CONFIG_SPIRAM_SIZE=2097152 -# end of SPI RAM config - -CONFIG_DEFAULT_PSRAM_CLK_IO=30 -# -# PSRAM clock and cs IO for ESP32S2 -# -CONFIG_DEFAULT_PSRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S2 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_80M is not set -CONFIG_SPIRAM_SPEED_40M=y -# CONFIG_SPIRAM_SPEED_26M is not set -# CONFIG_SPIRAM_SPEED_20M is not set -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set -CONFIG_SPIRAM_USE_MEMMAP=y -# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set -# CONFIG_SPIRAM_USE_MALLOC is not set -CONFIG_SPIRAM_MEMTEST=y -# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# -# LWIP -# -CONFIG_LWIP_LOCAL_HOSTNAME="espressif" -# end of LWIP diff --git a/ports/espressif/boards/hiibot_iots2/board.c b/ports/espressif/boards/hiibot_iots2/board.c index 87ee7d0b1443..8524c80202e2 100644 --- a/ports/espressif/boards/hiibot_iots2/board.c +++ b/ports/espressif/boards/hiibot_iots2/board.c @@ -126,25 +126,6 @@ static void display_init(void) { } void board_init(void) { - // USB - common_hal_never_reset_pin(&pin_GPIO19); - common_hal_never_reset_pin(&pin_GPIO20); - - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif - - // SPI Flash and RAM - common_hal_never_reset_pin(&pin_GPIO26); - common_hal_never_reset_pin(&pin_GPIO27); - common_hal_never_reset_pin(&pin_GPIO28); - common_hal_never_reset_pin(&pin_GPIO29); - common_hal_never_reset_pin(&pin_GPIO30); - common_hal_never_reset_pin(&pin_GPIO31); - common_hal_never_reset_pin(&pin_GPIO32); - // Display display_init(); } diff --git a/ports/espressif/boards/hiibot_iots2/mpconfigboard.mk b/ports/espressif/boards/hiibot_iots2/mpconfigboard.mk index a60d89466594..84a49c256f58 100644 --- a/ports/espressif/boards/hiibot_iots2/mpconfigboard.mk +++ b/ports/espressif/boards/hiibot_iots2/mpconfigboard.mk @@ -9,3 +9,7 @@ CIRCUITPY_ESP_FLASH_MODE = qio CIRCUITPY_ESP_FLASH_FREQ = 40m CIRCUITPY_ESP_FLASH_SIZE = 8MB #CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_PSRAM_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m diff --git a/ports/espressif/boards/hiibot_iots2/sdkconfig b/ports/espressif/boards/hiibot_iots2/sdkconfig index 5ef7020a7201..b2b83eb6e6c4 100644 --- a/ports/espressif/boards/hiibot_iots2/sdkconfig +++ b/ports/espressif/boards/hiibot_iots2/sdkconfig @@ -1,40 +1,15 @@ -CONFIG_ESP32S2_SPIRAM_SUPPORT=y - # -# SPI RAM config +# Espressif IoT Development Framework Configuration # -# CONFIG_SPIRAM_TYPE_AUTO is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM16=y -# CONFIG_SPIRAM_TYPE_ESPPSRAM32=y -CONFIG_SPIRAM_TYPE_ESPPSRAM64=y -CONFIG_SPIRAM_SIZE=8388608 -# CONFIG_SPIRAM_SIZE=2097152 - # -# PSRAM clock and cs IO for ESP32S2 +# Component config # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 -CONFIG_DEFAULT_PSRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S2 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_80M is not set -CONFIG_SPIRAM_SPEED_40M=y -# CONFIG_SPIRAM_SPEED_26M is not set -# CONFIG_SPIRAM_SPEED_20M is not set -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set -CONFIG_SPIRAM_USE_MEMMAP=y -# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set -# CONFIG_SPIRAM_USE_MALLOC is not set -CONFIG_SPIRAM_MEMTEST=y -# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# end of SPI RAM config - # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="HiiBot_IoTs2" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/lilygo_tembed_esp32s3/board.c b/ports/espressif/boards/lilygo_tembed_esp32s3/board.c index 03a86a48d4f8..ee48d502887d 100644 --- a/ports/espressif/boards/lilygo_tembed_esp32s3/board.c +++ b/ports/espressif/boards/lilygo_tembed_esp32s3/board.c @@ -88,12 +88,6 @@ void board_init(void) { true, // backlight_on_high false, // SH1107_addressing 50000); // backlight pwm frequency - - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif } // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/lilygo_tembed_esp32s3/mpconfigboard.mk b/ports/espressif/boards/lilygo_tembed_esp32s3/mpconfigboard.mk index 2b8f67b56051..bb7847cf277a 100644 --- a/ports/espressif/boards/lilygo_tembed_esp32s3/mpconfigboard.mk +++ b/ports/espressif/boards/lilygo_tembed_esp32s3/mpconfigboard.mk @@ -5,6 +5,10 @@ USB_MANUFACTURER = "LILYGO" IDF_TARGET = esp32s3 +CIRCUITPY_ESP_FLASH_SIZE = 16MB CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 80m -CIRCUITPY_ESP_FLASH_SIZE = 16MB + +CIRCUITPY_ESP_PSRAM_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_MODE = opi +CIRCUITPY_ESP_PSRAM_FREQ = 80m diff --git a/ports/espressif/boards/lilygo_tembed_esp32s3/sdkconfig b/ports/espressif/boards/lilygo_tembed_esp32s3/sdkconfig index f508f4a67c3f..f5ef79768114 100644 --- a/ports/espressif/boards/lilygo_tembed_esp32s3/sdkconfig +++ b/ports/espressif/boards/lilygo_tembed_esp32s3/sdkconfig @@ -1,34 +1,15 @@ -CONFIG_ESP32S3_SPIRAM_SUPPORT=y # -# SPI RAM config +# Espressif IoT Development Framework Configuration # -# CONFIG_SPIRAM_MODE_QUAD is not set -CONFIG_SPIRAM_MODE_OCT=y -# CONFIG_SPIRAM_TYPE_AUTO is not set -CONFIG_SPIRAM_TYPE_ESPPSRAM64=y -CONFIG_SPIRAM_SIZE=8388608 -# end of SPI RAM config - -CONFIG_DEFAULT_PSRAM_CLK_IO=30 # -# PSRAM Clock and CS IO for ESP32S3 +# Component config # -CONFIG_DEFAULT_PSRAM_CS_IO=26 -# end of PSRAM Clock and CS IO for ESP32S3 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -CONFIG_SPIRAM_SPEED_80M=y -# CONFIG_SPIRAM_SPEED_40M is not set -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set -CONFIG_SPIRAM_USE_MEMMAP=y -# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set -# CONFIG_SPIRAM_USE_MALLOC is not set -CONFIG_SPIRAM_MEMTEST=y # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/lilygo_ttgo_t-01c3/board.c b/ports/espressif/boards/lilygo_ttgo_t-01c3/board.c index 67b05e5cd242..e8fec80c7c6f 100644 --- a/ports/espressif/boards/lilygo_ttgo_t-01c3/board.c +++ b/ports/espressif/boards/lilygo_ttgo_t-01c3/board.c @@ -1,14 +1,3 @@ -#include "shared-bindings/microcontroller/Pin.h" #include "supervisor/board.h" -#include "components/driver/include/driver/gpio.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO20); - common_hal_never_reset_pin(&pin_GPIO21); - #endif -} - // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/lilygo_ttgo_t-01c3/mpconfigboard.mk b/ports/espressif/boards/lilygo_ttgo_t-01c3/mpconfigboard.mk index 2ca19f332c2f..de5601680ccc 100644 --- a/ports/espressif/boards/lilygo_ttgo_t-01c3/mpconfigboard.mk +++ b/ports/espressif/boards/lilygo_ttgo_t-01c3/mpconfigboard.mk @@ -6,3 +6,7 @@ IDF_TARGET = esp32c3 CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_USB_SERIAL_JTAG = 0 + +CIRCUITPY_BLEIO = 0 diff --git a/ports/espressif/boards/lilygo_ttgo_t-01c3/sdkconfig b/ports/espressif/boards/lilygo_ttgo_t-01c3/sdkconfig index 9d906d3c3bc0..54105bd51b39 100644 --- a/ports/espressif/boards/lilygo_ttgo_t-01c3/sdkconfig +++ b/ports/espressif/boards/lilygo_ttgo_t-01c3/sdkconfig @@ -1,5 +1,15 @@ # +# Espressif IoT Development Framework Configuration +# +# +# Component config +# +# # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="LILYGO TTGO T-01C3" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/lilygo_ttgo_t-oi-plus/board.c b/ports/espressif/boards/lilygo_ttgo_t-oi-plus/board.c index 7bcdcdba25e3..164430c88c92 100644 --- a/ports/espressif/boards/lilygo_ttgo_t-oi-plus/board.c +++ b/ports/espressif/boards/lilygo_ttgo_t-oi-plus/board.c @@ -24,17 +24,6 @@ * THE SOFTWARE. */ -#include "shared-bindings/microcontroller/Pin.h" #include "supervisor/board.h" -#include "components/driver/include/driver/gpio.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO20); - common_hal_never_reset_pin(&pin_GPIO21); - #endif -} - // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/lilygo_ttgo_t-oi-plus/mpconfigboard.mk b/ports/espressif/boards/lilygo_ttgo_t-oi-plus/mpconfigboard.mk index 7a801452173e..ede6428e8b75 100644 --- a/ports/espressif/boards/lilygo_ttgo_t-oi-plus/mpconfigboard.mk +++ b/ports/espressif/boards/lilygo_ttgo_t-oi-plus/mpconfigboard.mk @@ -6,3 +6,7 @@ IDF_TARGET = esp32c3 CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_USB_SERIAL_JTAG = 0 + +CIRCUITPY_BLEIO = 0 diff --git a/ports/espressif/boards/lilygo_ttgo_t-oi-plus/sdkconfig b/ports/espressif/boards/lilygo_ttgo_t-oi-plus/sdkconfig index 7c85db877669..fc0f5c6edd20 100644 --- a/ports/espressif/boards/lilygo_ttgo_t-oi-plus/sdkconfig +++ b/ports/espressif/boards/lilygo_ttgo_t-oi-plus/sdkconfig @@ -1,5 +1,15 @@ # +# Espressif IoT Development Framework Configuration +# +# +# Component config +# +# # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="LILYGO TTGO T-OI PLUS" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/lilygo_ttgo_t8_esp32_s2_wroom/board.c b/ports/espressif/boards/lilygo_ttgo_t8_esp32_s2_wroom/board.c index 6597b51c5f31..76973aee30dc 100644 --- a/ports/espressif/boards/lilygo_ttgo_t8_esp32_s2_wroom/board.c +++ b/ports/espressif/boards/lilygo_ttgo_t8_esp32_s2_wroom/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/lilygo_ttgo_t8_esp32_s2_wroom/sdkconfig b/ports/espressif/boards/lilygo_ttgo_t8_esp32_s2_wroom/sdkconfig index 5b9c86dcc346..e69de29bb2d1 100644 --- a/ports/espressif/boards/lilygo_ttgo_t8_esp32_s2_wroom/sdkconfig +++ b/ports/espressif/boards/lilygo_ttgo_t8_esp32_s2_wroom/sdkconfig @@ -1,6 +0,0 @@ -# CONFIG_ESP32S2_SPIRAM_SUPPORT is not set -# -# LWIP -# -CONFIG_LWIP_LOCAL_HOSTNAME="espressif" -# end of LWIP diff --git a/ports/espressif/boards/lilygo_ttgo_t8_s2/board.c b/ports/espressif/boards/lilygo_ttgo_t8_s2/board.c index 6597b51c5f31..76973aee30dc 100644 --- a/ports/espressif/boards/lilygo_ttgo_t8_s2/board.c +++ b/ports/espressif/boards/lilygo_ttgo_t8_s2/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/lilygo_ttgo_t8_s2/mpconfigboard.mk b/ports/espressif/boards/lilygo_ttgo_t8_s2/mpconfigboard.mk index e7d70c671a25..2af499b5c6e1 100644 --- a/ports/espressif/boards/lilygo_ttgo_t8_s2/mpconfigboard.mk +++ b/ports/espressif/boards/lilygo_ttgo_t8_s2/mpconfigboard.mk @@ -5,6 +5,10 @@ USB_MANUFACTURER = "LILYGO" IDF_TARGET = esp32s2 +CIRCUITPY_ESP_FLASH_SIZE = 4MB CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 40m -CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_PSRAM_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m diff --git a/ports/espressif/boards/lilygo_ttgo_t8_s2/sdkconfig b/ports/espressif/boards/lilygo_ttgo_t8_s2/sdkconfig index 8c401a6ff374..23f6593f1b23 100644 --- a/ports/espressif/boards/lilygo_ttgo_t8_s2/sdkconfig +++ b/ports/espressif/boards/lilygo_ttgo_t8_s2/sdkconfig @@ -1,37 +1,15 @@ -CONFIG_ESP32S2_SPIRAM_SUPPORT=y # -# SPI RAM config +# Espressif IoT Development Framework Configuration # -# CONFIG_SPIRAM_TYPE_AUTO is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM16 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -CONFIG_SPIRAM_TYPE_ESPPSRAM64=y -CONFIG_SPIRAM_SIZE=8388608 -# end of SPI RAM config - -CONFIG_DEFAULT_PSRAM_CLK_IO=30 # -# PSRAM clock and cs IO for ESP32S2 +# Component config # -CONFIG_DEFAULT_PSRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S2 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_80M is not set -CONFIG_SPIRAM_SPEED_40M=y -# CONFIG_SPIRAM_SPEED_26M is not set -# CONFIG_SPIRAM_SPEED_20M is not set -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set -CONFIG_SPIRAM_USE_MEMMAP=y -# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set -# CONFIG_SPIRAM_USE_MALLOC is not set -CONFIG_SPIRAM_MEMTEST=y -# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="TTGO-T8-ESP32-S2" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/board.c b/ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/board.c index 7ba109dfced0..f6ac6ede2d71 100644 --- a/ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/board.c +++ b/ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/board.c @@ -126,12 +126,6 @@ static void display_init(void) { } void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ - // Display display_init(); } diff --git a/ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.mk b/ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.mk index 865dbe2661d8..052c1e54171b 100644 --- a/ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.mk +++ b/ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.mk @@ -5,6 +5,10 @@ USB_MANUFACTURER = "LILYGO" IDF_TARGET = esp32s2 +CIRCUITPY_ESP_FLASH_SIZE = 4MB CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 40m -CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_PSRAM_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m diff --git a/ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/sdkconfig b/ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/sdkconfig index 8c401a6ff374..23f6593f1b23 100644 --- a/ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/sdkconfig +++ b/ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/sdkconfig @@ -1,37 +1,15 @@ -CONFIG_ESP32S2_SPIRAM_SUPPORT=y # -# SPI RAM config +# Espressif IoT Development Framework Configuration # -# CONFIG_SPIRAM_TYPE_AUTO is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM16 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -CONFIG_SPIRAM_TYPE_ESPPSRAM64=y -CONFIG_SPIRAM_SIZE=8388608 -# end of SPI RAM config - -CONFIG_DEFAULT_PSRAM_CLK_IO=30 # -# PSRAM clock and cs IO for ESP32S2 +# Component config # -CONFIG_DEFAULT_PSRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S2 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_80M is not set -CONFIG_SPIRAM_SPEED_40M=y -# CONFIG_SPIRAM_SPEED_26M is not set -# CONFIG_SPIRAM_SPEED_20M is not set -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set -CONFIG_SPIRAM_USE_MEMMAP=y -# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set -# CONFIG_SPIRAM_USE_MALLOC is not set -CONFIG_SPIRAM_MEMTEST=y -# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="TTGO-T8-ESP32-S2" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/lilygo_ttgo_tdisplay_esp32_16m/sdkconfig b/ports/espressif/boards/lilygo_ttgo_tdisplay_esp32_16m/sdkconfig index 55052e98cab5..61beea449b11 100644 --- a/ports/espressif/boards/lilygo_ttgo_tdisplay_esp32_16m/sdkconfig +++ b/ports/espressif/boards/lilygo_ttgo_tdisplay_esp32_16m/sdkconfig @@ -1,5 +1,15 @@ # +# Espressif IoT Development Framework Configuration +# +# +# Component config +# +# # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="TTGO-TDISPLAY" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/lilygo_twatch_2020_v3/mpconfigboard.mk b/ports/espressif/boards/lilygo_twatch_2020_v3/mpconfigboard.mk index 9d6c8dc25b98..f881eddc1312 100644 --- a/ports/espressif/boards/lilygo_twatch_2020_v3/mpconfigboard.mk +++ b/ports/espressif/boards/lilygo_twatch_2020_v3/mpconfigboard.mk @@ -6,3 +6,7 @@ IDF_TARGET = esp32 CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 16MB + +CIRCUITPY_ESP_PSRAM_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_MODE = opi +CIRCUITPY_ESP_PSRAM_FREQ = 80m diff --git a/ports/espressif/boards/lilygo_twatch_2020_v3/sdkconfig b/ports/espressif/boards/lilygo_twatch_2020_v3/sdkconfig index 89647ab5a148..d1e302072ae3 100644 --- a/ports/espressif/boards/lilygo_twatch_2020_v3/sdkconfig +++ b/ports/espressif/boards/lilygo_twatch_2020_v3/sdkconfig @@ -1,31 +1,22 @@ -# SPI RAM config # -CONFIG_ESP32_SPIRAM_SUPPORT=y -CONFIG_SPIRAM_MODE_OCT=y -CONFIG_SPIRAM_TYPE_ESPPSRAM64=y -CONFIG_SPIRAM_SIZE=8388608 -CONFIG_SPIRAM_SPEED_80M=y -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -# CONFIG_SPIRAM_IGNORE_NOTFOUND=y -CONFIG_SPIRAM_USE_MEMMAP=y -CONFIG_SPIRAM_MEMTEST=y -CONFIG_SPIRAM_CACHE_WORKAROUND=y - -# Uncomment (remove ###) to send ESP_LOG output to TX/RX pins +# Espressif IoT Development Framework Configuration +# +# +# Component config +# # # ESP System Settings # -CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT=y -# CONFIG_ESP_SYSTEM_PANIC_SILENT_REBOOT is not set CONFIG_ESP_CONSOLE_UART_CUSTOM=y # CONFIG_ESP_CONSOLE_NONE is not set CONFIG_ESP_CONSOLE_UART=y CONFIG_ESP_CONSOLE_UART_CUSTOM_NUM_0=y -# CONFIG_ESP_CONSOLE_UART_CUSTOM_NUM_1 is not set CONFIG_ESP_CONSOLE_UART_NUM=0 CONFIG_ESP_CONSOLE_UART_TX_GPIO=1 CONFIG_ESP_CONSOLE_UART_RX_GPIO=3 CONFIG_ESP_CONSOLE_UART_BAUDRATE=115200 -# CONFIG_ESP_SYSTEM_CHECK_INT_LEVEL_5 is not set # end of ESP System Settings + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/lolin_c3_mini/mpconfigboard.h b/ports/espressif/boards/lolin_c3_mini/mpconfigboard.h index 2a90d9184549..315384627b5f 100644 --- a/ports/espressif/boards/lolin_c3_mini/mpconfigboard.h +++ b/ports/espressif/boards/lolin_c3_mini/mpconfigboard.h @@ -44,5 +44,3 @@ #define CIRCUITPY_BOARD_UART (1) #define CIRCUITPY_BOARD_UART_PIN {{.tx = &pin_GPIO21, .rx = &pin_GPIO20}} - -#define CIRCUITPY_ESP_USB_SERIAL_JTAG (1) diff --git a/ports/espressif/boards/lolin_c3_mini/mpconfigboard.mk b/ports/espressif/boards/lolin_c3_mini/mpconfigboard.mk index d1cd0129fd07..b6dea2809836 100644 --- a/ports/espressif/boards/lolin_c3_mini/mpconfigboard.mk +++ b/ports/espressif/boards/lolin_c3_mini/mpconfigboard.mk @@ -6,3 +6,7 @@ IDF_TARGET = esp32c3 CIRCUITPY_ESP_FLASH_MODE=qio CIRCUITPY_ESP_FLASH_FREQ=80m CIRCUITPY_ESP_FLASH_SIZE=4MB + +CIRCUITPY_ESP_USB_SERIAL_JTAG = 1 + +CIRCUITPY_BLEIO = 0 diff --git a/ports/espressif/boards/lolin_c3_mini/sdkconfig b/ports/espressif/boards/lolin_c3_mini/sdkconfig index 833f8368fa30..932a4a2cbd04 100644 --- a/ports/espressif/boards/lolin_c3_mini/sdkconfig +++ b/ports/espressif/boards/lolin_c3_mini/sdkconfig @@ -1,5 +1,15 @@ # +# Espressif IoT Development Framework Configuration +# +# +# Component config +# +# # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="lolin-c3-mini" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/lolin_c3_pico/mpconfigboard.h b/ports/espressif/boards/lolin_c3_pico/mpconfigboard.h index 3e68e6adf997..ce0643e787db 100644 --- a/ports/espressif/boards/lolin_c3_pico/mpconfigboard.h +++ b/ports/espressif/boards/lolin_c3_pico/mpconfigboard.h @@ -44,5 +44,3 @@ #define CIRCUITPY_BOARD_UART (1) #define CIRCUITPY_BOARD_UART_PIN {{.tx = &pin_GPIO21, .rx = &pin_GPIO20}} - -#define CIRCUITPY_ESP_USB_SERIAL_JTAG (1) diff --git a/ports/espressif/boards/lolin_c3_pico/mpconfigboard.mk b/ports/espressif/boards/lolin_c3_pico/mpconfigboard.mk index a202fd8ad32f..56c03ddf68c4 100644 --- a/ports/espressif/boards/lolin_c3_pico/mpconfigboard.mk +++ b/ports/espressif/boards/lolin_c3_pico/mpconfigboard.mk @@ -7,5 +7,9 @@ CIRCUITPY_ESP_FLASH_MODE=qio CIRCUITPY_ESP_FLASH_FREQ=80m CIRCUITPY_ESP_FLASH_SIZE=4MB +CIRCUITPY_ESP_USB_SERIAL_JTAG = 1 + +CIRCUITPY_BLEIO = 0 + # Include these Python libraries in firmware. FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel diff --git a/ports/espressif/boards/lolin_c3_pico/sdkconfig b/ports/espressif/boards/lolin_c3_pico/sdkconfig index b801dac1e2a1..00134fd0f29e 100644 --- a/ports/espressif/boards/lolin_c3_pico/sdkconfig +++ b/ports/espressif/boards/lolin_c3_pico/sdkconfig @@ -1,5 +1,15 @@ # +# Espressif IoT Development Framework Configuration +# +# +# Component config +# +# # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="lolin-c3-pico" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/lolin_s2_mini/board.c b/ports/espressif/boards/lolin_s2_mini/board.c index b3c8cb41914e..164430c88c92 100644 --- a/ports/espressif/boards/lolin_s2_mini/board.c +++ b/ports/espressif/boards/lolin_s2_mini/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/lolin_s2_mini/mpconfigboard.mk b/ports/espressif/boards/lolin_s2_mini/mpconfigboard.mk index 24f88d9abf17..a1b5333cf0e4 100644 --- a/ports/espressif/boards/lolin_s2_mini/mpconfigboard.mk +++ b/ports/espressif/boards/lolin_s2_mini/mpconfigboard.mk @@ -5,10 +5,13 @@ USB_MANUFACTURER = "Lolin" IDF_TARGET = esp32s2 +CIRCUITPY_ESP_FLASH_SIZE = 4MB CIRCUITPY_ESP_FLASH_MODE = qio CIRCUITPY_ESP_FLASH_FREQ = 80m -CIRCUITPY_ESP_FLASH_SIZE = 4MB +CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m # Include these Python libraries in firmware. FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel diff --git a/ports/espressif/boards/lolin_s2_mini/sdkconfig b/ports/espressif/boards/lolin_s2_mini/sdkconfig index deb0dadcb92a..ac239ca333e6 100644 --- a/ports/espressif/boards/lolin_s2_mini/sdkconfig +++ b/ports/espressif/boards/lolin_s2_mini/sdkconfig @@ -1,37 +1,15 @@ -CONFIG_ESP32S2_SPIRAM_SUPPORT=y # -# SPI RAM config +# Espressif IoT Development Framework Configuration # -# CONFIG_SPIRAM_TYPE_AUTO is not set -CONFIG_SPIRAM_TYPE_ESPPSRAM16=y -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set -CONFIG_SPIRAM_SIZE=2097152 -# end of SPI RAM config - -CONFIG_DEFAULT_PSRAM_CLK_IO=30 # -# PSRAM clock and cs IO for ESP32S2 +# Component config # -CONFIG_DEFAULT_PSRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S2 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_80M is not set -CONFIG_SPIRAM_SPEED_40M=y -# CONFIG_SPIRAM_SPEED_26M is not set -# CONFIG_SPIRAM_SPEED_20M is not set -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set -CONFIG_SPIRAM_USE_MEMMAP=y -# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set -# CONFIG_SPIRAM_USE_MALLOC is not set -CONFIG_SPIRAM_MEMTEST=y -# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="LS2Mini" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/lolin_s2_pico/board.c b/ports/espressif/boards/lolin_s2_pico/board.c index 2f987799add5..dfac8d0f5796 100644 --- a/ports/espressif/boards/lolin_s2_pico/board.c +++ b/ports/espressif/boards/lolin_s2_pico/board.c @@ -97,11 +97,6 @@ static void display_init(void) { void board_init(void) { // init display display_init(); - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ } // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/lolin_s2_pico/mpconfigboard.mk b/ports/espressif/boards/lolin_s2_pico/mpconfigboard.mk index bf946a483fe9..830c39e69136 100644 --- a/ports/espressif/boards/lolin_s2_pico/mpconfigboard.mk +++ b/ports/espressif/boards/lolin_s2_pico/mpconfigboard.mk @@ -5,10 +5,13 @@ USB_MANUFACTURER = "Lolin" IDF_TARGET = esp32s2 +CIRCUITPY_ESP_FLASH_SIZE = 4MB CIRCUITPY_ESP_FLASH_MODE = qio CIRCUITPY_ESP_FLASH_FREQ = 80m -CIRCUITPY_ESP_FLASH_SIZE = 4MB +CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m # Include these Python libraries in firmware. FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel diff --git a/ports/espressif/boards/lolin_s2_pico/sdkconfig b/ports/espressif/boards/lolin_s2_pico/sdkconfig index 5ce352a98de9..c2238c68143a 100644 --- a/ports/espressif/boards/lolin_s2_pico/sdkconfig +++ b/ports/espressif/boards/lolin_s2_pico/sdkconfig @@ -1,37 +1,15 @@ -CONFIG_ESP32S2_SPIRAM_SUPPORT=y # -# SPI RAM config +# Espressif IoT Development Framework Configuration # -# CONFIG_SPIRAM_TYPE_AUTO is not set -CONFIG_SPIRAM_TYPE_ESPPSRAM16=y -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set -CONFIG_SPIRAM_SIZE=2097152 -# end of SPI RAM config - -CONFIG_DEFAULT_PSRAM_CLK_IO=30 # -# PSRAM clock and cs IO for ESP32S2 +# Component config # -CONFIG_DEFAULT_PSRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S2 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_80M is not set -CONFIG_SPIRAM_SPEED_40M=y -# CONFIG_SPIRAM_SPEED_26M is not set -# CONFIG_SPIRAM_SPEED_20M is not set -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set -CONFIG_SPIRAM_USE_MEMMAP=y -# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set -# CONFIG_SPIRAM_USE_MALLOC is not set -CONFIG_SPIRAM_MEMTEST=y -# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="Lolin-S2Pico" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/lolin_s3/mpconfigboard.mk b/ports/espressif/boards/lolin_s3/mpconfigboard.mk index 56b42a419c3d..fce42cef8db5 100644 --- a/ports/espressif/boards/lolin_s3/mpconfigboard.mk +++ b/ports/espressif/boards/lolin_s3/mpconfigboard.mk @@ -5,8 +5,13 @@ USB_MANUFACTURER = "WEMOS" IDF_TARGET = esp32s3 +CIRCUITPY_ESP_FLASH_SIZE = 16MB CIRCUITPY_ESP_FLASH_MODE = qio CIRCUITPY_ESP_FLASH_FREQ = 80m -CIRCUITPY_ESP_FLASH_SIZE = 16MB +CIRCUITPY_ESP_PSRAM_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_MODE = opi +CIRCUITPY_ESP_PSRAM_FREQ = 80m + +OPTIMIZATION_FLAGS = -Os CIRCUITPY_ESPCAMERA = 0 diff --git a/ports/espressif/boards/lolin_s3/sdkconfig b/ports/espressif/boards/lolin_s3/sdkconfig index 23d005edd91c..b90e3fa57eda 100644 --- a/ports/espressif/boards/lolin_s3/sdkconfig +++ b/ports/espressif/boards/lolin_s3/sdkconfig @@ -1,44 +1,9 @@ # -# Component config -# -# -# ESP32S3-Specific -# -CONFIG_ESP32S3_SPIRAM_SUPPORT=y -# -# SPI RAM config +# Espressif IoT Development Framework Configuration # -CONFIG_SPIRAM_MODE_QUAD=y -# CONFIG_SPIRAM_MODE_OCT is not set -CONFIG_SPIRAM_TYPE_AUTO=y -# CONFIG_SPIRAM_TYPE_ESPPSRAM16 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set -CONFIG_SPIRAM_SIZE=8388608 # -# PSRAM Clock and CS IO for ESP32S3 +# Component config # -# CONFIG_DEFAULT_PSRAM_CLK_IO=30 -# CONFIG_DEFAULT_PSRAM_CS_IO=26 -# end of PSRAM Clock and CS IO for ESP32S3 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_120M is not set -CONFIG_SPIRAM_SPEED_80M=y -# CONFIG_SPIRAM_SPEED_40M is not set -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set -CONFIG_SPIRAM_USE_MEMMAP=y -# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set -# CONFIG_SPIRAM_USE_MALLOC is not set -CONFIG_SPIRAM_MEMTEST=y -CONFIG_SPIRAM_MODE_OCT=y -# end of SPI RAM config - -# end of ESP32S3-Specific - # # LWIP # @@ -46,3 +11,5 @@ CONFIG_LWIP_LOCAL_HOSTNAME="LOLIN-S3" # end of LWIP # end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/lolin_s3_mini/board.c b/ports/espressif/boards/lolin_s3_mini/board.c index 9731a30366b3..00ae21ace820 100644 --- a/ports/espressif/boards/lolin_s3_mini/board.c +++ b/ports/espressif/boards/lolin_s3_mini/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/lolin_s3_mini/mpconfigboard.mk b/ports/espressif/boards/lolin_s3_mini/mpconfigboard.mk index 2a02d7f231e1..2bd303adb31b 100644 --- a/ports/espressif/boards/lolin_s3_mini/mpconfigboard.mk +++ b/ports/espressif/boards/lolin_s3_mini/mpconfigboard.mk @@ -9,7 +9,11 @@ CIRCUITPY_ESP_FLASH_MODE = qio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 4MB -# OPTIMIZATION_FLAGS = -Os +CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m + +OPTIMIZATION_FLAGS = -Os CIRCUITPY_ESPCAMERA = 0 # Include these Python libraries in firmware. diff --git a/ports/espressif/boards/lolin_s3_mini/sdkconfig b/ports/espressif/boards/lolin_s3_mini/sdkconfig index c9fa5f3e516a..36be9c760edd 100644 --- a/ports/espressif/boards/lolin_s3_mini/sdkconfig +++ b/ports/espressif/boards/lolin_s3_mini/sdkconfig @@ -1,44 +1,9 @@ # -# Component config -# -# -# ESP32S3-Specific -# -CONFIG_ESP32S3_SPIRAM_SUPPORT=y -# -# SPI RAM config +# Espressif IoT Development Framework Configuration # -CONFIG_SPIRAM_MODE_QUAD=y -# CONFIG_SPIRAM_MODE_OCT is not set -# CONFIG_SPIRAM_TYPE_AUTO=y -# CONFIG_SPIRAM_TYPE_ESPPSRAM16 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set -CONFIG_SPIRAM_SIZE=2097152 # -# PSRAM Clock and CS IO for ESP32S3 +# Component config # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 -CONFIG_DEFAULT_PSRAM_CS_IO=26 -# end of PSRAM Clock and CS IO for ESP32S3 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_120M is not set -# CONFIG_SPIRAM_SPEED_40M=y -# CONFIG_SPIRAM_SPEED_40M is not set -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set -CONFIG_SPIRAM_USE_MEMMAP=y -# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set -# CONFIG_SPIRAM_USE_MALLOC is not set -CONFIG_SPIRAM_MEMTEST=y -# CONFIG_SPIRAM_MODE_OCT=y -# end of SPI RAM config - -# end of ESP32S3-Specific - # # LWIP # @@ -46,3 +11,5 @@ CONFIG_LWIP_LOCAL_HOSTNAME="LOLIN-S3-MINI" # end of LWIP # end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/luatos_core_esp32c3/mpconfigboard.h b/ports/espressif/boards/luatos_core_esp32c3/mpconfigboard.h index 23bb5ee9b2ae..6d33513e3c7c 100644 --- a/ports/espressif/boards/luatos_core_esp32c3/mpconfigboard.h +++ b/ports/espressif/boards/luatos_core_esp32c3/mpconfigboard.h @@ -34,5 +34,3 @@ #define CIRCUITPY_BOARD_UART (1) #define CIRCUITPY_BOARD_UART_PIN {{.tx = &pin_GPIO21, .rx = &pin_GPIO20}} - -#define CIRCUITPY_ESP_USB_SERIAL_JTAG (1) diff --git a/ports/espressif/boards/luatos_core_esp32c3/mpconfigboard.mk b/ports/espressif/boards/luatos_core_esp32c3/mpconfigboard.mk index e0df58f75630..dfd8ff63def9 100644 --- a/ports/espressif/boards/luatos_core_esp32c3/mpconfigboard.mk +++ b/ports/espressif/boards/luatos_core_esp32c3/mpconfigboard.mk @@ -6,3 +6,7 @@ IDF_TARGET = esp32c3 CIRCUITPY_ESP_FLASH_MODE=dio CIRCUITPY_ESP_FLASH_FREQ=80m CIRCUITPY_ESP_FLASH_SIZE=4MB + +CIRCUITPY_ESP_USB_SERIAL_JTAG = 1 + +CIRCUITPY_BLEIO = 0 diff --git a/ports/espressif/boards/luatos_core_esp32c3/sdkconfig b/ports/espressif/boards/luatos_core_esp32c3/sdkconfig index ccc70917b530..7d94db0b5b13 100644 --- a/ports/espressif/boards/luatos_core_esp32c3/sdkconfig +++ b/ports/espressif/boards/luatos_core_esp32c3/sdkconfig @@ -1,5 +1,15 @@ # +# Espressif IoT Development Framework Configuration +# +# +# Component config +# +# # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="luatos-core-esp32c3" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/luatos_core_esp32c3_ch343/mpconfigboard.mk b/ports/espressif/boards/luatos_core_esp32c3_ch343/mpconfigboard.mk index 6a19c783f1ea..8a425a75cb8a 100644 --- a/ports/espressif/boards/luatos_core_esp32c3_ch343/mpconfigboard.mk +++ b/ports/espressif/boards/luatos_core_esp32c3_ch343/mpconfigboard.mk @@ -6,3 +6,7 @@ IDF_TARGET = esp32c3 CIRCUITPY_ESP_FLASH_MODE=dio CIRCUITPY_ESP_FLASH_FREQ=80m CIRCUITPY_ESP_FLASH_SIZE=4MB + +CIRCUITPY_ESP_USB_SERIAL_JTAG = 0 + +CIRCUITPY_BLEIO = 0 diff --git a/ports/espressif/boards/luatos_core_esp32c3_ch343/sdkconfig b/ports/espressif/boards/luatos_core_esp32c3_ch343/sdkconfig index ccc70917b530..7d94db0b5b13 100644 --- a/ports/espressif/boards/luatos_core_esp32c3_ch343/sdkconfig +++ b/ports/espressif/boards/luatos_core_esp32c3_ch343/sdkconfig @@ -1,5 +1,15 @@ # +# Espressif IoT Development Framework Configuration +# +# +# Component config +# +# # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="luatos-core-esp32c3" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/m5stack_atom_echo/sdkconfig b/ports/espressif/boards/m5stack_atom_echo/sdkconfig index 3879222babd7..861e4ebad397 100644 --- a/ports/espressif/boards/m5stack_atom_echo/sdkconfig +++ b/ports/espressif/boards/m5stack_atom_echo/sdkconfig @@ -1,26 +1,15 @@ -CONFIG_ESP32_SPIRAM_SUPPORT=n - -# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set +# +# Espressif IoT Development Framework Configuration +# +# +# Component config +# # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="M5StaskAtomEcho" # end of LWIP -# Uncomment (remove ###) to send ESP_LOG output to TX/RX pins -### # -### # ESP System Settings -### # -### CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT=y -### # CONFIG_ESP_SYSTEM_PANIC_SILENT_REBOOT is not set -### CONFIG_ESP_CONSOLE_UART_CUSTOM=y -### CONFIG_ESP_CONSOLE_NONE is not set -### CONFIG_ESP_CONSOLE_UART=y -### CONFIG_ESP_CONSOLE_UART_CUSTOM_NUM_0=y -### # CONFIG_ESP_CONSOLE_UART_CUSTOM_NUM_1 is not set -### CONFIG_ESP_CONSOLE_UART_NUM=0 -### CONFIG_ESP_CONSOLE_UART_TX_GPIO=17 -### CONFIG_ESP_CONSOLE_UART_RX_GPIO=16 -### CONFIG_ESP_CONSOLE_UART_BAUDRATE=115200 -### # CONFIG_ESP_SYSTEM_CHECK_INT_LEVEL_5 is not set -### # end of ESP System Settings +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/m5stack_atom_lite/sdkconfig b/ports/espressif/boards/m5stack_atom_lite/sdkconfig index 8a9fb07019dd..eaaf716a15ef 100644 --- a/ports/espressif/boards/m5stack_atom_lite/sdkconfig +++ b/ports/espressif/boards/m5stack_atom_lite/sdkconfig @@ -1,27 +1,15 @@ -CONFIG_ESP32_ECO3_CACHE_LOCK_FIX=y -CONFIG_ESP32_SPIRAM_SUPPORT=n - -# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set +# +# Espressif IoT Development Framework Configuration +# +# +# Component config +# # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="M5StaskAtomLite" # end of LWIP -# Uncomment (remove ###) to send ESP_LOG output to TX/RX pins -### # -### # ESP System Settings -### # -### CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT=y -### # CONFIG_ESP_SYSTEM_PANIC_SILENT_REBOOT is not set -### CONFIG_ESP_CONSOLE_UART_CUSTOM=y -### CONFIG_ESP_CONSOLE_NONE is not set -### CONFIG_ESP_CONSOLE_UART=y -### CONFIG_ESP_CONSOLE_UART_CUSTOM_NUM_0=y -### # CONFIG_ESP_CONSOLE_UART_CUSTOM_NUM_1 is not set -### CONFIG_ESP_CONSOLE_UART_NUM=0 -### CONFIG_ESP_CONSOLE_UART_TX_GPIO=17 -### CONFIG_ESP_CONSOLE_UART_RX_GPIO=16 -### CONFIG_ESP_CONSOLE_UART_BAUDRATE=115200 -### # CONFIG_ESP_SYSTEM_CHECK_INT_LEVEL_5 is not set -### # end of ESP System Settings +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/m5stack_atom_matrix/sdkconfig b/ports/espressif/boards/m5stack_atom_matrix/sdkconfig index 474a760b566f..730f17de0e19 100644 --- a/ports/espressif/boards/m5stack_atom_matrix/sdkconfig +++ b/ports/espressif/boards/m5stack_atom_matrix/sdkconfig @@ -1,26 +1,15 @@ -CONFIG_ESP32_SPIRAM_SUPPORT=n - -# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set +# +# Espressif IoT Development Framework Configuration +# +# +# Component config +# # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="M5StaskAtomMatrix" # end of LWIP -# Uncomment (remove ###) to send ESP_LOG output to TX/RX pins -### # -### # ESP System Settings -### # -### CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT=y -### # CONFIG_ESP_SYSTEM_PANIC_SILENT_REBOOT is not set -### CONFIG_ESP_CONSOLE_UART_CUSTOM=y -### CONFIG_ESP_CONSOLE_NONE is not set -### CONFIG_ESP_CONSOLE_UART=y -### CONFIG_ESP_CONSOLE_UART_CUSTOM_NUM_0=y -### # CONFIG_ESP_CONSOLE_UART_CUSTOM_NUM_1 is not set -### CONFIG_ESP_CONSOLE_UART_NUM=0 -### CONFIG_ESP_CONSOLE_UART_TX_GPIO=17 -### CONFIG_ESP_CONSOLE_UART_RX_GPIO=16 -### CONFIG_ESP_CONSOLE_UART_BAUDRATE=115200 -### # CONFIG_ESP_SYSTEM_CHECK_INT_LEVEL_5 is not set -### # end of ESP System Settings +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/m5stack_atom_u/sdkconfig b/ports/espressif/boards/m5stack_atom_u/sdkconfig index 90c99459a8fd..06d0f0169370 100644 --- a/ports/espressif/boards/m5stack_atom_u/sdkconfig +++ b/ports/espressif/boards/m5stack_atom_u/sdkconfig @@ -1,26 +1,15 @@ -CONFIG_ESP32_SPIRAM_SUPPORT=n - -# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set +# +# Espressif IoT Development Framework Configuration +# +# +# Component config +# # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="M5StaskAtomU" # end of LWIP -# Uncomment (remove ###) to send ESP_LOG output to TX/RX pins -### # -### # ESP System Settings -### # -### CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT=y -### # CONFIG_ESP_SYSTEM_PANIC_SILENT_REBOOT is not set -### CONFIG_ESP_CONSOLE_UART_CUSTOM=y -### CONFIG_ESP_CONSOLE_NONE is not set -### CONFIG_ESP_CONSOLE_UART=y -### CONFIG_ESP_CONSOLE_UART_CUSTOM_NUM_0=y -### # CONFIG_ESP_CONSOLE_UART_CUSTOM_NUM_1 is not set -### CONFIG_ESP_CONSOLE_UART_NUM=0 -### CONFIG_ESP_CONSOLE_UART_TX_GPIO=17 -### CONFIG_ESP_CONSOLE_UART_RX_GPIO=16 -### CONFIG_ESP_CONSOLE_UART_BAUDRATE=115200 -### # CONFIG_ESP_SYSTEM_CHECK_INT_LEVEL_5 is not set -### # end of ESP System Settings +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/m5stack_atoms3_lite/sdkconfig b/ports/espressif/boards/m5stack_atoms3_lite/sdkconfig index 9d924272ec4e..f5ef79768114 100644 --- a/ports/espressif/boards/m5stack_atoms3_lite/sdkconfig +++ b/ports/espressif/boards/m5stack_atoms3_lite/sdkconfig @@ -1,7 +1,15 @@ -CONFIG_ESP32S3_SPIRAM_SUPPORT=n - +# +# Espressif IoT Development Framework Configuration +# +# +# Component config +# # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/m5stack_atoms3u/sdkconfig b/ports/espressif/boards/m5stack_atoms3u/sdkconfig index 9d924272ec4e..f5ef79768114 100644 --- a/ports/espressif/boards/m5stack_atoms3u/sdkconfig +++ b/ports/espressif/boards/m5stack_atoms3u/sdkconfig @@ -1,7 +1,15 @@ -CONFIG_ESP32S3_SPIRAM_SUPPORT=n - +# +# Espressif IoT Development Framework Configuration +# +# +# Component config +# # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/m5stack_core2/board.c b/ports/espressif/boards/m5stack_core2/board.c index e64ac35a7ddc..29011638b275 100644 --- a/ports/espressif/boards/m5stack_core2/board.c +++ b/ports/espressif/boards/m5stack_core2/board.c @@ -34,7 +34,7 @@ #include "shared-bindings/board/__init__.h" #include "shared-bindings/microcontroller/Pin.h" -#include "components/driver/include/driver/gpio.h" +#include "components/driver/gpio/include/driver/gpio.h" #include "components/hal/include/hal/gpio_hal.h" #include "common-hal/microcontroller/Pin.h" diff --git a/ports/espressif/boards/m5stack_core2/mpconfigboard.mk b/ports/espressif/boards/m5stack_core2/mpconfigboard.mk index 74ed5bcb832d..c8954579ee50 100644 --- a/ports/espressif/boards/m5stack_core2/mpconfigboard.mk +++ b/ports/espressif/boards/m5stack_core2/mpconfigboard.mk @@ -7,6 +7,10 @@ CIRCUITPY_ESP_FLASH_MODE = qio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 16MB +CIRCUITPY_ESP_PSRAM_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 80m + M5STACK_CORE2_5V_OUTPUT_ENABLE_DEFAULT = 1 CFLAGS += -DM5STACK_CORE2_5V_OUTPUT_ENABLE_DEFAULT=$(M5STACK_CORE2_5V_OUTPUT_ENABLE_DEFAULT) diff --git a/ports/espressif/boards/m5stack_core2/sdkconfig b/ports/espressif/boards/m5stack_core2/sdkconfig index 47a0a18a5e35..c8ac5f43acf9 100644 --- a/ports/espressif/boards/m5stack_core2/sdkconfig +++ b/ports/espressif/boards/m5stack_core2/sdkconfig @@ -1,6 +1,30 @@ -CONFIG_ESP32_ECO3_CACHE_LOCK_FIX=y -CONFIG_ESP32_SPIRAM_SUPPORT=y +# +# Espressif IoT Development Framework Configuration +# +# +# Security features +# +CONFIG_SECURE_BOOT_V2_RSA_SUPPORTED=y +CONFIG_SECURE_BOOT_V2_PREFERRED=y +# end of Security features + +# +# Component config +# +# +# Hardware Settings +# +# +# Chip revision +# +# CONFIG_ESP32_REV_MIN_0 is not set CONFIG_ESP32_REV_MIN_3=y +CONFIG_ESP32_REV_MIN=3 +CONFIG_ESP32_REV_MIN_FULL=300 +CONFIG_ESP_REV_MIN_FULL=300 +# end of Chip revision + +# end of Hardware Settings # # LWIP @@ -8,27 +32,6 @@ CONFIG_ESP32_REV_MIN_3=y CONFIG_LWIP_LOCAL_HOSTNAME="M5StaskCore2" # end of LWIP -# -# SPI RAM config -# -# CONFIG_SPIRAM_TYPE_AUTO=y -# CONFIG_SPIRAM_TYPE_ESPPSRAM16 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -CONFIG_SPIRAM_TYPE_ESPPSRAM64=y -CONFIG_SPIRAM_SIZE=8388608 -# end of SPI RAM config +# end of Component config -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -CONFIG_SPIRAM_SPEED_80M=y -# CONFIG_SPIRAM_SPEED_40M is not set -# CONFIG_SPIRAM_SPEED_26M is not set -# CONFIG_SPIRAM_SPEED_20M is not set -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set -CONFIG_SPIRAM_USE_MEMMAP=y -# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set -# CONFIG_SPIRAM_USE_MALLOC is not set -CONFIG_SPIRAM_MEMTEST=y -# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/m5stack_core_basic/sdkconfig b/ports/espressif/boards/m5stack_core_basic/sdkconfig index a4cedd8e813e..5b7ecf870975 100644 --- a/ports/espressif/boards/m5stack_core_basic/sdkconfig +++ b/ports/espressif/boards/m5stack_core_basic/sdkconfig @@ -1,28 +1,37 @@ -CONFIG_ESP32_ECO3_CACHE_LOCK_FIX=y -CONFIG_ESP32_SPIRAM_SUPPORT=n +# +# Espressif IoT Development Framework Configuration +# +# +# Security features +# +CONFIG_SECURE_BOOT_V2_RSA_SUPPORTED=y +CONFIG_SECURE_BOOT_V2_PREFERRED=y +# end of Security features + +# +# Component config +# +# +# Hardware Settings +# +# +# Chip revision +# +# CONFIG_ESP32_REV_MIN_0 is not set CONFIG_ESP32_REV_MIN_3=y +CONFIG_ESP32_REV_MIN=3 +CONFIG_ESP32_REV_MIN_FULL=300 +CONFIG_ESP_REV_MIN_FULL=300 +# end of Chip revision + +# end of Hardware Settings -# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="M5StaskCoreBasic" # end of LWIP -# Uncomment (remove ###) to send ESP_LOG output to TX/RX pins -### # -### # ESP System Settings -### # -### CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT=y -### # CONFIG_ESP_SYSTEM_PANIC_SILENT_REBOOT is not set -### CONFIG_ESP_CONSOLE_UART_CUSTOM=y -### CONFIG_ESP_CONSOLE_NONE is not set -### CONFIG_ESP_CONSOLE_UART=y -### CONFIG_ESP_CONSOLE_UART_CUSTOM_NUM_0=y -### # CONFIG_ESP_CONSOLE_UART_CUSTOM_NUM_1 is not set -### CONFIG_ESP_CONSOLE_UART_NUM=0 -### CONFIG_ESP_CONSOLE_UART_TX_GPIO=17 -### CONFIG_ESP_CONSOLE_UART_RX_GPIO=16 -### CONFIG_ESP_CONSOLE_UART_BAUDRATE=115200 -### # CONFIG_ESP_SYSTEM_CHECK_INT_LEVEL_5 is not set -### # end of ESP System Settings +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/m5stack_core_fire/mpconfigboard.mk b/ports/espressif/boards/m5stack_core_fire/mpconfigboard.mk index 82e462012c7d..591c596bbcfe 100644 --- a/ports/espressif/boards/m5stack_core_fire/mpconfigboard.mk +++ b/ports/espressif/boards/m5stack_core_fire/mpconfigboard.mk @@ -3,7 +3,12 @@ CIRCUITPY_CREATION_ID = 0x00320001 IDF_TARGET = esp32 +CIRCUITPY_ESP_FLASH_SIZE = 16MB CIRCUITPY_ESP_FLASH_MODE = qio CIRCUITPY_ESP_FLASH_FREQ = 80m -CIRCUITPY_ESP_FLASH_SIZE = 16MB + +CIRCUITPY_ESP_PSRAM_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 80m + CIRCUITPY_ESPCAMERA = 0 diff --git a/ports/espressif/boards/m5stack_core_fire/sdkconfig b/ports/espressif/boards/m5stack_core_fire/sdkconfig index d77fe645254c..0e7b9709383c 100644 --- a/ports/espressif/boards/m5stack_core_fire/sdkconfig +++ b/ports/espressif/boards/m5stack_core_fire/sdkconfig @@ -1,58 +1,37 @@ -CONFIG_ESP32_ECO3_CACHE_LOCK_FIX=y -CONFIG_ESP32_SPIRAM_SUPPORT=y -CONFIG_ESP32_REV_MIN_3=y - # -# SPI RAM config +# Espressif IoT Development Framework Configuration +# # -CONFIG_SPIRAM_TYPE_AUTO=y -# CONFIG_SPIRAM_TYPE_ESPPSRAM16 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -#CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set -CONFIG_SPIRAM_SIZE=8388608 -# end of SPI RAM config +# Security features +# +CONFIG_SECURE_BOOT_V2_RSA_SUPPORTED=y +CONFIG_SECURE_BOOT_V2_PREFERRED=y +# end of Security features # -# PSRAM clock and cs IO for ESP32 +# Component config +# +# +# Hardware Settings # -CONFIG_D0WD_PSRAM_CLK_IO=17 -CONFIG_D0WD_PSRAM_CS_IO=16 -# end of PSRAM clock and cs IO for ESP32 +# +# Chip revision +# +# CONFIG_ESP32_REV_MIN_0 is not set +CONFIG_ESP32_REV_MIN_3=y +CONFIG_ESP32_REV_MIN=3 +CONFIG_ESP32_REV_MIN_FULL=300 +CONFIG_ESP_REV_MIN_FULL=300 +# end of Chip revision + +# end of Hardware Settings -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -CONFIG_SPIRAM_SPEED_80M=y -# CONFIG_SPIRAM_SPEED_40M is not set -# CONFIG_SPIRAM_SPEED_26M is not set -# CONFIG_SPIRAM_SPEED_20M is not set -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set -CONFIG_SPIRAM_USE_MEMMAP=y -# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set -# CONFIG_SPIRAM_USE_MALLOC is not set -CONFIG_SPIRAM_MEMTEST=y -# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="M5StaskCoreFire" # end of LWIP -# Uncomment (remove ###) to send ESP_LOG output to TX/RX pins -### # -### # ESP System Settings -### # -### CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT=y -### # CONFIG_ESP_SYSTEM_PANIC_SILENT_REBOOT is not set -### CONFIG_ESP_CONSOLE_UART_CUSTOM=y -### CONFIG_ESP_CONSOLE_NONE is not set -### CONFIG_ESP_CONSOLE_UART=y -### CONFIG_ESP_CONSOLE_UART_CUSTOM_NUM_0=y -### # CONFIG_ESP_CONSOLE_UART_CUSTOM_NUM_1 is not set -### CONFIG_ESP_CONSOLE_UART_NUM=0 -### CONFIG_ESP_CONSOLE_UART_TX_GPIO=17 -### CONFIG_ESP_CONSOLE_UART_RX_GPIO=16 -### CONFIG_ESP_CONSOLE_UART_BAUDRATE=115200 -### # CONFIG_ESP_SYSTEM_CHECK_INT_LEVEL_5 is not set -### # end of ESP System Settings +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/m5stack_m5paper/mpconfigboard.mk b/ports/espressif/boards/m5stack_m5paper/mpconfigboard.mk index d3e2bb2aac3a..bacf270a6638 100644 --- a/ports/espressif/boards/m5stack_m5paper/mpconfigboard.mk +++ b/ports/espressif/boards/m5stack_m5paper/mpconfigboard.mk @@ -6,4 +6,9 @@ IDF_TARGET = esp32 CIRCUITPY_ESP_FLASH_MODE = qio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 16MB + +CIRCUITPY_ESP_PSRAM_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 80m + CIRCUITPY_ESPCAMERA = 0 diff --git a/ports/espressif/boards/m5stack_m5paper/sdkconfig b/ports/espressif/boards/m5stack_m5paper/sdkconfig index afbee57d1929..fbf94f27494a 100644 --- a/ports/espressif/boards/m5stack_m5paper/sdkconfig +++ b/ports/espressif/boards/m5stack_m5paper/sdkconfig @@ -1,58 +1,37 @@ -CONFIG_ESP32_ECO3_CACHE_LOCK_FIX=y -CONFIG_ESP32_SPIRAM_SUPPORT=y -CONFIG_ESP32_REV_MIN_3=y - # -# SPI RAM config +# Espressif IoT Development Framework Configuration +# # -CONFIG_SPIRAM_TYPE_AUTO=y -# CONFIG_SPIRAM_TYPE_ESPPSRAM16 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -#CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set -CONFIG_SPIRAM_SIZE=8388608 -# end of SPI RAM config +# Security features +# +CONFIG_SECURE_BOOT_V2_RSA_SUPPORTED=y +CONFIG_SECURE_BOOT_V2_PREFERRED=y +# end of Security features # -# PSRAM clock and cs IO for ESP32 +# Component config +# +# +# Hardware Settings # -CONFIG_D0WD_PSRAM_CLK_IO=17 -CONFIG_D0WD_PSRAM_CS_IO=16 -# end of PSRAM clock and cs IO for ESP32 +# +# Chip revision +# +# CONFIG_ESP32_REV_MIN_0 is not set +CONFIG_ESP32_REV_MIN_3=y +CONFIG_ESP32_REV_MIN=3 +CONFIG_ESP32_REV_MIN_FULL=300 +CONFIG_ESP_REV_MIN_FULL=300 +# end of Chip revision + +# end of Hardware Settings -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -CONFIG_SPIRAM_SPEED_80M=y -# CONFIG_SPIRAM_SPEED_40M is not set -# CONFIG_SPIRAM_SPEED_26M is not set -# CONFIG_SPIRAM_SPEED_20M is not set -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set -CONFIG_SPIRAM_USE_MEMMAP=y -# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set -# CONFIG_SPIRAM_USE_MALLOC is not set -CONFIG_SPIRAM_MEMTEST=y -# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="M5Paper" # end of LWIP -# Uncomment (remove ###) to send ESP_LOG output to TX/RX pins -### # -### # ESP System Settings -### # -### CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT=y -### # CONFIG_ESP_SYSTEM_PANIC_SILENT_REBOOT is not set -### CONFIG_ESP_CONSOLE_UART_CUSTOM=y -### CONFIG_ESP_CONSOLE_NONE is not set -### CONFIG_ESP_CONSOLE_UART=y -### CONFIG_ESP_CONSOLE_UART_CUSTOM_NUM_0=y -### # CONFIG_ESP_CONSOLE_UART_CUSTOM_NUM_1 is not set -### CONFIG_ESP_CONSOLE_UART_NUM=0 -### CONFIG_ESP_CONSOLE_UART_TX_GPIO=17 -### CONFIG_ESP_CONSOLE_UART_RX_GPIO=16 -### CONFIG_ESP_CONSOLE_UART_BAUDRATE=115200 -### # CONFIG_ESP_SYSTEM_CHECK_INT_LEVEL_5 is not set -### # end of ESP System Settings +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/m5stack_stamp_c3/mpconfigboard.h b/ports/espressif/boards/m5stack_stamp_c3/mpconfigboard.h index 3e8be96d7d12..90174f60ff44 100644 --- a/ports/espressif/boards/m5stack_stamp_c3/mpconfigboard.h +++ b/ports/espressif/boards/m5stack_stamp_c3/mpconfigboard.h @@ -35,8 +35,6 @@ #define CIRCUITPY_BOARD_UART (1) #define CIRCUITPY_BOARD_UART_PIN {{.tx = &pin_GPIO21, .rx = &pin_GPIO20}} -// #define CIRCUITPY_ESP_USB_SERIAL_JTAG (1) - // Serial over UART #define CIRCUITPY_CONSOLE_UART_RX (&pin_GPIO20) #define CIRCUITPY_CONSOLE_UART_TX (&pin_GPIO21) diff --git a/ports/espressif/boards/m5stack_stamp_c3/mpconfigboard.mk b/ports/espressif/boards/m5stack_stamp_c3/mpconfigboard.mk index 25a6f87428f5..e360567a0aaa 100644 --- a/ports/espressif/boards/m5stack_stamp_c3/mpconfigboard.mk +++ b/ports/espressif/boards/m5stack_stamp_c3/mpconfigboard.mk @@ -6,3 +6,7 @@ IDF_TARGET = esp32c3 CIRCUITPY_ESP_FLASH_MODE=qio CIRCUITPY_ESP_FLASH_FREQ=80m CIRCUITPY_ESP_FLASH_SIZE=4MB + +CIRCUITPY_ESP_USB_SERIAL_JTAG = 0 + +CIRCUITPY_BLEIO = 0 diff --git a/ports/espressif/boards/m5stack_stamp_c3/sdkconfig b/ports/espressif/boards/m5stack_stamp_c3/sdkconfig index 34260aa7f20e..87330ec13bd6 100644 --- a/ports/espressif/boards/m5stack_stamp_c3/sdkconfig +++ b/ports/espressif/boards/m5stack_stamp_c3/sdkconfig @@ -1,5 +1,15 @@ # +# Espressif IoT Development Framework Configuration +# +# +# Component config +# +# # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="m5stack-stamp-c3" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/m5stack_stick_c/board.c b/ports/espressif/boards/m5stack_stick_c/board.c index 779125a017c0..7f9b5a54f477 100644 --- a/ports/espressif/boards/m5stack_stick_c/board.c +++ b/ports/espressif/boards/m5stack_stick_c/board.c @@ -33,7 +33,7 @@ #include "shared-module/displayio/mipi_constants.h" #include "shared-bindings/board/__init__.h" #include "shared-bindings/microcontroller/Pin.h" -#include "components/driver/include/driver/gpio.h" +#include "components/driver/gpio/include/driver/gpio.h" #include "components/hal/include/hal/gpio_hal.h" #include "common-hal/microcontroller/Pin.h" diff --git a/ports/espressif/boards/m5stack_stick_c/sdkconfig b/ports/espressif/boards/m5stack_stick_c/sdkconfig index 7ec6f90c157e..2e72fdb21633 100644 --- a/ports/espressif/boards/m5stack_stick_c/sdkconfig +++ b/ports/espressif/boards/m5stack_stick_c/sdkconfig @@ -1,26 +1,15 @@ -CONFIG_ESP32_SPIRAM_SUPPORT=n - -# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set +# +# Espressif IoT Development Framework Configuration +# +# +# Component config +# # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="M5StaskStickC" # end of LWIP -# Uncomment (remove ###) to send ESP_LOG output to TX/RX pins -### # -### # ESP System Settings -### # -### CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT=y -### # CONFIG_ESP_SYSTEM_PANIC_SILENT_REBOOT is not set -### CONFIG_ESP_CONSOLE_UART_CUSTOM=y -### CONFIG_ESP_CONSOLE_NONE is not set -### CONFIG_ESP_CONSOLE_UART=y -### CONFIG_ESP_CONSOLE_UART_CUSTOM_NUM_0=y -### # CONFIG_ESP_CONSOLE_UART_CUSTOM_NUM_1 is not set -### CONFIG_ESP_CONSOLE_UART_NUM=0 -### CONFIG_ESP_CONSOLE_UART_TX_GPIO=17 -### CONFIG_ESP_CONSOLE_UART_RX_GPIO=16 -### CONFIG_ESP_CONSOLE_UART_BAUDRATE=115200 -### # CONFIG_ESP_SYSTEM_CHECK_INT_LEVEL_5 is not set -### # end of ESP System Settings +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/m5stack_stick_c_plus/board.c b/ports/espressif/boards/m5stack_stick_c_plus/board.c index ea43209c2446..5901f8cea82c 100644 --- a/ports/espressif/boards/m5stack_stick_c_plus/board.c +++ b/ports/espressif/boards/m5stack_stick_c_plus/board.c @@ -33,7 +33,7 @@ #include "shared-module/displayio/mipi_constants.h" #include "shared-bindings/board/__init__.h" #include "shared-bindings/microcontroller/Pin.h" -#include "components/driver/include/driver/gpio.h" +#include "components/driver/gpio/include/driver/gpio.h" #include "components/hal/include/hal/gpio_hal.h" #include "common-hal/microcontroller/Pin.h" diff --git a/ports/espressif/boards/m5stack_stick_c_plus/sdkconfig b/ports/espressif/boards/m5stack_stick_c_plus/sdkconfig index a37e88cedfad..54f50db25c3c 100644 --- a/ports/espressif/boards/m5stack_stick_c_plus/sdkconfig +++ b/ports/espressif/boards/m5stack_stick_c_plus/sdkconfig @@ -1,26 +1,15 @@ -CONFIG_ESP32_SPIRAM_SUPPORT=n - -# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set +# +# Espressif IoT Development Framework Configuration +# +# +# Component config +# # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="M5StaskStickCPlus" # end of LWIP -# Uncomment (remove ###) to send ESP_LOG output to TX/RX pins -### # -### # ESP System Settings -### # -### CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT=y -### # CONFIG_ESP_SYSTEM_PANIC_SILENT_REBOOT is not set -### CONFIG_ESP_CONSOLE_UART_CUSTOM=y -### CONFIG_ESP_CONSOLE_NONE is not set -### CONFIG_ESP_CONSOLE_UART=y -### CONFIG_ESP_CONSOLE_UART_CUSTOM_NUM_0=y -### # CONFIG_ESP_CONSOLE_UART_CUSTOM_NUM_1 is not set -### CONFIG_ESP_CONSOLE_UART_NUM=0 -### CONFIG_ESP_CONSOLE_UART_TX_GPIO=17 -### CONFIG_ESP_CONSOLE_UART_RX_GPIO=16 -### CONFIG_ESP_CONSOLE_UART_BAUDRATE=115200 -### # CONFIG_ESP_SYSTEM_CHECK_INT_LEVEL_5 is not set -### # end of ESP System Settings +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/m5stack_timer_camera_x/board.c b/ports/espressif/boards/m5stack_timer_camera_x/board.c index 65b857c3aec6..162ad40a80cb 100755 --- a/ports/espressif/boards/m5stack_timer_camera_x/board.c +++ b/ports/espressif/boards/m5stack_timer_camera_x/board.c @@ -27,7 +27,7 @@ #include "supervisor/board.h" #include "mpconfigboard.h" #include "shared-bindings/microcontroller/Pin.h" -#include "components/driver/include/driver/gpio.h" +#include "components/driver/gpio/include/driver/gpio.h" #include "components/hal/include/hal/gpio_hal.h" #include "common-hal/microcontroller/Pin.h" diff --git a/ports/espressif/boards/m5stack_timer_camera_x/mpconfigboard.mk b/ports/espressif/boards/m5stack_timer_camera_x/mpconfigboard.mk index 6339db806baf..e17f5061d9e8 100644 --- a/ports/espressif/boards/m5stack_timer_camera_x/mpconfigboard.mk +++ b/ports/espressif/boards/m5stack_timer_camera_x/mpconfigboard.mk @@ -6,3 +6,7 @@ IDF_TARGET = esp32 CIRCUITPY_ESP_FLASH_MODE = qio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_PSRAM_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_MODE = opi +CIRCUITPY_ESP_PSRAM_FREQ = 80m diff --git a/ports/espressif/boards/m5stack_timer_camera_x/sdkconfig b/ports/espressif/boards/m5stack_timer_camera_x/sdkconfig index 06cce7a5954e..a600e00b31aa 100644 --- a/ports/espressif/boards/m5stack_timer_camera_x/sdkconfig +++ b/ports/espressif/boards/m5stack_timer_camera_x/sdkconfig @@ -1,27 +1,37 @@ -# ESP32-D0WDQ6-V3 (revision 3) -CONFIG_ESP32_SPIRAM_SUPPORT=y -CONFIG_ESP32_ECO3_CACHE_LOCK_FIX=y -CONFIG_ESP32_REV_MIN_3=y - -# PSRAM -CONFIG_D0WD_PSRAM_CLK_IO=17 -CONFIG_D0WD_PSRAM_CS_IO=16 +# +# Espressif IoT Development Framework Configuration +# +# +# Security features +# +CONFIG_SECURE_BOOT_V2_RSA_SUPPORTED=y +CONFIG_SECURE_BOOT_V2_PREFERRED=y +# end of Security features -CONFIG_SPIRAM_MODE_OCT=y -CONFIG_SPIRAM_TYPE_ESPPSRAM64=y -CONFIG_SPIRAM_SIZE=8388608 -CONFIG_SPIRAM_SPEED_80M=y +# +# Component config +# +# +# Hardware Settings +# +# +# Chip revision +# +# CONFIG_ESP32_REV_MIN_0 is not set +CONFIG_ESP32_REV_MIN_3=y +CONFIG_ESP32_REV_MIN=3 +CONFIG_ESP32_REV_MIN_FULL=300 +CONFIG_ESP_REV_MIN_FULL=300 +# end of Chip revision -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -CONFIG_SPIRAM_USE_MEMMAP=y -CONFIG_SPIRAM_MEMTEST=y +# end of Hardware Settings -# Hostname +# +# LWIP +# CONFIG_LWIP_LOCAL_HOSTNAME="M5StackTimerX" +# end of LWIP + +# end of Component config -# Camera -CONFIG_OV3660_SUPPORT=y -CONFIG_GC_SENSOR_SUBSAMPLE_MODE=y -CONFIG_CAMERA_CORE0=y -CONFIG_CAMERA_DMA_BUFFER_SIZE_MAX=32768 +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/maker_badge/board.c b/ports/espressif/boards/maker_badge/board.c index 19dba31c57d8..45a7be238051 100644 --- a/ports/espressif/boards/maker_badge/board.c +++ b/ports/espressif/boards/maker_badge/board.c @@ -37,16 +37,6 @@ #define DELAY 0x80 void board_init(void) { - // USB - common_hal_never_reset_pin(&pin_GPIO19); - common_hal_never_reset_pin(&pin_GPIO20); - - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ - } bool board_requests_safe_mode(void) { diff --git a/ports/espressif/boards/maker_badge/sdkconfig b/ports/espressif/boards/maker_badge/sdkconfig index 68689ed79eca..d62227df74f4 100644 --- a/ports/espressif/boards/maker_badge/sdkconfig +++ b/ports/espressif/boards/maker_badge/sdkconfig @@ -1,6 +1,15 @@ -CONFIG_ESP32S2_SPIRAM_SUPPORT=n - +# +# Espressif IoT Development Framework Configuration +# +# +# Component config +# +# # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="Maker_badge" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/makerfabs_tft7/mpconfigboard.mk b/ports/espressif/boards/makerfabs_tft7/mpconfigboard.mk index e6efc34ef73e..dbe7940c7ecb 100644 --- a/ports/espressif/boards/makerfabs_tft7/mpconfigboard.mk +++ b/ports/espressif/boards/makerfabs_tft7/mpconfigboard.mk @@ -9,4 +9,8 @@ CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 16MB +CIRCUITPY_ESP_PSRAM_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_MODE = opi +CIRCUITPY_ESP_PSRAM_FREQ = 80m + CIRCUITPY_DOTCLOCKFRAMEBUFFER = 1 diff --git a/ports/espressif/boards/makerfabs_tft7/pins.c b/ports/espressif/boards/makerfabs_tft7/pins.c index 1a170035c2ef..88738d3c99c2 100644 --- a/ports/espressif/boards/makerfabs_tft7/pins.c +++ b/ports/espressif/boards/makerfabs_tft7/pins.c @@ -38,7 +38,7 @@ STATIC const mp_rom_obj_tuple_t tft_b_pins = { } }; -STATIC const mp_rom_map_elem_t tft_table[] = { +STATIC const mp_rom_map_elem_t tft_pins_table[] = { { MP_ROM_QSTR(MP_QSTR_de), MP_ROM_PTR(&pin_GPIO40) }, { MP_ROM_QSTR(MP_QSTR_vsync), MP_ROM_PTR(&pin_GPIO41) }, { MP_ROM_QSTR(MP_QSTR_hsync), MP_ROM_PTR(&pin_GPIO39) }, @@ -47,7 +47,7 @@ STATIC const mp_rom_map_elem_t tft_table[] = { { MP_ROM_QSTR(MP_QSTR_green), MP_ROM_PTR(&tft_g_pins) }, { MP_ROM_QSTR(MP_QSTR_blue), MP_ROM_PTR(&tft_b_pins) }, }; -MP_DEFINE_CONST_DICT(tft_dict, tft_table); +MP_DEFINE_CONST_DICT(tft_pins_dict, tft_pins_table); STATIC const mp_rom_map_elem_t timings800_table[] = { { MP_ROM_QSTR(MP_QSTR_frequency), MP_ROM_INT(6500000) }, // nominal 16MHz, but display is unstable/tears at that frequency @@ -70,8 +70,8 @@ MP_DEFINE_CONST_DICT(timings800_dict, timings800_table); STATIC const mp_rom_map_elem_t board_module_globals_table[] = { CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS - { MP_ROM_QSTR(MP_QSTR_TFT), MP_ROM_PTR(&tft_dict) }, - { MP_ROM_QSTR(MP_QSTR_TIMINGS800), MP_ROM_PTR(&timings800_dict) }, + { MP_ROM_QSTR(MP_QSTR_TFT_PINS), MP_ROM_PTR(&tft_pins_dict) }, + { MP_ROM_QSTR(MP_QSTR_TFT_TIMINGS_800x480), MP_ROM_PTR(&timings800_dict) }, { MP_ROM_QSTR(MP_QSTR_BACKLIGHT), MP_ROM_PTR(&pin_GPIO10) }, { MP_ROM_QSTR(MP_QSTR_I2S_SCK), MP_ROM_PTR(&pin_GPIO20) }, diff --git a/ports/espressif/boards/makerfabs_tft7/sdkconfig b/ports/espressif/boards/makerfabs_tft7/sdkconfig index 2514dd506bcb..e05ead796029 100644 --- a/ports/espressif/boards/makerfabs_tft7/sdkconfig +++ b/ports/espressif/boards/makerfabs_tft7/sdkconfig @@ -1,41 +1,28 @@ -CONFIG_ESP32S3_SPIRAM_SUPPORT=y # -# SPI RAM config +# Espressif IoT Development Framework Configuration # -# CONFIG_SPIRAM_MODE_QUAD is not set -CONFIG_SPIRAM_MODE_OCT=y -CONFIG_SPIRAM_TYPE_AUTO=y -# end of SPI RAM config - -CONFIG_DEFAULT_PSRAM_CLK_IO=30 -# -# PSRAM Clock and CS IO for ESP32S3 # -CONFIG_DEFAULT_PSRAM_CS_IO=26 -# end of PSRAM Clock and CS IO for ESP32S3 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -CONFIG_SPIRAM_SPEED_80M=y -# CONFIG_SPIRAM_SPEED_40M is not set -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set -#CONFIG_SPIRAM_USE_MEMMAP=y -CONFIG_SPIRAM_USE_CAPS_ALLOC=y -# CONFIG_SPIRAM_USE_MALLOC is not set -CONFIG_SPIRAM_MEMTEST=y +# Component config # -# LWIP # -CONFIG_LWIP_LOCAL_HOSTNAME="matouch-tft" -# end of LWIP +# ESP System Settings # +CONFIG_ESP_CONSOLE_UART_CUSTOM=y # CONFIG_ESP_CONSOLE_NONE is not set -CONFIG_ESP_CONSOLE_UART_BAUDRATE=115200 +CONFIG_ESP_CONSOLE_UART=y CONFIG_ESP_CONSOLE_UART_CUSTOM_NUM_0=y -CONFIG_ESP_CONSOLE_UART_CUSTOM=y CONFIG_ESP_CONSOLE_UART_NUM=0 -CONFIG_ESP_CONSOLE_UART_RX_GPIO=44 CONFIG_ESP_CONSOLE_UART_TX_GPIO=43 -CONFIG_ESP_CONSOLE_UART=y +CONFIG_ESP_CONSOLE_UART_RX_GPIO=44 +CONFIG_ESP_CONSOLE_UART_BAUDRATE=115200 +# end of ESP System Settings + +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="matouch-tft" +# end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/microdev_micro_c3/board.c b/ports/espressif/boards/microdev_micro_c3/board.c index b155ed7a7bf0..f749ee60d2be 100644 --- a/ports/espressif/boards/microdev_micro_c3/board.c +++ b/ports/espressif/boards/microdev_micro_c3/board.c @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -#include "shared-bindings/microcontroller/Pin.h" #include "supervisor/board.h" -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO20); - common_hal_never_reset_pin(&pin_GPIO21); - #endif -} - // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/microdev_micro_c3/mpconfigboard.h b/ports/espressif/boards/microdev_micro_c3/mpconfigboard.h index 215351330643..0ed8ea8925a7 100644 --- a/ports/espressif/boards/microdev_micro_c3/mpconfigboard.h +++ b/ports/espressif/boards/microdev_micro_c3/mpconfigboard.h @@ -45,8 +45,5 @@ #define DEFAULT_UART_BUS_RX (&pin_GPIO20) #define DEFAULT_UART_BUS_TX (&pin_GPIO21) -// For REPL over built-in USB Serial -#define CIRCUITPY_ESP_USB_SERIAL_JTAG (1) - // For entering safe mode #define CIRCUITPY_BOOT_BUTTON (&pin_GPIO9) diff --git a/ports/espressif/boards/microdev_micro_c3/mpconfigboard.mk b/ports/espressif/boards/microdev_micro_c3/mpconfigboard.mk index 94c64a827360..dd3e1593860c 100644 --- a/ports/espressif/boards/microdev_micro_c3/mpconfigboard.mk +++ b/ports/espressif/boards/microdev_micro_c3/mpconfigboard.mk @@ -6,3 +6,7 @@ IDF_TARGET = esp32c3 CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_USB_SERIAL_JTAG = 1 + +CIRCUITPY_BLEIO = 0 diff --git a/ports/espressif/boards/microdev_micro_c3/sdkconfig b/ports/espressif/boards/microdev_micro_c3/sdkconfig index f6f038a77cb1..9b13279bd385 100644 --- a/ports/espressif/boards/microdev_micro_c3/sdkconfig +++ b/ports/espressif/boards/microdev_micro_c3/sdkconfig @@ -1,5 +1,15 @@ # +# Espressif IoT Development Framework Configuration +# +# +# Component config +# +# # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="MicroDev-microC3" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/microdev_micro_s2/board.c b/ports/espressif/boards/microdev_micro_s2/board.c index 65bb19acede8..f749ee60d2be 100644 --- a/ports/espressif/boards/microdev_micro_s2/board.c +++ b/ports/espressif/boards/microdev_micro_s2/board.c @@ -25,17 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -#include "components/driver/include/driver/gpio.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/microdev_micro_s2/mpconfigboard.mk b/ports/espressif/boards/microdev_micro_s2/mpconfigboard.mk index e5a7f05462c9..c090c69aac76 100644 --- a/ports/espressif/boards/microdev_micro_s2/mpconfigboard.mk +++ b/ports/espressif/boards/microdev_micro_s2/mpconfigboard.mk @@ -5,6 +5,10 @@ USB_MANUFACTURER = "MicroDev" IDF_TARGET = esp32s2 +CIRCUITPY_ESP_FLASH_SIZE = 16MB CIRCUITPY_ESP_FLASH_MODE = qio CIRCUITPY_ESP_FLASH_FREQ = 80m -CIRCUITPY_ESP_FLASH_SIZE = 16MB + +CIRCUITPY_ESP_PSRAM_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 80m diff --git a/ports/espressif/boards/microdev_micro_s2/sdkconfig b/ports/espressif/boards/microdev_micro_s2/sdkconfig index 4b617fee715c..f6158eac3ecc 100644 --- a/ports/espressif/boards/microdev_micro_s2/sdkconfig +++ b/ports/espressif/boards/microdev_micro_s2/sdkconfig @@ -1,37 +1,15 @@ -CONFIG_ESP32S2_SPIRAM_SUPPORT=y # -# SPI RAM config +# Espressif IoT Development Framework Configuration # -# CONFIG_SPIRAM_TYPE_AUTO is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM16 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -CONFIG_SPIRAM_TYPE_ESPPSRAM64=y -CONFIG_SPIRAM_SIZE=8388608 -# end of SPI RAM config - -CONFIG_DEFAULT_PSRAM_CLK_IO=30 # -# PSRAM clock and cs IO for ESP32S2 +# Component config # -CONFIG_DEFAULT_PSRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S2 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -CONFIG_SPIRAM_SPEED_80M=y -# CONFIG_SPIRAM_SPEED_40M is not set -# CONFIG_SPIRAM_SPEED_26M is not set -# CONFIG_SPIRAM_SPEED_20M is not set -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set -CONFIG_SPIRAM_USE_MEMMAP=y -# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set -# CONFIG_SPIRAM_USE_MALLOC is not set -CONFIG_SPIRAM_MEMTEST=y -# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="MicroDev-microS2" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/mixgo_ce_serial/board.c b/ports/espressif/boards/mixgo_ce_serial/board.c index fc592ce4c4a1..ffc208e46ea2 100644 --- a/ports/espressif/boards/mixgo_ce_serial/board.c +++ b/ports/espressif/boards/mixgo_ce_serial/board.c @@ -34,12 +34,6 @@ #include "supervisor/filesystem.h" void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ - mp_import_stat_t stat_b = mp_import_stat("boot.py"); if (stat_b != MP_IMPORT_STAT_FILE) { FATFS *fatfs = filesystem_circuitpy(); diff --git a/ports/espressif/boards/mixgo_ce_serial/sdkconfig b/ports/espressif/boards/mixgo_ce_serial/sdkconfig index 5b9c86dcc346..e69de29bb2d1 100644 --- a/ports/espressif/boards/mixgo_ce_serial/sdkconfig +++ b/ports/espressif/boards/mixgo_ce_serial/sdkconfig @@ -1,6 +0,0 @@ -# CONFIG_ESP32S2_SPIRAM_SUPPORT is not set -# -# LWIP -# -CONFIG_LWIP_LOCAL_HOSTNAME="espressif" -# end of LWIP diff --git a/ports/espressif/boards/mixgo_ce_udisk/board.c b/ports/espressif/boards/mixgo_ce_udisk/board.c index b3c8cb41914e..164430c88c92 100644 --- a/ports/espressif/boards/mixgo_ce_udisk/board.c +++ b/ports/espressif/boards/mixgo_ce_udisk/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/mixgo_ce_udisk/sdkconfig b/ports/espressif/boards/mixgo_ce_udisk/sdkconfig index 5b9c86dcc346..e69de29bb2d1 100644 --- a/ports/espressif/boards/mixgo_ce_udisk/sdkconfig +++ b/ports/espressif/boards/mixgo_ce_udisk/sdkconfig @@ -1,6 +0,0 @@ -# CONFIG_ESP32S2_SPIRAM_SUPPORT is not set -# -# LWIP -# -CONFIG_LWIP_LOCAL_HOSTNAME="espressif" -# end of LWIP diff --git a/ports/espressif/boards/morpheans_morphesp-240/board.c b/ports/espressif/boards/morpheans_morphesp-240/board.c index 949190216179..b4c0db304a26 100644 --- a/ports/espressif/boards/morpheans_morphesp-240/board.c +++ b/ports/espressif/boards/morpheans_morphesp-240/board.c @@ -139,12 +139,6 @@ uint8_t display_init_sequence[] = { void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO6); - common_hal_never_reset_pin(&pin_GPIO7); - #endif /* DEBUG */ - // Display displayio_fourwire_obj_t *bus = &allocate_display_bus()->fourwire_bus; diff --git a/ports/espressif/boards/morpheans_morphesp-240/sdkconfig b/ports/espressif/boards/morpheans_morphesp-240/sdkconfig index 6de15d155684..b0a838eacc8b 100644 --- a/ports/espressif/boards/morpheans_morphesp-240/sdkconfig +++ b/ports/espressif/boards/morpheans_morphesp-240/sdkconfig @@ -1,6 +1,15 @@ -# CONFIG_ESP32S2_SPIRAM_SUPPORT is not set +# +# Espressif IoT Development Framework Configuration +# +# +# Component config +# # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="MORPHESP-240" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/muselab_nanoesp32_s2_wroom/board.c b/ports/espressif/boards/muselab_nanoesp32_s2_wroom/board.c index b3c8cb41914e..164430c88c92 100644 --- a/ports/espressif/boards/muselab_nanoesp32_s2_wroom/board.c +++ b/ports/espressif/boards/muselab_nanoesp32_s2_wroom/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/muselab_nanoesp32_s2_wroom/sdkconfig b/ports/espressif/boards/muselab_nanoesp32_s2_wroom/sdkconfig index 5b9c86dcc346..e69de29bb2d1 100644 --- a/ports/espressif/boards/muselab_nanoesp32_s2_wroom/sdkconfig +++ b/ports/espressif/boards/muselab_nanoesp32_s2_wroom/sdkconfig @@ -1,6 +0,0 @@ -# CONFIG_ESP32S2_SPIRAM_SUPPORT is not set -# -# LWIP -# -CONFIG_LWIP_LOCAL_HOSTNAME="espressif" -# end of LWIP diff --git a/ports/espressif/boards/muselab_nanoesp32_s2_wrover/board.c b/ports/espressif/boards/muselab_nanoesp32_s2_wrover/board.c index b3c8cb41914e..164430c88c92 100644 --- a/ports/espressif/boards/muselab_nanoesp32_s2_wrover/board.c +++ b/ports/espressif/boards/muselab_nanoesp32_s2_wrover/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.mk b/ports/espressif/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.mk index f008241e1999..1707d3270671 100644 --- a/ports/espressif/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.mk +++ b/ports/espressif/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.mk @@ -5,6 +5,10 @@ USB_MANUFACTURER = "Muselab" IDF_TARGET = esp32s2 +CIRCUITPY_ESP_FLASH_SIZE = 4MB CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 40m -CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m diff --git a/ports/espressif/boards/muselab_nanoesp32_s2_wrover/sdkconfig b/ports/espressif/boards/muselab_nanoesp32_s2_wrover/sdkconfig index 9b513fcf5a1d..e69de29bb2d1 100644 --- a/ports/espressif/boards/muselab_nanoesp32_s2_wrover/sdkconfig +++ b/ports/espressif/boards/muselab_nanoesp32_s2_wrover/sdkconfig @@ -1,27 +0,0 @@ -CONFIG_ESP32S2_SPIRAM_SUPPORT=y - -# -# SPI RAM config -# -CONFIG_SPIRAM_TYPE_ESPPSRAM16=y -CONFIG_SPIRAM_SIZE=2097152 -# end of SPI RAM config - -# -# PSRAM clock and cs IO for ESP32S2 -# -CONFIG_DEFAULT_PSRAM_CLK_IO=30 -CONFIG_DEFAULT_PSRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S2 - -CONFIG_SPIRAM_SPEED_40M=y -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -CONFIG_SPIRAM_USE_MEMMAP=y -CONFIG_SPIRAM_MEMTEST=y - -# -# LWIP -# -CONFIG_LWIP_LOCAL_HOSTNAME="espressif" -# end of LWIP diff --git a/ports/espressif/boards/odt_pixelwing_esp32_s2/mpconfigboard.mk b/ports/espressif/boards/odt_pixelwing_esp32_s2/mpconfigboard.mk index 44546fc09f8c..f0a39b8a20d7 100644 --- a/ports/espressif/boards/odt_pixelwing_esp32_s2/mpconfigboard.mk +++ b/ports/espressif/boards/odt_pixelwing_esp32_s2/mpconfigboard.mk @@ -5,6 +5,10 @@ USB_MANUFACTURER = "Oak Dev Tech" IDF_TARGET = esp32s2 +CIRCUITPY_ESP_FLASH_SIZE = 4MB CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 40m -CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m diff --git a/ports/espressif/boards/odt_pixelwing_esp32_s2/sdkconfig b/ports/espressif/boards/odt_pixelwing_esp32_s2/sdkconfig index 17c1995cd34b..3017a9532f61 100644 --- a/ports/espressif/boards/odt_pixelwing_esp32_s2/sdkconfig +++ b/ports/espressif/boards/odt_pixelwing_esp32_s2/sdkconfig @@ -1,37 +1,15 @@ -CONFIG_ESP32S2_SPIRAM_SUPPORT=y # -# SPI RAM config +# Espressif IoT Development Framework Configuration # -# CONFIG_SPIRAM_TYPE_AUTO is not set -CONFIG_SPIRAM_TYPE_ESPPSRAM16=y -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set -CONFIG_SPIRAM_SIZE=2097152 -# end of SPI RAM config - -CONFIG_DEFAULT_PSRAM_CLK_IO=30 # -# PSRAM clock and cs IO for ESP32S2 +# Component config # -CONFIG_DEFAULT_PSRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S2 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_80M is not set -CONFIG_SPIRAM_SPEED_40M=y -# CONFIG_SPIRAM_SPEED_26M is not set -# CONFIG_SPIRAM_SPEED_20M is not set -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set -CONFIG_SPIRAM_USE_MEMMAP=y -# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set -# CONFIG_SPIRAM_USE_MALLOC is not set -CONFIG_SPIRAM_MEMTEST=y -# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="PixelWing-ESP32S2" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/seeed_xiao_esp32c3/board.c b/ports/espressif/boards/seeed_xiao_esp32c3/board.c index 7bcdcdba25e3..164430c88c92 100644 --- a/ports/espressif/boards/seeed_xiao_esp32c3/board.c +++ b/ports/espressif/boards/seeed_xiao_esp32c3/board.c @@ -24,17 +24,6 @@ * THE SOFTWARE. */ -#include "shared-bindings/microcontroller/Pin.h" #include "supervisor/board.h" -#include "components/driver/include/driver/gpio.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO20); - common_hal_never_reset_pin(&pin_GPIO21); - #endif -} - // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/seeed_xiao_esp32c3/mpconfigboard.h b/ports/espressif/boards/seeed_xiao_esp32c3/mpconfigboard.h index 638be9d1975b..26fa6b7f8344 100644 --- a/ports/espressif/boards/seeed_xiao_esp32c3/mpconfigboard.h +++ b/ports/espressif/boards/seeed_xiao_esp32c3/mpconfigboard.h @@ -10,5 +10,3 @@ #define DEFAULT_UART_BUS_RX (&pin_GPIO20) #define DEFAULT_UART_BUS_TX (&pin_GPIO21) - -#define CIRCUITPY_ESP_USB_SERIAL_JTAG (1) diff --git a/ports/espressif/boards/seeed_xiao_esp32c3/mpconfigboard.mk b/ports/espressif/boards/seeed_xiao_esp32c3/mpconfigboard.mk index d7325cf44e1e..3e2c97dab900 100644 --- a/ports/espressif/boards/seeed_xiao_esp32c3/mpconfigboard.mk +++ b/ports/espressif/boards/seeed_xiao_esp32c3/mpconfigboard.mk @@ -6,3 +6,7 @@ IDF_TARGET = esp32c3 CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_USB_SERIAL_JTAG = 1 + +CIRCUITPY_BLEIO = 0 diff --git a/ports/espressif/boards/seeed_xiao_esp32c3/sdkconfig b/ports/espressif/boards/seeed_xiao_esp32c3/sdkconfig index b2c9bc0fe6e9..a593f1d17368 100644 --- a/ports/espressif/boards/seeed_xiao_esp32c3/sdkconfig +++ b/ports/espressif/boards/seeed_xiao_esp32c3/sdkconfig @@ -1,5 +1,15 @@ # +# Espressif IoT Development Framework Configuration +# +# +# Component config +# +# # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="seeed-xiao-esp32c3" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/smartbeedesigns_bee_data_logger/board.c b/ports/espressif/boards/smartbeedesigns_bee_data_logger/board.c index b3c8cb41914e..164430c88c92 100644 --- a/ports/espressif/boards/smartbeedesigns_bee_data_logger/board.c +++ b/ports/espressif/boards/smartbeedesigns_bee_data_logger/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/smartbeedesigns_bee_data_logger/sdkconfig b/ports/espressif/boards/smartbeedesigns_bee_data_logger/sdkconfig index 4008263f8d90..deb1b88d7cac 100644 --- a/ports/espressif/boards/smartbeedesigns_bee_data_logger/sdkconfig +++ b/ports/espressif/boards/smartbeedesigns_bee_data_logger/sdkconfig @@ -1,6 +1,15 @@ -# CONFIG_ESP32S3_SPIRAM_SUPPORT is not set +# +# Espressif IoT Development Framework Configuration +# +# +# Component config +# # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="smartbeedesigns_bee_data_logger" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/smartbeedesigns_bee_motion_s3/board.c b/ports/espressif/boards/smartbeedesigns_bee_motion_s3/board.c index b3c8cb41914e..164430c88c92 100644 --- a/ports/espressif/boards/smartbeedesigns_bee_motion_s3/board.c +++ b/ports/espressif/boards/smartbeedesigns_bee_motion_s3/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/smartbeedesigns_bee_motion_s3/sdkconfig b/ports/espressif/boards/smartbeedesigns_bee_motion_s3/sdkconfig index 84cf45aa834e..fe95b60d4c81 100644 --- a/ports/espressif/boards/smartbeedesigns_bee_motion_s3/sdkconfig +++ b/ports/espressif/boards/smartbeedesigns_bee_motion_s3/sdkconfig @@ -1,6 +1,15 @@ -# CONFIG_ESP32S3_SPIRAM_SUPPORT is not set +# +# Espressif IoT Development Framework Configuration +# +# +# Component config +# # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="smartbeedesigns_bee_motion_s3" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/smartbeedesigns_bee_s3/board.c b/ports/espressif/boards/smartbeedesigns_bee_s3/board.c index b3c8cb41914e..164430c88c92 100644 --- a/ports/espressif/boards/smartbeedesigns_bee_s3/board.c +++ b/ports/espressif/boards/smartbeedesigns_bee_s3/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/smartbeedesigns_bee_s3/sdkconfig b/ports/espressif/boards/smartbeedesigns_bee_s3/sdkconfig index b7bb11fdd5d2..2c7a057567fa 100644 --- a/ports/espressif/boards/smartbeedesigns_bee_s3/sdkconfig +++ b/ports/espressif/boards/smartbeedesigns_bee_s3/sdkconfig @@ -1,6 +1,15 @@ -# CONFIG_ESP32S3_SPIRAM_SUPPORT is not set +# +# Espressif IoT Development Framework Configuration +# +# +# Component config +# # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="smartbeedesigns_bee_s3" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/targett_module_clip_wroom/board.c b/ports/espressif/boards/targett_module_clip_wroom/board.c index ce5a77092003..3168e9a0aa95 100644 --- a/ports/espressif/boards/targett_module_clip_wroom/board.c +++ b/ports/espressif/boards/targett_module_clip_wroom/board.c @@ -29,12 +29,6 @@ #include "shared-bindings/microcontroller/Pin.h" void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ - // Crystal common_hal_never_reset_pin(&pin_GPIO15); common_hal_never_reset_pin(&pin_GPIO16); diff --git a/ports/espressif/boards/targett_module_clip_wroom/mpconfigboard.mk b/ports/espressif/boards/targett_module_clip_wroom/mpconfigboard.mk index e13c654aa661..2422ee60ef02 100644 --- a/ports/espressif/boards/targett_module_clip_wroom/mpconfigboard.mk +++ b/ports/espressif/boards/targett_module_clip_wroom/mpconfigboard.mk @@ -8,4 +8,5 @@ IDF_TARGET = esp32s2 CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 40m CIRCUITPY_ESP_FLASH_SIZE = 4MB + CIRCUITPY_ESPCAMERA = 0 diff --git a/ports/espressif/boards/targett_module_clip_wroom/sdkconfig b/ports/espressif/boards/targett_module_clip_wroom/sdkconfig index 5b9c86dcc346..e69de29bb2d1 100644 --- a/ports/espressif/boards/targett_module_clip_wroom/sdkconfig +++ b/ports/espressif/boards/targett_module_clip_wroom/sdkconfig @@ -1,6 +0,0 @@ -# CONFIG_ESP32S2_SPIRAM_SUPPORT is not set -# -# LWIP -# -CONFIG_LWIP_LOCAL_HOSTNAME="espressif" -# end of LWIP diff --git a/ports/espressif/boards/targett_module_clip_wrover/board.c b/ports/espressif/boards/targett_module_clip_wrover/board.c index ce5a77092003..3168e9a0aa95 100644 --- a/ports/espressif/boards/targett_module_clip_wrover/board.c +++ b/ports/espressif/boards/targett_module_clip_wrover/board.c @@ -29,12 +29,6 @@ #include "shared-bindings/microcontroller/Pin.h" void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ - // Crystal common_hal_never_reset_pin(&pin_GPIO15); common_hal_never_reset_pin(&pin_GPIO16); diff --git a/ports/espressif/boards/targett_module_clip_wrover/mpconfigboard.mk b/ports/espressif/boards/targett_module_clip_wrover/mpconfigboard.mk index 6ef620ac50fa..a2e862fa02ac 100644 --- a/ports/espressif/boards/targett_module_clip_wrover/mpconfigboard.mk +++ b/ports/espressif/boards/targett_module_clip_wrover/mpconfigboard.mk @@ -5,6 +5,10 @@ USB_MANUFACTURER = "Targett" IDF_TARGET = esp32s2 +CIRCUITPY_ESP_FLASH_SIZE = 4MB CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 40m -CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m diff --git a/ports/espressif/boards/targett_module_clip_wrover/sdkconfig b/ports/espressif/boards/targett_module_clip_wrover/sdkconfig index f19afafa3d23..e69de29bb2d1 100644 --- a/ports/espressif/boards/targett_module_clip_wrover/sdkconfig +++ b/ports/espressif/boards/targett_module_clip_wrover/sdkconfig @@ -1,37 +0,0 @@ -CONFIG_ESP32S2_SPIRAM_SUPPORT=y -# -# SPI RAM config -# -# CONFIG_SPIRAM_TYPE_AUTO is not set -CONFIG_SPIRAM_TYPE_ESPPSRAM16=y -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set -CONFIG_SPIRAM_SIZE=2097152 -# end of SPI RAM config - -CONFIG_DEFAULT_PSRAM_CLK_IO=30 -# -# PSRAM clock and cs IO for ESP32S2 -# -CONFIG_DEFAULT_PSRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S2 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_80M is not set -CONFIG_SPIRAM_SPEED_40M=y -# CONFIG_SPIRAM_SPEED_26M is not set -# CONFIG_SPIRAM_SPEED_20M is not set -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set -CONFIG_SPIRAM_USE_MEMMAP=y -# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set -# CONFIG_SPIRAM_USE_MALLOC is not set -CONFIG_SPIRAM_MEMTEST=y -# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# -# LWIP -# -CONFIG_LWIP_LOCAL_HOSTNAME="espressif" -# end of LWIP diff --git a/ports/espressif/boards/unexpectedmaker_feathers2/board.c b/ports/espressif/boards/unexpectedmaker_feathers2/board.c index b3c8cb41914e..164430c88c92 100644 --- a/ports/espressif/boards/unexpectedmaker_feathers2/board.c +++ b/ports/espressif/boards/unexpectedmaker_feathers2/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/unexpectedmaker_feathers2/mpconfigboard.mk b/ports/espressif/boards/unexpectedmaker_feathers2/mpconfigboard.mk index 1d48ea10768a..fda8f7bb22e2 100644 --- a/ports/espressif/boards/unexpectedmaker_feathers2/mpconfigboard.mk +++ b/ports/espressif/boards/unexpectedmaker_feathers2/mpconfigboard.mk @@ -5,9 +5,13 @@ USB_MANUFACTURER = "UnexpectedMaker" IDF_TARGET = esp32s2 +CIRCUITPY_ESP_FLASH_SIZE = 16MB CIRCUITPY_ESP_FLASH_MODE = qio CIRCUITPY_ESP_FLASH_FREQ = 40m -CIRCUITPY_ESP_FLASH_SIZE = 16MB + +CIRCUITPY_ESP_PSRAM_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m CIRCUITPY_BITBANG_APA102 = 1 diff --git a/ports/espressif/boards/unexpectedmaker_feathers2/sdkconfig b/ports/espressif/boards/unexpectedmaker_feathers2/sdkconfig index 8d785a6004ce..a1e5e03b7692 100644 --- a/ports/espressif/boards/unexpectedmaker_feathers2/sdkconfig +++ b/ports/espressif/boards/unexpectedmaker_feathers2/sdkconfig @@ -1,37 +1,15 @@ -CONFIG_ESP32S2_SPIRAM_SUPPORT=y # -# SPI RAM config +# Espressif IoT Development Framework Configuration # -# CONFIG_SPIRAM_TYPE_AUTO is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM16 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -CONFIG_SPIRAM_TYPE_ESPPSRAM64=y -CONFIG_SPIRAM_SIZE=8388608 -# end of SPI RAM config - -CONFIG_DEFAULT_PSRAM_CLK_IO=30 # -# PSRAM clock and cs IO for ESP32S2 +# Component config # -CONFIG_DEFAULT_PSRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S2 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_80M is not set -CONFIG_SPIRAM_SPEED_40M=y -# CONFIG_SPIRAM_SPEED_26M is not set -# CONFIG_SPIRAM_SPEED_20M is not set -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set -CONFIG_SPIRAM_USE_MEMMAP=y -# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set -# CONFIG_SPIRAM_USE_MALLOC is not set -CONFIG_SPIRAM_MEMTEST=y -# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="UMFeatherS2" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/unexpectedmaker_feathers2_neo/board.c b/ports/espressif/boards/unexpectedmaker_feathers2_neo/board.c index b3c8cb41914e..164430c88c92 100644 --- a/ports/espressif/boards/unexpectedmaker_feathers2_neo/board.c +++ b/ports/espressif/boards/unexpectedmaker_feathers2_neo/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/unexpectedmaker_feathers2_neo/mpconfigboard.mk b/ports/espressif/boards/unexpectedmaker_feathers2_neo/mpconfigboard.mk index 2b78e51635e1..4f3ea4afac4d 100644 --- a/ports/espressif/boards/unexpectedmaker_feathers2_neo/mpconfigboard.mk +++ b/ports/espressif/boards/unexpectedmaker_feathers2_neo/mpconfigboard.mk @@ -5,9 +5,13 @@ USB_MANUFACTURER = "UnexpectedMaker" IDF_TARGET = esp32s2 +CIRCUITPY_ESP_FLASH_SIZE = 4MB CIRCUITPY_ESP_FLASH_MODE = qio CIRCUITPY_ESP_FLASH_FREQ = 80m -CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m CIRCUITPY_BITBANG_NEOPIXEL = 1 diff --git a/ports/espressif/boards/unexpectedmaker_feathers2_neo/sdkconfig b/ports/espressif/boards/unexpectedmaker_feathers2_neo/sdkconfig index 4a5990b91d6d..cc781c9a3dda 100644 --- a/ports/espressif/boards/unexpectedmaker_feathers2_neo/sdkconfig +++ b/ports/espressif/boards/unexpectedmaker_feathers2_neo/sdkconfig @@ -1,37 +1,15 @@ -CONFIG_ESP32S2_SPIRAM_SUPPORT=y # -# SPI RAM config +# Espressif IoT Development Framework Configuration # -# CONFIG_SPIRAM_TYPE_AUTO is not set -CONFIG_SPIRAM_TYPE_ESPPSRAM16=y -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set -CONFIG_SPIRAM_SIZE=2097152 -# end of SPI RAM config - -CONFIG_DEFAULT_PSRAM_CLK_IO=30 # -# PSRAM clock and cs IO for ESP32S2 +# Component config # -CONFIG_DEFAULT_PSRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S2 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_80M is not set -CONFIG_SPIRAM_SPEED_40M=y -# CONFIG_SPIRAM_SPEED_26M is not set -# CONFIG_SPIRAM_SPEED_20M is not set -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set -CONFIG_SPIRAM_USE_MEMMAP=y -# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set -# CONFIG_SPIRAM_USE_MALLOC is not set -CONFIG_SPIRAM_MEMTEST=y -# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="UMFeatherS2Neo" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/unexpectedmaker_feathers2_prerelease/board.c b/ports/espressif/boards/unexpectedmaker_feathers2_prerelease/board.c index b3c8cb41914e..164430c88c92 100644 --- a/ports/espressif/boards/unexpectedmaker_feathers2_prerelease/board.c +++ b/ports/espressif/boards/unexpectedmaker_feathers2_prerelease/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.mk b/ports/espressif/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.mk index 1d48ea10768a..fda8f7bb22e2 100644 --- a/ports/espressif/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.mk +++ b/ports/espressif/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.mk @@ -5,9 +5,13 @@ USB_MANUFACTURER = "UnexpectedMaker" IDF_TARGET = esp32s2 +CIRCUITPY_ESP_FLASH_SIZE = 16MB CIRCUITPY_ESP_FLASH_MODE = qio CIRCUITPY_ESP_FLASH_FREQ = 40m -CIRCUITPY_ESP_FLASH_SIZE = 16MB + +CIRCUITPY_ESP_PSRAM_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m CIRCUITPY_BITBANG_APA102 = 1 diff --git a/ports/espressif/boards/unexpectedmaker_feathers2_prerelease/sdkconfig b/ports/espressif/boards/unexpectedmaker_feathers2_prerelease/sdkconfig index 8d785a6004ce..a1e5e03b7692 100644 --- a/ports/espressif/boards/unexpectedmaker_feathers2_prerelease/sdkconfig +++ b/ports/espressif/boards/unexpectedmaker_feathers2_prerelease/sdkconfig @@ -1,37 +1,15 @@ -CONFIG_ESP32S2_SPIRAM_SUPPORT=y # -# SPI RAM config +# Espressif IoT Development Framework Configuration # -# CONFIG_SPIRAM_TYPE_AUTO is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM16 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -CONFIG_SPIRAM_TYPE_ESPPSRAM64=y -CONFIG_SPIRAM_SIZE=8388608 -# end of SPI RAM config - -CONFIG_DEFAULT_PSRAM_CLK_IO=30 # -# PSRAM clock and cs IO for ESP32S2 +# Component config # -CONFIG_DEFAULT_PSRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S2 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_80M is not set -CONFIG_SPIRAM_SPEED_40M=y -# CONFIG_SPIRAM_SPEED_26M is not set -# CONFIG_SPIRAM_SPEED_20M is not set -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set -CONFIG_SPIRAM_USE_MEMMAP=y -# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set -# CONFIG_SPIRAM_USE_MALLOC is not set -CONFIG_SPIRAM_MEMTEST=y -# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="UMFeatherS2" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/unexpectedmaker_feathers3/board.c b/ports/espressif/boards/unexpectedmaker_feathers3/board.c index b3c8cb41914e..164430c88c92 100644 --- a/ports/espressif/boards/unexpectedmaker_feathers3/board.c +++ b/ports/espressif/boards/unexpectedmaker_feathers3/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/unexpectedmaker_feathers3/mpconfigboard.mk b/ports/espressif/boards/unexpectedmaker_feathers3/mpconfigboard.mk index 666185b6fd71..887ca5a122ec 100644 --- a/ports/espressif/boards/unexpectedmaker_feathers3/mpconfigboard.mk +++ b/ports/espressif/boards/unexpectedmaker_feathers3/mpconfigboard.mk @@ -5,9 +5,13 @@ USB_MANUFACTURER = "UnexpectedMaker" IDF_TARGET = esp32s3 +CIRCUITPY_ESP_FLASH_SIZE = 16MB CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 80m -CIRCUITPY_ESP_FLASH_SIZE = 16MB + +CIRCUITPY_ESP_PSRAM_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 80m #CIRCUITPY_BITBANG_NEOPIXEL = 1 diff --git a/ports/espressif/boards/unexpectedmaker_feathers3/sdkconfig b/ports/espressif/boards/unexpectedmaker_feathers3/sdkconfig index ec989c08fc70..3ccd3175c69d 100644 --- a/ports/espressif/boards/unexpectedmaker_feathers3/sdkconfig +++ b/ports/espressif/boards/unexpectedmaker_feathers3/sdkconfig @@ -1,39 +1,15 @@ -CONFIG_ESP32S3_SPIRAM_SUPPORT=y - # -# SPI RAM config +# Espressif IoT Development Framework Configuration # -# CONFIG_SPIRAM_TYPE_AUTO is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM16 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -CONFIG_SPIRAM_TYPE_ESPPSRAM64=y -CONFIG_SPIRAM_SIZE=8388608 - # -# PSRAM clock and cs IO for ESP32S2 +# Component config # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 -CONFIG_DEFAULT_PSRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S2 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -CONFIG_SPIRAM_SPEED_80M=y -# CONFIG_SPIRAM_SPEED_40M is not set -# CONFIG_SPIRAM_SPEED_26M is not set -# CONFIG_SPIRAM_SPEED_20M is not set -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set -CONFIG_SPIRAM_USE_MEMMAP=y -# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set -# CONFIG_SPIRAM_USE_MALLOC is not set -# CONFIG_SPIRAM_MEMTEST=y -# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# end of SPI RAM config - # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="UMFeatherS3" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/unexpectedmaker_nanos3/board.c b/ports/espressif/boards/unexpectedmaker_nanos3/board.c index 8fd94f6c8bc3..164430c88c92 100644 --- a/ports/espressif/boards/unexpectedmaker_nanos3/board.c +++ b/ports/espressif/boards/unexpectedmaker_nanos3/board.c @@ -25,13 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ -} +// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/unexpectedmaker_nanos3/mpconfigboard.mk b/ports/espressif/boards/unexpectedmaker_nanos3/mpconfigboard.mk index c61654bfc391..9fd196d4bfee 100644 --- a/ports/espressif/boards/unexpectedmaker_nanos3/mpconfigboard.mk +++ b/ports/espressif/boards/unexpectedmaker_nanos3/mpconfigboard.mk @@ -9,6 +9,10 @@ CIRCUITPY_ESP_FLASH_MODE = qio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 80m + # CIRCUITPY_BITBANG_NEOPIXEL = 1 # Include these Python libraries in firmware. diff --git a/ports/espressif/boards/unexpectedmaker_nanos3/sdkconfig b/ports/espressif/boards/unexpectedmaker_nanos3/sdkconfig index c1dee837177d..815f002d3829 100644 --- a/ports/espressif/boards/unexpectedmaker_nanos3/sdkconfig +++ b/ports/espressif/boards/unexpectedmaker_nanos3/sdkconfig @@ -1,39 +1,15 @@ -CONFIG_ESP32S3_SPIRAM_SUPPORT=y - # -# SPI RAM config +# Espressif IoT Development Framework Configuration # -# CONFIG_SPIRAM_TYPE_AUTO is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM16 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -CONFIG_SPIRAM_TYPE_ESPPSRAM64=y -CONFIG_SPIRAM_SIZE=8388608 - # -# PSRAM clock and cs IO for ESP32S2 +# Component config # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 -CONFIG_DEFAULT_PSRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S2 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -CONFIG_SPIRAM_SPEED_80M=y -# CONFIG_SPIRAM_SPEED_40M is not set -# CONFIG_SPIRAM_SPEED_26M is not set -# CONFIG_SPIRAM_SPEED_20M is not set -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set -CONFIG_SPIRAM_USE_MEMMAP=y -# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set -# CONFIG_SPIRAM_USE_MALLOC is not set -# CONFIG_SPIRAM_MEMTEST=y -# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# end of SPI RAM config - # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="UMNanoS3" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/unexpectedmaker_pros3/board.c b/ports/espressif/boards/unexpectedmaker_pros3/board.c index 8fd94f6c8bc3..164430c88c92 100644 --- a/ports/espressif/boards/unexpectedmaker_pros3/board.c +++ b/ports/espressif/boards/unexpectedmaker_pros3/board.c @@ -25,13 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ -} +// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/unexpectedmaker_pros3/mpconfigboard.mk b/ports/espressif/boards/unexpectedmaker_pros3/mpconfigboard.mk index bf6e7a51059e..be2a711c6cb3 100644 --- a/ports/espressif/boards/unexpectedmaker_pros3/mpconfigboard.mk +++ b/ports/espressif/boards/unexpectedmaker_pros3/mpconfigboard.mk @@ -5,9 +5,13 @@ USB_MANUFACTURER = "UnexpectedMaker" IDF_TARGET = esp32s3 +CIRCUITPY_ESP_FLASH_SIZE = 16MB CIRCUITPY_ESP_FLASH_MODE = qio CIRCUITPY_ESP_FLASH_FREQ = 80m -CIRCUITPY_ESP_FLASH_SIZE = 16MB + +CIRCUITPY_ESP_PSRAM_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 80m # CIRCUITPY_BITBANG_NEOPIXEL = 1 diff --git a/ports/espressif/boards/unexpectedmaker_pros3/sdkconfig b/ports/espressif/boards/unexpectedmaker_pros3/sdkconfig index eeb103fb7d5f..21b91a2199af 100644 --- a/ports/espressif/boards/unexpectedmaker_pros3/sdkconfig +++ b/ports/espressif/boards/unexpectedmaker_pros3/sdkconfig @@ -1,39 +1,15 @@ -CONFIG_ESP32S3_SPIRAM_SUPPORT=y - # -# SPI RAM config +# Espressif IoT Development Framework Configuration # -# CONFIG_SPIRAM_TYPE_AUTO is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM16 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -CONFIG_SPIRAM_TYPE_ESPPSRAM64=y -CONFIG_SPIRAM_SIZE=8388608 - # -# PSRAM clock and cs IO for ESP32S2 +# Component config # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 -CONFIG_DEFAULT_PSRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S2 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -CONFIG_SPIRAM_SPEED_80M=y -# CONFIG_SPIRAM_SPEED_40M is not set -# CONFIG_SPIRAM_SPEED_26M is not set -# CONFIG_SPIRAM_SPEED_20M is not set -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set -CONFIG_SPIRAM_USE_MEMMAP=y -# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set -# CONFIG_SPIRAM_USE_MALLOC is not set -# CONFIG_SPIRAM_MEMTEST=y -# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# end of SPI RAM config - # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="UMProS3" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/unexpectedmaker_tinypico/board.c b/ports/espressif/boards/unexpectedmaker_tinypico/board.c index e59af9528dcc..530c27f776de 100644 --- a/ports/espressif/boards/unexpectedmaker_tinypico/board.c +++ b/ports/espressif/boards/unexpectedmaker_tinypico/board.c @@ -27,7 +27,7 @@ #include "supervisor/board.h" #include "mpconfigboard.h" #include "shared-bindings/microcontroller/Pin.h" -#include "components/driver/include/driver/gpio.h" +#include "components/driver/gpio/include/driver/gpio.h" #include "components/hal/include/hal/gpio_hal.h" #include "common-hal/microcontroller/Pin.h" diff --git a/ports/espressif/boards/unexpectedmaker_tinypico/mpconfigboard.mk b/ports/espressif/boards/unexpectedmaker_tinypico/mpconfigboard.mk index e26981465ba9..d600ce4d307e 100644 --- a/ports/espressif/boards/unexpectedmaker_tinypico/mpconfigboard.mk +++ b/ports/espressif/boards/unexpectedmaker_tinypico/mpconfigboard.mk @@ -3,6 +3,10 @@ CIRCUITPY_CREATION_ID = 0x00000001 IDF_TARGET = esp32 +CIRCUITPY_ESP_FLASH_SIZE = 4MB CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 80m -CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_PSRAM_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 80m diff --git a/ports/espressif/boards/unexpectedmaker_tinypico/sdkconfig b/ports/espressif/boards/unexpectedmaker_tinypico/sdkconfig index 2d4d0d4ecced..e69de29bb2d1 100644 --- a/ports/espressif/boards/unexpectedmaker_tinypico/sdkconfig +++ b/ports/espressif/boards/unexpectedmaker_tinypico/sdkconfig @@ -1,20 +0,0 @@ -# -# SPI RAM config -# -# CONFIG_SPIRAM_TYPE_AUTO is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM16=y -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -CONFIG_SPIRAM_TYPE_ESPPSRAM64=y -# CONFIG_SPIRAM_SIZE is not set -CONFIG_ESP32_SPIRAM_SUPPORT=y -CONFIG_SPIRAM_SPEED_80M=y -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -CONFIG_SPIRAM_IGNORE_NOTFOUND=y -CONFIG_SPIRAM_USE_MEMMAP=y -# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set -# CONFIG_SPIRAM_USE_MALLOC is not set -CONFIG_SPIRAM_MEMTEST=y -# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# CONFIG_SPIRAM_ALLOW_NOINIT_SEG_EXTERNAL_MEMORY is not set -CONFIG_SPIRAM_CACHE_WORKAROUND=y diff --git a/ports/espressif/boards/unexpectedmaker_tinypico_nano/board.c b/ports/espressif/boards/unexpectedmaker_tinypico_nano/board.c index d66ab9e5f16d..551058611ea1 100644 --- a/ports/espressif/boards/unexpectedmaker_tinypico_nano/board.c +++ b/ports/espressif/boards/unexpectedmaker_tinypico_nano/board.c @@ -27,7 +27,7 @@ #include "supervisor/board.h" #include "mpconfigboard.h" #include "shared-bindings/microcontroller/Pin.h" -#include "components/driver/include/driver/gpio.h" +#include "components/driver/gpio/include/driver/gpio.h" #include "components/hal/include/hal/gpio_hal.h" #include "common-hal/microcontroller/Pin.h" diff --git a/ports/espressif/boards/unexpectedmaker_tinypico_nano/mpconfigboard.mk b/ports/espressif/boards/unexpectedmaker_tinypico_nano/mpconfigboard.mk index f3d9ea4c924b..5f837932136d 100644 --- a/ports/espressif/boards/unexpectedmaker_tinypico_nano/mpconfigboard.mk +++ b/ports/espressif/boards/unexpectedmaker_tinypico_nano/mpconfigboard.mk @@ -3,6 +3,10 @@ CIRCUITPY_CREATION_ID = 0x00000002 IDF_TARGET = esp32 +CIRCUITPY_ESP_FLASH_SIZE = 4MB CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 80m -CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_PSRAM_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 80m diff --git a/ports/espressif/boards/unexpectedmaker_tinypico_nano/sdkconfig b/ports/espressif/boards/unexpectedmaker_tinypico_nano/sdkconfig index 2d4d0d4ecced..e69de29bb2d1 100644 --- a/ports/espressif/boards/unexpectedmaker_tinypico_nano/sdkconfig +++ b/ports/espressif/boards/unexpectedmaker_tinypico_nano/sdkconfig @@ -1,20 +0,0 @@ -# -# SPI RAM config -# -# CONFIG_SPIRAM_TYPE_AUTO is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM16=y -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -CONFIG_SPIRAM_TYPE_ESPPSRAM64=y -# CONFIG_SPIRAM_SIZE is not set -CONFIG_ESP32_SPIRAM_SUPPORT=y -CONFIG_SPIRAM_SPEED_80M=y -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -CONFIG_SPIRAM_IGNORE_NOTFOUND=y -CONFIG_SPIRAM_USE_MEMMAP=y -# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set -# CONFIG_SPIRAM_USE_MALLOC is not set -CONFIG_SPIRAM_MEMTEST=y -# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# CONFIG_SPIRAM_ALLOW_NOINIT_SEG_EXTERNAL_MEMORY is not set -CONFIG_SPIRAM_CACHE_WORKAROUND=y diff --git a/ports/espressif/boards/unexpectedmaker_tinys2/board.c b/ports/espressif/boards/unexpectedmaker_tinys2/board.c index b3c8cb41914e..164430c88c92 100644 --- a/ports/espressif/boards/unexpectedmaker_tinys2/board.c +++ b/ports/espressif/boards/unexpectedmaker_tinys2/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/unexpectedmaker_tinys2/mpconfigboard.mk b/ports/espressif/boards/unexpectedmaker_tinys2/mpconfigboard.mk index 39a9c38b360c..6b61ef12b7aa 100644 --- a/ports/espressif/boards/unexpectedmaker_tinys2/mpconfigboard.mk +++ b/ports/espressif/boards/unexpectedmaker_tinys2/mpconfigboard.mk @@ -5,9 +5,13 @@ USB_MANUFACTURER = "UnexpectedMaker" IDF_TARGET = esp32s2 +CIRCUITPY_ESP_FLASH_SIZE = 4MB CIRCUITPY_ESP_FLASH_MODE = qio CIRCUITPY_ESP_FLASH_FREQ = 80m -CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m CIRCUITPY_BITBANG_NEOPIXEL = 1 diff --git a/ports/espressif/boards/unexpectedmaker_tinys2/sdkconfig b/ports/espressif/boards/unexpectedmaker_tinys2/sdkconfig index 8539cb751955..647e33d8f5a9 100644 --- a/ports/espressif/boards/unexpectedmaker_tinys2/sdkconfig +++ b/ports/espressif/boards/unexpectedmaker_tinys2/sdkconfig @@ -1,37 +1,15 @@ -CONFIG_ESP32S2_SPIRAM_SUPPORT=y # -# SPI RAM config +# Espressif IoT Development Framework Configuration # -# CONFIG_SPIRAM_TYPE_AUTO is not set -CONFIG_SPIRAM_TYPE_ESPPSRAM16=y -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set -CONFIG_SPIRAM_SIZE=2097152 -# end of SPI RAM config - -CONFIG_DEFAULT_PSRAM_CLK_IO=30 # -# PSRAM clock and cs IO for ESP32S2 +# Component config # -CONFIG_DEFAULT_PSRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S2 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_80M is not set -CONFIG_SPIRAM_SPEED_40M=y -# CONFIG_SPIRAM_SPEED_26M is not set -# CONFIG_SPIRAM_SPEED_20M is not set -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set -CONFIG_SPIRAM_USE_MEMMAP=y -# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set -# CONFIG_SPIRAM_USE_MALLOC is not set -CONFIG_SPIRAM_MEMTEST=y -# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="UMTinyS2" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/unexpectedmaker_tinys3/board.c b/ports/espressif/boards/unexpectedmaker_tinys3/board.c index b3c8cb41914e..164430c88c92 100644 --- a/ports/espressif/boards/unexpectedmaker_tinys3/board.c +++ b/ports/espressif/boards/unexpectedmaker_tinys3/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/unexpectedmaker_tinys3/mpconfigboard.mk b/ports/espressif/boards/unexpectedmaker_tinys3/mpconfigboard.mk index 716a45b5ca87..bf3521ed5392 100644 --- a/ports/espressif/boards/unexpectedmaker_tinys3/mpconfigboard.mk +++ b/ports/espressif/boards/unexpectedmaker_tinys3/mpconfigboard.mk @@ -5,9 +5,13 @@ USB_MANUFACTURER = "UnexpectedMaker" IDF_TARGET = esp32s3 +CIRCUITPY_ESP_FLASH_SIZE = 8MB CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 80m -CIRCUITPY_ESP_FLASH_SIZE = 8MB + +CIRCUITPY_ESP_PSRAM_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 80m # CIRCUITPY_BITBANG_NEOPIXEL = 1 diff --git a/ports/espressif/boards/unexpectedmaker_tinys3/sdkconfig b/ports/espressif/boards/unexpectedmaker_tinys3/sdkconfig index 0ac438450d23..d08f76926e0d 100644 --- a/ports/espressif/boards/unexpectedmaker_tinys3/sdkconfig +++ b/ports/espressif/boards/unexpectedmaker_tinys3/sdkconfig @@ -1,41 +1,15 @@ -CONFIG_ESP32S3_SPIRAM_SUPPORT=y - # -# SPI RAM config +# Espressif IoT Development Framework Configuration # -# CONFIG_SPIRAM_MODE_OCT is not set -CONFIG_SPIRAM_MODE_QUAD=y -# CONFIG_SPIRAM_TYPE_AUTO is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM16 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -CONFIG_SPIRAM_TYPE_ESPPSRAM64=y -CONFIG_SPIRAM_SIZE=8388608 - # -# PSRAM clock and cs IO for ESP32S3 +# Component config # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 -CONFIG_DEFAULT_PSRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S3 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -CONFIG_SPIRAM_SPEED_80M=y -# CONFIG_SPIRAM_SPEED_40M is not set -# CONFIG_SPIRAM_SPEED_26M is not set -# CONFIG_SPIRAM_SPEED_20M is not set -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set -CONFIG_SPIRAM_USE_MEMMAP=y -# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set -# CONFIG_SPIRAM_USE_MALLOC is not set -# CONFIG_SPIRAM_MEMTEST=y -# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# end of SPI RAM config - # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="UMTinyS3" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/waveshare_esp32_s2_pico_lcd/board.c b/ports/espressif/boards/waveshare_esp32_s2_pico_lcd/board.c index 2898f675c8b8..c49e1b8d453d 100644 --- a/ports/espressif/boards/waveshare_esp32_s2_pico_lcd/board.c +++ b/ports/espressif/boards/waveshare_esp32_s2_pico_lcd/board.c @@ -126,12 +126,6 @@ static void display_init(void) { void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ - // Display display_init(); } diff --git a/ports/espressif/boards/waveshare_esp32_s2_pico_lcd/mpconfigboard.mk b/ports/espressif/boards/waveshare_esp32_s2_pico_lcd/mpconfigboard.mk index e65760ec6804..64987d2c1349 100644 --- a/ports/espressif/boards/waveshare_esp32_s2_pico_lcd/mpconfigboard.mk +++ b/ports/espressif/boards/waveshare_esp32_s2_pico_lcd/mpconfigboard.mk @@ -6,6 +6,10 @@ USB_MANUFACTURER = "Waveshare Electronics" IDF_TARGET = esp32s2 +CIRCUITPY_ESP_FLASH_SIZE=4MB CIRCUITPY_ESP_FLASH_MODE=dio CIRCUITPY_ESP_FLASH_FREQ=80m -CIRCUITPY_ESP_FLASH_SIZE=4MB + +CIRCUITPY_ESP_PSRAM_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 80m diff --git a/ports/espressif/boards/waveshare_esp32_s2_pico_lcd/sdkconfig b/ports/espressif/boards/waveshare_esp32_s2_pico_lcd/sdkconfig index 836fd46764d2..7c86f9f8e37a 100644 --- a/ports/espressif/boards/waveshare_esp32_s2_pico_lcd/sdkconfig +++ b/ports/espressif/boards/waveshare_esp32_s2_pico_lcd/sdkconfig @@ -1,37 +1,15 @@ -CONFIG_ESP32S2_SPIRAM_SUPPORT=y # -# SPI RAM config +# Espressif IoT Development Framework Configuration # -# CONFIG_SPIRAM_TYPE_AUTO is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM16 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -CONFIG_SPIRAM_TYPE_ESPPSRAM64=y -CONFIG_SPIRAM_SIZE=8388608 -# end of SPI RAM config - -CONFIG_DEFAULT_PSRAM_CLK_IO=30 # -# PSRAM clock and cs IO for ESP32S2 +# Component config # -CONFIG_DEFAULT_PSRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S2 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -CONFIG_SPIRAM_SPEED_80M=y -# CONFIG_SPIRAM_SPEED_40M is not set -# CONFIG_SPIRAM_SPEED_26M is not set -# CONFIG_SPIRAM_SPEED_20M is not set -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set -CONFIG_SPIRAM_USE_MEMMAP=y -# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set -# CONFIG_SPIRAM_USE_MALLOC is not set -CONFIG_SPIRAM_MEMTEST=y -# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="waveshare" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/waveshare_esp32_s3_pico/board.c b/ports/espressif/boards/waveshare_esp32_s3_pico/board.c index 5031686be44d..164430c88c92 100644 --- a/ports/espressif/boards/waveshare_esp32_s3_pico/board.c +++ b/ports/espressif/boards/waveshare_esp32_s3_pico/board.c @@ -25,16 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif -} - // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/waveshare_esp32_s3_pico/mpconfigboard.h b/ports/espressif/boards/waveshare_esp32_s3_pico/mpconfigboard.h index dfec09b8aaae..070f091442b5 100644 --- a/ports/espressif/boards/waveshare_esp32_s3_pico/mpconfigboard.h +++ b/ports/espressif/boards/waveshare_esp32_s3_pico/mpconfigboard.h @@ -31,7 +31,12 @@ #define MICROPY_HW_NEOPIXEL (&pin_GPIO21) -#define CIRCUITPY_BOOT_BUTTON (&pin_GPIO0) - #define DEFAULT_UART_BUS_RX (&pin_GPIO12) #define DEFAULT_UART_BUS_TX (&pin_GPIO11) + +#define DEFAULT_I2C_BUS_SCL (&pin_GPIO18) +#define DEFAULT_I2C_BUS_SDA (&pin_GPIO17) + +#define DEFAULT_SPI_BUS_SCK (&pin_GPIO36) +#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO35) +#define DEFAULT_SPI_BUS_MISO (&pin_GPIO37) diff --git a/ports/espressif/boards/waveshare_esp32_s3_pico/mpconfigboard.mk b/ports/espressif/boards/waveshare_esp32_s3_pico/mpconfigboard.mk index 116a998b74c1..76b6eb2206f3 100644 --- a/ports/espressif/boards/waveshare_esp32_s3_pico/mpconfigboard.mk +++ b/ports/espressif/boards/waveshare_esp32_s3_pico/mpconfigboard.mk @@ -8,3 +8,7 @@ IDF_TARGET = esp32s3 CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 16MB + +CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 80m diff --git a/ports/espressif/boards/waveshare_esp32_s3_pico/pins.c b/ports/espressif/boards/waveshare_esp32_s3_pico/pins.c index 884f4cf9e5fd..a1de1382aaee 100644 --- a/ports/espressif/boards/waveshare_esp32_s3_pico/pins.c +++ b/ports/espressif/boards/waveshare_esp32_s3_pico/pins.c @@ -22,9 +22,9 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_IO16), MP_ROM_PTR(&pin_GPIO16) }, { MP_ROM_QSTR(MP_QSTR_IO17), MP_ROM_PTR(&pin_GPIO17) }, { MP_ROM_QSTR(MP_QSTR_IO18), MP_ROM_PTR(&pin_GPIO18) }, - { MP_ROM_QSTR(MP_QSTR_IO19), MP_ROM_PTR(&pin_GPIO19) }, - { MP_ROM_QSTR(MP_QSTR_IO20), MP_ROM_PTR(&pin_GPIO20) }, { MP_ROM_QSTR(MP_QSTR_IO21), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_IO33), MP_ROM_PTR(&pin_GPIO33) }, + { MP_ROM_QSTR(MP_QSTR_IO34), MP_ROM_PTR(&pin_GPIO34) }, { MP_ROM_QSTR(MP_QSTR_IO35), MP_ROM_PTR(&pin_GPIO35) }, { MP_ROM_QSTR(MP_QSTR_IO36), MP_ROM_PTR(&pin_GPIO36) }, { MP_ROM_QSTR(MP_QSTR_IO37), MP_ROM_PTR(&pin_GPIO37) }, @@ -34,18 +34,23 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_IO41), MP_ROM_PTR(&pin_GPIO41) }, { MP_ROM_QSTR(MP_QSTR_IO42), MP_ROM_PTR(&pin_GPIO42) }, - - + // NEOPIXEL { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO21) }, + // UART { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO11) }, { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO12) }, - { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, + // I2C + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO17) }, + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, - - - + // SPI + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO36) }, + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO35) }, + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO37) }, + { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, }; MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/espressif/boards/waveshare_esp32_s3_pico/sdkconfig b/ports/espressif/boards/waveshare_esp32_s3_pico/sdkconfig index 3e366f01720a..f5ef79768114 100644 --- a/ports/espressif/boards/waveshare_esp32_s3_pico/sdkconfig +++ b/ports/espressif/boards/waveshare_esp32_s3_pico/sdkconfig @@ -1,43 +1,9 @@ # -# Component config -# -# -# ESP32S3-Specific -# -CONFIG_ESP32S3_SPIRAM_SUPPORT=y -# -# SPI RAM config +# Espressif IoT Development Framework Configuration # -CONFIG_SPIRAM_MODE_QUAD=y -# CONFIG_SPIRAM_MODE_OCT is not set -# CONFIG_SPIRAM_TYPE_AUTO is not set -CONFIG_SPIRAM_TYPE_ESPPSRAM16=y -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set -CONFIG_SPIRAM_SIZE=2097152 # -# PSRAM Clock and CS IO for ESP32S3 +# Component config # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 -CONFIG_DEFAULT_PSRAM_CS_IO=26 -# end of PSRAM Clock and CS IO for ESP32S3 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_120M is not set -CONFIG_SPIRAM_SPEED_80M=y -# CONFIG_SPIRAM_SPEED_40M is not set -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set -CONFIG_SPIRAM_USE_MEMMAP=y -# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set -# CONFIG_SPIRAM_USE_MALLOC is not set -CONFIG_SPIRAM_MEMTEST=y -# end of SPI RAM config - -# end of ESP32S3-Specific - # # LWIP # @@ -45,3 +11,5 @@ CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3" # end of LWIP # end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/waveshare_esp32s2_pico/board.c b/ports/espressif/boards/waveshare_esp32s2_pico/board.c index b3c8cb41914e..164430c88c92 100644 --- a/ports/espressif/boards/waveshare_esp32s2_pico/board.c +++ b/ports/espressif/boards/waveshare_esp32s2_pico/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/waveshare_esp32s2_pico/mpconfigboard.mk b/ports/espressif/boards/waveshare_esp32s2_pico/mpconfigboard.mk index 2db911fb26d6..e845f33327c4 100644 --- a/ports/espressif/boards/waveshare_esp32s2_pico/mpconfigboard.mk +++ b/ports/espressif/boards/waveshare_esp32s2_pico/mpconfigboard.mk @@ -5,6 +5,10 @@ USB_MANUFACTURER = "Waveshare Electronics" IDF_TARGET = esp32s2 +CIRCUITPY_ESP_FLASH_SIZE = 4MB CIRCUITPY_ESP_FLASH_MODE = qio CIRCUITPY_ESP_FLASH_FREQ = 80m -CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_PSRAM_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 120m diff --git a/ports/espressif/boards/waveshare_esp32s2_pico/sdkconfig b/ports/espressif/boards/waveshare_esp32s2_pico/sdkconfig index c81fbb4837ef..7c86f9f8e37a 100644 --- a/ports/espressif/boards/waveshare_esp32s2_pico/sdkconfig +++ b/ports/espressif/boards/waveshare_esp32s2_pico/sdkconfig @@ -1,20 +1,15 @@ # -# SPI RAM config +# Espressif IoT Development Framework Configuration +# +# +# Component config # -CONFIG_ESP32S2_SPIRAM_SUPPORT=y -CONFIG_DEFAULT_PSRAM_CLK_IO=30 -CONFIG_DEFAULT_PSRAM_CS_IO=26 -CONFIG_SPIRAM_TYPE_ESPPSRAM64=y -CONFIG_SPIRAM_MODE_QUAD=y -CONFIG_SPIRAM_SIZE=8388608 -CONFIG_SPIRAM_SPEED_120M=y -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -CONFIG_SPIRAM_USE_MEMMAP=y -CONFIG_SPIRAM_MEMTEST=y - # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="waveshare" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/yd_esp32_s3_n16r8/board.c b/ports/espressif/boards/yd_esp32_s3_n16r8/board.c index e218345f5916..70ff11b067d5 100644 --- a/ports/espressif/boards/yd_esp32_s3_n16r8/board.c +++ b/ports/espressif/boards/yd_esp32_s3_n16r8/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/yd_esp32_s3_n16r8/mpconfigboard.mk b/ports/espressif/boards/yd_esp32_s3_n16r8/mpconfigboard.mk index 2120ba97cb74..be875cd895db 100644 --- a/ports/espressif/boards/yd_esp32_s3_n16r8/mpconfigboard.mk +++ b/ports/espressif/boards/yd_esp32_s3_n16r8/mpconfigboard.mk @@ -9,5 +9,9 @@ CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 16MB +CIRCUITPY_ESP_PSRAM_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_MODE = opi +CIRCUITPY_ESP_PSRAM_FREQ = 80m + # Include these Python libraries in firmware. FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel diff --git a/ports/espressif/boards/yd_esp32_s3_n16r8/sdkconfig b/ports/espressif/boards/yd_esp32_s3_n16r8/sdkconfig index 5aff7f49b15c..f5ef79768114 100644 --- a/ports/espressif/boards/yd_esp32_s3_n16r8/sdkconfig +++ b/ports/espressif/boards/yd_esp32_s3_n16r8/sdkconfig @@ -1,16 +1,15 @@ -CONFIG_ESP32S3_SPIRAM_SUPPORT=y - -CONFIG_SPIRAM_TYPE_ESPPSRAM64=y -CONFIG_SPIRAM_SIZE=8388608 -CONFIG_SPIRAM_MODE_OCT=y -CONFIG_SPIRAM_SPEED_80M=y - -CONFIG_DEFAULT_PSRAM_CLK_IO=30 -CONFIG_DEFAULT_PSRAM_CS_IO=26 +# +# Espressif IoT Development Framework Configuration +# +# +# Component config +# +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3" +# end of LWIP -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -CONFIG_SPIRAM_USE_MEMMAP=y -CONFIG_SPIRAM_MEMTEST=y +# end of Component config -CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3" +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/yd_esp32_s3_n8r8/board.c b/ports/espressif/boards/yd_esp32_s3_n8r8/board.c index e218345f5916..70ff11b067d5 100644 --- a/ports/espressif/boards/yd_esp32_s3_n8r8/board.c +++ b/ports/espressif/boards/yd_esp32_s3_n8r8/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/yd_esp32_s3_n8r8/mpconfigboard.mk b/ports/espressif/boards/yd_esp32_s3_n8r8/mpconfigboard.mk index 766e71dc2d89..6ff5cada7ca9 100644 --- a/ports/espressif/boards/yd_esp32_s3_n8r8/mpconfigboard.mk +++ b/ports/espressif/boards/yd_esp32_s3_n8r8/mpconfigboard.mk @@ -9,5 +9,9 @@ CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_MODE = opi +CIRCUITPY_ESP_PSRAM_FREQ = 80m + # Include these Python libraries in firmware. FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel diff --git a/ports/espressif/boards/yd_esp32_s3_n8r8/sdkconfig b/ports/espressif/boards/yd_esp32_s3_n8r8/sdkconfig index 5aff7f49b15c..f5ef79768114 100644 --- a/ports/espressif/boards/yd_esp32_s3_n8r8/sdkconfig +++ b/ports/espressif/boards/yd_esp32_s3_n8r8/sdkconfig @@ -1,16 +1,15 @@ -CONFIG_ESP32S3_SPIRAM_SUPPORT=y - -CONFIG_SPIRAM_TYPE_ESPPSRAM64=y -CONFIG_SPIRAM_SIZE=8388608 -CONFIG_SPIRAM_MODE_OCT=y -CONFIG_SPIRAM_SPEED_80M=y - -CONFIG_DEFAULT_PSRAM_CLK_IO=30 -CONFIG_DEFAULT_PSRAM_CS_IO=26 +# +# Espressif IoT Development Framework Configuration +# +# +# Component config +# +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3" +# end of LWIP -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -CONFIG_SPIRAM_USE_MEMMAP=y -CONFIG_SPIRAM_MEMTEST=y +# end of Component config -CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3" +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/common-hal/_bleio/Adapter.c b/ports/espressif/common-hal/_bleio/Adapter.c index 24452993cb04..b03bf7c4390f 100644 --- a/ports/espressif/common-hal/_bleio/Adapter.c +++ b/ports/espressif/common-hal/_bleio/Adapter.c @@ -95,7 +95,6 @@ void common_hal_bleio_adapter_set_enabled(bleio_adapter_obj_t *self, bool enable } if (enabled) { - esp_nimble_hci_and_controller_init(); nimble_port_init(); // ble_hs_cfg.reset_cb = blecent_on_reset; ble_hs_cfg.sync_cb = _on_sync; diff --git a/ports/espressif/common-hal/alarm/SleepMemory.h b/ports/espressif/common-hal/alarm/SleepMemory.h index 626f748a6773..68e9a7d1a68f 100644 --- a/ports/espressif/common-hal/alarm/SleepMemory.h +++ b/ports/espressif/common-hal/alarm/SleepMemory.h @@ -41,7 +41,11 @@ // is set. Any memory not allocated by us can be used by the ESP-IDF for heap or other purposes. // Use half of RTC_SLOW_MEM or RTC_FAST_MEM. -#define SLEEP_MEMORY_LENGTH (4096) +#ifdef CONFIG_IDF_TARGET_ESP32 +#define SLEEP_MEMORY_LENGTH (3 * 1024) +#else +#define SLEEP_MEMORY_LENGTH (4 * 1024) +#endif typedef struct { mp_obj_base_t base; diff --git a/ports/espressif/common-hal/alarm/__init__.c b/ports/espressif/common-hal/alarm/__init__.c index 6fa205d01fbe..6590bcc8e427 100644 --- a/ports/espressif/common-hal/alarm/__init__.c +++ b/ports/espressif/common-hal/alarm/__init__.c @@ -51,8 +51,8 @@ #include "esp_sleep.h" #include "soc/rtc_cntl_reg.h" -#include "components/driver/include/driver/gpio.h" -#include "components/driver/include/driver/uart.h" +#include "components/driver/gpio/include/driver/gpio.h" +#include "components/driver/uart/include/driver/uart.h" // Singleton instance of SleepMemory. const alarm_sleep_memory_obj_t alarm_sleep_memory_obj = { @@ -213,6 +213,8 @@ void NORETURN common_hal_alarm_enter_deep_sleep(void) { // The ESP-IDF caches the deep sleep settings and applies them before sleep. // We don't need to worry about resetting them in the interim. esp_deep_sleep_start(); + + reset_into_safe_mode(SAFE_MODE_HARD_FAULT); } void common_hal_alarm_gc_collect(void) { diff --git a/ports/espressif/common-hal/alarm/pin/PinAlarm.c b/ports/espressif/common-hal/alarm/pin/PinAlarm.c index 6db184a4dd9b..7d35b66d0c85 100644 --- a/ports/espressif/common-hal/alarm/pin/PinAlarm.c +++ b/ports/espressif/common-hal/alarm/pin/PinAlarm.c @@ -36,8 +36,8 @@ #include "hal/gpio_ll.h" #include "esp_debug_helpers.h" -#include "components/driver/include/driver/rtc_io.h" -#include "components/freertos/include/freertos/FreeRTOS.h" +#include "driver/rtc_io.h" +#include "freertos/FreeRTOS.h" void common_hal_alarm_pin_pinalarm_construct(alarm_pin_pinalarm_obj_t *self, const mcu_pin_obj_t *pin, bool value, bool edge, bool pull) { if (edge) { diff --git a/ports/espressif/common-hal/analogbufio/BufferedIn.c b/ports/espressif/common-hal/analogbufio/BufferedIn.c index 9dd66bc9daa2..47942c7c33bc 100644 --- a/ports/espressif/common-hal/analogbufio/BufferedIn.c +++ b/ports/espressif/common-hal/analogbufio/BufferedIn.c @@ -28,6 +28,7 @@ */ #include +#include "bindings/espidf/__init__.h" #include "common-hal/analogbufio/BufferedIn.h" #include "shared-bindings/analogbufio/BufferedIn.h" #include "shared-bindings/microcontroller/Pin.h" @@ -39,7 +40,6 @@ #include "freertos/FreeRTOS.h" #include "freertos/task.h" #include "freertos/semphr.h" -#include "driver/adc.h" // #define DEBUG_ANALOGBUFIO @@ -56,12 +56,14 @@ #elif defined(CONFIG_IDF_TARGET_ESP32S2) #define ADC_RESULT_BYTE 2 #define ADC_CONV_LIMIT_EN 0 -#elif defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32H2) +#elif defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32C6) || defined(CONFIG_IDF_TARGET_ESP32H2) #define ADC_RESULT_BYTE 4 #define ADC_CONV_LIMIT_EN 0 #elif defined(CONFIG_IDF_TARGET_ESP32S3) #define ADC_RESULT_BYTE 4 #define ADC_CONV_LIMIT_EN 0 +#else +#error No known CONFIG_IDF_TARGET_xxx found #endif static void start_dma(analogbufio_bufferedin_obj_t *self, adc_digi_convert_mode_t *convert_mode, adc_digi_output_format_t *output_format); @@ -70,12 +72,32 @@ static void stop_dma(analogbufio_bufferedin_obj_t *self); void common_hal_analogbufio_bufferedin_construct(analogbufio_bufferedin_obj_t *self, const mcu_pin_obj_t *pin, uint32_t sample_rate) { self->pin = pin; self->sample_rate = sample_rate; + if (pin->adc_index == NO_ADC || pin->adc_channel == NO_ADC_CHANNEL) { + raise_ValueError_invalid_pin(); + } + + #if defined(CONFIG_IDF_TARGET_ESP32) + if (pin->adc_index != ADC_UNIT_1) { + /* + * ESP32 only supports ADC1 unit + * https://www.espressif.com/sites/default/files/documentation/esp32_technical_reference_manual_en.pdf + * Table 29-3 + */ + raise_ValueError_invalid_pin(); + } + #endif + + // C3 and S3 have errata related to ADC2 and continuous mode. + #if (defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32S3)) && !defined(CONFIG_ADC_CONTINUOUS_FORCE_USE_ADC2_ON_C3_S3) + if (pin->adc_index != ADC_UNIT_1) { + raise_ValueError_invalid_pin(); + } + #endif + + common_hal_mcu_pin_claim(pin); } static void start_dma(analogbufio_bufferedin_obj_t *self, adc_digi_convert_mode_t *convert_mode, adc_digi_output_format_t *output_format) { - uint16_t adc1_chan_mask = 0; - uint16_t adc2_chan_mask = 0; - const mcu_pin_obj_t *pin = self->pin; uint32_t sample_rate = self->sample_rate; @@ -86,10 +108,6 @@ static void start_dma(analogbufio_bufferedin_obj_t *self, adc_digi_convert_mode_ *convert_mode = ADC_CONV_SINGLE_UNIT_2; } - if (pin->adc_index == NO_ADC || pin->adc_channel == NO_ADC_CHANNEL) { - raise_ValueError_invalid_pin(); - } - /* * Chip version Conversion Mode Output Format Type * ESP32 1 TYPE1 @@ -99,17 +117,6 @@ static void start_dma(analogbufio_bufferedin_obj_t *self, adc_digi_convert_mode_ * ESP32H3 1,2,BOTH,ALTER TYPE2 */ - #if defined(CONFIG_IDF_TARGET_ESP32) - if (pin->adc_index != ADC_UNIT_1) { - /* - * ESP32 only supports ADC1 unit - * https://www.espressif.com/sites/default/files/documentation/esp32_technical_reference_manual_en.pdf - * Table 29-3 - */ - raise_ValueError_invalid_pin(); - } - #endif - #if defined(CONFIG_IDF_TARGET_ESP32C3) /* ESP32C3 only supports alter mode */ *convert_mode = ADC_CONV_ALTER_UNIT; @@ -119,34 +126,21 @@ static void start_dma(analogbufio_bufferedin_obj_t *self, adc_digi_convert_mode_ *output_format = ADC_DIGI_OUTPUT_FORMAT_TYPE2; #endif - common_hal_mcu_pin_claim(pin); - - if (pin->adc_index == ADC_UNIT_1) { - adc1_chan_mask = 1 << pin->adc_channel; - } else { - adc2_chan_mask = 1 << pin->adc_channel; - } - - adc_digi_init_config_t adc_dma_config = { + adc_continuous_handle_cfg_t adc_dma_config = { .max_store_buf_size = DMA_BUFFER_SIZE, - .conv_num_each_intr = NUM_SAMPLES_PER_INTERRUPT, - .adc1_chan_mask = adc1_chan_mask, - .adc2_chan_mask = adc2_chan_mask, + .conv_frame_size = NUM_SAMPLES_PER_INTERRUPT * SOC_ADC_DIGI_DATA_BYTES_PER_CONV }; #if defined(DEBUG_ANALOGBUFIO) mp_printf(&mp_plat_print, "pin:%d, ADC channel:%d, ADC index:%d, adc1_chan_mask:0x%x, adc2_chan_mask:0x%x\n", pin->number, pin->adc_channel, pin->adc_index, adc1_chan_mask, adc2_chan_mask); #endif // DEBUG_ANALOGBUFIO - esp_err_t err = adc_digi_initialize(&adc_dma_config); + esp_err_t err = adc_continuous_new_handle(&adc_dma_config, &self->handle); if (ESP_OK != err) { stop_dma(self); - common_hal_analogbufio_bufferedin_deinit(self); - mp_raise_ValueError_varg(translate("Unable to initialize ADC DMA controller, ErrorCode:%d"), err); + CHECK_ESP_RESULT(err); } - adc_digi_configuration_t dig_cfg = { - .conv_limit_en = ADC_CONV_LIMIT_EN, - .conv_limit_num = 250, + adc_continuous_config_t dig_cfg = { .pattern_num = NUM_ADC_CHANNELS, .sample_freq_hz = sample_rate, .conv_mode = *convert_mode, @@ -172,25 +166,28 @@ static void start_dma(analogbufio_bufferedin_obj_t *self, adc_digi_convert_mode_ mp_printf(&mp_plat_print, "adc_pattern[0].channel:%d, adc_pattern[0].unit:%d, adc_pattern[0].atten:%d\n", adc_pattern[0].channel, adc_pattern[0].unit, adc_pattern[0].atten); #endif // DEBUG_ANALOGBUFIO - err = adc_digi_controller_configure(&dig_cfg); + err = adc_continuous_config(self->handle, &dig_cfg); if (ESP_OK != err) { stop_dma(self); - common_hal_analogbufio_bufferedin_deinit(self); - mp_raise_ValueError_varg(translate("Unable to configure ADC DMA controller, ErrorCode:%d"), err); + CHECK_ESP_RESULT(err); } - err = adc_digi_start(); + err = adc_continuous_start(self->handle); if (ESP_OK != err) { stop_dma(self); - common_hal_analogbufio_bufferedin_deinit(self); - mp_raise_ValueError_varg(translate("Unable to start ADC DMA controller, ErrorCode:%d"), err); + CHECK_ESP_RESULT(err); } + self->started = true; } static void stop_dma(analogbufio_bufferedin_obj_t *self) { - adc_digi_stop(); - adc_digi_deinitialize(); - // Release ADC Pin - reset_pin_number(self->pin->number); + if (self->started) { + adc_continuous_stop(self->handle); + self->started = false; + } + if (self->handle != NULL) { + adc_continuous_deinit(self->handle); + self->handle = NULL; + } } bool common_hal_analogbufio_bufferedin_deinited(analogbufio_bufferedin_obj_t *self) { @@ -201,11 +198,18 @@ void common_hal_analogbufio_bufferedin_deinit(analogbufio_bufferedin_obj_t *self if (common_hal_analogbufio_bufferedin_deinited(self)) { return; } + // Release ADC Pin + reset_pin_number(self->pin->number); self->pin = NULL; } static bool check_valid_data(const adc_digi_output_data_t *data, const mcu_pin_obj_t *pin, adc_digi_convert_mode_t convert_mode, adc_digi_output_format_t output_format) { - unsigned int unit = data->type2.unit; + unsigned int unit; + #if SOC_ADC_PERIPH_NUM == 1 + unit = 0; + #else + unit = data->type2.unit; + #endif if (output_format == ADC_DIGI_OUTPUT_FORMAT_TYPE2) { if (data->type2.channel >= SOC_ADC_CHANNEL_NUM(unit)) { return false; @@ -235,7 +239,7 @@ static bool check_valid_data(const adc_digi_output_data_t *data, const mcu_pin_o } uint32_t common_hal_analogbufio_bufferedin_readinto(analogbufio_bufferedin_obj_t *self, uint8_t *buffer, uint32_t len, uint8_t bytes_per_sample) { - uint8_t result[NUM_SAMPLES_PER_INTERRUPT] __attribute__ ((aligned(4))) = {0}; + uint8_t result[NUM_SAMPLES_PER_INTERRUPT * SOC_ADC_DIGI_DATA_BYTES_PER_CONV] __attribute__ ((aligned(4))) = {0}; uint32_t captured_samples = 0; uint32_t captured_bytes = 0; esp_err_t ret; @@ -256,7 +260,7 @@ uint32_t common_hal_analogbufio_bufferedin_readinto(analogbufio_bufferedin_obj_t while (captured_bytes < len) { ret_num = 0; - ret = adc_digi_read_bytes(result, NUM_SAMPLES_PER_INTERRUPT, &ret_num, ADC_READ_TIMEOUT_MS); + ret = adc_continuous_read(self->handle, result, NUM_SAMPLES_PER_INTERRUPT * SOC_ADC_DIGI_DATA_BYTES_PER_CONV, &ret_num, ADC_READ_TIMEOUT_MS); if (ret == ESP_OK) { for (uint32_t i = 0; i < ret_num; i += ADC_RESULT_BYTE) { diff --git a/ports/espressif/common-hal/analogbufio/BufferedIn.h b/ports/espressif/common-hal/analogbufio/BufferedIn.h index 909455ca067c..8e0695c57d2a 100644 --- a/ports/espressif/common-hal/analogbufio/BufferedIn.h +++ b/ports/espressif/common-hal/analogbufio/BufferedIn.h @@ -32,11 +32,15 @@ #include "common-hal/microcontroller/Pin.h" #include "py/obj.h" +#include "components/esp_adc/include/esp_adc/adc_continuous.h" + // This is the analogbufio object typedef struct { mp_obj_base_t base; const mcu_pin_obj_t *pin; uint32_t sample_rate; + adc_continuous_handle_t handle; + bool started; } analogbufio_bufferedin_obj_t; #endif // MICROPY_INCLUDED_ESP32_COMMON_HAL_ANALOGBUFIO_BUFFEREDIN_H diff --git a/ports/espressif/common-hal/analogio/AnalogIn.c b/ports/espressif/common-hal/analogio/AnalogIn.c index fb2e098cb45d..f3950e7f1955 100644 --- a/ports/espressif/common-hal/analogio/AnalogIn.c +++ b/ports/espressif/common-hal/analogio/AnalogIn.c @@ -25,13 +25,18 @@ */ #include "common-hal/analogio/AnalogIn.h" + +#include "bindings/espidf/__init__.h" #include "shared-bindings/analogio/AnalogIn.h" #include "py/mperrno.h" #include "py/runtime.h" #include "supervisor/shared/translate/translate.h" -#include "components/driver/include/driver/adc_common.h" -#include "components/esp_adc_cal/include/esp_adc_cal.h" +#include "adc_cali_schemes.h" +#include "esp_adc/adc_oneshot.h" +#include "esp_adc/adc_cali.h" +#include "driver/gpio.h" +#include "hal/adc_types.h" #include "shared-bindings/microcontroller/Pin.h" @@ -41,20 +46,24 @@ #define NO_OF_SAMPLES 2 #define ATTENUATION ADC_ATTEN_DB_11 #if defined(CONFIG_IDF_TARGET_ESP32) -#define DATA_WIDTH ADC_WIDTH_BIT_12 +#define DATA_WIDTH ADC_BITWIDTH_12 #elif defined(CONFIG_IDF_TARGET_ESP32C3) -#define DATA_WIDTH ADC_WIDTH_BIT_12 +#define DATA_WIDTH ADC_BITWIDTH_12 +#elif defined(CONFIG_IDF_TARGET_ESP32C6) +#define DATA_WIDTH ADC_BITWIDTH_12 #elif defined(CONFIG_IDF_TARGET_ESP32S2) -#define DATA_WIDTH ADC_WIDTH_BIT_13 +#define DATA_WIDTH ADC_BITWIDTH_13 #elif defined(CONFIG_IDF_TARGET_ESP32S3) -#define DATA_WIDTH ADC_WIDTH_BIT_12 +#define DATA_WIDTH ADC_BITWIDTH_12 +#elif defined(CONFIG_IDF_TARGET_ESP32H2) +#define DATA_WIDTH ADC_BITWIDTH_12 #else #error No known CONFIG_IDF_TARGET_xxx found #endif void common_hal_analogio_analogin_construct(analogio_analogin_obj_t *self, const mcu_pin_obj_t *pin) { - if (pin->adc_index == 0 || pin->adc_channel == ADC_CHANNEL_MAX) { + if (pin->adc_index == NO_ADC || pin->adc_channel == NO_ADC_CHANNEL) { raise_ValueError_invalid_pin(); } common_hal_mcu_pin_claim(pin); @@ -78,38 +87,86 @@ void common_hal_analogio_analogin_deinit(analogio_analogin_obj_t *self) { } uint16_t common_hal_analogio_analogin_get_value(analogio_analogin_obj_t *self) { - if (self->pin->adc_index == ADC_UNIT_1) { - adc1_config_width(DATA_WIDTH); - adc1_config_channel_atten((adc1_channel_t)self->pin->adc_channel, ATTENUATION); - } else if (self->pin->adc_index == ADC_UNIT_2) { - adc2_config_channel_atten((adc2_channel_t)self->pin->adc_channel, ATTENUATION); - } else { - raise_ValueError_invalid_pin(); - } + adc_oneshot_unit_handle_t adc_handle; + adc_oneshot_unit_init_cfg_t adc_config = { + .unit_id = self->pin->adc_index, + .ulp_mode = ADC_ULP_MODE_DISABLE + }; + cp_check_esp_error(adc_oneshot_new_unit(&adc_config, &adc_handle)); + + adc_oneshot_chan_cfg_t channel_config = { + .atten = ATTENUATION, + .bitwidth = DATA_WIDTH + }; + adc_channel_t channel = (adc_channel_t)self->pin->adc_channel; + adc_oneshot_config_channel(adc_handle, channel, &channel_config); - // Automatically select calibration process depending on status of efuse - esp_adc_cal_characteristics_t adc_chars; - memset(&adc_chars, 0, sizeof(adc_chars)); - esp_adc_cal_characterize(self->pin->adc_index, ATTENUATION, DATA_WIDTH, DEFAULT_VREF, &adc_chars); + adc_cali_scheme_ver_t supported_schemes; + adc_cali_check_scheme(&supported_schemes); + adc_cali_scheme_ver_t calibration_scheme = 0; + adc_cali_handle_t calibration; + + #if defined(ADC_CALI_SCHEME_CURVE_FITTING_SUPPORTED) && ADC_CALI_SCHEME_CURVE_FITTING_SUPPORTED + adc_cali_curve_fitting_config_t config = { + .unit_id = self->pin->adc_index, + .chan = channel, + .atten = ATTENUATION, + .bitwidth = DATA_WIDTH + }; + if (adc_cali_create_scheme_curve_fitting(&config, &calibration) == ESP_OK) { + calibration_scheme = ADC_CALI_SCHEME_VER_CURVE_FITTING; + } + #endif + #if defined(ADC_CALI_SCHEME_LINE_FITTING_SUPPORTED) && ADC_CALI_SCHEME_LINE_FITTING_SUPPORTED + if (calibration_scheme == 0) { + adc_cali_line_fitting_config_t config = { + .unit_id = self->pin->adc_index, + .atten = ATTENUATION, + .bitwidth = DATA_WIDTH, + #ifdef CONFIG_IDF_TARGET_ESP32 + .default_vref = DEFAULT_VREF, + #endif + }; + if (adc_cali_create_scheme_line_fitting(&config, &calibration) == ESP_OK) { + calibration_scheme = ADC_CALI_SCHEME_VER_LINE_FITTING; + } + } + #endif uint32_t adc_reading = 0; + size_t sample_count = 0; // Multisampling + esp_err_t ret = ESP_OK; for (int i = 0; i < NO_OF_SAMPLES; i++) { - if (self->pin->adc_index == ADC_UNIT_1) { - adc_reading += adc1_get_raw((adc1_channel_t)self->pin->adc_channel); - } else { - int raw; - esp_err_t r = adc2_get_raw((adc2_channel_t)self->pin->adc_channel, DATA_WIDTH, &raw); - if (r != ESP_OK) { - mp_raise_ValueError(translate("ADC2 is being used by WiFi")); - } - adc_reading += raw; + int raw; + ret = adc_oneshot_read(adc_handle, channel, &raw); + if (ret != ESP_OK) { + continue; } + adc_reading += raw; + sample_count += 1; + } + if (sample_count == 0) { + raise_esp_error(ret); } - adc_reading /= NO_OF_SAMPLES; + adc_reading /= sample_count; // This corrects non-linear regions of the ADC range with a LUT, so it's a better reading than raw - uint32_t voltage = esp_adc_cal_raw_to_voltage(adc_reading, &adc_chars); + int voltage; + adc_cali_raw_to_voltage(calibration, adc_reading, &voltage); + + + #if defined(ADC_CALI_SCHEME_CURVE_FITTING_SUPPORTED) && ADC_CALI_SCHEME_CURVE_FITTING_SUPPORTED + if (calibration_scheme == ADC_CALI_SCHEME_VER_CURVE_FITTING) { + adc_cali_delete_scheme_curve_fitting(calibration); + } + #endif + #if defined(ADC_CALI_SCHEME_LINE_FITTING_SUPPORTED) && ADC_CALI_SCHEME_LINE_FITTING_SUPPORTED + if (calibration_scheme == ADC_CALI_SCHEME_VER_LINE_FITTING) { + adc_cali_delete_scheme_line_fitting(calibration); + } + #endif + adc_oneshot_del_unit(adc_handle); return voltage * ((1 << 16) - 1) / 3300; } diff --git a/ports/espressif/common-hal/analogio/AnalogOut.c b/ports/espressif/common-hal/analogio/AnalogOut.c index 1a1e74391bdc..b2bf7294f137 100644 --- a/ports/espressif/common-hal/analogio/AnalogOut.c +++ b/ports/espressif/common-hal/analogio/AnalogOut.c @@ -35,63 +35,71 @@ #include "shared-bindings/microcontroller/Pin.h" #include "supervisor/shared/translate/translate.h" -#if defined(CONFIG_IDF_TARGET_ESP32) || defined(CONFIG_IDF_TARGET_ESP32S2) -#include "components/driver/include/driver/dac_common.h" -#define HAS_DAC 1 +#ifdef SOC_DAC_SUPPORTED +#include "driver/dac_oneshot.h" + #if defined(CONFIG_IDF_TARGET_ESP32) -#define pin_CHANNEL_1 pin_GPIO25 -#define pin_CHANNEL_2 pin_GPIO26 +#define pin_CHANNEL_0 pin_GPIO25 +#define pin_CHANNEL_1 pin_GPIO26 #elif defined(CONFIG_IDF_TARGET_ESP32S2) -#define pin_CHANNEL_1 pin_GPIO17 -#define pin_CHANNEL_2 pin_GPIO18 +#define pin_CHANNEL_0 pin_GPIO17 +#define pin_CHANNEL_1 pin_GPIO18 #endif -#else -#define HAS_DAC 0 +static dac_oneshot_handle_t _active_handles[SOC_DAC_CHAN_NUM]; #endif + void common_hal_analogio_analogout_construct(analogio_analogout_obj_t *self, const mcu_pin_obj_t *pin) { - #if HAS_DAC - if (pin == &pin_CHANNEL_1) { - self->channel = DAC_CHANNEL_1; - } else if (pin == &pin_CHANNEL_2) { - self->channel = DAC_CHANNEL_2; + #ifdef SOC_DAC_SUPPORTED + if (pin == &pin_CHANNEL_0) { + self->channel = DAC_CHAN_0; + } else if (pin == &pin_CHANNEL_1) { + self->channel = DAC_CHAN_1; } else { raise_ValueError_invalid_pin(); } - dac_output_enable(self->channel); + dac_oneshot_config_t config = { + .chan_id = self->channel + }; + dac_oneshot_new_channel(&config, &self->handle); + _active_handles[self->channel] = self->handle; #else mp_raise_NotImplementedError(NULL); #endif } bool common_hal_analogio_analogout_deinited(analogio_analogout_obj_t *self) { - #if HAS_DAC - return self->channel == DAC_CHANNEL_MAX; + #ifdef SOC_DAC_SUPPORTED + return self->handle == NULL; #else return false; #endif } void common_hal_analogio_analogout_deinit(analogio_analogout_obj_t *self) { - #if HAS_DAC - dac_output_disable(self->channel); - self->channel = DAC_CHANNEL_MAX; + #ifdef SOC_DAC_SUPPORTED + dac_oneshot_del_channel(self->handle); + self->handle = NULL; + _active_handles[self->channel] = NULL; #endif } void common_hal_analogio_analogout_set_value(analogio_analogout_obj_t *self, uint16_t value) { - #if HAS_DAC + #ifdef SOC_DAC_SUPPORTED uint8_t dac_value = (value * 255) / 65535; - dac_output_enable(self->channel); - dac_output_voltage(self->channel, dac_value); + dac_oneshot_output_voltage(self->handle, dac_value); #endif } void analogout_reset(void) { - #if HAS_DAC - dac_output_disable(DAC_CHANNEL_1); - dac_output_disable(DAC_CHANNEL_2); + #ifdef SOC_DAC_SUPPORTED + for (uint8_t c = 0; c < SOC_DAC_CHAN_NUM; c++) { + if (_active_handles[c] != NULL) { + dac_oneshot_del_channel(_active_handles[c]); + } + _active_handles[c] = NULL; + } #endif } diff --git a/ports/espressif/common-hal/analogio/AnalogOut.h b/ports/espressif/common-hal/analogio/AnalogOut.h index 085c4e6783d0..26cdd0867594 100644 --- a/ports/espressif/common-hal/analogio/AnalogOut.h +++ b/ports/espressif/common-hal/analogio/AnalogOut.h @@ -30,12 +30,17 @@ #include "common-hal/microcontroller/Pin.h" +#ifdef SOC_DAC_SUPPORTED +#include "esp-idf/components/driver/dac/include/driver/dac_oneshot.h" +#endif #include "py/obj.h" typedef struct { mp_obj_base_t base; - const mcu_pin_obj_t *pin; + #ifdef SOC_DAC_SUPPORTED + dac_oneshot_handle_t handle; uint8_t channel; + #endif } analogio_analogout_obj_t; void analogout_reset(void); diff --git a/ports/espressif/common-hal/audiobusio/I2SOut.c b/ports/espressif/common-hal/audiobusio/I2SOut.c index 8b03a534a4be..33e5dd6ac035 100644 --- a/ports/espressif/common-hal/audiobusio/I2SOut.c +++ b/ports/espressif/common-hal/audiobusio/I2SOut.c @@ -44,7 +44,7 @@ #include "shared-bindings/microcontroller/Pin.h" #include "supervisor/shared/translate/translate.h" -#include "driver/i2s.h" +#include "driver/i2s_std.h" // Caller validates that pins are free. void common_hal_audiobusio_i2sout_construct(audiobusio_i2sout_obj_t *self, @@ -53,15 +53,20 @@ void common_hal_audiobusio_i2sout_construct(audiobusio_i2sout_obj_t *self, if (main_clock != NULL) { mp_raise_NotImplementedError_varg(translate("%q"), MP_QSTR_main_clock); } - port_i2s_allocate_init(&self->peripheral, left_justified); - - i2s_pin_config_t i2s_pin_config = { - .bck_io_num = bit_clock->number, - .ws_io_num = word_select->number, - .data_out_num = data->number, - .data_in_num = I2S_PIN_NO_CHANGE, + port_i2s_allocate_init(&self->i2s, left_justified); + + i2s_std_config_t i2s_config = { + .clk_cfg = I2S_STD_CLK_DEFAULT_CONFIG(48000), + .slot_cfg = I2S_STD_MSB_SLOT_DEFAULT_CONFIG(I2S_DATA_BIT_WIDTH_16BIT, I2S_SLOT_MODE_STEREO), + .gpio_cfg = { + .mclk = I2S_GPIO_UNUSED, + .bclk = bit_clock->number, + .ws = word_select->number, + .dout = data->number, + .din = I2S_GPIO_UNUSED, + } }; - CHECK_ESP_RESULT(i2s_set_pin(self->peripheral.instance, &i2s_pin_config)); + CHECK_ESP_RESULT(i2s_channel_init_std_mode(self->i2s.handle, &i2s_config)); self->bit_clock = bit_clock; self->word_select = word_select; self->data = data; @@ -71,7 +76,7 @@ void common_hal_audiobusio_i2sout_construct(audiobusio_i2sout_obj_t *self, } bool common_hal_audiobusio_i2sout_deinited(audiobusio_i2sout_obj_t *self) { - return self->peripheral.instance == -1; + return self->data == NULL; } void common_hal_audiobusio_i2sout_deinit(audiobusio_i2sout_obj_t *self) { @@ -79,6 +84,10 @@ void common_hal_audiobusio_i2sout_deinit(audiobusio_i2sout_obj_t *self) { return; } + common_hal_audiobusio_i2sout_stop(self); + + port_i2s_deinit(&self->i2s); + if (self->bit_clock) { reset_pin_number(self->bit_clock->number); } @@ -94,10 +103,6 @@ void common_hal_audiobusio_i2sout_deinit(audiobusio_i2sout_obj_t *self) { } self->data = NULL; - if (self->peripheral.instance >= 0) { - port_i2s_reset_instance(self->peripheral.instance); - } - self->peripheral.instance = -1; } void common_hal_audiobusio_i2sout_play(audiobusio_i2sout_obj_t *self, @@ -105,27 +110,27 @@ void common_hal_audiobusio_i2sout_play(audiobusio_i2sout_obj_t *self, if (common_hal_audiobusio_i2sout_get_playing(self)) { common_hal_audiobusio_i2sout_stop(self); } - port_i2s_play(&self->peripheral, sample, loop); + port_i2s_play(&self->i2s, sample, loop); } void common_hal_audiobusio_i2sout_pause(audiobusio_i2sout_obj_t *self) { - port_i2s_pause(&self->peripheral); + port_i2s_pause(&self->i2s); } void common_hal_audiobusio_i2sout_resume(audiobusio_i2sout_obj_t *self) { - port_i2s_resume(&self->peripheral); + port_i2s_resume(&self->i2s); } bool common_hal_audiobusio_i2sout_get_paused(audiobusio_i2sout_obj_t *self) { - return port_i2s_paused(&self->peripheral); + return port_i2s_paused(&self->i2s); } void common_hal_audiobusio_i2sout_stop(audiobusio_i2sout_obj_t *self) { - port_i2s_stop(&self->peripheral); + port_i2s_stop(&self->i2s); } bool common_hal_audiobusio_i2sout_get_playing(audiobusio_i2sout_obj_t *self) { - return port_i2s_playing(&self->peripheral); + return port_i2s_playing(&self->i2s); } #endif // CIRCUITPY_AUDIOBUSIO_I2SOUT diff --git a/ports/espressif/common-hal/audiobusio/I2SOut.h b/ports/espressif/common-hal/audiobusio/I2SOut.h index 891e9af674fe..48ab26a42e80 100644 --- a/ports/espressif/common-hal/audiobusio/I2SOut.h +++ b/ports/espressif/common-hal/audiobusio/I2SOut.h @@ -36,7 +36,7 @@ typedef struct { mp_obj_base_t base; - i2s_t peripheral; + i2s_t i2s; const mcu_pin_obj_t *bit_clock; const mcu_pin_obj_t *word_select; const mcu_pin_obj_t *data; diff --git a/ports/espressif/common-hal/audiobusio/__init__.c b/ports/espressif/common-hal/audiobusio/__init__.c index e58aeefe88a1..d05e40c77248 100644 --- a/ports/espressif/common-hal/audiobusio/__init__.c +++ b/ports/espressif/common-hal/audiobusio/__init__.c @@ -35,70 +35,26 @@ #include "shared-module/audiocore/__init__.h" -#define I2S_QUEUE_SIZE (3) - -static i2s_t *i2s_instance[I2S_NUM_MAX]; -static QueueHandle_t i2s_queues[I2S_NUM_MAX]; -static TaskHandle_t i2s_tasks[I2S_NUM_MAX]; - -void port_i2s_allocate_i2s0(void) { - if (!i2s_instance[0]) { - i2s_instance[0] = (void *)~(intptr_t)0; - return; - } - - mp_raise_RuntimeError(translate("Peripheral in use")); -} - -static int8_t port_i2s_allocate(void) { - #if defined(I2S_NUM_1) - if (!i2s_instance[1]) { - return 1; - } - #endif - if (!i2s_instance[0]) { - return 0; - } - - mp_raise_RuntimeError(translate("Peripheral in use")); -} - -void port_i2s_reset_instance(int i) { - assert(i >= 0 && i < I2S_NUM_MAX); - if (i2s_tasks[i]) { - vTaskDelete(i2s_tasks[i]); - } - i2s_tasks[i] = NULL; - - (void)i2s_driver_uninstall(i); - i2s_instance[i] = NULL; -} - -void i2s_reset(void) { - for (int i = 0; i < I2S_NUM_MAX; i++) { - port_i2s_reset_instance(i); - } -} - -#define I2S_WRITE_DELAY pdMS_TO_TICKS(1) +#define CIRCUITPY_BUFFER_COUNT 3 +#define CIRCUITPY_BUFFER_SIZE 1023 +#define CIRCUITPY_OUTPUT_SLOTS 2 static void i2s_fill_buffer(i2s_t *self) { - if (self->instance < 0 || self->instance >= I2S_NUM_MAX) { + if (self->next_buffer_size == 0) { + // Error, no new buffer queued. return; } -#define STACK_BUFFER_SIZE (4096) - int16_t signed_samples[STACK_BUFFER_SIZE / sizeof(int16_t)]; - + int16_t *output_buffer = (int16_t *)self->next_buffer; + size_t output_buffer_size = self->next_buffer_size; + const size_t bytes_per_output_frame = 4; + size_t bytes_per_input_frame = self->channel_count * self->bytes_per_sample; if (!self->playing || self->paused || !self->sample || self->stopping) { - memset(signed_samples, 0, sizeof(signed_samples)); - - size_t bytes_written = 0; - do { - CHECK_ESP_RESULT(i2s_write(self->instance, signed_samples, sizeof(signed_samples), &bytes_written, I2S_WRITE_DELAY)); - } while (bytes_written != 0); + memset(output_buffer, 0, self->next_buffer_size); + self->next_buffer = NULL; + self->next_buffer_size = 0; return; } - while (!self->stopping) { + while (!self->stopping && output_buffer_size > 0) { if (self->sample_data == self->sample_end) { uint32_t sample_buffer_length; audioio_get_buffer_result_t get_buffer_result = @@ -118,51 +74,45 @@ static void i2s_fill_buffer(i2s_t *self) { break; } } - size_t bytes_written = 0; - size_t bytecount = self->sample_end - self->sample_data; + size_t sample_bytecount = self->sample_end - self->sample_data; + // The framecount is the minimum of space left in the output buffer or left in the incoming sample. + size_t framecount = MIN(output_buffer_size / bytes_per_output_frame, sample_bytecount / bytes_per_input_frame); if (self->samples_signed && self->channel_count == 2) { if (self->bytes_per_sample == 2) { - CHECK_ESP_RESULT(i2s_write(self->instance, self->sample_data, bytecount, &bytes_written, I2S_WRITE_DELAY)); + memcpy(output_buffer, self->sample_data, framecount * bytes_per_output_frame); } else { - CHECK_ESP_RESULT(i2s_write_expand(self->instance, self->sample_data, bytecount, 8, 16, &bytes_written, I2S_WRITE_DELAY)); + audiosample_convert_s8s_s16s(output_buffer, ((int8_t *)self->sample_data), framecount); } } else { - const size_t bytes_per_output_frame = 4; - size_t bytes_per_input_frame = self->channel_count * self->bytes_per_sample; - size_t framecount = MIN(STACK_BUFFER_SIZE / bytes_per_output_frame, bytecount / bytes_per_input_frame); if (self->samples_signed) { assert(self->channel_count == 1); if (self->bytes_per_sample == 1) { - audiosample_convert_s8m_s16s(signed_samples, (int8_t *)(void *)self->sample_data, framecount); + audiosample_convert_s8m_s16s(output_buffer, (int8_t *)(void *)self->sample_data, framecount); } else { - audiosample_convert_s16m_s16s(signed_samples, (int16_t *)(void *)self->sample_data, framecount); + audiosample_convert_s16m_s16s(output_buffer, (int16_t *)(void *)self->sample_data, framecount); } } else { if (self->channel_count == 1) { if (self->bytes_per_sample == 1) { - audiosample_convert_u8m_s16s(signed_samples, (uint8_t *)(void *)self->sample_data, framecount); + audiosample_convert_u8m_s16s(output_buffer, (uint8_t *)(void *)self->sample_data, framecount); } else { - audiosample_convert_u16m_s16s(signed_samples, (uint16_t *)(void *)self->sample_data, framecount); + audiosample_convert_u16m_s16s(output_buffer, (uint16_t *)(void *)self->sample_data, framecount); } } else { if (self->bytes_per_sample == 1) { - audiosample_convert_u8s_s16s(signed_samples, (uint8_t *)(void *)self->sample_data, framecount); + audiosample_convert_u8s_s16s(output_buffer, (uint8_t *)(void *)self->sample_data, framecount); } else { - audiosample_convert_u16s_s16s(signed_samples, (uint16_t *)(void *)self->sample_data, framecount); + audiosample_convert_u16s_s16s(output_buffer, (uint16_t *)(void *)self->sample_data, framecount); } } } - size_t expanded_bytes_written = 0; - CHECK_ESP_RESULT(i2s_write(self->instance, signed_samples, bytes_per_output_frame * framecount, &expanded_bytes_written, I2S_WRITE_DELAY)); - assert(expanded_bytes_written % 4 == 0); - bytes_written = expanded_bytes_written / bytes_per_output_frame * bytes_per_input_frame; - } - self->sample_data += bytes_written; - // We have filled the DMA buffer - if (!bytes_written) { - break; } + self->sample_data += framecount * bytes_per_input_frame; + output_buffer += framecount * CIRCUITPY_OUTPUT_SLOTS; + output_buffer_size -= framecount * bytes_per_output_frame; } + self->next_buffer = NULL; + self->next_buffer_size = 0; } static void i2s_callback_fun(void *self_in) { @@ -170,39 +120,41 @@ static void i2s_callback_fun(void *self_in) { i2s_fill_buffer(self); } -static void i2s_event_task(void *self_in) { +static bool i2s_event_interrupt(i2s_chan_handle_t handle, i2s_event_data_t *event, void *self_in) { i2s_t *self = self_in; - while (true) { - i2s_event_type_t event; - BaseType_t result = xQueueReceive(i2s_queues[self->instance], &event, portMAX_DELAY); - if (result && event == I2S_EVENT_TX_DONE) { - background_callback_add(&self->callback, i2s_callback_fun, self_in); - } - } + self->underrun = self->underrun || self->next_buffer != NULL; + self->next_buffer = *(int16_t **)event->data; + self->next_buffer_size = event->size; + background_callback_add(&self->callback, i2s_callback_fun, self_in); + return false; } void port_i2s_allocate_init(i2s_t *self, bool left_justified) { - self->instance = port_i2s_allocate(); - - i2s_config_t i2s_config = { - .mode = I2S_MODE_MASTER | I2S_MODE_TX, - .sample_rate = 44100, - .bits_per_sample = 16, - .channel_format = I2S_CHANNEL_FMT_RIGHT_LEFT, - .communication_format = left_justified ? I2S_COMM_FORMAT_STAND_I2S : I2S_COMM_FORMAT_STAND_I2S, - .dma_buf_count = 3, - .dma_buf_len = 1024, // in _frames_, so 1024 is 4096 bytes per dma buf - .use_apll = false, + i2s_chan_config_t chan_config = { + .id = I2S_NUM_AUTO, + .role = I2S_ROLE_MASTER, + .dma_desc_num = CIRCUITPY_BUFFER_COUNT, + .dma_frame_num = CIRCUITPY_BUFFER_SIZE, // in _frames_, so 1023 is 4092 bytes per dma buf which is the maximum }; - CHECK_ESP_RESULT(i2s_driver_install(self->instance, &i2s_config, I2S_QUEUE_SIZE, &i2s_queues[self->instance])); - - if (!xTaskCreate(i2s_event_task, "I2S_task", 3 * configMINIMAL_STACK_SIZE, self, CONFIG_PTHREAD_TASK_PRIO_DEFAULT, &i2s_tasks[self->instance])) { - mp_raise_OSError_msg(translate("xTaskCreate failed")); + esp_err_t err = i2s_new_channel(&chan_config, &self->handle, NULL); + if (err == ESP_ERR_NOT_FOUND) { + mp_raise_RuntimeError(translate("Peripheral in use")); } - i2s_instance[self->instance] = self; + i2s_event_callbacks_t callbacks = { + .on_recv = NULL, + .on_recv_q_ovf = NULL, + .on_sent = i2s_event_interrupt, + .on_send_q_ovf = NULL, + }; + i2s_channel_register_event_callback(self->handle, &callbacks, self); } +void port_i2s_deinit(i2s_t *self) { + port_i2s_stop(self); + i2s_del_channel(self->handle); + self->handle = NULL; +} void port_i2s_play(i2s_t *self, mp_obj_t sample, bool loop) { self->sample = sample; @@ -216,9 +168,6 @@ void port_i2s_play(i2s_t *self, mp_obj_t sample, bool loop) { audiosample_get_buffer_structure(sample, false, &single_buffer, &samples_signed, &max_buffer_length, &spacing); self->samples_signed = samples_signed; - self->playing = true; - self->paused = false; - self->stopping = false; self->sample_data = self->sample_end = NULL; // We always output stereo so output twice as many bits. // uint16_t bits_per_sample_output = bits_per_sample * 2; @@ -226,12 +175,32 @@ void port_i2s_play(i2s_t *self, mp_obj_t sample, bool loop) { audiosample_reset_buffer(self->sample, false, 0); uint32_t sample_rate = audiosample_sample_rate(sample); - if (sample_rate != self->i2s_config.sample_rate) { - CHECK_ESP_RESULT(i2s_set_sample_rates(self->instance, audiosample_sample_rate(sample))); - self->i2s_config.sample_rate = sample_rate; + i2s_std_clk_config_t clk_config = I2S_STD_CLK_DEFAULT_CONFIG(sample_rate); + CHECK_ESP_RESULT(i2s_channel_reconfig_std_clock(self->handle, &clk_config)); + + // preload the data + self->playing = true; + self->paused = false; + self->stopping = false; + // This will be slow but we can't rewind the underlying sample. So, we will + // preload one frame at a time and drop the last sample that can't fit. + // We cap ourselves at the max DMA set to prevent a sample drop if starting + // fresh. + uint32_t starting_frame; + size_t bytes_loaded = 4; + size_t preloaded = 0; + while (bytes_loaded > 0 && preloaded < CIRCUITPY_BUFFER_SIZE * CIRCUITPY_BUFFER_COUNT) { + self->next_buffer = &starting_frame; + self->next_buffer_size = sizeof(starting_frame); + i2s_fill_buffer(self); + i2s_channel_preload_data(self->handle, &starting_frame, sizeof(uint32_t), &bytes_loaded); + preloaded += 1; } - background_callback_add(&self->callback, i2s_callback_fun, self); + // enable the channel + i2s_channel_enable(self->handle); + + // The IDF will call us back when there is a free DMA buffer. } bool port_i2s_playing(i2s_t *self) { @@ -243,8 +212,8 @@ bool port_i2s_paused(i2s_t *self) { } void port_i2s_stop(i2s_t *self) { + port_i2s_pause(self); self->sample = NULL; - self->paused = false; self->playing = false; self->stopping = false; } @@ -252,13 +221,13 @@ void port_i2s_stop(i2s_t *self) { void port_i2s_pause(i2s_t *self) { if (!self->paused) { self->paused = true; - CHECK_ESP_RESULT(i2s_stop(self->instance)); + CHECK_ESP_RESULT(i2s_channel_disable(self->handle)); } } void port_i2s_resume(i2s_t *self) { if (self->paused) { self->paused = false; - CHECK_ESP_RESULT(i2s_start(self->instance)); + CHECK_ESP_RESULT(i2s_channel_enable(self->handle)); } } diff --git a/ports/espressif/common-hal/audiobusio/__init__.h b/ports/espressif/common-hal/audiobusio/__init__.h index 00dc99d30a57..a2e397828a92 100644 --- a/ports/espressif/common-hal/audiobusio/__init__.h +++ b/ports/espressif/common-hal/audiobusio/__init__.h @@ -30,7 +30,7 @@ #include "supervisor/background_callback.h" -#include "driver/i2s.h" +#include "driver/i2s_std.h" typedef struct { mp_obj_t *sample; @@ -42,23 +42,22 @@ typedef struct { bool samples_signed; int8_t bytes_per_sample; int8_t channel_count; - int8_t instance; uint16_t buffer_length; uint8_t *sample_data, *sample_end; - i2s_config_t i2s_config; + void *next_buffer; + size_t next_buffer_size; + i2s_chan_handle_t handle; background_callback_t callback; + bool underrun; } i2s_t; void port_i2s_allocate_init(i2s_t *self, bool left_justified); -void port_i2s_reset_instance(int i); -void i2s_reset(void); +void port_i2s_deinit(i2s_t *self); + void port_i2s_play(i2s_t *self, mp_obj_t sample, bool loop); void port_i2s_stop(i2s_t *self); bool port_i2s_playing(i2s_t *self); bool port_i2s_paused(i2s_t *self); void port_i2s_pause(i2s_t *self); void port_i2s_resume(i2s_t *self); - -// some uses (imagecapture) can only operate on i2s0 and need their own init code -void port_i2s_allocate_i2s0(void); diff --git a/ports/espressif/common-hal/busio/I2C.c b/ports/espressif/common-hal/busio/I2C.c index 92bd4fb1576f..ea752c986d4c 100644 --- a/ports/espressif/common-hal/busio/I2C.c +++ b/ports/espressif/common-hal/busio/I2C.c @@ -28,7 +28,7 @@ #include "py/mperrno.h" #include "py/runtime.h" -#include "components/driver/include/driver/i2c.h" +#include "components/driver/i2c/include/driver/i2c.h" #include "shared-bindings/microcontroller/__init__.h" #include "shared-bindings/microcontroller/Pin.h" @@ -82,6 +82,7 @@ void common_hal_busio_i2c_construct(busio_i2c_obj_t *self, self->sda_pin = sda; self->scl_pin = scl; self->i2c_num = peripherals_i2c_get_free_num(); + self->has_lock = 0; if (self->i2c_num == I2C_NUM_MAX) { mp_raise_ValueError(translate("All I2C peripherals are in use")); diff --git a/ports/espressif/common-hal/busio/SPI.c b/ports/espressif/common-hal/busio/SPI.c index 0b6b395c510e..96a222655314 100644 --- a/ports/espressif/common-hal/busio/SPI.c +++ b/ports/espressif/common-hal/busio/SPI.c @@ -30,7 +30,7 @@ #include "shared-bindings/busio/SPI.h" #include "shared-bindings/microcontroller/Pin.h" -#include "driver/spi_common_internal.h" +#include "esp_private/spi_common_internal.h" #define SPI_MAX_DMA_BITS (SPI_MAX_DMA_LEN * 8) #define MAX_SPI_TRANSACTIONS 10 diff --git a/ports/espressif/common-hal/busio/UART.c b/ports/espressif/common-hal/busio/UART.c index bee199fb1731..e96861191f13 100644 --- a/ports/espressif/common-hal/busio/UART.c +++ b/ports/espressif/common-hal/busio/UART.c @@ -28,7 +28,7 @@ #include "shared-bindings/microcontroller/Pin.h" #include "shared-bindings/busio/UART.h" -#include "components/driver/include/driver/uart.h" +#include "components/driver/uart/include/driver/uart.h" #include "mpconfigport.h" #include "shared/readline/readline.h" @@ -230,7 +230,7 @@ void common_hal_busio_uart_construct(busio_uart_obj_t *self, uart_config.stop_bits = UART_STOP_BITS_2; } // uart_set_stop_bits(self->uart_num, stop_bits); - uart_config.source_clk = UART_SCLK_APB; // guessing here... + uart_config.source_clk = UART_SCLK_DEFAULT; // config all in one? if (uart_param_config(self->uart_num, &uart_config) != ESP_OK) { diff --git a/ports/espressif/common-hal/canio/Listener.c b/ports/espressif/common-hal/canio/Listener.c index 66ce09697073..a6c0dbf90c38 100644 --- a/ports/espressif/common-hal/canio/Listener.c +++ b/ports/espressif/common-hal/canio/Listener.c @@ -39,40 +39,30 @@ #include "hal/twai_ll.h" +// There is no logic that dictates TWAI vs TWAI0 +#if defined(CONFIG_IDF_TARGET_ESP32H2) || defined(CONFIG_IDF_TARGET_ESP32C6) +#define TWAI TWAI0 +#endif + // IDE = "extended ID" flag of packet header. We always add this bit to the // mask because a match is always for just one kind of address length #define FILTER16_IDE (1 << 3) #define FILTER32_IDE (1 << 2) -// Work around a problem reported at -// https://github.com/espressif/esp-idf/issues/6020 where -// twai_ll_set_acc_filter does not work under -Os optimization -__attribute__((optimize("O0"))) -__attribute__((noinline)) -static void canio_set_acc_filter(twai_dev_t *hw, uint32_t code, uint32_t mask, bool single_filter) { - uint32_t code_swapped = __builtin_bswap32(code); - uint32_t mask_swapped = __builtin_bswap32(mask); - for (int i = 0; i < 4; i++) { - hw->acceptance_filter.acr[i].val = ((code_swapped >> (i * 8)) & 0xFF); - hw->acceptance_filter.amr[i].val = ((mask_swapped >> (i * 8)) & 0xFF); - } - hw->mode_reg.afm = single_filter; -} - STATIC void install_standard_filter(canio_listener_obj_t *self, canio_match_obj_t *match) { - canio_set_acc_filter(&TWAI, match->id << 21, ~(match->mask << 21), true); + twai_ll_set_acc_filter(&TWAI, match->id << 21, ~(match->mask << 21), true); self->extended = false; self->standard = true; } STATIC void install_extended_filter(canio_listener_obj_t *self, canio_match_obj_t *match) { - canio_set_acc_filter(&TWAI, match->id << 3, ~(match->mask << 3), true); + twai_ll_set_acc_filter(&TWAI, match->id << 3, ~(match->mask << 3), true); self->extended = true; self->standard = false; } STATIC void install_all_match_filter(canio_listener_obj_t *self) { - canio_set_acc_filter(&TWAI, 0u, ~0u, true); + twai_ll_set_acc_filter(&TWAI, 0u, ~0u, true); self->extended = true; self->standard = true; } diff --git a/ports/espressif/common-hal/countio/Counter.c b/ports/espressif/common-hal/countio/Counter.c index cc4c067266ee..1cf6d8e70701 100644 --- a/ports/espressif/common-hal/countio/Counter.c +++ b/ports/espressif/common-hal/countio/Counter.c @@ -31,6 +31,8 @@ #include "py/runtime.h" #include "supervisor/shared/translate/translate.h" +#include "driver/gpio.h" + void common_hal_countio_counter_construct(countio_counter_obj_t *self, const mcu_pin_obj_t *pin, countio_edge_t edge, digitalio_pull_t pull) { claim_pin(pin); diff --git a/ports/espressif/common-hal/digitalio/DigitalInOut.c b/ports/espressif/common-hal/digitalio/DigitalInOut.c index 61671dadb9a0..4b6c966da3a9 100644 --- a/ports/espressif/common-hal/digitalio/DigitalInOut.c +++ b/ports/espressif/common-hal/digitalio/DigitalInOut.c @@ -28,7 +28,7 @@ #include "py/runtime.h" #include "supervisor/shared/translate/translate.h" -#include "components/driver/include/driver/gpio.h" +#include "components/driver/gpio/include/driver/gpio.h" #include "components/hal/include/hal/gpio_hal.h" diff --git a/ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.c b/ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.c index e9809da38c7b..ade19da3961f 100644 --- a/ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.c +++ b/ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.c @@ -36,54 +36,19 @@ #include "hal/lcd_ll.h" #include "soc/lcd_periph.h" -// extract from esp-idf esp_lcd_rgb_panel.c -typedef struct -{ - esp_lcd_panel_t base; // Base class of generic lcd panel - int panel_id; // LCD panel ID - lcd_hal_context_t hal; // Hal layer object - size_t data_width; // Number of data lines (e.g. for RGB565, the data width is 16) - size_t sram_trans_align; // Alignment for framebuffer that allocated in SRAM - size_t psram_trans_align; // Alignment for framebuffer that allocated in PSRAM - int disp_gpio_num; // Display control GPIO, which is used to perform action like "disp_off" - intr_handle_t intr; // LCD peripheral interrupt handle - esp_pm_lock_handle_t pm_lock; // Power management lock - size_t num_dma_nodes; // Number of DMA descriptors that used to carry the frame buffer - uint8_t *fb; // Frame buffer - size_t fb_size; // Size of frame buffer - int data_gpio_nums[SOC_LCD_RGB_DATA_WIDTH]; // GPIOs used for data lines, we keep these GPIOs for action like "invert_color" - size_t resolution_hz; // Peripheral clock resolution - esp_lcd_rgb_timing_t timings; // RGB timing parameters (e.g. pclk, sync pulse, porch width) - gdma_channel_handle_t dma_chan; // DMA channel handle - esp_lcd_rgb_panel_frame_trans_done_cb_t on_frame_trans_done; // Callback, invoked after frame trans done - void *user_ctx; // Reserved user's data of callback functions - int x_gap; // Extra gap in x coordinate, it's used when calculate the flush window - int y_gap; // Extra gap in y coordinate, it's used when calculate the flush window - struct - { - unsigned int disp_en_level : 1; // The level which can turn on the screen by `disp_gpio_num` - unsigned int stream_mode : 1; // If set, the LCD transfers data continuously, otherwise, it stops refreshing the LCD when transaction done - unsigned int fb_in_psram : 1; // Whether the frame buffer is in PSRAM - } flags; - dma_descriptor_t dma_nodes[]; // DMA descriptor pool of size `num_dma_nodes` -} esp_rgb_panel_t; - - #include "esp_log.h" #define TAG "LCD" #include "components/esp_rom/include/esp_rom_sys.h" - +#include "bindings/espidf/__init__.h" #include "py/objarray.h" #include "shared-bindings/dotclockframebuffer/DotClockFramebuffer.h" #include "common-hal/dotclockframebuffer/DotClockFramebuffer.h" -#include "bindings/espidf/__init__.h" +#include "common-hal/espidf/__init__.h" #include "shared-bindings/microcontroller/Pin.h" #include "py/runtime.h" -#include "components/driver/include/driver/gpio.h" -#include "components/driver/include/driver/periph_ctrl.h" -#include "components/driver/include/esp_private/gdma.h" +#include "components/driver/gpio/include/driver/gpio.h" #include "components/esp_rom/include/esp_rom_gpio.h" #include "components/hal/esp32s3/include/hal/lcd_ll.h" #include "components/hal/include/hal/gpio_hal.h" @@ -170,6 +135,7 @@ void common_hal_dotclockframebuffer_framebuffer_construct(dotclockframebuffer_fr cfg->vsync_gpio_num = valid_pin(vsync, MP_QSTR_vsync); cfg->de_gpio_num = valid_pin(de, MP_QSTR_de); cfg->pclk_gpio_num = valid_pin(dclk, MP_QSTR_dclk); + cfg->clk_src = LCD_CLK_SRC_DEFAULT; cfg->data_gpio_nums[0] = valid_pin(blue[0], MP_QSTR_blue); cfg->data_gpio_nums[1] = valid_pin(blue[1], MP_QSTR_blue); @@ -193,23 +159,26 @@ void common_hal_dotclockframebuffer_framebuffer_construct(dotclockframebuffer_fr cfg->disp_gpio_num = GPIO_NUM_NC; cfg->flags.disp_active_low = 0; - cfg->flags.relax_on_idle = 0; + cfg->flags.refresh_on_demand = 0; cfg->flags.fb_in_psram = 1; // allocate frame buffer in PSRAM - ESP_ERROR_CHECK(esp_lcd_new_rgb_panel(&self->panel_config, &self->panel_handle)); - ESP_ERROR_CHECK(esp_lcd_panel_reset(self->panel_handle)); - ESP_ERROR_CHECK(esp_lcd_panel_init(self->panel_handle)); + esp_err_t ret = esp_lcd_new_rgb_panel(&self->panel_config, &self->panel_handle); + cp_check_esp_error(ret); + cp_check_esp_error(esp_lcd_panel_reset(self->panel_handle)); + cp_check_esp_error(esp_lcd_panel_init(self->panel_handle)); uint16_t color = 0; - ESP_ERROR_CHECK(self->panel_handle->draw_bitmap(self->panel_handle, 0, 0, 1, 1, &color)); + cp_check_esp_error(self->panel_handle->draw_bitmap(self->panel_handle, 0, 0, 1, 1, &color)); - esp_rgb_panel_t *_rgb_panel = __containerof(self->panel_handle, esp_rgb_panel_t, base); + void *fb; + cp_check_esp_error(esp_lcd_rgb_panel_get_frame_buffer(self->panel_handle, 1, &fb)); self->frequency = frequency; self->row_stride = 2 * (width + overscan_left); + self->first_pixel_offset = 2 * overscan_left; self->refresh_rate = frequency / (width + hsync_front_porch + hsync_back_porch) / (height + vsync_front_porch + vsync_back_porch); - self->bufinfo.buf = (uint8_t *)_rgb_panel->fb + 2 * overscan_left; // first line starts ater overscan_left pixels - self->bufinfo.len = 2 * (cfg->timings.h_res * cfg->timings.v_res - overscan_left); // no overscan after last line + self->bufinfo.buf = (uint8_t *)fb; + self->bufinfo.len = 2 * (cfg->timings.h_res * cfg->timings.v_res); self->bufinfo.typecode = 'H' | MP_OBJ_ARRAY_TYPECODE_FLAG_RW; // LCD_CAM.lcd_ctrl2.lcd_vsync_idle_pol = _vsync_polarity; @@ -234,7 +203,7 @@ bool common_hal_dotclockframebuffer_framebuffer_deinitialized(dotclockframebuffe mp_int_t common_hal_dotclockframebuffer_framebuffer_get_width(dotclockframebuffer_framebuffer_obj_t *self) { - return self->panel_config.timings.h_res; + return self->panel_config.timings.h_res - self->first_pixel_offset / 2; } mp_int_t common_hal_dotclockframebuffer_framebuffer_get_height(dotclockframebuffer_framebuffer_obj_t *self) { @@ -249,6 +218,10 @@ mp_int_t common_hal_dotclockframebuffer_framebuffer_get_row_stride(dotclockframe return self->row_stride; } +mp_int_t common_hal_dotclockframebuffer_framebuffer_get_first_pixel_offset(dotclockframebuffer_framebuffer_obj_t *self) { + return self->first_pixel_offset; +} + void common_hal_dotclockframebuffer_framebuffer_refresh(dotclockframebuffer_framebuffer_obj_t *self) { Cache_WriteBack_Addr((uint32_t)(self->bufinfo.buf), self->bufinfo.len); } diff --git a/ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.h b/ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.h index a40f28ea5288..1432b7009bd0 100644 --- a/ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.h +++ b/ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.h @@ -39,6 +39,7 @@ typedef struct dotclockframebuffer_framebuffer_obj { mp_buffer_info_t bufinfo; mp_int_t row_stride; uint32_t frequency, refresh_rate; + uint32_t first_pixel_offset; uint64_t used_pins_mask; volatile int32_t frame_count; esp_lcd_rgb_panel_config_t panel_config; diff --git a/ports/espressif/common-hal/dualbank/__init__.c b/ports/espressif/common-hal/dualbank/__init__.c index 9e3fb3862743..b3151f268dea 100644 --- a/ports/espressif/common-hal/dualbank/__init__.c +++ b/ports/espressif/common-hal/dualbank/__init__.c @@ -31,6 +31,7 @@ #include "esp_log.h" #include "esp_ota_ops.h" +#include "esp_app_format.h" static const esp_partition_t *update_partition = NULL; static esp_ota_handle_t update_handle = 0; @@ -59,10 +60,10 @@ void common_hal_dualbank_flash(const void *buf, const size_t len, const size_t o update_partition = esp_ota_get_next_update_partition(NULL); assert(update_partition != NULL); - ESP_LOGI(TAG, "Running partition type %d subtype %d (offset 0x%08x)", + ESP_LOGI(TAG, "Running partition type %d subtype %d (offset 0x%08lu)", running->type, running->subtype, running->address); - ESP_LOGI(TAG, "Writing partition type %d subtype %d (offset 0x%08x)\n", + ESP_LOGI(TAG, "Writing partition type %d subtype %d (offset 0x%08lu)\n", update_partition->type, update_partition->subtype, update_partition->address); } diff --git a/ports/espressif/common-hal/espcamera/Camera.c b/ports/espressif/common-hal/espcamera/Camera.c index 7db8a4b4c11d..cdf7ab63c80f 100644 --- a/ports/espressif/common-hal/espcamera/Camera.c +++ b/ports/espressif/common-hal/espcamera/Camera.c @@ -35,7 +35,7 @@ #include "shared-bindings/util.h" #include "common-hal/microcontroller/Pin.h" -#include "esp32-camera/driver/private_include/cam_hal.h" +#include "esp-camera/driver/private_include/cam_hal.h" #if !CONFIG_SPIRAM #error espcamera only works on boards configured with spiram, disable it in mpconfigboard.mk diff --git a/ports/espressif/common-hal/espidf/__init__.c b/ports/espressif/common-hal/espidf/__init__.c index 7acf9120774b..e5f866b9065b 100644 --- a/ports/espressif/common-hal/espidf/__init__.c +++ b/ports/espressif/common-hal/espidf/__init__.c @@ -35,7 +35,7 @@ #define TAG "espidf" #ifdef CONFIG_SPIRAM -#include "esp32/spiram.h" +#include "esp_psram.h" #include "esp_heap_caps.h" #include "esp_heap_caps_init.h" #include "soc/soc.h" @@ -44,14 +44,13 @@ #else #define esp_himem_reserved_area_size() (0) #endif -bool ok_to_reserve_psram = true; size_t reserved_psram = DEFAULT_RESERVED_PSRAM; #endif static size_t psram_size_usable(void) { #ifdef CONFIG_SPIRAM /* PSRAM chip may be larger than the size we can map into address space */ - size_t s = MIN(esp_spiram_get_size(), SOC_EXTRAM_DATA_SIZE); + size_t s = MIN(esp_psram_get_size(), SOC_EXTRAM_DATA_SIZE); return s - esp_himem_reserved_area_size(); #else return 0; @@ -60,10 +59,7 @@ static size_t psram_size_usable(void) { bool common_hal_espidf_set_reserved_psram(size_t amount) { #ifdef CONFIG_SPIRAM - if (!esp_spiram_is_initialized()) { - return false; - } - if (!ok_to_reserve_psram) { + if (!esp_psram_is_initialized()) { return false; } if (amount > psram_size_usable()) { @@ -112,20 +108,14 @@ size_t common_hal_espidf_get_total_psram(void) { intptr_t common_hal_espidf_get_psram_start(void) { #ifdef CONFIG_SPIRAM - if (esp_spiram_is_initialized()) { - #ifdef CONFIG_IDF_TARGET_ESP32 - return SOC_EXTRAM_DATA_LOW; - #else - return SOC_EXTRAM_DATA_HIGH - psram_size_usable(); - #endif - } + return (intptr_t)esp_psram_get_address(); #endif return 0; } intptr_t common_hal_espidf_get_psram_end(void) { #ifdef CONFIG_SPIRAM - if (esp_spiram_is_initialized()) { + if (esp_psram_is_initialized()) { return common_hal_espidf_get_psram_start() + psram_size_usable(); } #endif @@ -198,4 +188,11 @@ void raise_esp_error(esp_err_t err) { mp_raise_msg_varg(exception_type, translate("%s error 0x%x"), group, err); } +void cp_check_esp_error(esp_err_t err) { + if (err == ESP_OK) { + return; + } + raise_esp_error(err); +} + MP_REGISTER_MODULE(MP_QSTR_espidf, espidf_module); diff --git a/ports/espressif/common-hal/espidf/__init__.h b/ports/espressif/common-hal/espidf/__init__.h index 0d168b105c4f..337ad7ef99b9 100644 --- a/ports/espressif/common-hal/espidf/__init__.h +++ b/ports/espressif/common-hal/espidf/__init__.h @@ -26,4 +26,4 @@ #pragma once -#include "bindings/espidf/__init__.h" +void cp_check_esp_error(esp_err_t err); diff --git a/ports/espressif/common-hal/espnow/ESPNow.c b/ports/espressif/common-hal/espnow/ESPNow.c index ff07497a304d..814499b1c08c 100644 --- a/ports/espressif/common-hal/espnow/ESPNow.c +++ b/ports/espressif/common-hal/espnow/ESPNow.c @@ -88,7 +88,7 @@ static void send_cb(const uint8_t *mac, esp_now_send_status_t status) { // Callback triggered when an ESP-NOW packet is received. // Write the peer MAC address and the message into the recv_buffer as an ESPNow packet. // If the buffer is full, drop the message and increment the dropped count. -static void recv_cb(const uint8_t *mac, const uint8_t *msg, int msg_len) { +static void recv_cb(const esp_now_recv_info_t *esp_now_info, const uint8_t *msg, int msg_len) { espnow_obj_t *self = MP_STATE_PORT(espnow_singleton); ringbuf_t *buf = self->recv_buffer; @@ -117,7 +117,7 @@ static void recv_cb(const uint8_t *mac, const uint8_t *msg, int msg_len) { header.time_ms = mp_hal_ticks_ms(); ringbuf_put_n(buf, (uint8_t *)&header, sizeof(header)); - ringbuf_put_n(buf, mac, ESP_NOW_ETH_ALEN); + ringbuf_put_n(buf, esp_now_info->src_addr, ESP_NOW_ETH_ALEN); ringbuf_put_n(buf, msg, msg_len); self->read_success++; diff --git a/ports/espressif/common-hal/espulp/ULP.c b/ports/espressif/common-hal/espulp/ULP.c index 3350f6d45ca7..d8bb0be59739 100644 --- a/ports/espressif/common-hal/espulp/ULP.c +++ b/ports/espressif/common-hal/espulp/ULP.c @@ -28,7 +28,6 @@ #include "bindings/espulp/ULP.h" #include "py/runtime.h" - #include "shared-bindings/microcontroller/Pin.h" #if defined(CONFIG_IDF_TARGET_ESP32) @@ -36,11 +35,11 @@ #define ULP_COPROC_RESERVE_MEM (CONFIG_ESP32_ULP_COPROC_RESERVE_MEM) #elif defined(CONFIG_IDF_TARGET_ESP32S2) #include "esp32s2/ulp.h" -#include "esp32s2/ulp_riscv.h" +#include "ulp_riscv.h" #define ULP_COPROC_RESERVE_MEM (CONFIG_ESP32S2_ULP_COPROC_RESERVE_MEM) #elif defined(CONFIG_IDF_TARGET_ESP32S3) #include "esp32s3/ulp.h" -#include "esp32s3/ulp_riscv.h" +#include "ulp_riscv.h" #define ULP_COPROC_RESERVE_MEM (CONFIG_ESP32S3_ULP_COPROC_RESERVE_MEM) #endif @@ -56,7 +55,7 @@ void espulp_reset(void) { } void common_hal_espulp_ulp_run(espulp_ulp_obj_t *self, uint32_t *program, size_t length, uint32_t pin_mask) { - if (length > ULP_COPROC_RESERVE_MEM) { + if (length > CONFIG_ULP_COPROC_RESERVE_MEM) { mp_raise_ValueError(translate("Program too long")); } @@ -91,16 +90,18 @@ void common_hal_espulp_ulp_run(espulp_ulp_obj_t *self, uint32_t *program, size_t ulp_set_wakeup_period(0, 20000); switch (self->arch) { + #ifdef CONFIG_ULP_COPROC_TYPE_FSM case FSM: ulp_load_binary(0, (const uint8_t *)program, length); ulp_run(0); break; + #endif + #ifdef CONFIG_ULP_COPROC_TYPE_RISCV case RISCV: - #ifndef CONFIG_IDF_TARGET_ESP32 ulp_riscv_load_binary((const uint8_t *)program, length); ulp_riscv_run(); break; - #endif + #endif default: mp_raise_NotImplementedError(NULL); break; @@ -108,22 +109,23 @@ void common_hal_espulp_ulp_run(espulp_ulp_obj_t *self, uint32_t *program, size_t } void common_hal_espulp_ulp_halt(espulp_ulp_obj_t *self) { - #ifdef CONFIG_IDF_TARGET_ESP32 - mp_raise_NotImplementedError(NULL); - #else - // To-do idf v5.0: use following functions - // ulp_riscv_timer_stop(); - // ulp_riscv_halt(); - - // stop the ulp timer so that it doesn't restart the cpu - CLEAR_PERI_REG_MASK(RTC_CNTL_ULP_CP_TIMER_REG, RTC_CNTL_ULP_CP_SLP_TIMER_EN); - - // suspends the ulp operation - SET_PERI_REG_MASK(RTC_CNTL_COCPU_CTRL_REG, RTC_CNTL_COCPU_DONE); - - // resets the processor - SET_PERI_REG_MASK(RTC_CNTL_COCPU_CTRL_REG, RTC_CNTL_COCPU_SHUT_RESET_EN); - #endif + switch (self->arch) { + /* + #ifdef CONFIG_ULP_COPROC_TYPE_FSM + case FSM: + break; + #endif + */ + #ifdef CONFIG_ULP_COPROC_TYPE_RISCV + case RISCV: + ulp_riscv_timer_stop(); + ulp_riscv_halt(); + break; + #endif + default: + mp_raise_NotImplementedError(NULL); + break; + } // Release pins we were using. for (uint8_t i = 0; i < 32; i++) { @@ -141,11 +143,19 @@ void common_hal_espulp_ulp_construct(espulp_ulp_obj_t *self, espulp_architecture mp_raise_ValueError_varg(translate("%q in use"), MP_QSTR_ULP); } - #ifdef CONFIG_IDF_TARGET_ESP32 - if (self->arch == RISCV) { - mp_raise_NotImplementedError(NULL); + switch (arch) { + #ifdef CONFIG_ULP_COPROC_TYPE_FSM + case FSM: + break; + #endif + #ifdef CONFIG_ULP_COPROC_TYPE_RISCV + case RISCV: + break; + #endif + default: + mp_raise_NotImplementedError(NULL); + break; } - #endif self->arch = arch; self->inited = true; diff --git a/ports/espressif/common-hal/espulp/ULPAlarm.c b/ports/espressif/common-hal/espulp/ULPAlarm.c index 3717d2ab7132..798d86ce29bb 100644 --- a/ports/espressif/common-hal/espulp/ULPAlarm.c +++ b/ports/espressif/common-hal/espulp/ULPAlarm.c @@ -29,7 +29,7 @@ #include "common-hal/alarm/__init__.h" #include "supervisor/port.h" -#include "driver/rtc_cntl.h" +#include "esp_private/rtc_ctrl.h" #include "soc/rtc_cntl_reg.h" #include "esp_sleep.h" @@ -81,20 +81,22 @@ void espulp_ulpalarm_set_alarm(const bool deep_sleep, const size_t n_alarms, con // enable ulp interrupt switch (alarm->ulp->arch) { + #ifdef CONFIG_ULP_COPROC_TYPE_FSM case FSM: #ifdef CONFIG_IDF_TARGET_ESP32 - rtc_isr_register(&ulp_interrupt, NULL, RTC_CNTL_ULP_CP_INT_RAW); + rtc_isr_register(&ulp_interrupt, NULL, RTC_CNTL_ULP_CP_INT_RAW, 0); #else - rtc_isr_register(&ulp_interrupt, NULL, RTC_CNTL_ULP_CP_INT_ST); + rtc_isr_register(&ulp_interrupt, NULL, RTC_CNTL_ULP_CP_INT_ST, 0); #endif REG_SET_BIT(RTC_CNTL_INT_ENA_REG, RTC_CNTL_ULP_CP_INT_ENA); break; + #endif + #ifdef CONFIG_ULP_COPROC_TYPE_RISCV case RISCV: - #ifndef CONFIG_IDF_TARGET_ESP32 - rtc_isr_register(&ulp_interrupt, NULL, RTC_CNTL_COCPU_INT_ST); + rtc_isr_register(&ulp_interrupt, NULL, RTC_CNTL_COCPU_INT_ST, 0); REG_SET_BIT(RTC_CNTL_INT_ENA_REG, RTC_CNTL_COCPU_INT_ENA); break; - #endif + #endif default: mp_raise_NotImplementedError(NULL); break; @@ -110,14 +112,18 @@ void espulp_ulpalarm_prepare_for_deep_sleep(void) { // disable ulp interrupt rtc_isr_deregister(&ulp_interrupt, NULL); + #ifdef CONFIG_ULP_COPROC_TYPE_FSM REG_CLR_BIT(RTC_CNTL_INT_ENA_REG, RTC_CNTL_ULP_CP_INT_ENA); - #ifndef CONFIG_IDF_TARGET_ESP32 + #endif + #ifdef CONFIG_ULP_COPROC_TYPE_RISCV REG_CLR_BIT(RTC_CNTL_INT_ENA_REG, RTC_CNTL_COCPU_INT_ENA); #endif // enable ulp wakeup esp_sleep_enable_ulp_wakeup(); + #if defined(SOC_PM_SUPPORT_RTC_SLOW_MEM_PD) && SOC_PM_SUPPORT_RTC_SLOW_MEM_PD esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_SLOW_MEM, ESP_PD_OPTION_ON); + #endif } bool espulp_ulpalarm_woke_this_cycle(void) { diff --git a/ports/espressif/common-hal/frequencyio/FrequencyIn.c b/ports/espressif/common-hal/frequencyio/FrequencyIn.c index d35614ea1948..92e76f120791 100644 --- a/ports/espressif/common-hal/frequencyio/FrequencyIn.c +++ b/ports/espressif/common-hal/frequencyio/FrequencyIn.c @@ -28,6 +28,10 @@ #include "py/runtime.h" +#include "driver/gpio.h" +#include "driver/timer.h" +#include "soc/timer_group_struct.h" + static void IRAM_ATTR pcnt_overflow_handler(void *self_in) { frequencyio_frequencyin_obj_t *self = self_in; // reset counter @@ -56,28 +60,20 @@ static void IRAM_ATTR timer_interrupt_handler(void *self_in) { // reset interrupt timg_dev_t *device = self->timer.group ? &(TIMERG1) : &(TIMERG0); - #if defined(CONFIG_IDF_TARGET_ESP32) - if (self->timer.idx) { - device->int_clr_timers.t1 = 1; - } else { - device->int_clr_timers.t0 = 1; - } - #else + #if SOC_TIMER_GROUP_TIMERS_PER_GROUP > 1 if (self->timer.idx) { device->int_clr_timers.t1_int_clr = 1; } else { - device->int_clr_timers.t0_int_clr = 1; - } + #endif + device->int_clr_timers.t0_int_clr = 1; + #if SOC_TIMER_GROUP_TIMERS_PER_GROUP > 1 +} #endif - #if defined(CONFIG_IDF_TARGET_ESP32) - device->hw_timer[self->timer.idx].config.alarm_en = 1; - #elif defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32C2) - device->hw_timer[self->timer.idx].config.tx_alarm_en = 1; - #elif defined(CONFIG_IDF_TARGET_ESP32S3) + #if defined(CONFIG_IDF_TARGET_ESP32S3) device->hw_timer[self->timer.idx].config.tn_alarm_en = 1; #else - #error No known CONFIG_IDF_TARGET_xxx found + device->hw_timer[self->timer.idx].config.tx_alarm_en = 1; #endif } diff --git a/ports/espressif/common-hal/hashlib/Hash.c b/ports/espressif/common-hal/hashlib/Hash.c index 8090128acb90..5aed82817af1 100644 --- a/ports/espressif/common-hal/hashlib/Hash.c +++ b/ports/espressif/common-hal/hashlib/Hash.c @@ -30,7 +30,7 @@ void common_hal_hashlib_hash_update(hashlib_hash_obj_t *self, const uint8_t *data, size_t datalen) { if (self->hash_type == MBEDTLS_SSL_HASH_SHA1) { - mbedtls_sha1_update_ret(&self->sha1, data, datalen); + mbedtls_sha1_update(&self->sha1, data, datalen); return; } } @@ -44,7 +44,7 @@ void common_hal_hashlib_hash_digest(hashlib_hash_obj_t *self, uint8_t *data, siz // the digest a second time. mbedtls_sha1_context copy; mbedtls_sha1_clone(©, &self->sha1); - mbedtls_sha1_finish_ret(&self->sha1, data); + mbedtls_sha1_finish(&self->sha1, data); mbedtls_sha1_clone(&self->sha1, ©); } } diff --git a/ports/espressif/common-hal/hashlib/__init__.c b/ports/espressif/common-hal/hashlib/__init__.c index 1e6b2a480283..7dd147be5f12 100644 --- a/ports/espressif/common-hal/hashlib/__init__.c +++ b/ports/espressif/common-hal/hashlib/__init__.c @@ -33,7 +33,7 @@ bool common_hal_hashlib_new(hashlib_hash_obj_t *self, const char *algorithm) { if (strcmp(algorithm, "sha1") == 0) { self->hash_type = MBEDTLS_SSL_HASH_SHA1; mbedtls_sha1_init(&self->sha1); - mbedtls_sha1_starts_ret(&self->sha1); + mbedtls_sha1_starts(&self->sha1); return true; } return false; diff --git a/ports/espressif/common-hal/mdns/RemoteService.h b/ports/espressif/common-hal/mdns/RemoteService.h index ca59f5ece601..b57793802443 100644 --- a/ports/espressif/common-hal/mdns/RemoteService.h +++ b/ports/espressif/common-hal/mdns/RemoteService.h @@ -26,7 +26,7 @@ #pragma once -#include "components/mdns/include/mdns.h" +#include "mdns.h" typedef struct { mp_obj_base_t base; diff --git a/ports/espressif/common-hal/mdns/Server.c b/ports/espressif/common-hal/mdns/Server.c index 9205f76087c2..0246a39587b9 100644 --- a/ports/espressif/common-hal/mdns/Server.c +++ b/ports/espressif/common-hal/mdns/Server.c @@ -31,7 +31,7 @@ #include "shared-bindings/mdns/RemoteService.h" #include "shared-bindings/wifi/__init__.h" -#include "components/mdns/include/mdns.h" +#include "mdns.h" // Track whether the underlying IDF mdns has been started so that we only // create a single inited MDNS object to CircuitPython. (After deinit, another @@ -125,22 +125,13 @@ size_t mdns_server_find(mdns_server_obj_t *self, const char *service_type, const if (search == NULL) { return 0; } + uint8_t num_results; mdns_result_t *results; - while (!mdns_query_async_get_results(search, 1, &results)) { + while (!mdns_query_async_get_results(search, 1, &results, &num_results)) { RUN_BACKGROUND_TASKS; } mdns_query_async_delete(search); - // Count how many results we got. - // TODO: Remove this loop when moving off 4.4. Newer APIs will give us num_results - // back directly. mdns_result_t *next = results; - uint8_t num_results = 0; - while (next != NULL) { - num_results++; - next = next->next; - } - - next = results; // Don't error if we're out of memory. Instead, truncate the tuple. uint8_t added = 0; while (next != NULL && added < out_len) { @@ -166,27 +157,19 @@ mp_obj_t common_hal_mdns_server_find(mdns_server_obj_t *self, const char *servic if (search == NULL) { mp_raise_RuntimeError(translate("Unable to start mDNS query")); } + uint8_t num_results; mdns_result_t *results; - while (!mdns_query_async_get_results(search, 1, &results)) { + while (!mdns_query_async_get_results(search, 1, &results, &num_results)) { RUN_BACKGROUND_TASKS; } mdns_query_async_delete(search); - // Count how many results we got. - // TODO: Remove this loop when moving off 4.4. Newer APIs will give us num_results - // back directly. - mdns_result_t *next = results; - uint8_t num_results = 0; - while (next != NULL) { - num_results++; - next = next->next; - } mp_obj_tuple_t *tuple = MP_OBJ_TO_PTR(mp_obj_new_tuple(num_results, NULL)); // The empty tuple object is shared and stored in flash so return early if // we got it. Without this we'll crash when trying to set len below. if (num_results == 0) { return MP_OBJ_FROM_PTR(tuple); } - next = results; + mdns_result_t *next = results; // Don't error if we're out of memory. Instead, truncate the tuple. uint8_t added = 0; while (next != NULL) { diff --git a/ports/espressif/common-hal/memorymap/AddressRange.c b/ports/espressif/common-hal/memorymap/AddressRange.c index b05283b7006f..9e87e5384b90 100644 --- a/ports/espressif/common-hal/memorymap/AddressRange.c +++ b/ports/espressif/common-hal/memorymap/AddressRange.c @@ -29,7 +29,6 @@ #include "shared-bindings/memorymap/AddressRange.h" #include "py/runtime.h" - #include "soc/soc.h" size_t allow_ranges[][2] = { @@ -39,7 +38,6 @@ size_t allow_ranges[][2] = { {SOC_RTC_DRAM_LOW, SOC_RTC_DRAM_HIGH}, // RTC peripheral registers {0x60008000, 0x60009000} - }; void common_hal_memorymap_addressrange_construct(memorymap_addressrange_obj_t *self, uint8_t *start_address, size_t length) { diff --git a/ports/espressif/common-hal/microcontroller/Pin.c b/ports/espressif/common-hal/microcontroller/Pin.c index 2ba805eaabe6..5c2724e1030c 100644 --- a/ports/espressif/common-hal/microcontroller/Pin.c +++ b/ports/espressif/common-hal/microcontroller/Pin.c @@ -30,7 +30,7 @@ #include "py/mphal.h" -#include "components/driver/include/driver/gpio.h" +#include "components/driver/gpio/include/driver/gpio.h" #include "components/hal/include/hal/gpio_hal.h" STATIC uint64_t _never_reset_pin_mask; @@ -38,6 +38,66 @@ STATIC uint64_t _skip_reset_once_pin_mask; STATIC uint64_t _preserved_pin_mask; STATIC uint64_t _in_use_pin_mask; +#define GPIO_SEL_0 (BIT(0)) /*!< Pin 0 selected */ +#define GPIO_SEL_1 (BIT(1)) /*!< Pin 1 selected */ +#define GPIO_SEL_2 (BIT(2)) /*!< Pin 2 selected */ +#define GPIO_SEL_3 (BIT(3)) /*!< Pin 3 selected */ +#define GPIO_SEL_4 (BIT(4)) /*!< Pin 4 selected */ +#define GPIO_SEL_5 (BIT(5)) /*!< Pin 5 selected */ +#define GPIO_SEL_6 (BIT(6)) /*!< Pin 6 selected */ +#define GPIO_SEL_7 (BIT(7)) /*!< Pin 7 selected */ +#define GPIO_SEL_8 (BIT(8)) /*!< Pin 8 selected */ +#define GPIO_SEL_9 (BIT(9)) /*!< Pin 9 selected */ +#define GPIO_SEL_10 (BIT(10)) /*!< Pin 10 selected */ +#define GPIO_SEL_11 (BIT(11)) /*!< Pin 11 selected */ +#define GPIO_SEL_12 (BIT(12)) /*!< Pin 12 selected */ +#define GPIO_SEL_13 (BIT(13)) /*!< Pin 13 selected */ +#define GPIO_SEL_14 (BIT(14)) /*!< Pin 14 selected */ +#define GPIO_SEL_15 (BIT(15)) /*!< Pin 15 selected */ +#define GPIO_SEL_16 (BIT(16)) /*!< Pin 16 selected */ +#define GPIO_SEL_17 (BIT(17)) /*!< Pin 17 selected */ +#define GPIO_SEL_18 (BIT(18)) /*!< Pin 18 selected */ +#define GPIO_SEL_19 (BIT(19)) /*!< Pin 19 selected */ +#define GPIO_SEL_20 (BIT(20)) /*!< Pin 20 selected */ +#if SOC_GPIO_PIN_COUNT > 21 +#define GPIO_SEL_21 (BIT(21)) /*!< Pin 21 selected */ +#endif +#if SOC_GPIO_PIN_COUNT > 22 +#define GPIO_SEL_22 (BIT(22)) /*!< Pin 22 selected */ +#define GPIO_SEL_23 (BIT(23)) /*!< Pin 23 selected */ +#define GPIO_SEL_24 (BIT(24)) /*!< Pin 24 selected */ +#define GPIO_SEL_25 (BIT(25)) /*!< Pin 25 selected */ +#define GPIO_SEL_26 (BIT(26)) /*!< Pin 26 selected */ +#define GPIO_SEL_27 (BIT(27)) /*!< Pin 27 selected */ +#endif +#if SOC_GPIO_PIN_COUNT > 28 +#define GPIO_SEL_28 (BIT(28)) /*!< Pin 28 selected */ +#define GPIO_SEL_29 (BIT(29)) /*!< Pin 29 selected */ +#define GPIO_SEL_30 (BIT(30)) /*!< Pin 30 selected */ +#define GPIO_SEL_31 (BIT(31)) /*!< Pin 31 selected */ +#define GPIO_SEL_32 ((uint64_t)PIN_BIT(32)) /*!< Pin 32 selected */ +#define GPIO_SEL_33 ((uint64_t)PIN_BIT(33)) /*!< Pin 33 selected */ +#define GPIO_SEL_34 ((uint64_t)PIN_BIT(34)) /*!< Pin 34 selected */ +#define GPIO_SEL_35 ((uint64_t)PIN_BIT(35)) /*!< Pin 35 selected */ +#define GPIO_SEL_36 ((uint64_t)PIN_BIT(36)) /*!< Pin 36 selected */ +#define GPIO_SEL_37 ((uint64_t)PIN_BIT(37)) /*!< Pin 37 selected */ +#define GPIO_SEL_38 ((uint64_t)PIN_BIT(38)) /*!< Pin 38 selected */ +#define GPIO_SEL_39 ((uint64_t)PIN_BIT(39)) /*!< Pin 39 selected */ +#endif +#if SOC_GPIO_PIN_COUNT > 40 +#define GPIO_SEL_40 ((uint64_t)PIN_BIT(40)) /*!< Pin 40 selected */ +#define GPIO_SEL_41 ((uint64_t)PIN_BIT(41)) /*!< Pin 41 selected */ +#define GPIO_SEL_42 ((uint64_t)PIN_BIT(42)) /*!< Pin 42 selected */ +#define GPIO_SEL_43 ((uint64_t)PIN_BIT(43)) /*!< Pin 43 selected */ +#define GPIO_SEL_44 ((uint64_t)PIN_BIT(44)) /*!< Pin 44 selected */ +#define GPIO_SEL_45 ((uint64_t)PIN_BIT(45)) /*!< Pin 45 selected */ +#define GPIO_SEL_46 ((uint64_t)PIN_BIT(46)) /*!< Pin 46 selected */ +#endif +#if SOC_GPIO_PIN_COUNT > 47 +#define GPIO_SEL_47 ((uint64_t)PIN_BIT(47)) /*!< Pin 47 selected */ +#define GPIO_SEL_48 ((uint64_t)PIN_BIT(48)) /*!< Pin 48 selected */ +#endif + // Bit mask of all pins that should never EVER be reset. // Typically these are SPI flash and PSRAM control pins, and communication pins. // "Reset forbidden" is stronger than "never reset" below, which may only be temporary. @@ -70,6 +130,51 @@ static const uint64_t pin_mask_reset_forbidden = #endif #endif // ESP32C3 + #if defined(CONFIG_IDF_TARGET_ESP32C6) + // Never ever reset pins used to communicate with SPI flash. + GPIO_SEL_24 | // SPICS0 + GPIO_SEL_25 | // SPIQ + GPIO_SEL_26 | // SPIWP + GPIO_SEL_28 | // SPIHD + GPIO_SEL_29 | // SPICLK + GPIO_SEL_30 | // SPID + #if CIRCUITPY_ESP_USB_SERIAL_JTAG + // Never ever reset serial/JTAG communication pins. + GPIO_SEL_12 | // USB D- + GPIO_SEL_13 | // USB D+ + #endif + #if defined(CONFIG_ESP_CONSOLE_UART_DEFAULT) && CONFIG_ESP_CONSOLE_UART_DEFAULT && CONFIG_ESP_CONSOLE_UART_NUM == 0 + // Never reset debug UART/console pins. + GPIO_SEL_16 | + GPIO_SEL_17 | + #endif + #endif // ESP32C6 + + #if defined(CONFIG_IDF_TARGET_ESP32H2) + // Never ever reset pins used to communicate with the in-package SPI flash. + GPIO_SEL_15 | + GPIO_SEL_16 | + GPIO_SEL_17 | + GPIO_SEL_18 | + GPIO_SEL_19 | + GPIO_SEL_20 | + GPIO_SEL_21 | + // It isn't clear what these are used for but they aren't broken out for + // user use. + GPIO_SEL_6 | + GPIO_SEL_7 | + #if CIRCUITPY_ESP_USB_SERIAL_JTAG + // Never ever reset serial/JTAG communication pins. + GPIO_SEL_26 | // USB D- + GPIO_SEL_27 | // USB D+ + #endif + #if defined(CONFIG_ESP_CONSOLE_UART_DEFAULT) && CONFIG_ESP_CONSOLE_UART_DEFAULT && CONFIG_ESP_CONSOLE_UART_NUM == 0 + // Never reset debug UART/console pins. + GPIO_SEL_23 | + GPIO_SEL_24 | + #endif + #endif // ESP32C6 + #if defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32S3) // Never ever reset pins used to communicate with SPI flash and PSRAM. GPIO_SEL_19 | // USB D- @@ -98,6 +203,11 @@ static const uint64_t pin_mask_reset_forbidden = GPIO_SEL_19 | // USB D- GPIO_SEL_20 | // USB D+ #endif + #if defined(CONFIG_ESP_CONSOLE_UART_DEFAULT) && CONFIG_ESP_CONSOLE_UART_DEFAULT && CONFIG_ESP_CONSOLE_UART_NUM == 0 + // Don't reset/use the IDF UART console. + GPIO_SEL_43 | // UART TX + GPIO_SEL_44 | // UART RX + #endif #endif // ESP32S2, ESP32S3 0; // Terminate last "|". @@ -193,10 +303,12 @@ void preserve_pin_number(gpio_num_t pin_number) { _preserved_pin_mask |= PIN_BIT(pin_number); } if (_preserved_pin_mask) { + #if defined(SOC_GPIO_SUPPORT_HOLD_SINGLE_IO_IN_DSLP) && !SOC_GPIO_SUPPORT_HOLD_SINGLE_IO_IN_DSLP // Allow pin holds to work during deep sleep. This increases power consumption noticeably // during deep sleep, so enable holds only if we actually are holding some pins. // 270uA or so extra current is consumed even with no pins held. gpio_deep_sleep_hold_en(); + #endif } } @@ -240,7 +352,9 @@ void common_hal_reset_pin(const mcu_pin_obj_t *pin) { void reset_all_pins(void) { // Undo deep sleep holds in case we woke up from deep sleep. // We still need to unhold individual pins, which is done by _reset_pin. + #if defined(SOC_GPIO_SUPPORT_HOLD_SINGLE_IO_IN_DSLP) && !SOC_GPIO_SUPPORT_HOLD_SINGLE_IO_IN_DSLP gpio_deep_sleep_hold_dis(); + #endif for (uint8_t i = 0; i < GPIO_PIN_COUNT; i++) { uint32_t iomux_address = GPIO_PIN_MUX_REG[i]; @@ -252,7 +366,7 @@ void reset_all_pins(void) { } _reset_pin(i); } - _in_use_pin_mask = _never_reset_pin_mask; + _in_use_pin_mask = _never_reset_pin_mask | pin_mask_reset_forbidden; // Don't continue to skip resetting these pins. _skip_reset_once_pin_mask = 0; } diff --git a/ports/espressif/common-hal/microcontroller/Processor.c b/ports/espressif/common-hal/microcontroller/Processor.c index 5b7463c9ffa3..4248a972f49c 100644 --- a/ports/espressif/common-hal/microcontroller/Processor.c +++ b/ports/espressif/common-hal/microcontroller/Processor.c @@ -41,21 +41,23 @@ #include "soc/efuse_reg.h" #if !defined(CONFIG_IDF_TARGET_ESP32) -#include "driver/temp_sensor.h" +#include "driver/temperature_sensor.h" #endif float common_hal_mcu_processor_get_temperature(void) { - float tsens_out; + float tsens_value; #if defined(CONFIG_IDF_TARGET_ESP32) return NAN; #else - temp_sensor_config_t temp_sensor = TSENS_CONFIG_DEFAULT(); // DEFAULT: range:-10℃ ~ 80℃, error < 1℃. - temp_sensor_set_config(temp_sensor); - temp_sensor_start(); - temp_sensor_read_celsius(&tsens_out); - temp_sensor_stop(); + temperature_sensor_handle_t temp_sensor = NULL; + temperature_sensor_config_t temp_sensor_config = TEMPERATURE_SENSOR_CONFIG_DEFAULT(-10, 80); // DEFAULT: range:-10℃ ~ 80℃, error < 1℃. + temperature_sensor_install(&temp_sensor_config, &temp_sensor); + temperature_sensor_enable(temp_sensor); + temperature_sensor_get_celsius(temp_sensor, &tsens_value); + temperature_sensor_disable(temp_sensor); + temperature_sensor_uninstall(temp_sensor); #endif - return tsens_out; + return tsens_value; } float common_hal_mcu_processor_get_voltage(void) { @@ -63,17 +65,7 @@ float common_hal_mcu_processor_get_voltage(void) { } uint32_t common_hal_mcu_processor_get_frequency(void) { - #if defined(CONFIG_IDF_TARGET_ESP32) - return CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ * 1000000; - #elif defined(CONFIG_IDF_TARGET_ESP32C3) - return CONFIG_ESP32C3_DEFAULT_CPU_FREQ_MHZ * 1000000; - #elif defined(CONFIG_IDF_TARGET_ESP32S2) - return CONFIG_ESP32S2_DEFAULT_CPU_FREQ_MHZ * 1000000; - #elif defined(CONFIG_IDF_TARGET_ESP32S3) - return CONFIG_ESP32S3_DEFAULT_CPU_FREQ_MHZ * 1000000; - #else - #error No known CONFIG_IDF_TARGET_xxx found - #endif + return CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ * 1000000; } STATIC uint8_t swap_nibbles(uint8_t v) { @@ -88,6 +80,8 @@ void common_hal_mcu_processor_get_uid(uint8_t raw_id[]) { #if defined(CONFIG_IDF_TARGET_ESP32) uint32_t mac_address_part = REG_READ(EFUSE_BLK0_RDATA1_REG); + #elif defined(CONFIG_IDF_TARGET_ESP32H2) + uint32_t mac_address_part = REG_READ(EFUSE_RD_MAC_SYS_0_REG); #else uint32_t mac_address_part = REG_READ(EFUSE_RD_MAC_SPI_SYS_0_REG); #endif @@ -103,6 +97,8 @@ void common_hal_mcu_processor_get_uid(uint8_t raw_id[]) { // and 16 in the high order word #if defined(CONFIG_IDF_TARGET_ESP32) mac_address_part = REG_READ(EFUSE_BLK0_RDATA2_REG); + #elif defined(CONFIG_IDF_TARGET_ESP32H2) + mac_address_part = REG_READ(EFUSE_RD_MAC_SYS_1_REG); #else mac_address_part = REG_READ(EFUSE_RD_MAC_SPI_SYS_1_REG); #endif diff --git a/ports/espressif/common-hal/microcontroller/__init__.c b/ports/espressif/common-hal/microcontroller/__init__.c index 7ec9b215f1f3..470bebae5851 100644 --- a/ports/espressif/common-hal/microcontroller/__init__.c +++ b/ports/espressif/common-hal/microcontroller/__init__.c @@ -42,21 +42,30 @@ #include "freertos/FreeRTOS.h" -#include "soc/rtc_cntl_reg.h" #include "esp_private/system_internal.h" #if defined(CONFIG_IDF_TARGET_ESP32) +#include "soc/rtc_cntl_reg.h" #include "esp32/rom/rtc.h" #elif defined(CONFIG_IDF_TARGET_ESP32C3) +#include "soc/rtc_cntl_reg.h" #include "esp32c3/rom/rtc.h" +#elif defined(CONFIG_IDF_TARGET_ESP32C6) +#include "soc/lp_aon_reg.h" +#include "esp32c6/rom/rtc.h" #elif defined(CONFIG_IDF_TARGET_ESP32S2) +#include "soc/rtc_cntl_reg.h" #include "esp32s2/rom/rtc.h" #include "esp32s2/rom/usb/usb_persist.h" #include "esp32s2/rom/usb/chip_usb_dw_wrapper.h" #elif defined(CONFIG_IDF_TARGET_ESP32S3) +#include "soc/rtc_cntl_reg.h" #include "esp32s3/rom/rtc.h" #include "esp32s3/rom/usb/usb_persist.h" #include "esp32s3/rom/usb/chip_usb_dw_wrapper.h" +#elif defined(CONFIG_IDF_TARGET_ESP32H2) +#include "soc/lp_aon_reg.h" +#include "esp32h2/rom/rtc.h" #else #error No known CONFIG_IDF_TARGET_xxx found #endif @@ -101,10 +110,18 @@ void common_hal_mcu_on_next_reset(mcu_runmode_t runmode) { #if defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32S3) REG_WRITE(RTC_RESET_CAUSE_REG, 0); // reset uf2 #endif + #ifdef SOC_LP_AON_SUPPORTED + REG_WRITE(LP_AON_STORE0_REG, 0); // reset safe mode + #else REG_WRITE(RTC_CNTL_STORE0_REG, 0); // reset safe mode + #endif #if !defined(CONFIG_IDF_TARGET_ESP32) + #ifdef SOC_LP_AON_SUPPORTED + REG_WRITE(LP_AON_SYS_CFG_REG, 0); // reset bootloader + #else REG_WRITE(RTC_CNTL_OPTION1_REG, 0); // reset bootloader #endif + #endif break; case RUNMODE_SAFE_MODE: // enter safe mode on next boot @@ -118,8 +135,12 @@ void common_hal_mcu_on_next_reset(mcu_runmode_t runmode) { #if defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32S3) chip_usb_set_persist_flags(USBDC_BOOT_DFU); #endif + #ifdef SOC_LP_AON_SUPPORTED + REG_WRITE(LP_AON_SYS_CFG_REG, LP_AON_FORCE_DOWNLOAD_BOOT); + #else REG_WRITE(RTC_CNTL_OPTION1_REG, RTC_CNTL_FORCE_DOWNLOAD_BOOT); #endif + #endif break; default: break; diff --git a/ports/espressif/common-hal/neopixel_write/__init__.c b/ports/espressif/common-hal/neopixel_write/__init__.c index 148b47aeb0be..6d91cc776615 100644 --- a/ports/espressif/common-hal/neopixel_write/__init__.c +++ b/ports/espressif/common-hal/neopixel_write/__init__.c @@ -44,7 +44,6 @@ #include "py/runtime.h" #include "shared-bindings/neopixel_write/__init__.h" #include "supervisor/port.h" -#include "components/driver/include/driver/rmt.h" #include "peripherals/rmt.h" // Use closer to WS2812-style timings instead of WS2812B, to accommodate more varieties. diff --git a/ports/espressif/common-hal/os/__init__.c b/ports/espressif/common-hal/os/__init__.c index 1dcd3e46e017..bc18c838ae17 100644 --- a/ports/espressif/common-hal/os/__init__.c +++ b/ports/espressif/common-hal/os/__init__.c @@ -33,6 +33,7 @@ #include "shared-bindings/os/__init__.h" #include "esp_system.h" +#include "esp_random.h" STATIC const qstr os_uname_info_fields[] = { MP_QSTR_sysname, MP_QSTR_nodename, @@ -60,7 +61,7 @@ mp_obj_t common_hal_os_uname(void) { return (mp_obj_t)&os_uname_info_obj; } -bool common_hal_os_urandom(uint8_t *buffer, uint32_t length) { +bool common_hal_os_urandom(uint8_t *buffer, mp_uint_t length) { uint32_t i = 0; while (i < length) { uint32_t new_random = esp_random(); diff --git a/ports/espressif/common-hal/paralleldisplay/ParallelBus.c b/ports/espressif/common-hal/paralleldisplay/ParallelBus.c index c9ba3edd06b3..49008948b742 100644 --- a/ports/espressif/common-hal/paralleldisplay/ParallelBus.c +++ b/ports/espressif/common-hal/paralleldisplay/ParallelBus.c @@ -36,8 +36,8 @@ #include "common-hal/microcontroller/Pin.h" #include "py/runtime.h" -#include "i2s_lcd_driver.h" #include "driver/gpio.h" + /* * Current pin limitations for ESP32-S2 ParallelBus: * - data0 pin must be byte aligned @@ -166,11 +166,12 @@ bool common_hal_paralleldisplay_parallelbus_bus_free(mp_obj_t obj) { bool common_hal_paralleldisplay_parallelbus_begin_transaction(mp_obj_t obj) { paralleldisplay_parallelbus_obj_t *self = MP_OBJ_TO_PTR(obj); - bool r = i2s_lcd_acquire_nonblocking(self->handle, 1); - if (r) { + bool lock_acquired = false; + i2s_lcd_acquire_nonblocking(self->handle, 1, &lock_acquired); + if (lock_acquired) { gpio_set_level(self->config.pin_num_cs, false); } - return r; + return lock_acquired; } void common_hal_paralleldisplay_parallelbus_send(mp_obj_t obj, display_byte_type_t byte_type, diff --git a/ports/espressif/common-hal/pulseio/PulseIn.h b/ports/espressif/common-hal/pulseio/PulseIn.h index 55714b04b2b6..92db65f772d0 100644 --- a/ports/espressif/common-hal/pulseio/PulseIn.h +++ b/ports/espressif/common-hal/pulseio/PulseIn.h @@ -30,7 +30,6 @@ #include "common-hal/microcontroller/Pin.h" #include "py/obj.h" -#include "components/driver/include/driver/rmt.h" #include "peripherals/rmt.h" typedef struct { diff --git a/ports/espressif/common-hal/pulseio/PulseOut.h b/ports/espressif/common-hal/pulseio/PulseOut.h index 359280a86f7d..66b01df3188a 100644 --- a/ports/espressif/common-hal/pulseio/PulseOut.h +++ b/ports/espressif/common-hal/pulseio/PulseOut.h @@ -28,7 +28,6 @@ #define MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_PULSEIO_PULSEOUT_H #include "common-hal/microcontroller/Pin.h" -#include "components/driver/include/driver/rmt.h" #include "peripherals/rmt.h" #include "py/obj.h" diff --git a/ports/espressif/common-hal/pwmio/PWMOut.c b/ports/espressif/common-hal/pwmio/PWMOut.c index 519885a03261..225560b34a9a 100644 --- a/ports/espressif/common-hal/pwmio/PWMOut.c +++ b/ports/espressif/common-hal/pwmio/PWMOut.c @@ -28,7 +28,8 @@ #include "common-hal/pwmio/PWMOut.h" #include "shared-bindings/pwmio/PWMOut.h" #include "py/runtime.h" -#include "components/driver/include/driver/ledc.h" +#include "driver/ledc.h" +#include "soc/soc.h" #define INDEX_EMPTY 0xFF @@ -40,7 +41,7 @@ STATIC bool never_reset_chan[LEDC_CHANNEL_MAX]; STATIC uint32_t calculate_duty_cycle(uint32_t frequency) { uint32_t duty_bits = 0; - uint32_t interval = LEDC_APB_CLK_HZ / frequency; + uint32_t interval = APB_CLK_FREQ / frequency; for (size_t i = 0; i < 32; i++) { if (!(interval >> i)) { duty_bits = i - 1; diff --git a/ports/espressif/common-hal/pwmio/PWMOut.h b/ports/espressif/common-hal/pwmio/PWMOut.h index cde579ce89a8..a7711ebf078c 100644 --- a/ports/espressif/common-hal/pwmio/PWMOut.h +++ b/ports/espressif/common-hal/pwmio/PWMOut.h @@ -28,7 +28,7 @@ #define MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_PWMIO_PWMOUT_H #include "common-hal/microcontroller/Pin.h" -#include "components/driver/include/driver/ledc.h" +#include "components/driver/ledc/include/driver/ledc.h" typedef struct { mp_obj_base_t base; diff --git a/ports/espressif/common-hal/socketpool/Socket.c b/ports/espressif/common-hal/socketpool/Socket.c index 9d3c22aca8ed..f063873df993 100644 --- a/ports/espressif/common-hal/socketpool/Socket.c +++ b/ports/espressif/common-hal/socketpool/Socket.c @@ -402,7 +402,7 @@ void common_hal_socketpool_socket_connect(socketpool_socket_obj_t *self, #pragma GCC diagnostic ignored "-Wcast-align" dest_addr.sin_addr.s_addr = ((struct sockaddr_in *)result_i->ai_addr)->sin_addr.s_addr; #pragma GCC diagnostic pop - freeaddrinfo(result_i); + lwip_freeaddrinfo(result_i); dest_addr.sin_family = AF_INET; dest_addr.sin_port = htons(port); @@ -582,7 +582,7 @@ mp_uint_t common_hal_socketpool_socket_sendto(socketpool_socket_obj_t *self, #pragma GCC diagnostic ignored "-Wcast-align" dest_addr.sin_addr.s_addr = ((struct sockaddr_in *)result_i->ai_addr)->sin_addr.s_addr; #pragma GCC diagnostic pop - freeaddrinfo(result_i); + lwip_freeaddrinfo(result_i); dest_addr.sin_family = AF_INET; dest_addr.sin_port = htons(port); diff --git a/ports/espressif/common-hal/socketpool/Socket.h b/ports/espressif/common-hal/socketpool/Socket.h index dfd1cbfc110a..4c86c9b379d4 100644 --- a/ports/espressif/common-hal/socketpool/Socket.h +++ b/ports/espressif/common-hal/socketpool/Socket.h @@ -32,6 +32,7 @@ #include "common-hal/ssl/SSLContext.h" #include "components/esp-tls/esp_tls.h" +#include "components/lwip/lwip/src/include/lwip/sockets.h" typedef struct ssl_sslsocket_obj ssl_sslsocket_obj_t; diff --git a/ports/espressif/common-hal/socketpool/SocketPool.c b/ports/espressif/common-hal/socketpool/SocketPool.c index 780e90c42c60..9137ac3c8f90 100644 --- a/ports/espressif/common-hal/socketpool/SocketPool.c +++ b/ports/espressif/common-hal/socketpool/SocketPool.c @@ -60,7 +60,7 @@ mp_obj_t common_hal_socketpool_socketpool_gethostbyname(socketpool_socketpool_ob .ai_socktype = SOCK_STREAM, }; struct addrinfo *res; - int err = getaddrinfo(host, NULL, &hints, &res); + int err = lwip_getaddrinfo(host, NULL, &hints, &res); if (err != 0 || res == NULL) { return mp_const_none; } @@ -72,7 +72,7 @@ mp_obj_t common_hal_socketpool_socketpool_gethostbyname(socketpool_socketpool_ob char ip_str[IP4ADDR_STRLEN_MAX]; inet_ntoa_r(*addr, ip_str, IP4ADDR_STRLEN_MAX); mp_obj_t ip_obj = mp_obj_new_str(ip_str, strlen(ip_str)); - freeaddrinfo(res); + lwip_freeaddrinfo(res); return ip_obj; } diff --git a/ports/espressif/common-hal/ssl/SSLContext.c b/ports/espressif/common-hal/ssl/SSLContext.c index 1923a9c2a9c7..c583cecaa76e 100644 --- a/ports/espressif/common-hal/ssl/SSLContext.c +++ b/ports/espressif/common-hal/ssl/SSLContext.c @@ -32,6 +32,7 @@ #include "components/mbedtls/esp_crt_bundle/include/esp_crt_bundle.h" #include "py/runtime.h" +#include "lwip/sockets.h" void common_hal_ssl_sslcontext_construct(ssl_sslcontext_obj_t *self) { diff --git a/ports/espressif/common-hal/ssl/SSLSocket.c b/ports/espressif/common-hal/ssl/SSLSocket.c index 2446ce30053e..b94924000b88 100644 --- a/ports/espressif/common-hal/ssl/SSLSocket.c +++ b/ports/espressif/common-hal/ssl/SSLSocket.c @@ -33,7 +33,9 @@ #include "shared/runtime/interrupt_char.h" #include "py/mperrno.h" #include "py/runtime.h" +#include "supervisor/port.h" #include "supervisor/shared/tick.h" +#include "lwip/sockets.h" ssl_sslsocket_obj_t *common_hal_ssl_sslsocket_accept(ssl_sslsocket_obj_t *self, uint8_t *ip, uint32_t *port) { @@ -55,12 +57,16 @@ void common_hal_ssl_sslsocket_close(ssl_sslsocket_obj_t *self) { void common_hal_ssl_sslsocket_connect(ssl_sslsocket_obj_t *self, const char *host, size_t hostlen, uint32_t port) { + // Yield briefly so that the IDF can clean up memory before we need more. + port_yield(); int result = esp_tls_conn_new_sync(host, hostlen, port, &self->ssl_config, self->tls); self->sock->connected = result >= 0; if (result < 0) { int esp_tls_code; int flags; - esp_err_t err = esp_tls_get_and_clear_last_error(self->tls->error_handle, &esp_tls_code, &flags); + esp_tls_error_handle_t tls_error_handle; + esp_tls_get_error_handle(self->tls, &tls_error_handle); + esp_err_t err = esp_tls_get_and_clear_last_error(tls_error_handle, &esp_tls_code, &flags); if (err == ESP_ERR_MBEDTLS_SSL_SETUP_FAILED) { mp_raise_espidf_MemoryError(); @@ -154,7 +160,9 @@ mp_uint_t common_hal_ssl_sslsocket_send(ssl_sslsocket_obj_t *self, const uint8_t if (sent < 0) { int esp_tls_code; int flags; - esp_err_t err = esp_tls_get_and_clear_last_error(self->tls->error_handle, &esp_tls_code, &flags); + esp_tls_error_handle_t tls_error_handle; + esp_tls_get_error_handle(self->tls, &tls_error_handle); + esp_err_t err = esp_tls_get_and_clear_last_error(tls_error_handle, &esp_tls_code, &flags); if (err == ESP_ERR_MBEDTLS_SSL_SETUP_FAILED) { mp_raise_espidf_MemoryError(); diff --git a/ports/espressif/common-hal/watchdog/WatchDogTimer.c b/ports/espressif/common-hal/watchdog/WatchDogTimer.c index 159c99458f5f..68437958e575 100644 --- a/ports/espressif/common-hal/watchdog/WatchDogTimer.c +++ b/ports/espressif/common-hal/watchdog/WatchDogTimer.c @@ -25,17 +25,27 @@ */ #include "py/runtime.h" -#include "common-hal/watchdog/WatchDogTimer.h" #include "shared-bindings/watchdog/__init__.h" #include "shared-bindings/microcontroller/__init__.h" +#include "common-hal/watchdog/WatchDogTimer.h" + #include "esp_task_wdt.h" extern void esp_task_wdt_isr_user_handler(void); + void esp_task_wdt_isr_user_handler(void) { + // just delete, deiniting TWDT in isr context causes a crash + if (esp_task_wdt_delete(NULL) == ESP_OK) { + watchdog_watchdogtimer_obj_t *self = &common_hal_mcu_watchdogtimer_obj; + self->mode = WATCHDOGMODE_NONE; + } + + // schedule watchdog timeout exception mp_obj_exception_clear_traceback(MP_OBJ_FROM_PTR(&mp_watchdog_timeout_exception)); MP_STATE_THREAD(mp_pending_exception) = &mp_watchdog_timeout_exception; + #if MICROPY_ENABLE_SCHEDULER if (MP_STATE_VM(sched_state) == MP_SCHED_IDLE) { MP_STATE_VM(sched_state) = MP_SCHED_PENDING; @@ -44,26 +54,28 @@ void esp_task_wdt_isr_user_handler(void) { } void common_hal_watchdog_feed(watchdog_watchdogtimer_obj_t *self) { - if (esp_task_wdt_reset() != ESP_OK) { - mp_raise_RuntimeError(translate("watchdog not initialized")); - } + esp_task_wdt_reset(); } void common_hal_watchdog_deinit(watchdog_watchdogtimer_obj_t *self) { + if (self->mode == WATCHDOGMODE_NONE) { + return; + } if (esp_task_wdt_delete(NULL) == ESP_OK && esp_task_wdt_deinit() == ESP_OK) { self->mode = WATCHDOGMODE_NONE; } } -void watchdog_reset(void) { - common_hal_watchdog_deinit(&common_hal_mcu_watchdogtimer_obj); -} - -static void wdt_config(watchdog_watchdogtimer_obj_t *self) { +static void wdt_config(uint32_t timeout, watchdog_watchdogmode_t mode) { // enable panic hanler in WATCHDOGMODE_RESET mode // initialize Task Watchdog Timer (TWDT) - if (esp_task_wdt_init((uint32_t)self->timeout, (self->mode == WATCHDOGMODE_RESET)) != ESP_OK) { - mp_raise_RuntimeError(translate("Initialization failed due to lack of memory")); + esp_task_wdt_config_t twdt_config = { + .timeout_ms = timeout, + .idle_core_mask = (1 << portNUM_PROCESSORS) - 1, // Bitmask of all cores + .trigger_panic = (mode == WATCHDOGMODE_RESET), + }; + if (esp_task_wdt_init(&twdt_config) != ESP_OK) { + mp_raise_msg(&mp_type_MemoryError, NULL); } esp_task_wdt_add(NULL); } @@ -73,12 +85,17 @@ mp_float_t common_hal_watchdog_get_timeout(watchdog_watchdogtimer_obj_t *self) { } void common_hal_watchdog_set_timeout(watchdog_watchdogtimer_obj_t *self, mp_float_t new_timeout) { + if (!(self->timeout < new_timeout || self->timeout > new_timeout)) { + return; + } + if ((uint64_t)new_timeout > UINT32_MAX) { - mp_raise_ValueError(translate("timeout duration exceeded the maximum supported value")); + mp_raise_ValueError_varg(translate("%q must be <= %u"), MP_QSTR_timeout, UINT32_MAX); } - if ((uint32_t)self->timeout != (uint32_t)new_timeout) { - self->timeout = new_timeout; - wdt_config(self); + self->timeout = new_timeout; + + if (self->mode != WATCHDOGMODE_NONE) { + wdt_config(new_timeout, self->mode); } } @@ -87,8 +104,21 @@ watchdog_watchdogmode_t common_hal_watchdog_get_mode(watchdog_watchdogtimer_obj_ } void common_hal_watchdog_set_mode(watchdog_watchdogtimer_obj_t *self, watchdog_watchdogmode_t new_mode) { - if (self->mode != new_mode) { - self->mode = new_mode; - wdt_config(self); + if (self->mode == new_mode) { + return; + } + + switch (new_mode) { + case WATCHDOGMODE_NONE: + common_hal_watchdog_deinit(self); + break; + case WATCHDOGMODE_RAISE: + case WATCHDOGMODE_RESET: + wdt_config(self->timeout, new_mode); + break; + default: + return; } + + self->mode = new_mode; } diff --git a/ports/espressif/common-hal/watchdog/WatchDogTimer.h b/ports/espressif/common-hal/watchdog/WatchDogTimer.h index 8d95bfa4cc40..461d11f18cfc 100644 --- a/ports/espressif/common-hal/watchdog/WatchDogTimer.h +++ b/ports/espressif/common-hal/watchdog/WatchDogTimer.h @@ -28,6 +28,9 @@ #define MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_WATCHDOG_WATCHDOGTIMER_H #include "py/obj.h" + +#include "shared-module/watchdog/__init__.h" + #include "shared-bindings/watchdog/WatchDogMode.h" #include "shared-bindings/watchdog/WatchDogTimer.h" @@ -37,7 +40,4 @@ struct _watchdog_watchdogtimer_obj_t { watchdog_watchdogmode_t mode; }; -// This needs to be called in order to disable the watchdog -void watchdog_reset(void); - #endif // MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_WATCHDOG_WATCHDOGTIMER_H diff --git a/ports/espressif/common-hal/wifi/Radio.c b/ports/espressif/common-hal/wifi/Radio.c index e6385ee1e5aa..b96c76adffd9 100644 --- a/ports/espressif/common-hal/wifi/Radio.c +++ b/ports/espressif/common-hal/wifi/Radio.c @@ -44,7 +44,7 @@ #include "components/lwip/include/apps/ping/ping_sock.h" #if CIRCUITPY_MDNS -#include "components/mdns/include/mdns.h" +#include "mdns.h" #endif #define MAC_ADDRESS_LENGTH 6 diff --git a/ports/espressif/common-hal/wifi/Radio.h b/ports/espressif/common-hal/wifi/Radio.h index 3c0828bf0bd9..ddab4b2a5bb8 100644 --- a/ports/espressif/common-hal/wifi/Radio.h +++ b/ports/espressif/common-hal/wifi/Radio.h @@ -34,6 +34,8 @@ #include "shared-bindings/wifi/ScannedNetworks.h" #include "shared-bindings/wifi/Network.h" +#include "esp_netif_types.h" + // Event bits for the Radio event group. #define WIFI_SCAN_DONE_BIT BIT0 #define WIFI_CONNECTED_BIT BIT1 diff --git a/ports/espressif/common-hal/wifi/__init__.c b/ports/espressif/common-hal/wifi/__init__.c index cfcfaf024ba5..970eb8eb0441 100644 --- a/ports/espressif/common-hal/wifi/__init__.c +++ b/ports/espressif/common-hal/wifi/__init__.c @@ -32,6 +32,7 @@ #include "shared-bindings/wifi/Monitor.h" #include "shared-bindings/wifi/Radio.h" +#include "py/gc.h" #include "py/mpstate.h" #include "py/runtime.h" @@ -121,7 +122,7 @@ static void event_handler(void *arg, esp_event_base_t event_base, // Cases to handle later. // case WIFI_EVENT_STA_AUTHMODE_CHANGE: default: { - ESP_LOGW(TAG, "event %d 0x%02x", event_id, event_id); + ESP_LOGW(TAG, "event %ld 0x%02ld", event_id, event_id); break; } } @@ -162,8 +163,8 @@ void common_hal_wifi_init(bool user_initiated) { if (!wifi_ever_inited) { ESP_ERROR_CHECK(esp_netif_init()); ESP_ERROR_CHECK(esp_event_loop_create_default()); + wifi_ever_inited = true; } - wifi_ever_inited = true; self->netif = esp_netif_create_default_wifi_sta(); self->ap_netif = esp_netif_create_default_wifi_ap(); @@ -189,7 +190,8 @@ void common_hal_wifi_init(bool user_initiated) { &self->handler_instance_got_ip)); wifi_init_config_t config = WIFI_INIT_CONFIG_DEFAULT(); - #ifdef CONFIG_IDF_TARGET_ESP32 + #ifdef CONFIG_ESP32_WIFI_NVS_ENABLED + // Generally we don't use this because we store ssid and passwords ourselves in the filesystem. esp_err_t err = nvs_flash_init(); if (err == ESP_ERR_NVS_NO_FREE_PAGES || err == ESP_ERR_NVS_NEW_VERSION_FOUND) { // NVS partition was truncated and needs to be erased @@ -201,9 +203,16 @@ void common_hal_wifi_init(bool user_initiated) { #endif esp_err_t result = esp_wifi_init(&config); if (result == ESP_ERR_NO_MEM) { - mp_raise_msg(&mp_type_MemoryError, translate("Failed to allocate Wifi memory")); + if (gc_alloc_possible()) { + mp_raise_msg(&mp_type_MemoryError, translate("Failed to allocate Wifi memory")); + } + ESP_LOGE(TAG, "Failed to allocate Wifi memory"); } else if (result != ESP_OK) { - raise_esp_error(result); + if (gc_alloc_possible()) { + raise_esp_error(result); + } + ESP_LOGE(TAG, "WiFi error code: %x", result); + return; } // set station mode to avoid the default SoftAP common_hal_wifi_radio_start_station(self); diff --git a/ports/espressif/esp-camera b/ports/espressif/esp-camera new file mode 160000 index 000000000000..8f3f2cc8cfb2 --- /dev/null +++ b/ports/espressif/esp-camera @@ -0,0 +1 @@ +Subproject commit 8f3f2cc8cfb2e4371870b0c5a974d40468114a9e diff --git a/ports/espressif/esp-idf b/ports/espressif/esp-idf index 69f9a4f566d4..fb07ab7f0007 160000 --- a/ports/espressif/esp-idf +++ b/ports/espressif/esp-idf @@ -1 +1 @@ -Subproject commit 69f9a4f566d49afe97fd8b47444bd394af005e23 +Subproject commit fb07ab7f0007549d38081cfc6d83348780526a28 diff --git a/ports/espressif/esp-idf-config/sdkconfig-ble.defaults b/ports/espressif/esp-idf-config/sdkconfig-ble.defaults index 8180786fbff7..c260c38016b3 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-ble.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-ble.defaults @@ -1,164 +1,37 @@ # +# Espressif IoT Development Framework Configuration +# +# # Component config # # # Bluetooth # CONFIG_BT_ENABLED=y -# -# Bluetooth controller -# -CONFIG_BT_CTRL_MODE_EFF=1 -CONFIG_BT_CTRL_BLE_MAX_ACT=10 -CONFIG_BT_CTRL_BLE_MAX_ACT_EFF=10 -CONFIG_BT_CTRL_BLE_STATIC_ACL_TX_BUF_NB=0 -CONFIG_BT_CTRL_PINNED_TO_CORE=0 -CONFIG_BT_CTRL_HCI_MODE_VHCI=y -# CONFIG_BT_CTRL_HCI_MODE_UART_H4 is not set -CONFIG_BT_CTRL_HCI_TL=1 -CONFIG_BT_CTRL_ADV_DUP_FILT_MAX=30 -# CONFIG_BT_CTRL_HW_CCA is not set -CONFIG_BT_CTRL_HW_CCA_VAL=20 -CONFIG_BT_CTRL_HW_CCA_EFF=0 -CONFIG_BT_CTRL_CE_LENGTH_TYPE_ORIG=y -# CONFIG_BT_CTRL_CE_LENGTH_TYPE_CE is not set -# CONFIG_BT_CTRL_CE_LENGTH_TYPE_SD is not set -CONFIG_BT_CTRL_CE_LENGTH_TYPE_EFF=0 -CONFIG_BT_CTRL_TX_ANTENNA_INDEX_0=y -# CONFIG_BT_CTRL_TX_ANTENNA_INDEX_1 is not set -CONFIG_BT_CTRL_TX_ANTENNA_INDEX_EFF=0 -CONFIG_BT_CTRL_RX_ANTENNA_INDEX_0=y -# CONFIG_BT_CTRL_RX_ANTENNA_INDEX_1 is not set -CONFIG_BT_CTRL_RX_ANTENNA_INDEX_EFF=0 -# CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_N27 is not set -# CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_N24 is not set -# CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_N21 is not set -# CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_N18 is not set -# CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_N15 is not set -# CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_N12 is not set -# CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_N9 is not set -# CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_N6 is not set -# CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_N3 is not set -# CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_N0 is not set -CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_P3=y -# CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_P6 is not set -# CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_P9 is not set -# CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_P12 is not set -# CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_P15 is not set -# CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_P18 is not set -CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_EFF=10 -CONFIG_BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_SUPP=y -CONFIG_BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_NUM=100 -CONFIG_BT_CTRL_BLE_ADV_REPORT_DISCARD_THRSHOLD=20 -# CONFIG_BT_CTRL_BLE_SCAN_DUPL is not set -# CONFIG_BT_CTRL_COEX_PHY_CODED_TX_RX_TLIM_EN is not set -CONFIG_BT_CTRL_COEX_PHY_CODED_TX_RX_TLIM_DIS=y -CONFIG_BT_CTRL_COEX_PHY_CODED_TX_RX_TLIM_EFF=0 -# -# MODEM SLEEP Options -# -# CONFIG_BT_CTRL_MODEM_SLEEP is not set -# end of MODEM SLEEP Options - -CONFIG_BT_CTRL_SLEEP_MODE_EFF=0 -CONFIG_BT_CTRL_SLEEP_CLOCK_EFF=0 -CONFIG_BT_CTRL_HCI_TL_EFF=1 -# CONFIG_BT_CTRL_AGC_RECORRECT_EN is not set -# end of Bluetooth controller - -# CONFIG_BT_BLUEDROID_ENABLED is not set CONFIG_BT_NIMBLE_ENABLED=y -# CONFIG_BT_CONTROLLER_ONLY is not set # # NimBLE Options # -CONFIG_BT_NIMBLE_MEM_ALLOC_MODE_INTERNAL=y -# CONFIG_BT_NIMBLE_MEM_ALLOC_MODE_DEFAULT is not set -# CONFIG_BT_NIMBLE_LOG_LEVEL_NONE is not set -# CONFIG_BT_NIMBLE_LOG_LEVEL_ERROR is not set -# CONFIG_BT_NIMBLE_LOG_LEVEL_WARNING is not set -CONFIG_BT_NIMBLE_LOG_LEVEL_INFO=y -# CONFIG_BT_NIMBLE_LOG_LEVEL_DEBUG is not set -CONFIG_BT_NIMBLE_LOG_LEVEL=1 -CONFIG_BT_NIMBLE_MAX_CONNECTIONS=3 -CONFIG_BT_NIMBLE_MAX_BONDS=3 -CONFIG_BT_NIMBLE_MAX_CCCDS=8 -CONFIG_BT_NIMBLE_L2CAP_COC_MAX_NUM=0 -CONFIG_BT_NIMBLE_TASK_STACK_SIZE=4096 -CONFIG_BT_NIMBLE_ROLE_CENTRAL=y -CONFIG_BT_NIMBLE_ROLE_PERIPHERAL=y -CONFIG_BT_NIMBLE_ROLE_BROADCASTER=y -CONFIG_BT_NIMBLE_ROLE_OBSERVER=y +CONFIG_BT_NIMBLE_LOG_LEVEL_NONE=y CONFIG_BT_NIMBLE_NVS_PERSIST=y -CONFIG_BT_NIMBLE_SM_LEGACY=y -CONFIG_BT_NIMBLE_SM_SC=y -# CONFIG_BT_NIMBLE_DEBUG is not set -# CONFIG_BT_NIMBLE_SM_SC_DEBUG_KEYS is not set -CONFIG_BT_NIMBLE_SVC_GAP_DEVICE_NAME="nimble" -CONFIG_BT_NIMBLE_GAP_DEVICE_NAME_MAX_LEN=31 -CONFIG_BT_NIMBLE_ATT_PREFERRED_MTU=256 -CONFIG_BT_NIMBLE_SVC_GAP_APPEARANCE=0 +# +# Memory Settings +# CONFIG_BT_NIMBLE_ACL_BUF_COUNT=20 -CONFIG_BT_NIMBLE_ACL_BUF_SIZE=255 CONFIG_BT_NIMBLE_HCI_EVT_BUF_SIZE=70 -CONFIG_BT_NIMBLE_HCI_EVT_HI_BUF_COUNT=30 -CONFIG_BT_NIMBLE_HCI_EVT_LO_BUF_COUNT=8 -CONFIG_BT_NIMBLE_MSYS1_BLOCK_COUNT=12 -# CONFIG_BT_NIMBLE_HS_FLOW_CTRL is not set -CONFIG_BT_NIMBLE_RPA_TIMEOUT=900 -# CONFIG_BT_NIMBLE_MESH is not set -CONFIG_BT_NIMBLE_CRYPTO_STACK_MBEDTLS=y -CONFIG_BT_NIMBLE_HS_STOP_TIMEOUT_MS=2000 -# CONFIG_BT_NIMBLE_HOST_BASED_PRIVACY is not set -CONFIG_BT_NIMBLE_ENABLE_CONN_REATTEMPT=y -CONFIG_BT_NIMBLE_MAX_CONN_REATTEMPT=3 +# end of Memory Settings + CONFIG_BT_NIMBLE_EXT_ADV=y -CONFIG_BT_NIMBLE_MAX_EXT_ADV_INSTANCES=1 -CONFIG_BT_NIMBLE_MAX_EXT_ADV_DATA_LEN=1650 -CONFIG_BT_NIMBLE_ENABLE_PERIODIC_ADV=y -CONFIG_BT_NIMBLE_MAX_PERIODIC_SYNCS=1 -# CONFIG_BT_NIMBLE_BLUFI_ENABLE is not set -CONFIG_BT_NIMBLE_USE_ESP_TIMER=y # end of NimBLE Options +# +# Controller Options +# +# CONFIG_BT_CTRL_BLE_SCAN_DUPL is not set +# end of Controller Options + # end of Bluetooth # end of Component config -# -# Deprecated options for backward compatibility -# -# CONFIG_BLUEDROID_ENABLED is not set -CONFIG_NIMBLE_ENABLED=y -CONFIG_NIMBLE_MEM_ALLOC_MODE_INTERNAL=y -# CONFIG_NIMBLE_MEM_ALLOC_MODE_DEFAULT is not set -CONFIG_NIMBLE_MAX_CONNECTIONS=3 -CONFIG_NIMBLE_MAX_BONDS=3 -CONFIG_NIMBLE_MAX_CCCDS=8 -CONFIG_NIMBLE_L2CAP_COC_MAX_NUM=0 -CONFIG_NIMBLE_TASK_STACK_SIZE=4096 -CONFIG_NIMBLE_ROLE_CENTRAL=y -CONFIG_NIMBLE_ROLE_PERIPHERAL=y -CONFIG_NIMBLE_ROLE_BROADCASTER=y -CONFIG_NIMBLE_ROLE_OBSERVER=y -CONFIG_NIMBLE_NVS_PERSIST=y -CONFIG_NIMBLE_SM_LEGACY=y -CONFIG_NIMBLE_SM_SC=y -# CONFIG_NIMBLE_DEBUG is not set -# CONFIG_NIMBLE_SM_SC_DEBUG_KEYS is not set -CONFIG_NIMBLE_SVC_GAP_DEVICE_NAME="nimble" -CONFIG_NIMBLE_GAP_DEVICE_NAME_MAX_LEN=31 -CONFIG_NIMBLE_ATT_PREFERRED_MTU=256 -CONFIG_NIMBLE_SVC_GAP_APPEARANCE=0 -CONFIG_NIMBLE_ACL_BUF_COUNT=20 -CONFIG_NIMBLE_ACL_BUF_SIZE=255 -CONFIG_NIMBLE_HCI_EVT_BUF_SIZE=70 -CONFIG_NIMBLE_HCI_EVT_HI_BUF_COUNT=30 -CONFIG_NIMBLE_HCI_EVT_LO_BUF_COUNT=8 -CONFIG_NIMBLE_MSYS1_BLOCK_COUNT=12 -# CONFIG_NIMBLE_HS_FLOW_CTRL is not set -CONFIG_NIMBLE_RPA_TIMEOUT=900 -# CONFIG_NIMBLE_MESH is not set -CONFIG_NIMBLE_CRYPTO_STACK_MBEDTLS=y -CONFIG_SW_COEXIST_ENABLE=y -# end of Deprecated options for backward compatibility +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/esp-idf-config/sdkconfig-debug.defaults b/ports/espressif/esp-idf-config/sdkconfig-debug.defaults index bef5ee5fe818..5976192600b4 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-debug.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-debug.defaults @@ -1,95 +1,21 @@ # -# Bootloader config +# Espressif IoT Development Framework Configuration # -CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_SIZE=y -# CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_DEBUG is not set -# CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_PERF is not set -# CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_NONE is not set -# CONFIG_BOOTLOADER_LOG_LEVEL_NONE is not set -# CONFIG_BOOTLOADER_LOG_LEVEL_ERROR is not set -# CONFIG_BOOTLOADER_LOG_LEVEL_WARN is not set -CONFIG_BOOTLOADER_LOG_LEVEL_INFO=y -# CONFIG_BOOTLOADER_LOG_LEVEL_DEBUG is not set -# CONFIG_BOOTLOADER_LOG_LEVEL_VERBOSE is not set -# end of Bootloader config - -# CONFIG_COMPILER_OPTIMIZATION_DEFAULT is not set # # Compiler options # CONFIG_COMPILER_OPTIMIZATION_SIZE=y -# CONFIG_COMPILER_OPTIMIZATION_PERF is not set -# CONFIG_COMPILER_OPTIMIZATION_NONE is not set -CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE=y -# CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT is not set -# CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE is not set -CONFIG_COMPILER_OPTIMIZATION_ASSERTION_LEVEL=2 -# CONFIG_COMPILER_OPTIMIZATION_CHECKS_SILENT is not set # end of Compiler options -CONFIG_ESP_ERR_TO_NAME_LOOKUP=y +# +# Component config +# # # ESP System Settings # CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT=y -# CONFIG_ESP_SYSTEM_PANIC_PRINT_REBOOT is not set -# CONFIG_ESP_SYSTEM_PANIC_SILENT_REBOOT is not set -# CONFIG_ESP_SYSTEM_PANIC_GDBSTUB is not set # end of ESP System Settings -CONFIG_ESP_CONSOLE_UART_DEFAULT=y -# CONFIG_ESP_CONSOLE_USB_CDC is not set -# CONFIG_ESP_CONSOLE_UART_CUSTOM is not set -# CONFIG_ESP_CONSOLE_NONE is not set -CONFIG_ESP_CONSOLE_UART=y -CONFIG_ESP_CONSOLE_MULTIPLE_UART=y -CONFIG_ESP_CONSOLE_UART_NUM=0 -CONFIG_ESP_CONSOLE_UART_BAUDRATE=115200 -# -# FreeRTOS -# -CONFIG_FREERTOS_ASSERT_ON_UNTESTED_FUNCTION=y -CONFIG_FREERTOS_ASSERT_FAIL_ABORT=y -# CONFIG_FREERTOS_ASSERT_FAIL_PRINT_CONTINUE is not set -# CONFIG_FREERTOS_ASSERT_DISABLE is not set -CONFIG_FREERTOS_TASK_FUNCTION_WRAPPER=y -CONFIG_FREERTOS_DEBUG_OCDAWARE=y -# end of FreeRTOS +# end of Component config -CONFIG_HAL_ASSERTION_EQUALS_SYSTEM=y -# -# Hardware Abstraction Layer (HAL) and Low Level (LL) -# -# CONFIG_HAL_ASSERTION_DISABLE is not set -# CONFIG_HAL_ASSERTION_SILIENT is not set -# CONFIG_HAL_ASSERTION_ENABLE is not set -CONFIG_HAL_DEFAULT_ASSERTION_LEVEL=2 -# end of Hardware Abstraction Layer (HAL) and Low Level (LL) - -# -# Log output -# -# CONFIG_LOG_DEFAULT_LEVEL_NONE is not set -# CONFIG_LOG_DEFAULT_LEVEL_ERROR is not set -# CONFIG_LOG_DEFAULT_LEVEL_WARN is not set -CONFIG_LOG_DEFAULT_LEVEL_INFO=y -# CONFIG_LOG_DEFAULT_LEVEL_DEBUG is not set -# CONFIG_LOG_DEFAULT_LEVEL_VERBOSE is not set -# end of Log output - -CONFIG_LWIP_ESP_LWIP_ASSERT=y -# -# Deprecated options for backward compatibility -# -CONFIG_COMPILER_OPTIMIZATION_LEVEL_DEBUG=y -# CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE is not set -CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED=y -# CONFIG_OPTIMIZATION_ASSERTIONS_SILENT is not set -# CONFIG_OPTIMIZATION_ASSERTIONS_DISABLED is not set -CONFIG_OPTIMIZATION_ASSERTION_LEVEL=2 -CONFIG_CONSOLE_UART_DEFAULT=y -# CONFIG_CONSOLE_UART_CUSTOM is not set -# CONFIG_ESP_CONSOLE_UART_NONE is not set -CONFIG_CONSOLE_UART_NUM=0 -CONFIG_CONSOLE_UART_BAUDRATE=115200 -# end of Deprecated options for backward compatibility +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/esp-idf-config/sdkconfig-esp32.defaults b/ports/espressif/esp-idf-config/sdkconfig-esp32.defaults index b6c5a938b1c9..de30ada5414f 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-esp32.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-esp32.defaults @@ -1,1143 +1,78 @@ # -# Espressif IoT Development Framework (ESP-IDF) Project Configuration +# Espressif IoT Development Framework Configuration # -CONFIG_IDF_TARGET_ARCH_XTENSA=y -CONFIG_IDF_TARGET="esp32" -CONFIG_IDF_TARGET_ESP32=y -CONFIG_IDF_FIRMWARE_CHIP_ID=0x0000 - -# -# SDK tool configuration -# -CONFIG_SDK_TOOLPREFIX="xtensa-esp32-elf-" -# CONFIG_SDK_TOOLCHAIN_SUPPORTS_TIME_WIDE_64_BITS is not set -# end of SDK tool configuration - -# -# Build type -# -CONFIG_APP_BUILD_TYPE_APP_2NDBOOT=y -# CONFIG_APP_BUILD_TYPE_ELF_RAM is not set -CONFIG_APP_BUILD_GENERATE_BINARIES=y -CONFIG_APP_BUILD_BOOTLOADER=y -CONFIG_APP_BUILD_USE_FLASH_SECTIONS=y -# end of Build type - -# -# Application manager -# -CONFIG_APP_COMPILE_TIME_DATE=y -# CONFIG_APP_EXCLUDE_PROJECT_VER_VAR is not set -# CONFIG_APP_EXCLUDE_PROJECT_NAME_VAR is not set -# CONFIG_APP_PROJECT_VER_FROM_CONFIG is not set -CONFIG_APP_RETRIEVE_LEN_ELF_SHA=16 -# end of Application manager - -# -# Bootloader config -# -CONFIG_BOOTLOADER_OFFSET_IN_FLASH=0x1000 -CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_SIZE=y -# CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_DEBUG is not set -# CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_PERF is not set -# CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_NONE is not set -CONFIG_BOOTLOADER_LOG_LEVEL_NONE=y -# CONFIG_BOOTLOADER_LOG_LEVEL_ERROR is not set -# CONFIG_BOOTLOADER_LOG_LEVEL_WARN is not set -# CONFIG_BOOTLOADER_LOG_LEVEL_INFO is not set -# CONFIG_BOOTLOADER_LOG_LEVEL_DEBUG is not set -# CONFIG_BOOTLOADER_LOG_LEVEL_VERBOSE is not set -CONFIG_BOOTLOADER_LOG_LEVEL=0 -# CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_8V is not set -CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_9V=y -# CONFIG_BOOTLOADER_FACTORY_RESET is not set -# CONFIG_BOOTLOADER_APP_TEST is not set -CONFIG_BOOTLOADER_WDT_ENABLE=y -# CONFIG_BOOTLOADER_WDT_DISABLE_IN_USER_CODE is not set -CONFIG_BOOTLOADER_WDT_TIME_MS=9000 -# CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE is not set -# CONFIG_BOOTLOADER_SKIP_VALIDATE_IN_DEEP_SLEEP is not set -# CONFIG_BOOTLOADER_SKIP_VALIDATE_ON_POWER_ON is not set -# CONFIG_BOOTLOADER_SKIP_VALIDATE_ALWAYS is not set -CONFIG_BOOTLOADER_RESERVE_RTC_SIZE=0 -# CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC is not set -CONFIG_BOOTLOADER_FLASH_XMC_SUPPORT=y -# end of Bootloader config - -# -# Security features -# -# CONFIG_SECURE_SIGNED_APPS_NO_SECURE_BOOT is not set -# CONFIG_SECURE_BOOT is not set -# CONFIG_SECURE_FLASH_ENC_ENABLED is not set -# end of Security features - -# -# Serial flasher config -# -CONFIG_ESPTOOLPY_BAUD_OTHER_VAL=115200 -# CONFIG_ESPTOOLPY_NO_STUB is not set -# CONFIG_ESPTOOLPY_FLASHMODE_QIO is not set -# CONFIG_ESPTOOLPY_FLASHMODE_QOUT is not set -CONFIG_ESPTOOLPY_FLASHMODE_DIO=y -# CONFIG_ESPTOOLPY_FLASHMODE_DOUT is not set -CONFIG_ESPTOOLPY_FLASH_SAMPLE_MODE_STR=y -CONFIG_ESPTOOLPY_FLASHMODE="dio" -# CONFIG_ESPTOOLPY_FLASHFREQ_80M is not set -CONFIG_ESPTOOLPY_FLASHFREQ_40M=y -# CONFIG_ESPTOOLPY_FLASHFREQ_26M is not set -# CONFIG_ESPTOOLPY_FLASHFREQ_20M is not set -CONFIG_ESPTOOLPY_FLASHFREQ="40m" -# CONFIG_ESPTOOLPY_FLASHSIZE_1MB is not set -# CONFIG_ESPTOOLPY_FLASHSIZE_2MB is not set -# CONFIG_ESPTOOLPY_FLASHSIZE_4MB is not set -# CONFIG_ESPTOOLPY_FLASHSIZE_8MB is not set -# CONFIG_ESPTOOLPY_FLASHSIZE_16MB is not set -# CONFIG_ESPTOOLPY_FLASHSIZE_32MB is not set -# CONFIG_ESPTOOLPY_FLASHSIZE_64MB is not set -# CONFIG_ESPTOOLPY_FLASHSIZE_128MB is not set -CONFIG_ESPTOOLPY_FLASHSIZE_DETECT=y -CONFIG_ESPTOOLPY_BEFORE_RESET=y -# CONFIG_ESPTOOLPY_BEFORE_NORESET is not set -CONFIG_ESPTOOLPY_BEFORE="default_reset" -CONFIG_ESPTOOLPY_AFTER_RESET=y -# CONFIG_ESPTOOLPY_AFTER_NORESET is not set -CONFIG_ESPTOOLPY_AFTER="hard_reset" -# CONFIG_ESPTOOLPY_MONITOR_BAUD_CONSOLE is not set -# CONFIG_ESPTOOLPY_MONITOR_BAUD_9600B is not set -# CONFIG_ESPTOOLPY_MONITOR_BAUD_57600B is not set -CONFIG_ESPTOOLPY_MONITOR_BAUD_115200B=y -# CONFIG_ESPTOOLPY_MONITOR_BAUD_230400B is not set -# CONFIG_ESPTOOLPY_MONITOR_BAUD_921600B is not set -# CONFIG_ESPTOOLPY_MONITOR_BAUD_2MB is not set -# CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER is not set -CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER_VAL=115200 -CONFIG_ESPTOOLPY_MONITOR_BAUD=115200 -# end of Serial flasher config - -# -# Compiler options -# -# CONFIG_COMPILER_OPTIMIZATION_DEFAULT is not set -CONFIG_COMPILER_OPTIMIZATION_SIZE=y -# CONFIG_COMPILER_OPTIMIZATION_PERF is not set -# CONFIG_COMPILER_OPTIMIZATION_NONE is not set -CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE=y -# CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT is not set -# CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE is not set -CONFIG_COMPILER_OPTIMIZATION_ASSERTION_LEVEL=2 -# CONFIG_COMPILER_OPTIMIZATION_CHECKS_SILENT is not set -CONFIG_COMPILER_HIDE_PATHS_MACROS=y -# CONFIG_COMPILER_CXX_EXCEPTIONS is not set -# CONFIG_COMPILER_CXX_RTTI is not set -CONFIG_COMPILER_STACK_CHECK_MODE_NONE=y -# CONFIG_COMPILER_STACK_CHECK_MODE_NORM is not set -# CONFIG_COMPILER_STACK_CHECK_MODE_STRONG is not set -# CONFIG_COMPILER_STACK_CHECK_MODE_ALL is not set -# CONFIG_COMPILER_WARN_WRITE_STRINGS is not set -# CONFIG_COMPILER_DISABLE_GCC8_WARNINGS is not set -# CONFIG_COMPILER_DUMP_RTL_FILES is not set -# end of Compiler options - # # Component config # - -# -# Application Level Tracing -# -# CONFIG_APPTRACE_DEST_JTAG is not set -CONFIG_APPTRACE_DEST_NONE=y -CONFIG_APPTRACE_LOCK_ENABLE=y -# end of Application Level Tracing - -# -# Bluetooth -# -# CONFIG_BT_ENABLED is not set -# end of Bluetooth - # -# Driver configurations +# Driver Configurations # - -# -# ADC configuration -# -# CONFIG_ADC_FORCE_XPD_FSM is not set -CONFIG_ADC_DISABLE_DAC=y -# end of ADC configuration - -# -# MCPWM configuration -# -# CONFIG_MCPWM_ISR_IN_IRAM is not set -# end of MCPWM configuration - -# -# SPI configuration -# -# CONFIG_SPI_MASTER_IN_IRAM is not set -CONFIG_SPI_MASTER_ISR_IN_IRAM=y -# CONFIG_SPI_SLAVE_IN_IRAM is not set -CONFIG_SPI_SLAVE_ISR_IN_IRAM=y -# end of SPI configuration - # -# TWAI configuration +# TWAI Configuration # -# CONFIG_TWAI_ISR_IN_IRAM is not set # CONFIG_TWAI_ERRATA_FIX_BUS_OFF_REC is not set # CONFIG_TWAI_ERRATA_FIX_TX_INTR_LOST is not set # CONFIG_TWAI_ERRATA_FIX_RX_FRAME_INVALID is not set # CONFIG_TWAI_ERRATA_FIX_RX_FIFO_CORRUPT is not set -# end of TWAI configuration - -# -# UART configuration -# -CONFIG_UART_ISR_IN_IRAM=y -# end of UART configuration - -# -# RTCIO configuration -# -# CONFIG_RTCIO_SUPPORT_RTC_GPIO_DESC is not set -# end of RTCIO configuration - -# -# GPIO Configuration -# -# CONFIG_GPIO_ESP32_SUPPORT_SWITCH_SLP_PULL is not set -# end of GPIO Configuration - -# -# GDMA Configuration -# -# CONFIG_GDMA_CTRL_FUNC_IN_IRAM is not set -# CONFIG_GDMA_ISR_IRAM_SAFE is not set -# end of GDMA Configuration -# end of Driver configurations - -# -# eFuse Bit Manager -# -# CONFIG_EFUSE_CUSTOM_TABLE is not set -# CONFIG_EFUSE_VIRTUAL is not set -# CONFIG_EFUSE_CODE_SCHEME_COMPAT_NONE is not set -CONFIG_EFUSE_CODE_SCHEME_COMPAT_3_4=y -# CONFIG_EFUSE_CODE_SCHEME_COMPAT_REPEAT is not set -CONFIG_EFUSE_MAX_BLK_LEN=192 -# end of eFuse Bit Manager - -# -# ESP-TLS -# -CONFIG_ESP_TLS_USING_MBEDTLS=y -# CONFIG_ESP_TLS_USE_SECURE_ELEMENT is not set -# CONFIG_ESP_TLS_CLIENT_SESSION_TICKETS is not set -CONFIG_ESP_TLS_SERVER=y -# CONFIG_ESP_TLS_SERVER_SESSION_TICKETS is not set -# CONFIG_ESP_TLS_SERVER_MIN_AUTH_MODE_OPTIONAL is not set -# CONFIG_ESP_TLS_PSK_VERIFICATION is not set -# CONFIG_ESP_TLS_INSECURE is not set -# end of ESP-TLS - -# -# ESP32-specific -# -CONFIG_ESP32_ECO3_CACHE_LOCK_FIX=y -CONFIG_ESP32_REV_MIN_0=y -# CONFIG_ESP32_REV_MIN_1 is not set -# CONFIG_ESP32_REV_MIN_2 is not set -# CONFIG_ESP32_REV_MIN_3 is not set -CONFIG_ESP32_REV_MIN=0 -CONFIG_ESP32_DPORT_WORKAROUND=y -# CONFIG_ESP32_DEFAULT_CPU_FREQ_80 is not set -# CONFIG_ESP32_DEFAULT_CPU_FREQ_160 is not set -CONFIG_ESP32_DEFAULT_CPU_FREQ_240=y -CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ=240 -# CONFIG_ESP32_SPIRAM_SUPPORT is not set - -# -# SPIRAM cache workaround debugging -# -CONFIG_SPIRAM_CACHE_WORKAROUND_STRATEGY_MEMW=y -# CONFIG_SPIRAM_CACHE_WORKAROUND_STRATEGY_DUPLDST is not set -# CONFIG_SPIRAM_CACHE_WORKAROUND_STRATEGY_NOPS is not set -# end of SPIRAM cache workaround debugging - -# -# SPIRAM workaround libraries placement -# -CONFIG_SPIRAM_CACHE_LIBJMP_IN_IRAM=y -CONFIG_SPIRAM_CACHE_LIBMATH_IN_IRAM=y -CONFIG_SPIRAM_CACHE_LIBNUMPARSER_IN_IRAM=y -CONFIG_SPIRAM_CACHE_LIBIO_IN_IRAM=y -CONFIG_SPIRAM_CACHE_LIBTIME_IN_IRAM=y -CONFIG_SPIRAM_CACHE_LIBCHAR_IN_IRAM=y -CONFIG_SPIRAM_CACHE_LIBMEM_IN_IRAM=y -CONFIG_SPIRAM_CACHE_LIBSTR_IN_IRAM=y -CONFIG_SPIRAM_CACHE_LIBRAND_IN_IRAM=y -CONFIG_SPIRAM_CACHE_LIBENV_IN_IRAM=y -CONFIG_SPIRAM_CACHE_LIBFILE_IN_IRAM=y -CONFIG_SPIRAM_CACHE_LIBMISC_IN_IRAM=y -# end of SPIRAM workaround libraries placement - -CONFIG_SPIRAM_BANKSWITCH_ENABLE=n - -# -# PSRAM clock and cs IO for ESP32-DOWD -# -CONFIG_D0WD_PSRAM_CLK_IO=17 -CONFIG_D0WD_PSRAM_CS_IO=16 -# end of PSRAM clock and cs IO for ESP32-DOWD - -# -# PSRAM clock and cs IO for ESP32-D2WD -# -CONFIG_D2WD_PSRAM_CLK_IO=9 -CONFIG_D2WD_PSRAM_CS_IO=10 -# end of PSRAM clock and cs IO for ESP32-D2WD - -# -# PSRAM clock and cs IO for ESP32-PICO -# -CONFIG_PICO_PSRAM_CS_IO=10 -# end of PSRAM clock and cs IO for ESP32-PICO - -# CONFIG_SPIRAM_CUSTOM_SPIWP_SD3_PIN is not set -CONFIG_SPIRAM_SPIWP_SD3_PIN=7 -# CONFIG_SPIRAM_2T_MODE is not set -# end of SPI RAM config - -# CONFIG_ESP32_TRAX is not set -CONFIG_ESP32_TRACEMEM_RESERVE_DRAM=0x0 -CONFIG_ESP32_ULP_COPROC_ENABLED=y -CONFIG_ESP32_ULP_COPROC_RESERVE_MEM=4080 -CONFIG_ESP32_DEBUG_OCDAWARE=y -CONFIG_ESP32_BROWNOUT_DET=y -CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_0=y -# CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_1 is not set -# CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_2 is not set -# CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_3 is not set -# CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_4 is not set -# CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_5 is not set -# CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_6 is not set -# CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_7 is not set -CONFIG_ESP32_BROWNOUT_DET_LVL=0 -CONFIG_ESP32_TIME_SYSCALL_USE_RTC_FRC1=y -# CONFIG_ESP32_TIME_SYSCALL_USE_RTC is not set -# CONFIG_ESP32_TIME_SYSCALL_USE_FRC1 is not set -# CONFIG_ESP32_TIME_SYSCALL_USE_NONE is not set -CONFIG_ESP32_RTC_CLK_SRC_INT_RC=y -# CONFIG_ESP32_RTC_CLK_SRC_EXT_CRYS is not set -# CONFIG_ESP32_RTC_CLK_SRC_EXT_OSC is not set -# CONFIG_ESP32_RTC_CLK_SRC_INT_8MD256 is not set -CONFIG_ESP32_RTC_CLK_CAL_CYCLES=1024 -CONFIG_ESP32_DEEP_SLEEP_WAKEUP_DELAY=2000 -CONFIG_ESP32_XTAL_FREQ_40=y -# CONFIG_ESP32_XTAL_FREQ_26 is not set -# CONFIG_ESP32_XTAL_FREQ_AUTO is not set -CONFIG_ESP32_XTAL_FREQ=40 -# CONFIG_ESP32_DISABLE_BASIC_ROM_CONSOLE is not set -# CONFIG_ESP32_NO_BLOBS is not set -# CONFIG_ESP32_COMPATIBLE_PRE_V2_1_BOOTLOADERS is not set -# CONFIG_ESP32_COMPATIBLE_PRE_V3_1_BOOTLOADERS is not set -# CONFIG_ESP32_USE_FIXED_STATIC_RAM_SIZE is not set -CONFIG_ESP32_DPORT_DIS_INTERRUPT_LVL=5 -# end of ESP32-specific +# end of TWAI Configuration # -# ADC-Calibration +# PCNT Configuration # -CONFIG_ADC_CAL_EFUSE_TP_ENABLE=y -CONFIG_ADC_CAL_EFUSE_VREF_ENABLE=y -CONFIG_ADC_CAL_LUT_ENABLE=y -# end of ADC-Calibration +CONFIG_PCNT_SUPPRESS_DEPRECATE_WARN=y +# end of PCNT Configuration # -# Common ESP-related +# RMT Configuration # -CONFIG_ESP_ERR_TO_NAME_LOOKUP=y -# end of Common ESP-related +CONFIG_RMT_SUPPRESS_DEPRECATE_WARN=y +# end of RMT Configuration -# -# Ethernet -# -# CONFIG_ETH_USE_ESP32_EMAC is not set -# CONFIG_ETH_USE_SPI_ETHERNET is not set -# CONFIG_ETH_USE_OPENETH is not set -# end of Ethernet - -# -# Event Loop Library -# -# CONFIG_ESP_EVENT_LOOP_PROFILING is not set -CONFIG_ESP_EVENT_POST_FROM_ISR=y -CONFIG_ESP_EVENT_POST_FROM_IRAM_ISR=y -# end of Event Loop Library - -# -# GDB Stub -# -# end of GDB Stub - -# -# Hardware Settings -# - -# -# MAC Config -# -CONFIG_ESP_MAC_ADDR_UNIVERSE_WIFI_STA=y -CONFIG_ESP_MAC_ADDR_UNIVERSE_WIFI_AP=y -CONFIG_ESP_MAC_ADDR_UNIVERSE_BT=y -CONFIG_ESP_MAC_ADDR_UNIVERSE_ETH=y -# CONFIG_ESP32_UNIVERSAL_MAC_ADDRESSES_TWO is not set -CONFIG_ESP32_UNIVERSAL_MAC_ADDRESSES_FOUR=y -CONFIG_ESP32_UNIVERSAL_MAC_ADDRESSES=4 -# end of MAC Config - -# -# Sleep Config -# -CONFIG_ESP_SLEEP_RTC_BUS_ISO_WORKAROUND=y -# CONFIG_ESP_SLEEP_GPIO_RESET_WORKAROUND is not set -# CONFIG_ESP_SLEEP_PSRAM_LEAKAGE_WORKAROUND is not set -# CONFIG_ESP_SLEEP_FLASH_LEAKAGE_WORKAROUND is not set -# end of Sleep Config +# end of Driver Configurations # -# RTC Clock Config +# ESP System Settings # -# end of RTC Clock Config -# end of Hardware Settings +CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ_240=y +# end of ESP System Settings # # IPC (Inter-Processor Call) # CONFIG_ESP_IPC_TASK_STACK_SIZE=1536 -CONFIG_ESP_IPC_USES_CALLERS_PRIORITY=y -CONFIG_ESP_IPC_ISR_ENABLE=y # end of IPC (Inter-Processor Call) -# -# ESP NETIF Adapter -# -CONFIG_ESP_NETIF_IP_LOST_TIMER_INTERVAL=120 -CONFIG_ESP_NETIF_TCPIP_LWIP=y -# CONFIG_ESP_NETIF_LOOPBACK is not set -# CONFIG_ESP_NETIF_TCPIP_ADAPTER_COMPATIBLE_LAYER is not set -# end of ESP NETIF Adapter - -# -# PHY -# -CONFIG_ESP_PHY_CALIBRATION_AND_DATA_STORAGE=y -# CONFIG_ESP_PHY_INIT_DATA_IN_PARTITION is not set -CONFIG_ESP_PHY_MAX_WIFI_TX_POWER=20 -CONFIG_ESP_PHY_MAX_TX_POWER=20 -CONFIG_ESP_PHY_REDUCE_TX_POWER=y -# end of PHY - -# -# Power Management -# -# CONFIG_PM_ENABLE is not set -# end of Power Management - -# -# ESP System Settings -# -CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT=y -# CONFIG_ESP_SYSTEM_PANIC_PRINT_REBOOT is not set -# CONFIG_ESP_SYSTEM_PANIC_SILENT_REBOOT is not set -# CONFIG_ESP_SYSTEM_PANIC_GDBSTUB is not set -# CONFIG_ESP_SYSTEM_GDBSTUB_RUNTIME is not set - -# -# Memory protection -# -# end of Memory protection - -CONFIG_ESP_SYSTEM_EVENT_QUEUE_SIZE=32 -CONFIG_ESP_SYSTEM_EVENT_TASK_STACK_SIZE=2304 -CONFIG_ESP_MAIN_TASK_AFFINITY_CPU0=y -# CONFIG_ESP_MAIN_TASK_AFFINITY_CPU1 is not set -# CONFIG_ESP_MAIN_TASK_AFFINITY_NO_AFFINITY is not set -CONFIG_ESP_MAIN_TASK_AFFINITY=0x0 -CONFIG_ESP_MINIMAL_SHARED_STACK_SIZE=2048 -# CONFIG_ESP_CONSOLE_UART_DEFAULT is not set -# CONFIG_ESP_CONSOLE_UART_CUSTOM is not set -CONFIG_ESP_CONSOLE_NONE=y -CONFIG_ESP_CONSOLE_MULTIPLE_UART=y -CONFIG_ESP_CONSOLE_UART_NUM=-1 -CONFIG_ESP_INT_WDT=y -CONFIG_ESP_INT_WDT_TIMEOUT_MS=300 -CONFIG_ESP_INT_WDT_CHECK_CPU1=y -# CONFIG_ESP_TASK_WDT is not set -# CONFIG_ESP_PANIC_HANDLER_IRAM is not set -# CONFIG_ESP_DEBUG_STUBS_ENABLE is not set -# CONFIG_ESP_SYSTEM_CHECK_INT_LEVEL_5 is not set -CONFIG_ESP_SYSTEM_CHECK_INT_LEVEL_4=y -# end of ESP System Settings - -# -# High resolution timer (esp_timer) -# -# CONFIG_ESP_TIMER_PROFILING is not set -CONFIG_ESP_TIME_FUNCS_USE_RTC_TIMER=y -CONFIG_ESP_TIME_FUNCS_USE_ESP_TIMER=y -CONFIG_ESP_TIMER_TASK_STACK_SIZE=3584 -CONFIG_ESP_TIMER_INTERRUPT_LEVEL=1 -# CONFIG_ESP_TIMER_SUPPORTS_ISR_DISPATCH_METHOD is not set -# CONFIG_ESP_TIMER_IMPL_FRC2 is not set -CONFIG_ESP_TIMER_IMPL_TG0_LAC=y -# end of High resolution timer (esp_timer) - # # Wi-Fi # -CONFIG_ESP32_WIFI_ENABLED=y -CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM=10 -CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM=32 -CONFIG_ESP32_WIFI_STATIC_TX_BUFFER=y -# CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER is not set -CONFIG_ESP32_WIFI_TX_BUFFER_TYPE=0 -CONFIG_ESP32_WIFI_STATIC_TX_BUFFER_NUM=16 -CONFIG_ESP32_WIFI_CACHE_TX_BUFFER_NUM=32 -# CONFIG_ESP32_WIFI_CSI_ENABLED is not set -CONFIG_ESP32_WIFI_AMPDU_TX_ENABLED=y -CONFIG_ESP32_WIFI_TX_BA_WIN=6 -CONFIG_ESP32_WIFI_AMPDU_RX_ENABLED=y -CONFIG_ESP32_WIFI_RX_BA_WIN=6 -# CONFIG_ESP32_WIFI_AMSDU_TX_ENABLED is not set -CONFIG_ESP32_WIFI_NVS_ENABLED=y -CONFIG_ESP32_WIFI_TASK_PINNED_TO_CORE_0=y -# CONFIG_ESP32_WIFI_TASK_PINNED_TO_CORE_1 is not set -CONFIG_ESP32_WIFI_SOFTAP_BEACON_MAX_LEN=752 -CONFIG_ESP32_WIFI_MGMT_SBUF_NUM=32 -CONFIG_ESP32_WIFI_IRAM_OPT=y -CONFIG_ESP32_WIFI_RX_IRAM_OPT=y -CONFIG_ESP32_WIFI_ENABLE_WPA3_SAE=y -# CONFIG_ESP_WIFI_SLP_IRAM_OPT is not set # CONFIG_ESP_WIFI_STA_DISCONNECTED_PM_ENABLE is not set -# CONFIG_ESP_WIFI_GMAC_SUPPORT is not set -CONFIG_ESP_WIFI_SOFTAP_SUPPORT=y # end of Wi-Fi -# -# Core dump -# -# CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH is not set -# CONFIG_ESP_COREDUMP_ENABLE_TO_UART is not set -CONFIG_ESP_COREDUMP_ENABLE_TO_NONE=y -# end of Core dump - -# -# FreeRTOS -# -# CONFIG_FREERTOS_UNICORE is not set -CONFIG_FREERTOS_NO_AFFINITY=0x7FFFFFFF -CONFIG_FREERTOS_TICK_SUPPORT_CORETIMER=y -CONFIG_FREERTOS_CORETIMER_0=y -# CONFIG_FREERTOS_CORETIMER_1 is not set -CONFIG_FREERTOS_SYSTICK_USES_CCOUNT=y -CONFIG_FREERTOS_HZ=100 -CONFIG_FREERTOS_ASSERT_ON_UNTESTED_FUNCTION=y -# CONFIG_FREERTOS_CHECK_STACKOVERFLOW_NONE is not set -# CONFIG_FREERTOS_CHECK_STACKOVERFLOW_PTRVAL is not set -CONFIG_FREERTOS_CHECK_STACKOVERFLOW_CANARY=y -# CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK is not set -CONFIG_FREERTOS_INTERRUPT_BACKTRACE=y -CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 -CONFIG_FREERTOS_ASSERT_FAIL_ABORT=y -# CONFIG_FREERTOS_ASSERT_FAIL_PRINT_CONTINUE is not set -# CONFIG_FREERTOS_ASSERT_DISABLE is not set -CONFIG_FREERTOS_IDLE_TASK_STACKSIZE=1536 -CONFIG_FREERTOS_ISR_STACKSIZE=1536 -# CONFIG_FREERTOS_LEGACY_HOOKS is not set -CONFIG_FREERTOS_MAX_TASK_NAME_LEN=16 -CONFIG_FREERTOS_SUPPORT_STATIC_ALLOCATION=y -# CONFIG_FREERTOS_ENABLE_STATIC_TASK_CLEAN_UP is not set -CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 -CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 -CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 -CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 -# CONFIG_FREERTOS_USE_TRACE_FACILITY is not set -# CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS is not set -CONFIG_FREERTOS_CHECK_MUTEX_GIVEN_BY_OWNER=y -# CONFIG_FREERTOS_CHECK_PORT_CRITICAL_COMPLIANCE is not set -# CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH is not set -CONFIG_FREERTOS_DEBUG_OCDAWARE=y -# CONFIG_FREERTOS_FPU_IN_ISR is not set -CONFIG_FREERTOS_ENABLE_TASK_SNAPSHOT=y -# CONFIG_FREERTOS_PLACE_SNAPSHOT_FUNS_INTO_FLASH is not set -# end of FreeRTOS - -# -# Hardware Abstraction Layer (HAL) and Low Level (LL) -# -CONFIG_HAL_ASSERTION_EQUALS_SYSTEM=y -# CONFIG_HAL_ASSERTION_DISABLE is not set -# CONFIG_HAL_ASSERTION_SILIENT is not set -# CONFIG_HAL_ASSERTION_ENABLE is not set -CONFIG_HAL_DEFAULT_ASSERTION_LEVEL=2 -# end of Hardware Abstraction Layer (HAL) and Low Level (LL) - -# -# Heap memory debugging -# -CONFIG_HEAP_POISONING_DISABLED=y -# CONFIG_HEAP_POISONING_LIGHT is not set -# CONFIG_HEAP_POISONING_COMPREHENSIVE is not set -CONFIG_HEAP_TRACING_OFF=y -# CONFIG_HEAP_TRACING_STANDALONE is not set -# CONFIG_HEAP_TRACING_TOHOST is not set -# CONFIG_HEAP_ABORT_WHEN_ALLOCATION_FAILS is not set -# end of Heap memory debugging - - -# -# LWIP -# -# CONFIG_LWIP_NETIF_API is not set -# CONFIG_LWIP_TCPIP_CORE_LOCKING is not set -CONFIG_LWIP_DNS_SUPPORT_MDNS_QUERIES=y -# CONFIG_LWIP_L2_TO_L3_COPY is not set -# CONFIG_LWIP_IRAM_OPTIMIZATION is not set -CONFIG_LWIP_TIMERS_ONDEMAND=y -CONFIG_LWIP_MAX_SOCKETS=8 -# CONFIG_LWIP_USE_ONLY_LWIP_SELECT is not set -# CONFIG_LWIP_SO_LINGER is not set -CONFIG_LWIP_SO_REUSE=y -CONFIG_LWIP_SO_REUSE_RXTOALL=y -CONFIG_LWIP_SO_RCVBUF=y -# CONFIG_LWIP_NETBUF_RECVINFO is not set -CONFIG_LWIP_IP4_FRAG=y -CONFIG_LWIP_IP6_FRAG=y -# CONFIG_LWIP_IP4_REASSEMBLY is not set -# CONFIG_LWIP_IP6_REASSEMBLY is not set -# CONFIG_LWIP_IP_FORWARD is not set -# CONFIG_LWIP_STATS is not set -# CONFIG_LWIP_ETHARP_TRUST_IP_MAC is not set -CONFIG_LWIP_ESP_GRATUITOUS_ARP=y -CONFIG_LWIP_GARP_TMR_INTERVAL=60 -CONFIG_LWIP_TCPIP_RECVMBOX_SIZE=32 -CONFIG_LWIP_DHCP_DOES_ARP_CHECK=y -# CONFIG_LWIP_DHCP_DISABLE_CLIENT_ID is not set -CONFIG_LWIP_DHCP_DISABLE_VENDOR_CLASS_ID=y -# CONFIG_LWIP_DHCP_RESTORE_LAST_IP is not set -CONFIG_LWIP_DHCP_OPTIONS_LEN=68 - -# -# DHCP server -# -CONFIG_LWIP_DHCPS=y -CONFIG_LWIP_DHCPS_LEASE_UNIT=60 -CONFIG_LWIP_DHCPS_MAX_STATION_NUM=8 -# end of DHCP server - -# CONFIG_LWIP_AUTOIP is not set -CONFIG_LWIP_IPV6=y -# CONFIG_LWIP_IPV6_AUTOCONFIG is not set -CONFIG_LWIP_IPV6_NUM_ADDRESSES=3 -# CONFIG_LWIP_IPV6_FORWARD is not set -# CONFIG_LWIP_NETIF_STATUS_CALLBACK is not set -CONFIG_LWIP_NETIF_LOOPBACK=y -CONFIG_LWIP_LOOPBACK_MAX_PBUFS=8 - -# -# TCP -# -CONFIG_LWIP_MAX_ACTIVE_TCP=4 -CONFIG_LWIP_MAX_LISTENING_TCP=4 -CONFIG_LWIP_TCP_HIGH_SPEED_RETRANSMISSION=y -CONFIG_LWIP_TCP_MAXRTX=12 -CONFIG_LWIP_TCP_SYNMAXRTX=6 -CONFIG_LWIP_TCP_MSS=1440 -CONFIG_LWIP_TCP_TMR_INTERVAL=250 -CONFIG_LWIP_TCP_MSL=60000 -CONFIG_LWIP_TCP_SND_BUF_DEFAULT=2880 -CONFIG_LWIP_TCP_WND_DEFAULT=2880 -CONFIG_LWIP_TCP_RECVMBOX_SIZE=6 -CONFIG_LWIP_TCP_QUEUE_OOSEQ=y -# CONFIG_LWIP_TCP_SACK_OUT is not set -# CONFIG_LWIP_TCP_KEEP_CONNECTION_WHEN_IP_CHANGES is not set -CONFIG_LWIP_TCP_OVERSIZE_MSS=y -# CONFIG_LWIP_TCP_OVERSIZE_QUARTER_MSS is not set -# CONFIG_LWIP_TCP_OVERSIZE_DISABLE is not set -CONFIG_LWIP_TCP_RTO_TIME=3000 -# end of TCP - -# -# UDP -# -CONFIG_LWIP_MAX_UDP_PCBS=16 -CONFIG_LWIP_UDP_RECVMBOX_SIZE=6 -# end of UDP - -# -# Checksums -# -# CONFIG_LWIP_CHECKSUM_CHECK_IP is not set -# CONFIG_LWIP_CHECKSUM_CHECK_UDP is not set -CONFIG_LWIP_CHECKSUM_CHECK_ICMP=y -# end of Checksums - -CONFIG_LWIP_TCPIP_TASK_STACK_SIZE=3072 -CONFIG_LWIP_TCPIP_TASK_AFFINITY_NO_AFFINITY=y -# CONFIG_LWIP_TCPIP_TASK_AFFINITY_CPU0 is not set -# CONFIG_LWIP_TCPIP_TASK_AFFINITY_CPU1 is not set -CONFIG_LWIP_TCPIP_TASK_AFFINITY=0x7FFFFFFF -# CONFIG_LWIP_PPP_SUPPORT is not set -CONFIG_LWIP_IPV6_MEMP_NUM_ND6_QUEUE=3 -CONFIG_LWIP_IPV6_ND6_NUM_NEIGHBORS=5 -# CONFIG_LWIP_SLIP_SUPPORT is not set - -# -# ICMP -# -CONFIG_LWIP_ICMP=y -# CONFIG_LWIP_MULTICAST_PING is not set -# CONFIG_LWIP_BROADCAST_PING is not set -# end of ICMP - -# -# LWIP RAW API -# -CONFIG_LWIP_MAX_RAW_PCBS=16 -# end of LWIP RAW API - -# -# SNTP -# -CONFIG_LWIP_SNTP_MAX_SERVERS=1 -# CONFIG_LWIP_DHCP_GET_NTP_SRV is not set -CONFIG_LWIP_SNTP_UPDATE_DELAY=3600000 -# end of SNTP - -CONFIG_LWIP_ESP_LWIP_ASSERT=y - -# -# Hooks -# -# CONFIG_LWIP_HOOK_TCP_ISN_NONE is not set -CONFIG_LWIP_HOOK_TCP_ISN_DEFAULT=y -# CONFIG_LWIP_HOOK_TCP_ISN_CUSTOM is not set -CONFIG_LWIP_HOOK_IP6_ROUTE_NONE=y -# CONFIG_LWIP_HOOK_IP6_ROUTE_DEFAULT is not set -# CONFIG_LWIP_HOOK_IP6_ROUTE_CUSTOM is not set -CONFIG_LWIP_HOOK_ND6_GET_GW_NONE=y -# CONFIG_LWIP_HOOK_ND6_GET_GW_DEFAULT is not set -# CONFIG_LWIP_HOOK_ND6_GET_GW_CUSTOM is not set -CONFIG_LWIP_HOOK_NETCONN_EXT_RESOLVE_NONE=y -# CONFIG_LWIP_HOOK_NETCONN_EXT_RESOLVE_DEFAULT is not set -# CONFIG_LWIP_HOOK_NETCONN_EXT_RESOLVE_CUSTOM is not set -# end of Hooks - -# CONFIG_LWIP_DEBUG is not set -# end of LWIP - -# -# mbedTLS -# -CONFIG_MBEDTLS_INTERNAL_MEM_ALLOC=y -# CONFIG_MBEDTLS_DEFAULT_MEM_ALLOC is not set -# CONFIG_MBEDTLS_CUSTOM_MEM_ALLOC is not set -CONFIG_MBEDTLS_ASYMMETRIC_CONTENT_LEN=y -CONFIG_MBEDTLS_SSL_IN_CONTENT_LEN=16384 -CONFIG_MBEDTLS_SSL_OUT_CONTENT_LEN=2048 -# CONFIG_MBEDTLS_DEBUG is not set - -# -# mbedTLS v2.28.x related -# -# CONFIG_MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH is not set -CONFIG_MBEDTLS_ECDH_LEGACY_CONTEXT=y -# CONFIG_MBEDTLS_X509_TRUSTED_CERT_CALLBACK is not set -# CONFIG_MBEDTLS_SSL_CONTEXT_SERIALIZATION is not set -CONFIG_MBEDTLS_SSL_KEEP_PEER_CERTIFICATE=y - -# -# DTLS-based configurations -# -# CONFIG_MBEDTLS_SSL_DTLS_CONNECTION_ID is not set -# CONFIG_MBEDTLS_SSL_DTLS_SRTP is not set -# end of DTLS-based configurations -# end of mbedTLS v2.28.x related - -# -# Certificate Bundle -# -CONFIG_MBEDTLS_CERTIFICATE_BUNDLE=y -# CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_FULL is not set -# CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_CMN is not set -CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_NONE=y -CONFIG_MBEDTLS_CUSTOM_CERTIFICATE_BUNDLE=y -CONFIG_MBEDTLS_CUSTOM_CERTIFICATE_BUNDLE_PATH="../../lib/certificates/nina-fw/data/roots.pem" -# end of Certificate Bundle - -CONFIG_MBEDTLS_ECP_RESTARTABLE=y -CONFIG_MBEDTLS_CMAC_C=y -CONFIG_MBEDTLS_HARDWARE_AES=y -CONFIG_MBEDTLS_HARDWARE_MPI=y -CONFIG_MBEDTLS_HARDWARE_SHA=y -CONFIG_MBEDTLS_ROM_MD5=y -# CONFIG_MBEDTLS_ATCA_HW_ECDSA_SIGN is not set -# CONFIG_MBEDTLS_ATCA_HW_ECDSA_VERIFY is not set -CONFIG_MBEDTLS_HAVE_TIME=y -# CONFIG_MBEDTLS_HAVE_TIME_DATE is not set -CONFIG_MBEDTLS_ECDSA_DETERMINISTIC=y -CONFIG_MBEDTLS_SHA512_C=y -CONFIG_MBEDTLS_TLS_SERVER_AND_CLIENT=y -# CONFIG_MBEDTLS_TLS_SERVER_ONLY is not set -# CONFIG_MBEDTLS_TLS_CLIENT_ONLY is not set -# CONFIG_MBEDTLS_TLS_DISABLED is not set -CONFIG_MBEDTLS_TLS_SERVER=y -CONFIG_MBEDTLS_TLS_CLIENT=y -CONFIG_MBEDTLS_TLS_ENABLED=y - -# -# TLS Key Exchange Methods -# -CONFIG_MBEDTLS_PSK_MODES=y -CONFIG_MBEDTLS_KEY_EXCHANGE_PSK=y -CONFIG_MBEDTLS_KEY_EXCHANGE_DHE_PSK=y -CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_PSK=y -CONFIG_MBEDTLS_KEY_EXCHANGE_RSA_PSK=y -CONFIG_MBEDTLS_KEY_EXCHANGE_RSA=y -CONFIG_MBEDTLS_KEY_EXCHANGE_DHE_RSA=y -CONFIG_MBEDTLS_KEY_EXCHANGE_ELLIPTIC_CURVE=y -CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_RSA=y -CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA=y -CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA=y -CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_RSA=y -# end of TLS Key Exchange Methods - -CONFIG_MBEDTLS_SSL_RENEGOTIATION=y -# CONFIG_MBEDTLS_SSL_PROTO_SSL3 is not set -# CONFIG_MBEDTLS_SSL_PROTO_TLS1 is not set -# CONFIG_MBEDTLS_SSL_PROTO_TLS1_1 is not set -CONFIG_MBEDTLS_SSL_PROTO_TLS1_2=y -# CONFIG_MBEDTLS_SSL_PROTO_GMTSSL1_1 is not set -CONFIG_MBEDTLS_SSL_PROTO_DTLS=y -CONFIG_MBEDTLS_SSL_ALPN=y -CONFIG_MBEDTLS_CLIENT_SSL_SESSION_TICKETS=y -CONFIG_MBEDTLS_X509_CHECK_KEY_USAGE=y -CONFIG_MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE=y -CONFIG_MBEDTLS_SERVER_SSL_SESSION_TICKETS=y - -# -# Symmetric Ciphers -# -CONFIG_MBEDTLS_AES_C=y -# CONFIG_MBEDTLS_CAMELLIA_C is not set -# CONFIG_MBEDTLS_DES_C is not set -CONFIG_MBEDTLS_RC4_DISABLED=y -# CONFIG_MBEDTLS_RC4_ENABLED_NO_DEFAULT is not set -# CONFIG_MBEDTLS_RC4_ENABLED is not set -# CONFIG_MBEDTLS_BLOWFISH_C is not set -# CONFIG_MBEDTLS_XTEA_C is not set -CONFIG_MBEDTLS_CCM_C=y -CONFIG_MBEDTLS_GCM_C=y -# CONFIG_MBEDTLS_NIST_KW_C is not set -# end of Symmetric Ciphers - -# CONFIG_MBEDTLS_RIPEMD160_C is not set - -# -# Certificates -# -CONFIG_MBEDTLS_PEM_PARSE_C=y -CONFIG_MBEDTLS_PEM_WRITE_C=y -CONFIG_MBEDTLS_X509_CRL_PARSE_C=y -CONFIG_MBEDTLS_X509_CSR_PARSE_C=y -# end of Certificates - -CONFIG_MBEDTLS_ECP_C=y -CONFIG_MBEDTLS_ECDH_C=y -CONFIG_MBEDTLS_ECDSA_C=y -# CONFIG_MBEDTLS_ECJPAKE_C is not set -CONFIG_MBEDTLS_ECP_DP_SECP192R1_ENABLED=y -CONFIG_MBEDTLS_ECP_DP_SECP224R1_ENABLED=y -CONFIG_MBEDTLS_ECP_DP_SECP256R1_ENABLED=y -CONFIG_MBEDTLS_ECP_DP_SECP384R1_ENABLED=y -CONFIG_MBEDTLS_ECP_DP_SECP521R1_ENABLED=y -CONFIG_MBEDTLS_ECP_DP_SECP192K1_ENABLED=y -CONFIG_MBEDTLS_ECP_DP_SECP224K1_ENABLED=y -CONFIG_MBEDTLS_ECP_DP_SECP256K1_ENABLED=y -CONFIG_MBEDTLS_ECP_DP_BP256R1_ENABLED=y -CONFIG_MBEDTLS_ECP_DP_BP384R1_ENABLED=y -CONFIG_MBEDTLS_ECP_DP_BP512R1_ENABLED=y -CONFIG_MBEDTLS_ECP_DP_CURVE25519_ENABLED=y -CONFIG_MBEDTLS_ECP_NIST_OPTIM=y -# CONFIG_MBEDTLS_POLY1305_C is not set -# CONFIG_MBEDTLS_CHACHA20_C is not set -# CONFIG_MBEDTLS_HKDF_C is not set -# CONFIG_MBEDTLS_THREADING_C is not set -# CONFIG_MBEDTLS_LARGE_KEY_SOFTWARE_MPI is not set -# CONFIG_MBEDTLS_SECURITY_RISKS is not set -# end of mbedTLS - -# -# mDNS -# -CONFIG_MDNS_MAX_SERVICES=10 -CONFIG_MDNS_TASK_PRIORITY=1 -CONFIG_MDNS_TASK_STACK_SIZE=4096 -# CONFIG_MDNS_TASK_AFFINITY_NO_AFFINITY is not set -CONFIG_MDNS_TASK_AFFINITY_CPU0=y -# CONFIG_MDNS_TASK_AFFINITY_CPU1 is not set -CONFIG_MDNS_TASK_AFFINITY=0x0 -CONFIG_MDNS_SERVICE_ADD_TIMEOUT_MS=2000 -# CONFIG_MDNS_STRICT_MODE is not set -CONFIG_MDNS_TIMER_PERIOD_MS=100 -# CONFIG_MDNS_NETWORKING_SOCKET is not set -CONFIG_MDNS_MULTIPLE_INSTANCE=y -# end of mDNS - # # Newlib # -CONFIG_NEWLIB_STDOUT_LINE_ENDING_CRLF=y -# CONFIG_NEWLIB_STDOUT_LINE_ENDING_LF is not set -# CONFIG_NEWLIB_STDOUT_LINE_ENDING_CR is not set -# CONFIG_NEWLIB_STDIN_LINE_ENDING_CRLF is not set -# CONFIG_NEWLIB_STDIN_LINE_ENDING_LF is not set -CONFIG_NEWLIB_STDIN_LINE_ENDING_CR=y -# CONFIG_NEWLIB_NANO_FORMAT is not set +CONFIG_NEWLIB_NANO_FORMAT=y # end of Newlib -# -# NVS -# -# end of NVS - -# -# OpenThread -# -# CONFIG_OPENTHREAD_ENABLED is not set -# end of OpenThread - -# -# PThreads -# -CONFIG_PTHREAD_TASK_PRIO_DEFAULT=5 -CONFIG_PTHREAD_TASK_STACK_SIZE_DEFAULT=3072 -CONFIG_PTHREAD_STACK_MIN=768 -CONFIG_PTHREAD_DEFAULT_CORE_NO_AFFINITY=y -# CONFIG_PTHREAD_DEFAULT_CORE_0 is not set -# CONFIG_PTHREAD_DEFAULT_CORE_1 is not set -CONFIG_PTHREAD_TASK_CORE_DEFAULT=-1 -CONFIG_PTHREAD_TASK_NAME_DEFAULT="pthread" -# end of PThreads - # # SPI Flash driver # -# CONFIG_SPI_FLASH_VERIFY_WRITE is not set -# CONFIG_SPI_FLASH_ENABLE_COUNTERS is not set -CONFIG_SPI_FLASH_ROM_DRIVER_PATCH=y -CONFIG_SPI_FLASH_DANGEROUS_WRITE_ABORTS=y -# CONFIG_SPI_FLASH_DANGEROUS_WRITE_FAILS is not set -# CONFIG_SPI_FLASH_DANGEROUS_WRITE_ALLOWED is not set -# CONFIG_SPI_FLASH_USE_LEGACY_IMPL is not set -# CONFIG_SPI_FLASH_SHARE_SPI1_BUS is not set -# CONFIG_SPI_FLASH_BYPASS_BLOCK_ERASE is not set -# CONFIG_SPI_FLASH_YIELD_DURING_ERASE is not set -CONFIG_SPI_FLASH_WRITE_CHUNK_SIZE=4096 -# CONFIG_SPI_FLASH_SIZE_OVERRIDE is not set -# CONFIG_SPI_FLASH_CHECK_ERASE_TIMEOUT_DISABLED is not set -# CONFIG_SPI_FLASH_OVERRIDE_CHIP_DRIVER_LIST is not set - # # Auto-detect flash chips # -CONFIG_SPI_FLASH_SUPPORT_ISSI_CHIP=y -CONFIG_SPI_FLASH_SUPPORT_MXIC_CHIP=y -CONFIG_SPI_FLASH_SUPPORT_GD_CHIP=y -CONFIG_SPI_FLASH_SUPPORT_WINBOND_CHIP=y CONFIG_SPI_FLASH_SUPPORT_BOYA_CHIP=y CONFIG_SPI_FLASH_SUPPORT_TH_CHIP=y # end of Auto-detect flash chips -CONFIG_SPI_FLASH_ENABLE_ENCRYPTED_READ_WRITE=y # end of SPI Flash driver # -# Virtual file system +# Ultra Low Power (ULP) Co-processor # -CONFIG_VFS_SUPPORT_IO=y -CONFIG_VFS_SUPPORT_DIR=y -CONFIG_VFS_SUPPORT_SELECT=y -CONFIG_VFS_SUPPRESS_SELECT_DEBUG_OUTPUT=y -CONFIG_VFS_SUPPORT_TERMIOS=y +CONFIG_ULP_COPROC_ENABLED=y +CONFIG_ULP_COPROC_RESERVE_MEM=4080 +# end of Ultra Low Power (ULP) Co-processor -# -# Host File System I/O (Semihosting) -# -CONFIG_VFS_SEMIHOSTFS_MAX_MOUNT_POINTS=1 -CONFIG_VFS_SEMIHOSTFS_HOST_PATH_MAX_LEN=128 -# end of Host File System I/O (Semihosting) -# end of Virtual file system - -# -# Supplicant -# -CONFIG_WPA_MBEDTLS_CRYPTO=y -# CONFIG_WPA_WAPI_PSK is not set -# CONFIG_WPA_SUITE_B_192 is not set -# CONFIG_WPA_DEBUG_PRINT is not set -# CONFIG_WPA_TESTING_OPTIONS is not set -# CONFIG_WPA_WPS_STRICT is not set -# CONFIG_WPA_11KV_SUPPORT is not set -# CONFIG_WPA_MBO_SUPPORT is not set -# CONFIG_WPA_DPP_SUPPORT is not set -# end of Supplicant # end of Component config -# -# Compatibility options -# -# CONFIG_LEGACY_INCLUDE_COMMON_HEADERS is not set -# end of Compatibility options - -# Deprecated options for backward compatibility -CONFIG_TOOLPREFIX="xtensa-esp32-elf-" -CONFIG_LOG_BOOTLOADER_LEVEL_NONE=y -# CONFIG_LOG_BOOTLOADER_LEVEL_ERROR is not set -# CONFIG_LOG_BOOTLOADER_LEVEL_WARN is not set -# CONFIG_LOG_BOOTLOADER_LEVEL_INFO is not set -# CONFIG_LOG_BOOTLOADER_LEVEL_DEBUG is not set -# CONFIG_LOG_BOOTLOADER_LEVEL_VERBOSE is not set -CONFIG_LOG_BOOTLOADER_LEVEL=0 -# CONFIG_APP_ROLLBACK_ENABLE is not set -# CONFIG_FLASH_ENCRYPTION_ENABLED is not set -# CONFIG_FLASHMODE_QIO is not set -# CONFIG_FLASHMODE_QOUT is not set -CONFIG_FLASHMODE_DIO=y -# CONFIG_FLASHMODE_DOUT is not set -# CONFIG_MONITOR_BAUD_9600B is not set -# CONFIG_MONITOR_BAUD_57600B is not set -CONFIG_MONITOR_BAUD_115200B=y -# CONFIG_MONITOR_BAUD_230400B is not set -# CONFIG_MONITOR_BAUD_921600B is not set -# CONFIG_MONITOR_BAUD_2MB is not set -# CONFIG_MONITOR_BAUD_OTHER is not set -CONFIG_MONITOR_BAUD_OTHER_VAL=115200 -CONFIG_MONITOR_BAUD=115200 -# CONFIG_COMPILER_OPTIMIZATION_LEVEL_DEBUG is not set -CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE=y -CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED=y -# CONFIG_OPTIMIZATION_ASSERTIONS_SILENT is not set -# CONFIG_OPTIMIZATION_ASSERTIONS_DISABLED is not set -CONFIG_OPTIMIZATION_ASSERTION_LEVEL=2 -# CONFIG_CXX_EXCEPTIONS is not set -CONFIG_STACK_CHECK_NONE=y -# CONFIG_STACK_CHECK_NORM is not set -# CONFIG_STACK_CHECK_STRONG is not set -# CONFIG_STACK_CHECK_ALL is not set -# CONFIG_WARN_WRITE_STRINGS is not set -# CONFIG_DISABLE_GCC8_WARNINGS is not set -# CONFIG_ESP32_APPTRACE_DEST_TRAX is not set -CONFIG_ESP32_APPTRACE_DEST_NONE=y -CONFIG_ESP32_APPTRACE_LOCK_ENABLE=y -CONFIG_ADC2_DISABLE_DAC=y -CONFIG_TRACEMEM_RESERVE_DRAM=0x0 -# CONFIG_ULP_COPROC_ENABLED is not set -CONFIG_ULP_COPROC_RESERVE_MEM=0 -CONFIG_BROWNOUT_DET=y -CONFIG_BROWNOUT_DET_LVL_SEL_0=y -# CONFIG_BROWNOUT_DET_LVL_SEL_1 is not set -# CONFIG_BROWNOUT_DET_LVL_SEL_2 is not set -# CONFIG_BROWNOUT_DET_LVL_SEL_3 is not set -# CONFIG_BROWNOUT_DET_LVL_SEL_4 is not set -# CONFIG_BROWNOUT_DET_LVL_SEL_5 is not set -# CONFIG_BROWNOUT_DET_LVL_SEL_6 is not set -# CONFIG_BROWNOUT_DET_LVL_SEL_7 is not set -CONFIG_BROWNOUT_DET_LVL=0 -CONFIG_ESP32_RTC_CLOCK_SOURCE_INTERNAL_RC=y -# CONFIG_ESP32_RTC_CLOCK_SOURCE_EXTERNAL_CRYSTAL is not set -# CONFIG_ESP32_RTC_CLOCK_SOURCE_EXTERNAL_OSC is not set -# CONFIG_ESP32_RTC_CLOCK_SOURCE_INTERNAL_8MD256 is not set -# CONFIG_DISABLE_BASIC_ROM_CONSOLE is not set -# CONFIG_NO_BLOBS is not set -# CONFIG_COMPATIBLE_PRE_V2_1_BOOTLOADERS is not set -# CONFIG_EVENT_LOOP_PROFILING is not set -CONFIG_POST_EVENTS_FROM_ISR=y -CONFIG_POST_EVENTS_FROM_IRAM_ISR=y -# CONFIG_TWO_UNIVERSAL_MAC_ADDRESS is not set -CONFIG_FOUR_UNIVERSAL_MAC_ADDRESS=y -CONFIG_NUMBER_OF_UNIVERSAL_MAC_ADDRESS=4 -# CONFIG_ESP32C3_LIGHTSLEEP_GPIO_RESET_WORKAROUND is not set -CONFIG_IPC_TASK_STACK_SIZE=1536 -CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE=y -# CONFIG_ESP32_PHY_INIT_DATA_IN_PARTITION is not set -CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER=20 -CONFIG_ESP32_PHY_MAX_TX_POWER=20 -CONFIG_ESP32_REDUCE_PHY_TX_POWER=y -CONFIG_ESP32S2_PANIC_PRINT_HALT=y -# CONFIG_ESP32S2_PANIC_PRINT_REBOOT is not set -# CONFIG_ESP32S2_PANIC_SILENT_REBOOT is not set -# CONFIG_ESP32S2_PANIC_GDBSTUB is not set -CONFIG_SYSTEM_EVENT_QUEUE_SIZE=32 -CONFIG_SYSTEM_EVENT_TASK_STACK_SIZE=2304 -# CONFIG_CONSOLE_UART_DEFAULT is not set -# CONFIG_CONSOLE_UART_CUSTOM is not set -CONFIG_ESP_CONSOLE_UART_NONE=y -CONFIG_CONSOLE_UART_NUM=-1 -CONFIG_INT_WDT=y -CONFIG_INT_WDT_TIMEOUT_MS=300 -CONFIG_INT_WDT_CHECK_CPU1=y -# CONFIG_TASK_WDT is not set -# CONFIG_ESP32_DEBUG_STUBS_ENABLE is not set -CONFIG_TIMER_TASK_STACK_SIZE=3584 -# CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH is not set -# CONFIG_ESP32_ENABLE_COREDUMP_TO_UART is not set -CONFIG_ESP32_ENABLE_COREDUMP_TO_NONE=y -# CONFIG_ENABLE_STATIC_TASK_CLEAN_UP_HOOK is not set -CONFIG_TIMER_TASK_PRIORITY=1 -CONFIG_TIMER_TASK_STACK_DEPTH=2048 -CONFIG_TIMER_QUEUE_LENGTH=10 -# CONFIG_L2_TO_L3_COPY is not set -# CONFIG_USE_ONLY_LWIP_SELECT is not set -CONFIG_ESP_GRATUITOUS_ARP=y -CONFIG_GARP_TMR_INTERVAL=60 -CONFIG_TCPIP_RECVMBOX_SIZE=32 -CONFIG_TCP_MAXRTX=12 -CONFIG_TCP_SYNMAXRTX=6 -CONFIG_TCP_MSS=1440 -CONFIG_TCP_MSL=60000 -CONFIG_TCP_SND_BUF_DEFAULT=2880 -CONFIG_TCP_WND_DEFAULT=2880 -CONFIG_TCP_RECVMBOX_SIZE=6 -CONFIG_TCP_QUEUE_OOSEQ=y -# CONFIG_ESP_TCP_KEEP_CONNECTION_WHEN_IP_CHANGES is not set -CONFIG_TCP_OVERSIZE_MSS=y -# CONFIG_TCP_OVERSIZE_QUARTER_MSS is not set -# CONFIG_TCP_OVERSIZE_DISABLE is not set -CONFIG_UDP_RECVMBOX_SIZE=6 -CONFIG_TCPIP_TASK_STACK_SIZE=3072 -CONFIG_TCPIP_TASK_AFFINITY_NO_AFFINITY=y -# CONFIG_TCPIP_TASK_AFFINITY_CPU0 is not set -# CONFIG_TCPIP_TASK_AFFINITY_CPU1 is not set -CONFIG_TCPIP_TASK_AFFINITY=0x7FFFFFFF -# CONFIG_PPP_SUPPORT is not set -CONFIG_ESP32_PTHREAD_TASK_PRIO_DEFAULT=5 -CONFIG_ESP32_PTHREAD_TASK_STACK_SIZE_DEFAULT=3072 -CONFIG_ESP32_PTHREAD_STACK_MIN=768 -CONFIG_ESP32_DEFAULT_PTHREAD_CORE_NO_AFFINITY=y -# CONFIG_ESP32_DEFAULT_PTHREAD_CORE_0 is not set -# CONFIG_ESP32_DEFAULT_PTHREAD_CORE_1 is not set -CONFIG_ESP32_PTHREAD_TASK_CORE_DEFAULT=-1 -CONFIG_ESP32_PTHREAD_TASK_NAME_DEFAULT="pthread" -CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ABORTS=y -# CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_FAILS is not set -# CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ALLOWED is not set -CONFIG_SUPPRESS_SELECT_DEBUG_OUTPUT=y -CONFIG_SUPPORT_TERMIOS=y -CONFIG_SEMIHOSTFS_MAX_MOUNT_POINTS=1 -CONFIG_SEMIHOSTFS_HOST_PATH_MAX_LEN=128 -# End of deprecated options +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/esp-idf-config/sdkconfig-esp32c3.defaults b/ports/espressif/esp-idf-config/sdkconfig-esp32c3.defaults index 5fdb766add7f..76a7924f67a0 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-esp32c3.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-esp32c3.defaults @@ -1,171 +1,60 @@ -CONFIG_IDF_TARGET_ARCH_RISCV=y -CONFIG_IDF_TARGET="esp32c3" -CONFIG_IDF_TARGET_ESP32C3=y -CONFIG_IDF_FIRMWARE_CHIP_ID=0x0005 # -# SDK tool configuration +# Espressif IoT Development Framework Configuration # -CONFIG_SDK_TOOLPREFIX="riscv32-esp-elf-" -# end of SDK tool configuration - -# -# Bootloader config -# -CONFIG_BOOTLOADER_OFFSET_IN_FLASH=0x0 -# end of Bootloader config - # # Component config # # # Bluetooth # -CONFIG_BT_SOC_SUPPORT_5_0=y +CONFIG_BT_ENABLED=y +CONFIG_BT_NIMBLE_ENABLED=y # # NimBLE Options # -CONFIG_BT_NIMBLE_PINNED_TO_CORE=0 -# end of NimBLE Options - -# end of Bluetooth - -# -# ESP32C3-Specific -# -# CONFIG_ESP32C3_DEFAULT_CPU_FREQ_80 is not set -CONFIG_ESP32C3_DEFAULT_CPU_FREQ_160=y -CONFIG_ESP32C3_DEFAULT_CPU_FREQ_MHZ=160 -# CONFIG_ESP32C3_REV_MIN_0 is not set -# CONFIG_ESP32C3_REV_MIN_1 is not set -# CONFIG_ESP32C3_REV_MIN_2 is not set -CONFIG_ESP32C3_REV_MIN_3=y -CONFIG_ESP32C3_REV_MIN=3 -CONFIG_ESP32C3_DEBUG_OCDAWARE=y -CONFIG_ESP32C3_BROWNOUT_DET=y -CONFIG_ESP32C3_BROWNOUT_DET_LVL_SEL_7=y -# CONFIG_ESP32C3_BROWNOUT_DET_LVL_SEL_6 is not set -# CONFIG_ESP32C3_BROWNOUT_DET_LVL_SEL_5 is not set -# CONFIG_ESP32C3_BROWNOUT_DET_LVL_SEL_4 is not set -# CONFIG_ESP32C3_BROWNOUT_DET_LVL_SEL_3 is not set -# CONFIG_ESP32C3_BROWNOUT_DET_LVL_SEL_2 is not set -CONFIG_ESP32C3_BROWNOUT_DET_LVL=7 -CONFIG_ESP32C3_TIME_SYSCALL_USE_RTC_SYSTIMER=y -# CONFIG_ESP32C3_TIME_SYSCALL_USE_RTC is not set -# CONFIG_ESP32C3_TIME_SYSCALL_USE_SYSTIMER is not set -# CONFIG_ESP32C3_TIME_SYSCALL_USE_NONE is not set -CONFIG_ESP32C3_RTC_CLK_SRC_INT_RC=y -# CONFIG_ESP32C3_RTC_CLK_SRC_EXT_CRYS is not set -# CONFIG_ESP32C3_RTC_CLK_SRC_EXT_OSC is not set -# CONFIG_ESP32C3_RTC_CLK_SRC_INT_8MD256 is not set -CONFIG_ESP32C3_RTC_CLK_CAL_CYCLES=1024 -# end of ESP32C3-Specific - -# -# Hardware Settings +CONFIG_BT_NIMBLE_LOG_LEVEL_NONE=y +CONFIG_BT_NIMBLE_NVS_PERSIST=y # +# Memory Settings # -# MAC Config -# -# CONFIG_ESP32C3_UNIVERSAL_MAC_ADDRESSES_TWO is not set -CONFIG_ESP32C3_UNIVERSAL_MAC_ADDRESSES_FOUR=y -CONFIG_ESP32C3_UNIVERSAL_MAC_ADDRESSES=4 -# end of MAC Config +CONFIG_BT_NIMBLE_TRANSPORT_ACL_FROM_LL_COUNT=20 +CONFIG_BT_NIMBLE_TRANSPORT_EVT_SIZE=70 +# end of Memory Settings -# -# Sleep Config -# -CONFIG_ESP_SLEEP_POWER_DOWN_FLASH=y -CONFIG_ESP_SLEEP_GPIO_RESET_WORKAROUND=y -# end of Sleep Config - -# end of Hardware Settings +CONFIG_BT_NIMBLE_EXT_ADV=y +# end of NimBLE Options # -# PHY +# Controller Options # -CONFIG_ESP_PHY_ENABLE_USB=y -# end of PHY +# CONFIG_BT_CTRL_BLE_SCAN_DUPL is not set +# end of Controller Options + +# end of Bluetooth # -# ESP System Settings +# Driver Configurations # -CONFIG_ESP_SYSTEM_SINGLE_CORE_MODE=y # -# Memory protection +# RMT Configuration # -CONFIG_ESP_SYSTEM_MEMPROT_DEPCHECK=y -CONFIG_ESP_SYSTEM_MEMPROT_FEATURE=y -CONFIG_ESP_SYSTEM_MEMPROT_FEATURE_LOCK=y -CONFIG_ESP_SYSTEM_MEMPROT_CPU_PREFETCH_PAD_SIZE=16 -CONFIG_ESP_SYSTEM_MEMPROT_MEM_ALIGN_SIZE=512 -# end of Memory protection - -CONFIG_ESP_MAIN_TASK_AFFINITY_CPU0=y -# CONFIG_ESP_MAIN_TASK_AFFINITY_NO_AFFINITY is not set -CONFIG_ESP_MAIN_TASK_AFFINITY=0x0 - -CONFIG_ESP_CONSOLE_SECONDARY_NONE=y -# CONFIG_ESP_CONSOLE_SECONDARY_USB_SERIAL_JTAG is not set -# end of ESP System Settings +CONFIG_RMT_SUPPRESS_DEPRECATE_WARN=y +# end of RMT Configuration +# end of Driver Configurations # # Wi-Fi # -CONFIG_ESP32_WIFI_ENABLED=y -CONFIG_ESP32_WIFI_SW_COEXIST_ENABLE=y -CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM=4 -CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM=8 -# CONFIG_ESP32_WIFI_STATIC_TX_BUFFER is not set -CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER=y -CONFIG_ESP32_WIFI_TX_BUFFER_TYPE=1 -CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER_NUM=16 -# CONFIG_ESP32_WIFI_CSI_ENABLED is not set -CONFIG_ESP32_WIFI_AMPDU_TX_ENABLED=y -CONFIG_ESP32_WIFI_TX_BA_WIN=6 -CONFIG_ESP32_WIFI_AMPDU_RX_ENABLED=y -CONFIG_ESP32_WIFI_RX_BA_WIN=6 -# CONFIG_ESP32_WIFI_NVS_ENABLED is not set -CONFIG_ESP32_WIFI_SOFTAP_BEACON_MAX_LEN=752 -CONFIG_ESP32_WIFI_MGMT_SBUF_NUM=32 -CONFIG_ESP32_WIFI_IRAM_OPT=y -CONFIG_ESP32_WIFI_RX_IRAM_OPT=y -# CONFIG_ESP32_WIFI_ENABLE_WPA3_SAE is not set +CONFIG_ESP_WIFI_STATIC_RX_BUFFER_NUM=4 # end of Wi-Fi # -# FreeRTOS +# Newlib # -CONFIG_FREERTOS_UNICORE=y -CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y -# end of FreeRTOS +CONFIG_NEWLIB_NANO_FORMAT=y +# end of Newlib # end of Component config -# -# Deprecated options for backward compatibility -# -CONFIG_TOOLPREFIX="riscv32-esp-elf-" -# CONFIG_ESP32_APPTRACE_DEST_TRAX is not set -CONFIG_ESP32_APPTRACE_DEST_NONE=y -CONFIG_ESP32_APPTRACE_LOCK_ENABLE=y -CONFIG_NIMBLE_PINNED_TO_CORE=0 -CONFIG_ESP_SYSTEM_PD_FLASH=y -CONFIG_ESP32C3_LIGHTSLEEP_GPIO_RESET_WORKAROUND=y -CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE=y -# CONFIG_ESP32_PHY_INIT_DATA_IN_PARTITION is not set -CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER=20 -CONFIG_ESP32_PHY_MAX_TX_POWER=20 -CONFIG_ESP32S2_ALLOW_RTC_FAST_MEM_AS_HEAP=y -CONFIG_ESP32H2_MEMPROT_FEATURE=y -CONFIG_ESP32H2_MEMPROT_FEATURE_LOCK=y -# CONFIG_ESP32_DEBUG_STUBS_ENABLE is not set -# CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH is not set -# CONFIG_ESP32_ENABLE_COREDUMP_TO_UART is not set -CONFIG_ESP32_ENABLE_COREDUMP_TO_NONE=y -CONFIG_ESP32_PTHREAD_TASK_PRIO_DEFAULT=5 -CONFIG_ESP32_PTHREAD_TASK_STACK_SIZE_DEFAULT=3072 -CONFIG_ESP32_PTHREAD_STACK_MIN=768 -CONFIG_ESP32_PTHREAD_TASK_CORE_DEFAULT=-1 -CONFIG_ESP32_PTHREAD_TASK_NAME_DEFAULT="pthread" -# end of Deprecated options for backward compatibility +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/esp-idf-config/sdkconfig-esp32c6.defaults b/ports/espressif/esp-idf-config/sdkconfig-esp32c6.defaults new file mode 100644 index 000000000000..c1776fc47cf8 --- /dev/null +++ b/ports/espressif/esp-idf-config/sdkconfig-esp32c6.defaults @@ -0,0 +1,60 @@ +# +# Espressif IoT Development Framework Configuration +# +# +# Component config +# +# +# Bluetooth +# +CONFIG_BT_ENABLED=y +CONFIG_BT_NIMBLE_ENABLED=y +# +# NimBLE Options +# +CONFIG_BT_NIMBLE_LOG_LEVEL_NONE=y +CONFIG_BT_NIMBLE_NVS_PERSIST=y +# +# Memory Settings +# +CONFIG_BT_NIMBLE_TRANSPORT_ACL_FROM_LL_COUNT=20 +CONFIG_BT_NIMBLE_TRANSPORT_EVT_SIZE=70 +# end of Memory Settings + +CONFIG_BT_NIMBLE_EXT_ADV=y +# end of NimBLE Options + +# end of Bluetooth + +# +# Driver Configurations +# +# +# PCNT Configuration +# +CONFIG_PCNT_SUPPRESS_DEPRECATE_WARN=y +# end of PCNT Configuration + +# +# RMT Configuration +# +CONFIG_RMT_SUPPRESS_DEPRECATE_WARN=y +# end of RMT Configuration + +# end of Driver Configurations + +# +# PHY +# +CONFIG_ESP_PHY_ENABLE_USB=y +# end of PHY + +# +# Wi-Fi +# +CONFIG_ESP_WIFI_STATIC_RX_BUFFER_NUM=4 +# end of Wi-Fi + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/esp-idf-config/sdkconfig-esp32h2.defaults b/ports/espressif/esp-idf-config/sdkconfig-esp32h2.defaults new file mode 100644 index 000000000000..c1776fc47cf8 --- /dev/null +++ b/ports/espressif/esp-idf-config/sdkconfig-esp32h2.defaults @@ -0,0 +1,60 @@ +# +# Espressif IoT Development Framework Configuration +# +# +# Component config +# +# +# Bluetooth +# +CONFIG_BT_ENABLED=y +CONFIG_BT_NIMBLE_ENABLED=y +# +# NimBLE Options +# +CONFIG_BT_NIMBLE_LOG_LEVEL_NONE=y +CONFIG_BT_NIMBLE_NVS_PERSIST=y +# +# Memory Settings +# +CONFIG_BT_NIMBLE_TRANSPORT_ACL_FROM_LL_COUNT=20 +CONFIG_BT_NIMBLE_TRANSPORT_EVT_SIZE=70 +# end of Memory Settings + +CONFIG_BT_NIMBLE_EXT_ADV=y +# end of NimBLE Options + +# end of Bluetooth + +# +# Driver Configurations +# +# +# PCNT Configuration +# +CONFIG_PCNT_SUPPRESS_DEPRECATE_WARN=y +# end of PCNT Configuration + +# +# RMT Configuration +# +CONFIG_RMT_SUPPRESS_DEPRECATE_WARN=y +# end of RMT Configuration + +# end of Driver Configurations + +# +# PHY +# +CONFIG_ESP_PHY_ENABLE_USB=y +# end of PHY + +# +# Wi-Fi +# +CONFIG_ESP_WIFI_STATIC_RX_BUFFER_NUM=4 +# end of Wi-Fi + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/esp-idf-config/sdkconfig-esp32s2.defaults b/ports/espressif/esp-idf-config/sdkconfig-esp32s2.defaults index bfd64ef90e70..eba36817a893 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-esp32s2.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-esp32s2.defaults @@ -1,167 +1,66 @@ # -# Espressif IoT Development Framework (ESP-IDF) Project Configuration +# Espressif IoT Development Framework Configuration +# +# +# Component config +# +# +# Driver Configurations # -CONFIG_IDF_TARGET_ARCH_XTENSA=y -CONFIG_IDF_TARGET="esp32s2" -CONFIG_IDF_TARGET_ESP32S2=y -CONFIG_IDF_FIRMWARE_CHIP_ID=0x0002 -# end of Espressif IoT Development Framework (ESP-IDF) Project Configuration - -CONFIG_SDK_TOOLPREFIX="xtensa-esp32s2-elf-" # -# Bootloader config +# PCNT Configuration # -CONFIG_BOOTLOADER_OFFSET_IN_FLASH=0x1000 -# end of Bootloader config +CONFIG_PCNT_SUPPRESS_DEPRECATE_WARN=y +# end of PCNT Configuration -# CONFIG_ESP32S2_DEFAULT_CPU_FREQ_80 is not set # -# ESP32S2-specific +# RMT Configuration # -# CONFIG_ESP32S2_DEFAULT_CPU_FREQ_160 is not set -CONFIG_ESP32S2_DEFAULT_CPU_FREQ_240=y -CONFIG_ESP32S2_DEFAULT_CPU_FREQ_MHZ=240 -# end of ESP32S2-specific +CONFIG_RMT_SUPPRESS_DEPRECATE_WARN=y +# end of RMT Configuration -# CONFIG_ESP32S2_INSTRUCTION_CACHE_8KB is not set +# end of Driver Configurations + +# +# ESP System Settings +# +CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ_240=y # # Cache config # CONFIG_ESP32S2_INSTRUCTION_CACHE_16KB=y -# CONFIG_ESP32S2_INSTRUCTION_CACHE_LINE_16B is not set -CONFIG_ESP32S2_INSTRUCTION_CACHE_LINE_32B=y -# CONFIG_ESP32S2_DATA_CACHE_0KB is not set -# CONFIG_ESP32S2_DATA_CACHE_8KB is not set CONFIG_ESP32S2_DATA_CACHE_16KB=y -# CONFIG_ESP32S2_DATA_CACHE_LINE_16B is not set -CONFIG_ESP32S2_DATA_CACHE_LINE_32B=y -# CONFIG_ESP32S2_INSTRUCTION_CACHE_WRAP is not set -# CONFIG_ESP32S2_DATA_CACHE_WRAP is not set # end of Cache config -# CONFIG_ESP32S2_TRAX is not set -CONFIG_ESP32S2_TRACEMEM_RESERVE_DRAM=0x0 -CONFIG_ESP32S2_ULP_COPROC_ENABLED=y -CONFIG_ESP32S2_ULP_COPROC_RESERVE_MEM=8176 -CONFIG_ESP32S2_ULP_COPROC_RISCV=y -CONFIG_ESP32S2_DEBUG_OCDAWARE=y -# CONFIG_ESP32S2_DEBUG_STUBS_ENABLE is not set -CONFIG_ESP32S2_BROWNOUT_DET=y -CONFIG_ESP32S2_BROWNOUT_DET_LVL_SEL_7=y -# CONFIG_ESP32S2_BROWNOUT_DET_LVL_SEL_6 is not set -# CONFIG_ESP32S2_BROWNOUT_DET_LVL_SEL_5 is not set -# CONFIG_ESP32S2_BROWNOUT_DET_LVL_SEL_4 is not set -# CONFIG_ESP32S2_BROWNOUT_DET_LVL_SEL_3 is not set -# CONFIG_ESP32S2_BROWNOUT_DET_LVL_SEL_2 is not set -# CONFIG_ESP32S2_BROWNOUT_DET_LVL_SEL_1 is not set -CONFIG_ESP32S2_BROWNOUT_DET_LVL=7 -CONFIG_ESP32S2_TIME_SYSCALL_USE_RTC_FRC1=y -# CONFIG_ESP32S2_TIME_SYSCALL_USE_RTC is not set -# CONFIG_ESP32S2_TIME_SYSCALL_USE_FRC1 is not set -# CONFIG_ESP32S2_TIME_SYSCALL_USE_NONE is not set -CONFIG_ESP32S2_RTC_CLK_SRC_INT_RC=y -# CONFIG_ESP32S2_RTC_CLK_SRC_EXT_CRYS is not set -# CONFIG_ESP32S2_RTC_CLK_SRC_EXT_OSC is not set -# CONFIG_ESP32S2_RTC_CLK_SRC_INT_8MD256 is not set -CONFIG_ESP32S2_RTC_CLK_CAL_CYCLES=576 -# CONFIG_ESP32S2_NO_BLOBS is not set -# CONFIG_ESP32S2_KEEP_USB_ALIVE is not set -CONFIG_ESP32S2_RTCDATA_IN_FAST_MEM=y -# CONFIG_ESP32S2_USE_FIXED_STATIC_RAM_SIZE is not set # -# MAC Config +# Memory # -# CONFIG_ESP32S2_UNIVERSAL_MAC_ADDRESSES_ONE is not set -CONFIG_ESP32S2_UNIVERSAL_MAC_ADDRESSES_TWO=y -CONFIG_ESP32S2_UNIVERSAL_MAC_ADDRESSES=2 -# end of MAC Config +CONFIG_ESP32S2_RTCDATA_IN_FAST_MEM=y +# end of Memory -CONFIG_ESP_SLEEP_POWER_DOWN_FLASH=y -# -# Sleep Config -# -# CONFIG_ESP_SLEEP_GPIO_RESET_WORKAROUND is not set -# end of Sleep Config +# end of ESP System Settings # -# PHY +# Wi-Fi # -# CONFIG_ESP_PHY_ENABLE_USB is not set -# end of PHY +CONFIG_ESP_WIFI_STATIC_RX_BUFFER_NUM=4 +CONFIG_ESP_WIFI_CACHE_TX_BUFFER_NUM=16 +CONFIG_ESP_WIFI_RX_BA_WIN=4 +# end of Wi-Fi -CONFIG_ESP_SYSTEM_SINGLE_CORE_MODE=y # -# Memory protection +# Newlib # -CONFIG_ESP_SYSTEM_MEMPROT_FEATURE=y -CONFIG_ESP_SYSTEM_MEMPROT_FEATURE_LOCK=y -CONFIG_ESP_SYSTEM_MEMPROT_CPU_PREFETCH_PAD_SIZE=16 -CONFIG_ESP_SYSTEM_MEMPROT_MEM_ALIGN_SIZE=4 -# end of Memory protection +CONFIG_NEWLIB_NANO_FORMAT=y +# end of Newlib -CONFIG_ESP_MAIN_TASK_AFFINITY_CPU0=y -# CONFIG_ESP_MAIN_TASK_AFFINITY_NO_AFFINITY is not set -CONFIG_ESP_MAIN_TASK_AFFINITY=0x0 # -# Wi-Fi +# Ultra Low Power (ULP) Co-processor # -CONFIG_ESP32_WIFI_ENABLED=y -CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM=4 -CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM=8 -# CONFIG_ESP32_WIFI_STATIC_TX_BUFFER is not set -CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER=y -CONFIG_ESP32_WIFI_TX_BUFFER_TYPE=1 -CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER_NUM=16 -CONFIG_ESP32_WIFI_CACHE_TX_BUFFER_NUM=16 -# CONFIG_ESP32_WIFI_CSI_ENABLED is not set -CONFIG_ESP32_WIFI_AMPDU_TX_ENABLED=y -CONFIG_ESP32_WIFI_TX_BA_WIN=6 -CONFIG_ESP32_WIFI_AMPDU_RX_ENABLED=y -CONFIG_ESP32_WIFI_RX_BA_WIN=6 -# CONFIG_ESP32_WIFI_NVS_ENABLED is not set -CONFIG_ESP32_WIFI_SOFTAP_BEACON_MAX_LEN=752 -CONFIG_ESP32_WIFI_MGMT_SBUF_NUM=32 -CONFIG_ESP32_WIFI_IRAM_OPT=y -CONFIG_ESP32_WIFI_RX_IRAM_OPT=y -# CONFIG_ESP32_WIFI_ENABLE_WPA3_SAE is not set -# CONFIG_ESP_WIFI_EXTERNAL_COEXIST_ENABLE is not set -# end of Wi-Fi +CONFIG_ULP_COPROC_ENABLED=y +CONFIG_ULP_COPROC_RESERVE_MEM=8176 +# end of Ultra Low Power (ULP) Co-processor -CONFIG_FREERTOS_UNICORE=y -# -# FreeRTOS -# -CONFIG_FREERTOS_TICK_SUPPORT_CORETIMER=y -CONFIG_FREERTOS_CORETIMER_0=y -# CONFIG_FREERTOS_CORETIMER_1 is not set -CONFIG_FREERTOS_SYSTICK_USES_CCOUNT=y -CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y -# end of FreeRTOS +# end of Component config -CONFIG_MBEDTLS_HARDWARE_GCM=y -# -# Deprecated options for backward compatibility -# -CONFIG_TOOLPREFIX="xtensa-esp32s2-elf-" -# CONFIG_ESP32_APPTRACE_DEST_TRAX is not set -CONFIG_ESP32_APPTRACE_DEST_NONE=y -CONFIG_ESP32_APPTRACE_LOCK_ENABLE=y -CONFIG_ESP_SYSTEM_PD_FLASH=y -# CONFIG_ESP32C3_LIGHTSLEEP_GPIO_RESET_WORKAROUND is not set -CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE=y -# CONFIG_ESP32_PHY_INIT_DATA_IN_PARTITION is not set -CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER=20 -CONFIG_ESP32_PHY_MAX_TX_POWER=20 -CONFIG_ESP32S2_ALLOW_RTC_FAST_MEM_AS_HEAP=y -CONFIG_ESP32H2_MEMPROT_FEATURE=y -CONFIG_ESP32H2_MEMPROT_FEATURE_LOCK=y -# CONFIG_EXTERNAL_COEX_ENABLE is not set -# CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH is not set -# CONFIG_ESP32_ENABLE_COREDUMP_TO_UART is not set -CONFIG_ESP32_ENABLE_COREDUMP_TO_NONE=y -CONFIG_ESP32_PTHREAD_TASK_PRIO_DEFAULT=5 -CONFIG_ESP32_PTHREAD_TASK_STACK_SIZE_DEFAULT=3072 -CONFIG_ESP32_PTHREAD_STACK_MIN=768 -CONFIG_ESP32_PTHREAD_TASK_CORE_DEFAULT=-1 -CONFIG_ESP32_PTHREAD_TASK_NAME_DEFAULT="pthread" -# end of Deprecated options for backward compatibility +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/esp-idf-config/sdkconfig-esp32s3.defaults b/ports/espressif/esp-idf-config/sdkconfig-esp32s3.defaults index f6fb80c75297..59966474a54e 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-esp32s3.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-esp32s3.defaults @@ -1,221 +1,106 @@ -CONFIG_IDF_TARGET_ARCH_XTENSA=y -CONFIG_IDF_TARGET="esp32s3" -CONFIG_IDF_TARGET_ESP32S3=y -CONFIG_IDF_FIRMWARE_CHIP_ID=0x0009 # -# SDK tool configuration +# Espressif IoT Development Framework Configuration # -CONFIG_SDK_TOOLPREFIX="xtensa-esp32s3-elf-" -# end of SDK tool configuration - -# -# Bootloader config -# -CONFIG_BOOTLOADER_OFFSET_IN_FLASH=0x0 -# end of Bootloader config - # # Component config # # # Bluetooth # -CONFIG_BT_SOC_SUPPORT_5_0=y +CONFIG_BT_ENABLED=y +CONFIG_BT_NIMBLE_ENABLED=y # # NimBLE Options # -# CONFIG_BT_NIMBLE_PINNED_TO_CORE_0 is not set +CONFIG_BT_NIMBLE_LOG_LEVEL_NONE=y CONFIG_BT_NIMBLE_PINNED_TO_CORE_1=y -CONFIG_BT_NIMBLE_PINNED_TO_CORE=1 -# end of NimBLE Options +CONFIG_BT_NIMBLE_NVS_PERSIST=y +# +# Memory Settings +# +CONFIG_BT_NIMBLE_TRANSPORT_ACL_FROM_LL_COUNT=20 +CONFIG_BT_NIMBLE_TRANSPORT_EVT_SIZE=70 +# end of Memory Settings -# end of Bluetooth +CONFIG_BT_NIMBLE_EXT_ADV=y +# CONFIG_BT_NIMBLE_ENABLE_PERIODIC_ADV is not set +# end of NimBLE Options # -# ESP32S3-Specific -# -# CONFIG_ESP32S3_DEFAULT_CPU_FREQ_80 is not set -# CONFIG_ESP32S3_DEFAULT_CPU_FREQ_160 is not set -CONFIG_ESP32S3_DEFAULT_CPU_FREQ_240=y -CONFIG_ESP32S3_DEFAULT_CPU_FREQ_MHZ=240 -# -# Cache config -# -CONFIG_ESP32S3_INSTRUCTION_CACHE_16KB=y -# CONFIG_ESP32S3_INSTRUCTION_CACHE_32KB is not set -CONFIG_ESP32S3_INSTRUCTION_CACHE_SIZE=0x4000 -# CONFIG_ESP32S3_INSTRUCTION_CACHE_4WAYS is not set -CONFIG_ESP32S3_INSTRUCTION_CACHE_8WAYS=y -CONFIG_ESP32S3_ICACHE_ASSOCIATED_WAYS=8 -# CONFIG_ESP32S3_INSTRUCTION_CACHE_LINE_16B is not set -CONFIG_ESP32S3_INSTRUCTION_CACHE_LINE_32B=y -CONFIG_ESP32S3_INSTRUCTION_CACHE_LINE_SIZE=32 -# CONFIG_ESP32S3_INSTRUCTION_CACHE_WRAP is not set -# CONFIG_ESP32S3_DATA_CACHE_16KB is not set -CONFIG_ESP32S3_DATA_CACHE_32KB=y -# CONFIG_ESP32S3_DATA_CACHE_64KB is not set -CONFIG_ESP32S3_DATA_CACHE_SIZE=0x8000 -# CONFIG_ESP32S3_DATA_CACHE_4WAYS is not set -CONFIG_ESP32S3_DATA_CACHE_8WAYS=y -CONFIG_ESP32S3_DCACHE_ASSOCIATED_WAYS=8 -# CONFIG_ESP32S3_DATA_CACHE_LINE_16B is not set -CONFIG_ESP32S3_DATA_CACHE_LINE_32B=y -# CONFIG_ESP32S3_DATA_CACHE_LINE_64B is not set -CONFIG_ESP32S3_DATA_CACHE_LINE_SIZE=32 -# CONFIG_ESP32S3_DATA_CACHE_WRAP is not set -# end of Cache config - -# CONFIG_ESP32S3_TRAX is not set -CONFIG_ESP32S3_TRACEMEM_RESERVE_DRAM=0x0 -CONFIG_ESP32S3_ULP_COPROC_ENABLED=y -CONFIG_ESP32S3_ULP_COPROC_RESERVE_MEM=8176 -CONFIG_ESP32S3_ULP_COPROC_RISCV=y -CONFIG_ESP32S3_BROWNOUT_DET=y -CONFIG_ESP32S3_BROWNOUT_DET_LVL_SEL_7=y -# CONFIG_ESP32S3_BROWNOUT_DET_LVL_SEL_6 is not set -# CONFIG_ESP32S3_BROWNOUT_DET_LVL_SEL_5 is not set -# CONFIG_ESP32S3_BROWNOUT_DET_LVL_SEL_4 is not set -# CONFIG_ESP32S3_BROWNOUT_DET_LVL_SEL_3 is not set -# CONFIG_ESP32S3_BROWNOUT_DET_LVL_SEL_2 is not set -# CONFIG_ESP32S3_BROWNOUT_DET_LVL_SEL_1 is not set -CONFIG_ESP32S3_BROWNOUT_DET_LVL=7 -CONFIG_ESP32S3_TIME_SYSCALL_USE_RTC_FRC1=y -# CONFIG_ESP32S3_TIME_SYSCALL_USE_RTC is not set -# CONFIG_ESP32S3_TIME_SYSCALL_USE_FRC1 is not set -# CONFIG_ESP32S3_TIME_SYSCALL_USE_NONE is not set -CONFIG_ESP32S3_RTC_CLK_SRC_INT_RC=y -# CONFIG_ESP32S3_RTC_CLK_SRC_EXT_CRYS is not set -# CONFIG_ESP32S3_RTC_CLK_SRC_EXT_OSC is not set -# CONFIG_ESP32S3_RTC_CLK_SRC_INT_8MD256 is not set -CONFIG_ESP32S3_RTC_CLK_CAL_CYCLES=1024 -CONFIG_ESP32S3_DEEP_SLEEP_WAKEUP_DELAY=2000 -CONFIG_ESP32S3_RTCDATA_IN_FAST_MEM=y -# CONFIG_ESP32S3_USE_FIXED_STATIC_RAM_SIZE is not set -# end of ESP32S3-Specific +# Controller Options +# +# CONFIG_BT_CTRL_BLE_SCAN_DUPL is not set +# end of Controller Options + +# end of Bluetooth # -# Hardware Settings +# Driver Configurations # # -# MAC Config +# PCNT Configuration # -# CONFIG_ESP32S3_UNIVERSAL_MAC_ADDRESSES_TWO is not set -CONFIG_ESP32S3_UNIVERSAL_MAC_ADDRESSES_FOUR=y -CONFIG_ESP32S3_UNIVERSAL_MAC_ADDRESSES=4 -# end of MAC Config +CONFIG_PCNT_SUPPRESS_DEPRECATE_WARN=y +# end of PCNT Configuration # -# Sleep Config +# RMT Configuration # -CONFIG_ESP_SLEEP_GPIO_RESET_WORKAROUND=y -# end of Sleep Config +CONFIG_RMT_SUPPRESS_DEPRECATE_WARN=y +# end of RMT Configuration -# end of Hardware Settings +# end of Driver Configurations # -# PHY +# LCD and Touch Panel +# # -CONFIG_ESP_PHY_ENABLE_USB=y -# end of PHY +# LCD Peripheral Configuration +# +CONFIG_LCD_RGB_RESTART_IN_VSYNC=y +# end of LCD Peripheral Configuration + +# end of LCD and Touch Panel # # ESP System Settings # -# CONFIG_ESP_MAIN_TASK_AFFINITY_CPU0 is not set +CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ_240=y +# +# Memory +# +CONFIG_ESP32S3_RTCDATA_IN_FAST_MEM=y +# end of Memory + CONFIG_ESP_MAIN_TASK_AFFINITY_CPU1=y -# CONFIG_ESP_MAIN_TASK_AFFINITY_NO_AFFINITY is not set -CONFIG_ESP_MAIN_TASK_AFFINITY=0x1 # end of ESP System Settings +# +# IPC (Inter-Processor Call) +# +CONFIG_ESP_IPC_TASK_STACK_SIZE=1536 +# end of IPC (Inter-Processor Call) + # # Wi-Fi # -CONFIG_ESP32_WIFI_ENABLED=y -CONFIG_ESP32_WIFI_SW_COEXIST_ENABLE=y -CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM=4 -CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM=8 -# CONFIG_ESP32_WIFI_STATIC_TX_BUFFER is not set -CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER=y -CONFIG_ESP32_WIFI_TX_BUFFER_TYPE=1 -CONFIG_ESP32_WIFI_CACHE_TX_BUFFER_NUM=16 -CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER_NUM=16 -# CONFIG_ESP32_WIFI_CSI_ENABLED is not set -CONFIG_ESP32_WIFI_AMPDU_TX_ENABLED=y -CONFIG_ESP32_WIFI_TX_BA_WIN=6 -CONFIG_ESP32_WIFI_AMPDU_RX_ENABLED=y -CONFIG_ESP32_WIFI_RX_BA_WIN=6 -# CONFIG_ESP32_WIFI_AMSDU_TX_ENABLED is not set -# CONFIG_ESP32_WIFI_NVS_ENABLED is not set -CONFIG_ESP32_WIFI_TASK_PINNED_TO_CORE_0=y -# CONFIG_ESP32_WIFI_TASK_PINNED_TO_CORE_1 is not set -CONFIG_ESP32_WIFI_SOFTAP_BEACON_MAX_LEN=752 -CONFIG_ESP32_WIFI_MGMT_SBUF_NUM=32 -CONFIG_ESP32_WIFI_IRAM_OPT=y -CONFIG_ESP32_WIFI_RX_IRAM_OPT=y -# CONFIG_ESP32_WIFI_ENABLE_WPA3_SAE is not set +CONFIG_ESP_WIFI_STATIC_RX_BUFFER_NUM=4 +CONFIG_ESP_WIFI_CACHE_TX_BUFFER_NUM=16 # end of Wi-Fi # -# FreeRTOS +# Newlib # -# CONFIG_FREERTOS_UNICORE is not set -# end of FreeRTOS - -# end of Component config +CONFIG_NEWLIB_NANO_FORMAT=y +# end of Newlib # -# Deprecated options for backward compatibility -# -CONFIG_TOOLPREFIX="xtensa-esp32s3-elf-" -# CONFIG_ESP32_APPTRACE_DEST_TRAX is not set -CONFIG_ESP32_APPTRACE_DEST_NONE=y -CONFIG_ESP32_APPTRACE_LOCK_ENABLE=y -# CONFIG_NIMBLE_PINNED_TO_CORE_0 is not set -CONFIG_NIMBLE_PINNED_TO_CORE_1=y -CONFIG_NIMBLE_PINNED_TO_CORE=1 -CONFIG_ESP32C3_LIGHTSLEEP_GPIO_RESET_WORKAROUND=y -CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE=y -# CONFIG_ESP32_PHY_INIT_DATA_IN_PARTITION is not set -CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER=20 -CONFIG_ESP32_PHY_MAX_TX_POWER=20 -CONFIG_ESP32S2_ALLOW_RTC_FAST_MEM_AS_HEAP=y -# CONFIG_ESP32_DEBUG_STUBS_ENABLE is not set -# CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH is not set -# CONFIG_ESP32_ENABLE_COREDUMP_TO_UART is not set -CONFIG_ESP32_ENABLE_COREDUMP_TO_NONE=y -CONFIG_ESP32_PTHREAD_TASK_PRIO_DEFAULT=5 -CONFIG_ESP32_PTHREAD_TASK_STACK_SIZE_DEFAULT=3072 -CONFIG_ESP32_PTHREAD_STACK_MIN=768 -CONFIG_ESP32_DEFAULT_PTHREAD_CORE_NO_AFFINITY=y -# CONFIG_ESP32_DEFAULT_PTHREAD_CORE_0 is not set -# CONFIG_ESP32_DEFAULT_PTHREAD_CORE_1 is not set -CONFIG_ESP32_PTHREAD_TASK_CORE_DEFAULT=-1 -CONFIG_ESP32_PTHREAD_TASK_NAME_DEFAULT="pthread" -# end of Deprecated options for backward compatibility - -# -# Camera configuration -# -CONFIG_OV7670_SUPPORT=y -# CONFIG_OV7725_SUPPORT is not set -# CONFIG_NT99141_SUPPORT is not set -CONFIG_OV2640_SUPPORT=y -CONFIG_OV3660_SUPPORT=y -CONFIG_OV5640_SUPPORT=y -# CONFIG_GC2145_SUPPORT is not set -# CONFIG_GC032A_SUPPORT is not set -# CONFIG_GC0308_SUPPORT is not set -# CONFIG_BF3005_SUPPORT is not set -# CONFIG_BF20A6_SUPPORT is not set -# CONFIG_SC101IOT_SUPPORT is not set -# CONFIG_SC030IOT_SUPPORT is not set -# CONFIG_SCCB_HARDWARE_I2C_PORT0 is not set -CONFIG_SCCB_HARDWARE_I2C_PORT1=y -CONFIG_SCCB_CLK_FREQ=100000 -CONFIG_CAMERA_CORE0=y -# CONFIG_CAMERA_CORE1 is not set -# CONFIG_CAMERA_NO_AFFINITY is not set -CONFIG_CAMERA_DMA_BUFFER_SIZE_MAX=32768 -# CONFIG_CAMERA_CONVERTER_ENABLED is not set -# end of Camera configuration +# Ultra Low Power (ULP) Co-processor +# +CONFIG_ULP_COPROC_ENABLED=y +CONFIG_ULP_COPROC_RESERVE_MEM=8176 +# end of Ultra Low Power (ULP) Co-processor + # end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/esp-idf-config/sdkconfig-16MB-no-uf2.defaults b/ports/espressif/esp-idf-config/sdkconfig-flash-16MB-no-uf2.defaults similarity index 100% rename from ports/espressif/esp-idf-config/sdkconfig-16MB-no-uf2.defaults rename to ports/espressif/esp-idf-config/sdkconfig-flash-16MB-no-uf2.defaults diff --git a/ports/espressif/esp-idf-config/sdkconfig-16MB.defaults b/ports/espressif/esp-idf-config/sdkconfig-flash-16MB.defaults similarity index 66% rename from ports/espressif/esp-idf-config/sdkconfig-16MB.defaults rename to ports/espressif/esp-idf-config/sdkconfig-flash-16MB.defaults index fac8ba1cadab..cc5d54fec41d 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-16MB.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-flash-16MB.defaults @@ -1,4 +1,7 @@ # +# Espressif IoT Development Framework Configuration +# +# # Serial flasher config # # CONFIG_ESPTOOLPY_FLASHSIZE_1MB is not set @@ -6,13 +9,17 @@ # CONFIG_ESPTOOLPY_FLASHSIZE_4MB is not set # CONFIG_ESPTOOLPY_FLASHSIZE_8MB is not set CONFIG_ESPTOOLPY_FLASHSIZE_16MB=y +# CONFIG_ESPTOOLPY_FLASHSIZE_32MB is not set +# CONFIG_ESPTOOLPY_FLASHSIZE_64MB is not set +# CONFIG_ESPTOOLPY_FLASHSIZE_128MB is not set CONFIG_ESPTOOLPY_FLASHSIZE="16MB" -CONFIG_ESPTOOLPY_FLASHSIZE_DETECT=y # end of Serial flasher config -CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="esp-idf-config/partitions-16MB.csv" # # Partition Table # +CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="esp-idf-config/partitions-16MB.csv" CONFIG_PARTITION_TABLE_FILENAME="esp-idf-config/partitions-16MB.csv" # end of Partition Table + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/esp-idf-config/sdkconfig-2MB-no-ota-no-uf2.defaults b/ports/espressif/esp-idf-config/sdkconfig-flash-2MB-no-ota-no-uf2.defaults similarity index 100% rename from ports/espressif/esp-idf-config/sdkconfig-2MB-no-ota-no-uf2.defaults rename to ports/espressif/esp-idf-config/sdkconfig-flash-2MB-no-ota-no-uf2.defaults diff --git a/ports/espressif/esp-idf-config/sdkconfig-32MB.defaults b/ports/espressif/esp-idf-config/sdkconfig-flash-32MB.defaults similarity index 100% rename from ports/espressif/esp-idf-config/sdkconfig-32MB.defaults rename to ports/espressif/esp-idf-config/sdkconfig-flash-32MB.defaults diff --git a/ports/espressif/esp-idf-config/sdkconfig-flash-40m.defaults b/ports/espressif/esp-idf-config/sdkconfig-flash-40m.defaults new file mode 100644 index 000000000000..235a62a57ee0 --- /dev/null +++ b/ports/espressif/esp-idf-config/sdkconfig-flash-40m.defaults @@ -0,0 +1,14 @@ +# CONFIG_ESPTOOLPY_FLASHFREQ_120M is not set +# CONFIG_ESPTOOLPY_FLASHFREQ_80M is not set +# CONFIG_ESPTOOLPY_FLASHFREQ_64M is not set +# CONFIG_ESPTOOLPY_FLASHFREQ_60M is not set +# CONFIG_ESPTOOLPY_FLASHFREQ_48M is not set +CONFIG_ESPTOOLPY_FLASHFREQ_40M=y +# CONFIG_ESPTOOLPY_FLASHFREQ_32M is not set +# CONFIG_ESPTOOLPY_FLASHFREQ_30M is not set +# CONFIG_ESPTOOLPY_FLASHFREQ_26M is not set +# CONFIG_ESPTOOLPY_FLASHFREQ_24M is not set +# CONFIG_ESPTOOLPY_FLASHFREQ_20M is not set +# CONFIG_ESPTOOLPY_FLASHFREQ_16M is not set +# CONFIG_ESPTOOLPY_FLASHFREQ_15M is not set +# CONFIG_ESPTOOLPY_FLASHFREQ_80M_DEFAULT is not set diff --git a/ports/espressif/esp-idf-config/sdkconfig-flash-48m.defaults b/ports/espressif/esp-idf-config/sdkconfig-flash-48m.defaults new file mode 100644 index 000000000000..b710fd22554e --- /dev/null +++ b/ports/espressif/esp-idf-config/sdkconfig-flash-48m.defaults @@ -0,0 +1,14 @@ +# CONFIG_ESPTOOLPY_FLASHFREQ_120M is not set +# CONFIG_ESPTOOLPY_FLASHFREQ_80M is not set +# CONFIG_ESPTOOLPY_FLASHFREQ_64M is not set +# CONFIG_ESPTOOLPY_FLASHFREQ_60M is not set +CONFIG_ESPTOOLPY_FLASHFREQ_48M=y +# CONFIG_ESPTOOLPY_FLASHFREQ_40M is not set +# CONFIG_ESPTOOLPY_FLASHFREQ_32M is not set +# CONFIG_ESPTOOLPY_FLASHFREQ_30M is not set +# CONFIG_ESPTOOLPY_FLASHFREQ_26M is not set +# CONFIG_ESPTOOLPY_FLASHFREQ_24M is not set +# CONFIG_ESPTOOLPY_FLASHFREQ_20M is not set +# CONFIG_ESPTOOLPY_FLASHFREQ_16M is not set +# CONFIG_ESPTOOLPY_FLASHFREQ_15M is not set +CONFIG_ESPTOOLPY_FLASHFREQ_48M_DEFAULT=y diff --git a/ports/espressif/esp-idf-config/sdkconfig-4MB-1ota.defaults b/ports/espressif/esp-idf-config/sdkconfig-flash-4MB-1ota.defaults similarity index 100% rename from ports/espressif/esp-idf-config/sdkconfig-4MB-1ota.defaults rename to ports/espressif/esp-idf-config/sdkconfig-flash-4MB-1ota.defaults diff --git a/ports/espressif/esp-idf-config/sdkconfig-4MB-no-uf2.defaults b/ports/espressif/esp-idf-config/sdkconfig-flash-4MB-no-uf2.defaults similarity index 66% rename from ports/espressif/esp-idf-config/sdkconfig-4MB-no-uf2.defaults rename to ports/espressif/esp-idf-config/sdkconfig-flash-4MB-no-uf2.defaults index 2325a6729698..d24998167e9a 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-4MB-no-uf2.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-flash-4MB-no-uf2.defaults @@ -1,4 +1,7 @@ # +# Espressif IoT Development Framework Configuration +# +# # Serial flasher config # # CONFIG_ESPTOOLPY_FLASHSIZE_1MB is not set @@ -6,13 +9,17 @@ CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y # CONFIG_ESPTOOLPY_FLASHSIZE_8MB is not set # CONFIG_ESPTOOLPY_FLASHSIZE_16MB is not set +# CONFIG_ESPTOOLPY_FLASHSIZE_32MB is not set +# CONFIG_ESPTOOLPY_FLASHSIZE_64MB is not set +# CONFIG_ESPTOOLPY_FLASHSIZE_128MB is not set CONFIG_ESPTOOLPY_FLASHSIZE="4MB" -CONFIG_ESPTOOLPY_FLASHSIZE_DETECT=y # end of Serial flasher config -CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="esp-idf-config/partitions-4MB-no-uf2.csv" # # Partition Table # +CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="esp-idf-config/partitions-4MB-no-uf2.csv" CONFIG_PARTITION_TABLE_FILENAME="esp-idf-config/partitions-4MB-no-uf2.csv" # end of Partition Table + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/esp-idf-config/sdkconfig-4MB.defaults b/ports/espressif/esp-idf-config/sdkconfig-flash-4MB.defaults similarity index 66% rename from ports/espressif/esp-idf-config/sdkconfig-4MB.defaults rename to ports/espressif/esp-idf-config/sdkconfig-flash-4MB.defaults index 69f15ebe7b6a..811c9ea37d15 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-4MB.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-flash-4MB.defaults @@ -1,4 +1,7 @@ # +# Espressif IoT Development Framework Configuration +# +# # Serial flasher config # # CONFIG_ESPTOOLPY_FLASHSIZE_1MB is not set @@ -6,13 +9,17 @@ CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y # CONFIG_ESPTOOLPY_FLASHSIZE_8MB is not set # CONFIG_ESPTOOLPY_FLASHSIZE_16MB is not set +# CONFIG_ESPTOOLPY_FLASHSIZE_32MB is not set +# CONFIG_ESPTOOLPY_FLASHSIZE_64MB is not set +# CONFIG_ESPTOOLPY_FLASHSIZE_128MB is not set CONFIG_ESPTOOLPY_FLASHSIZE="4MB" -CONFIG_ESPTOOLPY_FLASHSIZE_DETECT=y # end of Serial flasher config -CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="esp-idf-config/partitions-4MB.csv" # # Partition Table # +CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="esp-idf-config/partitions-4MB.csv" CONFIG_PARTITION_TABLE_FILENAME="esp-idf-config/partitions-4MB.csv" # end of Partition Table + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/esp-idf-config/sdkconfig-flash-80m.defaults b/ports/espressif/esp-idf-config/sdkconfig-flash-80m.defaults new file mode 100644 index 000000000000..2ea441900379 --- /dev/null +++ b/ports/espressif/esp-idf-config/sdkconfig-flash-80m.defaults @@ -0,0 +1,14 @@ +# CONFIG_ESPTOOLPY_FLASHFREQ_120M is not set +CONFIG_ESPTOOLPY_FLASHFREQ_80M=y +# CONFIG_ESPTOOLPY_FLASHFREQ_64M is not set +# CONFIG_ESPTOOLPY_FLASHFREQ_60M is not set +# CONFIG_ESPTOOLPY_FLASHFREQ_48M is not set +# CONFIG_ESPTOOLPY_FLASHFREQ_40M is not set +# CONFIG_ESPTOOLPY_FLASHFREQ_32M is not set +# CONFIG_ESPTOOLPY_FLASHFREQ_30M is not set +# CONFIG_ESPTOOLPY_FLASHFREQ_26M is not set +# CONFIG_ESPTOOLPY_FLASHFREQ_24M is not set +# CONFIG_ESPTOOLPY_FLASHFREQ_20M is not set +# CONFIG_ESPTOOLPY_FLASHFREQ_16M is not set +# CONFIG_ESPTOOLPY_FLASHFREQ_15M is not set +CONFIG_ESPTOOLPY_FLASHFREQ_80M_DEFAULT=y diff --git a/ports/espressif/esp-idf-config/sdkconfig-8MB-no-uf2.defaults b/ports/espressif/esp-idf-config/sdkconfig-flash-8MB-no-uf2.defaults similarity index 66% rename from ports/espressif/esp-idf-config/sdkconfig-8MB-no-uf2.defaults rename to ports/espressif/esp-idf-config/sdkconfig-flash-8MB-no-uf2.defaults index 2a2548ba047d..eda2a71c62b6 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-8MB-no-uf2.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-flash-8MB-no-uf2.defaults @@ -1,4 +1,7 @@ # +# Espressif IoT Development Framework Configuration +# +# # Serial flasher config # # CONFIG_ESPTOOLPY_FLASHSIZE_1MB is not set @@ -6,13 +9,17 @@ # CONFIG_ESPTOOLPY_FLASHSIZE_4MB is not set CONFIG_ESPTOOLPY_FLASHSIZE_8MB=y # CONFIG_ESPTOOLPY_FLASHSIZE_16MB is not set +# CONFIG_ESPTOOLPY_FLASHSIZE_32MB is not set +# CONFIG_ESPTOOLPY_FLASHSIZE_64MB is not set +# CONFIG_ESPTOOLPY_FLASHSIZE_128MB is not set CONFIG_ESPTOOLPY_FLASHSIZE="8MB" -CONFIG_ESPTOOLPY_FLASHSIZE_DETECT=y # end of Serial flasher config -CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="esp-idf-config/partitions-8MB-no-uf2.csv" # # Partition Table # +CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="esp-idf-config/partitions-8MB-no-uf2.csv" CONFIG_PARTITION_TABLE_FILENAME="esp-idf-config/partitions-8MB-no-uf2.csv" # end of Partition Table + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/esp-idf-config/sdkconfig-8MB.defaults b/ports/espressif/esp-idf-config/sdkconfig-flash-8MB.defaults similarity index 66% rename from ports/espressif/esp-idf-config/sdkconfig-8MB.defaults rename to ports/espressif/esp-idf-config/sdkconfig-flash-8MB.defaults index 1ecb1b4c16ff..c64775aa1cca 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-8MB.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-flash-8MB.defaults @@ -1,4 +1,7 @@ # +# Espressif IoT Development Framework Configuration +# +# # Serial flasher config # # CONFIG_ESPTOOLPY_FLASHSIZE_1MB is not set @@ -6,8 +9,10 @@ # CONFIG_ESPTOOLPY_FLASHSIZE_4MB is not set CONFIG_ESPTOOLPY_FLASHSIZE_8MB=y # CONFIG_ESPTOOLPY_FLASHSIZE_16MB is not set +# CONFIG_ESPTOOLPY_FLASHSIZE_32MB is not set +# CONFIG_ESPTOOLPY_FLASHSIZE_64MB is not set +# CONFIG_ESPTOOLPY_FLASHSIZE_128MB is not set CONFIG_ESPTOOLPY_FLASHSIZE="8MB" -CONFIG_ESPTOOLPY_FLASHSIZE_DETECT=y # end of Serial flasher config # @@ -16,3 +21,5 @@ CONFIG_ESPTOOLPY_FLASHSIZE_DETECT=y CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="esp-idf-config/partitions-8MB.csv" CONFIG_PARTITION_TABLE_FILENAME="esp-idf-config/partitions-8MB.csv" # end of Partition Table + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/esp-idf-config/sdkconfig-flash-dio.defaults b/ports/espressif/esp-idf-config/sdkconfig-flash-dio.defaults new file mode 100644 index 000000000000..12ef8ad896a7 --- /dev/null +++ b/ports/espressif/esp-idf-config/sdkconfig-flash-dio.defaults @@ -0,0 +1,6 @@ +# CONFIG_ESPTOOLPY_OCT_FLASH is not set +# CONFIG_ESPTOOLPY_FLASHMODE_QIO is not set +# CONFIG_ESPTOOLPY_FLASHMODE_QOUT is not set +CONFIG_ESPTOOLPY_FLASHMODE_DIO=y +# CONFIG_ESPTOOLPY_FLASHMODE_DOUT is not set +# CONFIG_ESPTOOLPY_FLASHMODE_OPI is not set diff --git a/ports/espressif/esp-idf-config/sdkconfig-flash-dout.defaults b/ports/espressif/esp-idf-config/sdkconfig-flash-dout.defaults new file mode 100644 index 000000000000..e0f319ce3944 --- /dev/null +++ b/ports/espressif/esp-idf-config/sdkconfig-flash-dout.defaults @@ -0,0 +1,6 @@ +# CONFIG_ESPTOOLPY_OCT_FLASH is not set +# CONFIG_ESPTOOLPY_FLASHMODE_QIO is not set +# CONFIG_ESPTOOLPY_FLASHMODE_QOUT is not set +# CONFIG_ESPTOOLPY_FLASHMODE_DIO is not set +CONFIG_ESPTOOLPY_FLASHMODE_DOUT=y +# CONFIG_ESPTOOLPY_FLASHMODE_OPI is not set diff --git a/ports/espressif/esp-idf-config/sdkconfig-flash-opi.defaults b/ports/espressif/esp-idf-config/sdkconfig-flash-opi.defaults new file mode 100644 index 000000000000..90e1291cc8d3 --- /dev/null +++ b/ports/espressif/esp-idf-config/sdkconfig-flash-opi.defaults @@ -0,0 +1,6 @@ +CONFIG_ESPTOOLPY_OCT_FLASH=y +# CONFIG_ESPTOOLPY_FLASHMODE_QIO is not set +# CONFIG_ESPTOOLPY_FLASHMODE_QOUT is not set +# CONFIG_ESPTOOLPY_FLASHMODE_DIO is not set +# CONFIG_ESPTOOLPY_FLASHMODE_DOUT is not set +# CONFIG_ESPTOOLPY_FLASHMODE_OPI is not set diff --git a/ports/espressif/esp-idf-config/sdkconfig-flash-qio.defaults b/ports/espressif/esp-idf-config/sdkconfig-flash-qio.defaults new file mode 100644 index 000000000000..647dd84dda7d --- /dev/null +++ b/ports/espressif/esp-idf-config/sdkconfig-flash-qio.defaults @@ -0,0 +1,6 @@ +# CONFIG_ESPTOOLPY_OCT_FLASH is not set +CONFIG_ESPTOOLPY_FLASHMODE_QIO=y +# CONFIG_ESPTOOLPY_FLASHMODE_QOUT is not set +# CONFIG_ESPTOOLPY_FLASHMODE_DIO is not set +# CONFIG_ESPTOOLPY_FLASHMODE_DOUT is not set +# CONFIG_ESPTOOLPY_FLASHMODE_OPI is not set diff --git a/ports/espressif/esp-idf-config/sdkconfig-opt.defaults b/ports/espressif/esp-idf-config/sdkconfig-opt.defaults index 1ccd6478fe6c..74502488dc31 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-opt.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-opt.defaults @@ -1,41 +1,23 @@ # +# Espressif IoT Development Framework Configuration +# +# # Bootloader config # -CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_SIZE=y -# CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_DEBUG is not set -# CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_PERF is not set -# CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_NONE is not set CONFIG_BOOTLOADER_LOG_LEVEL_NONE=y -# CONFIG_BOOTLOADER_LOG_LEVEL_ERROR is not set -# CONFIG_BOOTLOADER_LOG_LEVEL_WARN is not set -# CONFIG_BOOTLOADER_LOG_LEVEL_INFO is not set -# CONFIG_BOOTLOADER_LOG_LEVEL_DEBUG is not set -# CONFIG_BOOTLOADER_LOG_LEVEL_VERBOSE is not set # end of Bootloader config # # Compiler options # -# CONFIG_COMPILER_OPTIMIZATION_DEFAULT is not set CONFIG_COMPILER_OPTIMIZATION_SIZE=y -# CONFIG_COMPILER_OPTIMIZATION_PERF is not set -# CONFIG_COMPILER_OPTIMIZATION_NONE is not set -# CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE is not set CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT=y -# CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE is not set -CONFIG_COMPILER_OPTIMIZATION_ASSERTION_LEVEL=1 -# CONFIG_COMPILER_OPTIMIZATION_CHECKS_SILENT is not set +CONFIG_COMPILER_OPTIMIZATION_CHECKS_SILENT=y # end of Compiler options # # Component config # -# -# ESP32S3-Specific -# -CONFIG_ESP32S3_DEBUG_OCDAWARE=y -# end of ESP32S3-Specific - # # Common ESP-related # @@ -45,74 +27,17 @@ CONFIG_ESP32S3_DEBUG_OCDAWARE=y # # ESP System Settings # -# CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT is not set -# CONFIG_ESP_SYSTEM_PANIC_PRINT_REBOOT is not set CONFIG_ESP_SYSTEM_PANIC_SILENT_REBOOT=y -# CONFIG_ESP_SYSTEM_PANIC_GDBSTUB is not set -# CONFIG_ESP_CONSOLE_UART_DEFAULT is not set -# CONFIG_ESP_CONSOLE_USB_CDC is not set -# CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG is not set -# CONFIG_ESP_CONSOLE_UART_CUSTOM is not set CONFIG_ESP_CONSOLE_NONE=y -# CONFIG_ESP_CONSOLE_SECONDARY_NONE is not set -CONFIG_ESP_CONSOLE_SECONDARY_USB_SERIAL_JTAG=y -CONFIG_ESP_CONSOLE_MULTIPLE_UART=y -CONFIG_ESP_CONSOLE_UART_NUM=-1 +CONFIG_ESP_CONSOLE_SECONDARY_NONE=y # end of ESP System Settings -# -# FreeRTOS -# -CONFIG_FREERTOS_ASSERT_ON_UNTESTED_FUNCTION=y -CONFIG_FREERTOS_ASSERT_FAIL_ABORT=y -# CONFIG_FREERTOS_ASSERT_FAIL_PRINT_CONTINUE is not set -# CONFIG_FREERTOS_ASSERT_DISABLE is not set -CONFIG_FREERTOS_DEBUG_OCDAWARE=y -# end of FreeRTOS - -# -# Hardware Abstraction Layer (HAL) and Low Level (LL) -# -CONFIG_HAL_ASSERTION_EQUALS_SYSTEM=y -# CONFIG_HAL_ASSERTION_DISABLE is not set -# CONFIG_HAL_ASSERTION_SILIENT is not set -CONFIG_HAL_DEFAULT_ASSERTION_LEVEL=1 -# end of Hardware Abstraction Layer (HAL) and Low Level (LL) - # # Log output # CONFIG_LOG_DEFAULT_LEVEL_NONE=y -# CONFIG_LOG_DEFAULT_LEVEL_ERROR is not set -# CONFIG_LOG_DEFAULT_LEVEL_WARN is not set -# CONFIG_LOG_DEFAULT_LEVEL_INFO is not set -# CONFIG_LOG_DEFAULT_LEVEL_DEBUG is not set -# CONFIG_LOG_DEFAULT_LEVEL_VERBOSE is not set # end of Log output -# -# LWIP -# -CONFIG_LWIP_ESP_LWIP_ASSERT=y -# end of LWIP - # end of Component config -# -# Deprecated options for backward compatibility -# -# CONFIG_COMPILER_OPTIMIZATION_LEVEL_DEBUG is not set -CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE=y -# CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED is not set -CONFIG_OPTIMIZATION_ASSERTIONS_SILENT=y -# CONFIG_OPTIMIZATION_ASSERTIONS_DISABLED is not set -CONFIG_OPTIMIZATION_ASSERTION_LEVEL=1 -# CONFIG_ESP32S2_PANIC_PRINT_HALT is not set -# CONFIG_ESP32S2_PANIC_PRINT_REBOOT is not set -CONFIG_ESP32S2_PANIC_SILENT_REBOOT=y -# CONFIG_ESP32S2_PANIC_GDBSTUB is not set -# CONFIG_CONSOLE_UART_DEFAULT is not set -# CONFIG_CONSOLE_UART_CUSTOM is not set -CONFIG_ESP_CONSOLE_UART_NONE=y -CONFIG_CONSOLE_UART_NUM=-1 -# end of Deprecated options for backward compatibility +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/esp-idf-config/sdkconfig-psram-120m.defaults b/ports/espressif/esp-idf-config/sdkconfig-psram-120m.defaults new file mode 100644 index 000000000000..4ff192db3af8 --- /dev/null +++ b/ports/espressif/esp-idf-config/sdkconfig-psram-120m.defaults @@ -0,0 +1,3 @@ +CONFIG_SPIRAM_SPEED_120M=y +# CONFIG_SPIRAM_SPEED_80M is not set +# CONFIG_SPIRAM_SPEED_40M is not set diff --git a/ports/espressif/esp-idf-config/sdkconfig-psram-2MB.defaults b/ports/espressif/esp-idf-config/sdkconfig-psram-2MB.defaults new file mode 100644 index 000000000000..154e9517e504 --- /dev/null +++ b/ports/espressif/esp-idf-config/sdkconfig-psram-2MB.defaults @@ -0,0 +1,4 @@ +# CONFIG_SPIRAM_TYPE_AUTO is not set +CONFIG_SPIRAM_TYPE_ESPPSRAM16=y +# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set +# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set diff --git a/ports/espressif/esp-idf-config/sdkconfig-psram-40m.defaults b/ports/espressif/esp-idf-config/sdkconfig-psram-40m.defaults new file mode 100644 index 000000000000..5dba8c6d55da --- /dev/null +++ b/ports/espressif/esp-idf-config/sdkconfig-psram-40m.defaults @@ -0,0 +1,2 @@ +# CONFIG_SPIRAM_SPEED_80M is not set +CONFIG_SPIRAM_SPEED_40M=y diff --git a/ports/espressif/esp-idf-config/sdkconfig-psram-4MB.defaults b/ports/espressif/esp-idf-config/sdkconfig-psram-4MB.defaults new file mode 100644 index 000000000000..86ef9bcf4bb1 --- /dev/null +++ b/ports/espressif/esp-idf-config/sdkconfig-psram-4MB.defaults @@ -0,0 +1,4 @@ +# CONFIG_SPIRAM_TYPE_AUTO is not set +# CONFIG_SPIRAM_TYPE_ESPPSRAM16 is not set +CONFIG_SPIRAM_TYPE_ESPPSRAM32=y +# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set diff --git a/ports/espressif/esp-idf-config/sdkconfig-psram-80m.defaults b/ports/espressif/esp-idf-config/sdkconfig-psram-80m.defaults new file mode 100644 index 000000000000..7a2e5004096e --- /dev/null +++ b/ports/espressif/esp-idf-config/sdkconfig-psram-80m.defaults @@ -0,0 +1,3 @@ +# CONFIG_SPIRAM_SPEED_120M is not set +CONFIG_SPIRAM_SPEED_80M=y +# CONFIG_SPIRAM_SPEED_40M is not set diff --git a/ports/espressif/esp-idf-config/sdkconfig-psram-8MB.defaults b/ports/espressif/esp-idf-config/sdkconfig-psram-8MB.defaults new file mode 100644 index 000000000000..b8428627621c --- /dev/null +++ b/ports/espressif/esp-idf-config/sdkconfig-psram-8MB.defaults @@ -0,0 +1,4 @@ +# CONFIG_SPIRAM_TYPE_AUTO is not set +# CONFIG_SPIRAM_TYPE_ESPPSRAM16 is not set +# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set +CONFIG_SPIRAM_TYPE_ESPPSRAM64=y diff --git a/ports/espressif/esp-idf-config/sdkconfig-psram-opi.defaults b/ports/espressif/esp-idf-config/sdkconfig-psram-opi.defaults new file mode 100644 index 000000000000..05133e84c424 --- /dev/null +++ b/ports/espressif/esp-idf-config/sdkconfig-psram-opi.defaults @@ -0,0 +1,2 @@ +# CONFIG_SPIRAM_MODE_QUAD is not set +CONFIG_SPIRAM_MODE_OCT=y diff --git a/ports/espressif/esp-idf-config/sdkconfig-psram-qio.defaults b/ports/espressif/esp-idf-config/sdkconfig-psram-qio.defaults new file mode 100644 index 000000000000..ad262b49182b --- /dev/null +++ b/ports/espressif/esp-idf-config/sdkconfig-psram-qio.defaults @@ -0,0 +1,2 @@ +CONFIG_SPIRAM_MODE_QUAD=y +# CONFIG_SPIRAM_MODE_OCT is not set diff --git a/ports/espressif/esp-idf-config/sdkconfig-psram.defaults b/ports/espressif/esp-idf-config/sdkconfig-psram.defaults new file mode 100644 index 000000000000..0ac0e6c7bcba --- /dev/null +++ b/ports/espressif/esp-idf-config/sdkconfig-psram.defaults @@ -0,0 +1,27 @@ +# +# Espressif IoT Development Framework Configuration +# +# +# Component config +# +# +# ESP PSRAM +# +CONFIG_SPIRAM=y +# +# SPI RAM config +# +CONFIG_SPIRAM_USE_MEMMAP=y +# end of SPI RAM config + +# end of ESP PSRAM + +# +# Wi-Fi +# +CONFIG_ESP_WIFI_CACHE_TX_BUFFER_NUM=16 +# end of Wi-Fi + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/esp-idf-config/sdkconfig.defaults b/ports/espressif/esp-idf-config/sdkconfig.defaults index b183cd630d93..74c9019d9986 100644 --- a/ports/espressif/esp-idf-config/sdkconfig.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig.defaults @@ -1,877 +1,130 @@ -CONFIG_IDF_CMAKE=y # -# SDK tool configuration +# Espressif IoT Development Framework Configuration # -# CONFIG_SDK_TOOLCHAIN_SUPPORTS_TIME_WIDE_64_BITS is not set -# end of SDK tool configuration - -# -# Build type -# -CONFIG_APP_BUILD_TYPE_APP_2NDBOOT=y -# CONFIG_APP_BUILD_TYPE_ELF_RAM is not set -CONFIG_APP_BUILD_GENERATE_BINARIES=y -CONFIG_APP_BUILD_BOOTLOADER=y -CONFIG_APP_BUILD_USE_FLASH_SECTIONS=y -# end of Build type - -# -# Application manager -# -CONFIG_APP_COMPILE_TIME_DATE=y -# CONFIG_APP_EXCLUDE_PROJECT_VER_VAR is not set -# CONFIG_APP_EXCLUDE_PROJECT_NAME_VAR is not set -# CONFIG_APP_PROJECT_VER_FROM_CONFIG is not set -CONFIG_APP_RETRIEVE_LEN_ELF_SHA=16 -# end of Application manager - -# -# Bootloader config -# -# CONFIG_BOOTLOADER_LOG_LEVEL_NONE is not set -# CONFIG_BOOTLOADER_LOG_LEVEL_ERROR is not set -# CONFIG_BOOTLOADER_LOG_LEVEL_WARN is not set -CONFIG_BOOTLOADER_LOG_LEVEL_INFO=y -# CONFIG_BOOTLOADER_LOG_LEVEL_DEBUG is not set -# CONFIG_BOOTLOADER_LOG_LEVEL_VERBOSE is not set -CONFIG_BOOTLOADER_LOG_LEVEL=3 -# CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_8V is not set -CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_9V=y -# CONFIG_BOOTLOADER_FACTORY_RESET is not set -# CONFIG_BOOTLOADER_APP_TEST is not set -CONFIG_BOOTLOADER_WDT_ENABLE=y -# CONFIG_BOOTLOADER_WDT_DISABLE_IN_USER_CODE is not set -CONFIG_BOOTLOADER_WDT_TIME_MS=9000 -# CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE is not set -# CONFIG_BOOTLOADER_SKIP_VALIDATE_IN_DEEP_SLEEP is not set -# CONFIG_BOOTLOADER_SKIP_VALIDATE_ON_POWER_ON is not set -# CONFIG_BOOTLOADER_SKIP_VALIDATE_ALWAYS is not set -CONFIG_BOOTLOADER_RESERVE_RTC_SIZE=0 -# CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC is not set -CONFIG_BOOTLOADER_FLASH_XMC_SUPPORT=y -# end of Bootloader config - -# -# Security features -# -CONFIG_SECURE_BOOT_SUPPORTS_RSA=y -CONFIG_SECURE_TARGET_HAS_SECURE_ROM_DL_MODE=y -# CONFIG_SECURE_SIGNED_APPS_NO_SECURE_BOOT is not set -# CONFIG_SECURE_BOOT is not set -# CONFIG_SECURE_FLASH_ENC_ENABLED is not set -# end of Security features - -# -# Boot ROM Behavior -# -CONFIG_BOOT_ROM_LOG_ALWAYS_ON=y -# CONFIG_BOOT_ROM_LOG_ALWAYS_OFF is not set -# CONFIG_BOOT_ROM_LOG_ON_GPIO_HIGH is not set -# CONFIG_BOOT_ROM_LOG_ON_GPIO_LOW is not set -# end of Boot ROM Behavior - -# -# Serial flasher config -# -CONFIG_ESPTOOLPY_BAUD_OTHER_VAL=115200 -# CONFIG_ESPTOOLPY_NO_STUB is not set -# CONFIG_ESPTOOLPY_OCT_FLASH is not set -# CONFIG_ESPTOOLPY_FLASHMODE_QIO is not set -# CONFIG_ESPTOOLPY_FLASHMODE_QOUT is not set -CONFIG_ESPTOOLPY_FLASHMODE_DIO=y -# CONFIG_ESPTOOLPY_FLASHMODE_DOUT is not set -CONFIG_ESPTOOLPY_FLASH_SAMPLE_MODE_STR=y -CONFIG_ESPTOOLPY_FLASHMODE="dio" -# CONFIG_ESPTOOLPY_FLASHFREQ_120M is not set -# CONFIG_ESPTOOLPY_FLASHFREQ_80M is not set -CONFIG_ESPTOOLPY_FLASHFREQ_40M=y -# CONFIG_ESPTOOLPY_FLASHFREQ_20M is not set -CONFIG_ESPTOOLPY_FLASHFREQ="40m" -CONFIG_ESPTOOLPY_BEFORE_RESET=y -# CONFIG_ESPTOOLPY_BEFORE_NORESET is not set -CONFIG_ESPTOOLPY_BEFORE="default_reset" -CONFIG_ESPTOOLPY_AFTER_RESET=y -# CONFIG_ESPTOOLPY_AFTER_NORESET is not set -CONFIG_ESPTOOLPY_AFTER="hard_reset" -# CONFIG_ESPTOOLPY_MONITOR_BAUD_CONSOLE is not set -# CONFIG_ESPTOOLPY_MONITOR_BAUD_9600B is not set -# CONFIG_ESPTOOLPY_MONITOR_BAUD_57600B is not set -CONFIG_ESPTOOLPY_MONITOR_BAUD_115200B=y -# CONFIG_ESPTOOLPY_MONITOR_BAUD_230400B is not set -# CONFIG_ESPTOOLPY_MONITOR_BAUD_921600B is not set -# CONFIG_ESPTOOLPY_MONITOR_BAUD_2MB is not set -# CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER is not set -CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER_VAL=115200 -CONFIG_ESPTOOLPY_MONITOR_BAUD=115200 -# end of Serial flasher config - # # Partition Table # -# CONFIG_PARTITION_TABLE_SINGLE_APP is not set -# CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE is not set -# CONFIG_PARTITION_TABLE_TWO_OTA is not set CONFIG_PARTITION_TABLE_CUSTOM=y -CONFIG_PARTITION_TABLE_OFFSET=0x8000 -CONFIG_PARTITION_TABLE_MD5=y # end of Partition Table -# -# Compiler options -# -CONFIG_COMPILER_HIDE_PATHS_MACROS=y -# CONFIG_COMPILER_CXX_EXCEPTIONS is not set -# CONFIG_COMPILER_CXX_RTTI is not set -CONFIG_COMPILER_STACK_CHECK_MODE_NONE=y -# CONFIG_COMPILER_STACK_CHECK_MODE_NORM is not set -# CONFIG_COMPILER_STACK_CHECK_MODE_STRONG is not set -# CONFIG_COMPILER_STACK_CHECK_MODE_ALL is not set -# CONFIG_COMPILER_WARN_WRITE_STRINGS is not set -# CONFIG_COMPILER_DISABLE_GCC8_WARNINGS is not set -# CONFIG_COMPILER_DUMP_RTL_FILES is not set -# end of Compiler options - # # Component config # # -# Application Level Tracing -# -# CONFIG_APPTRACE_DEST_JTAG is not set -CONFIG_APPTRACE_DEST_NONE=y -CONFIG_APPTRACE_LOCK_ENABLE=y -# end of Application Level Tracing - -# CONFIG_BLE_MESH is not set -# -# Driver configurations -# -# -# ADC configuration -# -# CONFIG_ADC_FORCE_XPD_FSM is not set -CONFIG_ADC_DISABLE_DAC=y -# end of ADC configuration - -# -# MCPWM configuration -# -# CONFIG_MCPWM_ISR_IN_IRAM is not set -# end of MCPWM configuration - -# -# SPI configuration -# -# CONFIG_SPI_MASTER_IN_IRAM is not set -CONFIG_SPI_MASTER_ISR_IN_IRAM=y -# CONFIG_SPI_SLAVE_IN_IRAM is not set -CONFIG_SPI_SLAVE_ISR_IN_IRAM=y -# end of SPI configuration - -# -# TWAI configuration -# -# CONFIG_TWAI_ISR_IN_IRAM is not set -# end of TWAI configuration - -# -# UART configuration -# -# CONFIG_UART_ISR_IN_IRAM is not set -# end of UART configuration - -# -# GDMA Configuration -# -# CONFIG_GDMA_CTRL_FUNC_IN_IRAM is not set -# CONFIG_GDMA_ISR_IRAM_SAFE is not set -# end of GDMA Configuration - -# end of Driver configurations - -# -# eFuse Bit Manager -# -# CONFIG_EFUSE_CUSTOM_TABLE is not set -# CONFIG_EFUSE_VIRTUAL is not set -CONFIG_EFUSE_MAX_BLK_LEN=256 -# end of eFuse Bit Manager - -# -# ESP-TLS -# -CONFIG_ESP_TLS_USING_MBEDTLS=y -CONFIG_ESP_TLS_USE_DS_PERIPHERAL=y -CONFIG_ESP_TLS_SERVER=y -# CONFIG_ESP_TLS_CLIENT_SESSION_TICKETS is not set -# CONFIG_ESP_TLS_SERVER_SESSION_TICKETS is not set -# CONFIG_ESP_TLS_PSK_VERIFICATION is not set -# CONFIG_ESP_TLS_INSECURE is not set -# end of ESP-TLS - -# -# Ethernet -# -# CONFIG_ETH_USE_SPI_ETHERNET is not set -# CONFIG_ETH_USE_OPENETH is not set -# end of Ethernet - -# -# Event Loop Library -# -# CONFIG_ESP_EVENT_LOOP_PROFILING is not set -CONFIG_ESP_EVENT_POST_FROM_ISR=y -CONFIG_ESP_EVENT_POST_FROM_IRAM_ISR=y -# end of Event Loop Library - -# -# Hardware Settings -# -# -# MAC Config -# -CONFIG_ESP_MAC_ADDR_UNIVERSE_WIFI_STA=y -CONFIG_ESP_MAC_ADDR_UNIVERSE_WIFI_AP=y -CONFIG_ESP_MAC_ADDR_UNIVERSE_BT=y -CONFIG_ESP_MAC_ADDR_UNIVERSE_ETH=y -# end of MAC Config - -# -# Sleep Config -# -CONFIG_ESP_SLEEP_RTC_BUS_ISO_WORKAROUND=y -# CONFIG_ESP_SLEEP_PSRAM_LEAKAGE_WORKAROUND is not set -# CONFIG_ESP_SLEEP_FLASH_LEAKAGE_WORKAROUND is not set -# end of Sleep Config - -# -# RTC Clock Config +# Driver Configurations # -CONFIG_RTC_CLOCK_BBPLL_POWER_ON_WITH_USB=y -# end of RTC Clock Config - -# end of Hardware Settings - # -# IPC (Inter-Processor Call) +# GPTimer Configuration # -CONFIG_ESP_IPC_TASK_STACK_SIZE=1536 -CONFIG_ESP_IPC_USES_CALLERS_PRIORITY=y -CONFIG_ESP_IPC_ISR_ENABLE=y -# end of IPC (Inter-Processor Call) +CONFIG_GPTIMER_SUPPRESS_DEPRECATE_WARN=y +# end of GPTimer Configuration -# -# ESP NETIF Adapter -# -CONFIG_ESP_NETIF_IP_LOST_TIMER_INTERVAL=120 -CONFIG_ESP_NETIF_TCPIP_LWIP=y -# CONFIG_ESP_NETIF_LOOPBACK is not set -# CONFIG_ESP_NETIF_TCPIP_ADAPTER_COMPATIBLE_LAYER is not set -# end of ESP NETIF Adapter +# end of Driver Configurations # # PHY # -CONFIG_ESP_PHY_CALIBRATION_AND_DATA_STORAGE=y -# CONFIG_ESP_PHY_INIT_DATA_IN_PARTITION is not set -CONFIG_ESP_PHY_MAX_WIFI_TX_POWER=20 -CONFIG_ESP_PHY_MAX_TX_POWER=20 +# CONFIG_ESP_PHY_CALIBRATION_AND_DATA_STORAGE is not set # end of PHY -# -# Power Management -# -# CONFIG_PM_ENABLE is not set -CONFIG_PM_POWER_DOWN_CPU_IN_LIGHT_SLEEP=y -CONFIG_PM_POWER_DOWN_TAGMEM_IN_LIGHT_SLEEP=y -# end of Power Management - # # ESP System Settings # -# CONFIG_ESP_SYSTEM_GDBSTUB_RUNTIME is not set -CONFIG_ESP_SYSTEM_RTC_FAST_MEM_AS_HEAP_DEPCHECK=y -CONFIG_ESP_SYSTEM_ALLOW_RTC_FAST_MEM_AS_HEAP=y -CONFIG_ESP_SYSTEM_EVENT_QUEUE_SIZE=32 -CONFIG_ESP_SYSTEM_EVENT_TASK_STACK_SIZE=2304 CONFIG_ESP_MAIN_TASK_STACK_SIZE=16384 -CONFIG_ESP_MINIMAL_SHARED_STACK_SIZE=2048 -CONFIG_ESP_INT_WDT=y -CONFIG_ESP_INT_WDT_TIMEOUT_MS=300 -CONFIG_ESP_INT_WDT_CHECK_CPU1=y -# CONFIG_ESP_TASK_WDT is not set -# CONFIG_ESP_PANIC_HANDLER_IRAM is not set -# CONFIG_ESP_DEBUG_STUBS_ENABLE is not set -CONFIG_ESP_SYSTEM_CHECK_INT_LEVEL_4=y +# CONFIG_ESP_TASK_WDT_INIT is not set +# CONFIG_ESP_DEBUG_OCDAWARE is not set # end of ESP System Settings -# -# High resolution timer (esp_timer) -# -# CONFIG_ESP_TIMER_PROFILING is not set -CONFIG_ESP_TIME_FUNCS_USE_RTC_TIMER=y -CONFIG_ESP_TIME_FUNCS_USE_ESP_TIMER=y -CONFIG_ESP_TIMER_TASK_STACK_SIZE=3584 -CONFIG_ESP_TIMER_INTERRUPT_LEVEL=1 -# CONFIG_ESP_TIMER_SUPPORTS_ISR_DISPATCH_METHOD is not set -CONFIG_ESP_TIMER_IMPL_SYSTIMER=y -# end of High resolution timer (esp_timer) - # # Wi-Fi # -# CONFIG_ESP_WIFI_SLP_IRAM_OPT is not set -# CONFIG_ESP_WIFI_FTM_ENABLE is not set -# CONFIG_ESP_WIFI_STA_DISCONNECTED_PM_ENABLE is not set -# CONFIG_ESP_WIFI_GCMP_SUPPORT is not set -# CONFIG_ESP_WIFI_GMAC_SUPPORT is not set -CONFIG_ESP_WIFI_SOFTAP_SUPPORT=y +CONFIG_ESP_WIFI_DYNAMIC_RX_BUFFER_NUM=8 +CONFIG_ESP_WIFI_STATIC_TX_BUFFER=y +# CONFIG_ESP_WIFI_NVS_ENABLED is not set # end of Wi-Fi -# -# Core dump -# -# CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH is not set -# CONFIG_ESP_COREDUMP_ENABLE_TO_UART is not set -CONFIG_ESP_COREDUMP_ENABLE_TO_NONE=y -# end of Core dump - -# -# FreeRTOS -# -CONFIG_FREERTOS_NO_AFFINITY=0x7FFFFFFF -CONFIG_FREERTOS_TICK_SUPPORT_SYSTIMER=y -CONFIG_FREERTOS_CORETIMER_SYSTIMER_LVL1=y -# CONFIG_FREERTOS_CORETIMER_SYSTIMER_LVL3 is not set -CONFIG_FREERTOS_SYSTICK_USES_SYSTIMER=y -CONFIG_FREERTOS_HZ=100 -# CONFIG_FREERTOS_CHECK_STACKOVERFLOW_NONE is not set -# CONFIG_FREERTOS_CHECK_STACKOVERFLOW_PTRVAL is not set -CONFIG_FREERTOS_CHECK_STACKOVERFLOW_CANARY=y -# CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK is not set -CONFIG_FREERTOS_INTERRUPT_BACKTRACE=y -CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 -CONFIG_FREERTOS_IDLE_TASK_STACKSIZE=1536 -CONFIG_FREERTOS_ISR_STACKSIZE=1536 -# CONFIG_FREERTOS_LEGACY_HOOKS is not set -CONFIG_FREERTOS_MAX_TASK_NAME_LEN=16 -CONFIG_FREERTOS_SUPPORT_STATIC_ALLOCATION=y -# CONFIG_FREERTOS_ENABLE_STATIC_TASK_CLEAN_UP is not set -CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 -CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 -CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 -CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 -# CONFIG_FREERTOS_USE_TRACE_FACILITY is not set -# CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS is not set -CONFIG_FREERTOS_CHECK_MUTEX_GIVEN_BY_OWNER=y -# CONFIG_FREERTOS_CHECK_PORT_CRITICAL_COMPLIANCE is not set -# CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH is not set -CONFIG_FREERTOS_ENABLE_TASK_SNAPSHOT=y -# CONFIG_FREERTOS_PLACE_SNAPSHOT_FUNS_INTO_FLASH is not set -# end of FreeRTOS - -# -# Heap memory debugging -# -CONFIG_HEAP_POISONING_DISABLED=y -# CONFIG_HEAP_POISONING_LIGHT is not set -# CONFIG_HEAP_POISONING_COMPREHENSIVE is not set -CONFIG_HEAP_TRACING_OFF=y -# CONFIG_HEAP_TRACING_STANDALONE is not set -# CONFIG_HEAP_TRACING_TOHOST is not set -# CONFIG_HEAP_ABORT_WHEN_ALLOCATION_FAILS is not set -# end of Heap memory debugging - -# -# Log output -# -# CONFIG_LOG_DEFAULT_LEVEL_NONE is not set -# CONFIG_LOG_DEFAULT_LEVEL_ERROR is not set -# CONFIG_LOG_DEFAULT_LEVEL_WARN is not set -CONFIG_LOG_DEFAULT_LEVEL_INFO=y -# CONFIG_LOG_DEFAULT_LEVEL_DEBUG is not set -# CONFIG_LOG_DEFAULT_LEVEL_VERBOSE is not set -CONFIG_LOG_DEFAULT_LEVEL=3 -CONFIG_LOG_MAXIMUM_EQUALS_DEFAULT=y -# CONFIG_LOG_MAXIMUM_LEVEL_DEBUG is not set -# CONFIG_LOG_MAXIMUM_LEVEL_VERBOSE is not set -CONFIG_LOG_MAXIMUM_LEVEL=3 -CONFIG_LOG_COLORS=y -CONFIG_LOG_TIMESTAMP_SOURCE_RTOS=y -# CONFIG_LOG_TIMESTAMP_SOURCE_SYSTEM is not set -# end of Log output - # # LWIP # -# CONFIG_LWIP_NETIF_API is not set -# CONFIG_LWIP_TCPIP_CORE_LOCKING is not set -CONFIG_LWIP_DNS_SUPPORT_MDNS_QUERIES=y -# CONFIG_LWIP_L2_TO_L3_COPY is not set -# CONFIG_LWIP_IRAM_OPTIMIZATION is not set -CONFIG_LWIP_TIMERS_ONDEMAND=y CONFIG_LWIP_MAX_SOCKETS=8 -# CONFIG_LWIP_USE_ONLY_LWIP_SELECT is not set -# CONFIG_LWIP_SO_LINGER is not set -CONFIG_LWIP_SO_REUSE=y -CONFIG_LWIP_SO_REUSE_RXTOALL=y CONFIG_LWIP_SO_RCVBUF=y -# CONFIG_LWIP_NETBUF_RECVINFO is not set -CONFIG_LWIP_IP4_FRAG=y -CONFIG_LWIP_IP6_FRAG=y -# CONFIG_LWIP_IP4_REASSEMBLY is not set -# CONFIG_LWIP_IP6_REASSEMBLY is not set -# CONFIG_LWIP_IP_FORWARD is not set -# CONFIG_LWIP_STATS is not set -# CONFIG_LWIP_ETHARP_TRUST_IP_MAC is not set -CONFIG_LWIP_ESP_GRATUITOUS_ARP=y -CONFIG_LWIP_GARP_TMR_INTERVAL=60 -CONFIG_LWIP_TCPIP_RECVMBOX_SIZE=32 -CONFIG_LWIP_DHCP_DOES_ARP_CHECK=y -# CONFIG_LWIP_DHCP_DISABLE_CLIENT_ID is not set -CONFIG_LWIP_DHCP_DISABLE_VENDOR_CLASS_ID=y -# CONFIG_LWIP_DHCP_RESTORE_LAST_IP is not set -CONFIG_LWIP_DHCP_OPTIONS_LEN=68 -# -# DHCP server -# -CONFIG_LWIP_DHCPS=y -CONFIG_LWIP_DHCPS_LEASE_UNIT=60 -CONFIG_LWIP_DHCPS_MAX_STATION_NUM=8 -# end of DHCP server - -# CONFIG_LWIP_AUTOIP is not set -CONFIG_LWIP_IPV6=y -# CONFIG_LWIP_IPV6_AUTOCONFIG is not set -CONFIG_LWIP_IPV6_NUM_ADDRESSES=3 -# CONFIG_LWIP_IPV6_FORWARD is not set -# CONFIG_LWIP_NETIF_STATUS_CALLBACK is not set -CONFIG_LWIP_NETIF_LOOPBACK=y -CONFIG_LWIP_LOOPBACK_MAX_PBUFS=8 # # TCP # CONFIG_LWIP_MAX_ACTIVE_TCP=4 CONFIG_LWIP_MAX_LISTENING_TCP=4 -CONFIG_LWIP_TCP_HIGH_SPEED_RETRANSMISSION=y -CONFIG_LWIP_TCP_MAXRTX=12 CONFIG_LWIP_TCP_SYNMAXRTX=6 -CONFIG_LWIP_TCP_MSS=1440 -CONFIG_LWIP_TCP_TMR_INTERVAL=250 -CONFIG_LWIP_TCP_MSL=60000 CONFIG_LWIP_TCP_SND_BUF_DEFAULT=2880 CONFIG_LWIP_TCP_WND_DEFAULT=2880 -CONFIG_LWIP_TCP_RECVMBOX_SIZE=6 -CONFIG_LWIP_TCP_QUEUE_OOSEQ=y -# CONFIG_LWIP_TCP_SACK_OUT is not set -# CONFIG_LWIP_TCP_KEEP_CONNECTION_WHEN_IP_CHANGES is not set -CONFIG_LWIP_TCP_OVERSIZE_MSS=y -# CONFIG_LWIP_TCP_OVERSIZE_QUARTER_MSS is not set -# CONFIG_LWIP_TCP_OVERSIZE_DISABLE is not set CONFIG_LWIP_TCP_RTO_TIME=3000 # end of TCP -# -# UDP -# -CONFIG_LWIP_MAX_UDP_PCBS=16 -CONFIG_LWIP_UDP_RECVMBOX_SIZE=6 -# end of UDP - -# -# Checksums -# -# CONFIG_LWIP_CHECKSUM_CHECK_IP is not set -# CONFIG_LWIP_CHECKSUM_CHECK_UDP is not set -CONFIG_LWIP_CHECKSUM_CHECK_ICMP=y -# end of Checksums - -CONFIG_LWIP_TCPIP_TASK_STACK_SIZE=3072 -CONFIG_LWIP_TCPIP_TASK_AFFINITY_NO_AFFINITY=y -# CONFIG_LWIP_TCPIP_TASK_AFFINITY_CPU0 is not set -# CONFIG_LWIP_TCPIP_TASK_AFFINITY_CPU1 is not set -CONFIG_LWIP_TCPIP_TASK_AFFINITY=0x7FFFFFFF -# CONFIG_LWIP_PPP_SUPPORT is not set -CONFIG_LWIP_IPV6_MEMP_NUM_ND6_QUEUE=3 -CONFIG_LWIP_IPV6_ND6_NUM_NEIGHBORS=5 -# CONFIG_LWIP_SLIP_SUPPORT is not set -# -# ICMP -# -CONFIG_LWIP_ICMP=y -# CONFIG_LWIP_MULTICAST_PING is not set -# CONFIG_LWIP_BROADCAST_PING is not set -# end of ICMP - -# -# LWIP RAW API -# -CONFIG_LWIP_MAX_RAW_PCBS=16 -# end of LWIP RAW API - -# -# SNTP -# -CONFIG_LWIP_SNTP_MAX_SERVERS=1 -# CONFIG_LWIP_DHCP_GET_NTP_SRV is not set -CONFIG_LWIP_SNTP_UPDATE_DELAY=3600000 -# end of SNTP - -# -# Hooks -# -# CONFIG_LWIP_HOOK_TCP_ISN_NONE is not set -CONFIG_LWIP_HOOK_TCP_ISN_DEFAULT=y -# CONFIG_LWIP_HOOK_TCP_ISN_CUSTOM is not set -CONFIG_LWIP_HOOK_IP6_ROUTE_NONE=y -# CONFIG_LWIP_HOOK_IP6_ROUTE_DEFAULT is not set -# CONFIG_LWIP_HOOK_IP6_ROUTE_CUSTOM is not set -CONFIG_LWIP_HOOK_ND6_GET_GW_NONE=y -# CONFIG_LWIP_HOOK_ND6_GET_GW_DEFAULT is not set -# CONFIG_LWIP_HOOK_ND6_GET_GW_CUSTOM is not set -CONFIG_LWIP_HOOK_NETCONN_EXT_RESOLVE_NONE=y -# CONFIG_LWIP_HOOK_NETCONN_EXT_RESOLVE_DEFAULT is not set -# CONFIG_LWIP_HOOK_NETCONN_EXT_RESOLVE_CUSTOM is not set -# end of Hooks - -# CONFIG_LWIP_DEBUG is not set # end of LWIP # # mbedTLS # -CONFIG_MBEDTLS_INTERNAL_MEM_ALLOC=y -# CONFIG_MBEDTLS_DEFAULT_MEM_ALLOC is not set -# CONFIG_MBEDTLS_CUSTOM_MEM_ALLOC is not set -CONFIG_MBEDTLS_ASYMMETRIC_CONTENT_LEN=y -CONFIG_MBEDTLS_SSL_IN_CONTENT_LEN=16384 CONFIG_MBEDTLS_SSL_OUT_CONTENT_LEN=2048 -# CONFIG_MBEDTLS_DEBUG is not set -# -# mbedTLS v2.28.x related -# -# CONFIG_MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH is not set -CONFIG_MBEDTLS_ECDH_LEGACY_CONTEXT=y -# CONFIG_MBEDTLS_X509_TRUSTED_CERT_CALLBACK is not set -# CONFIG_MBEDTLS_SSL_CONTEXT_SERIALIZATION is not set -CONFIG_MBEDTLS_SSL_KEEP_PEER_CERTIFICATE=y # -# DTLS-based configurations +# mbedTLS v3.x related # -# CONFIG_MBEDTLS_SSL_DTLS_CONNECTION_ID is not set -# CONFIG_MBEDTLS_SSL_DTLS_SRTP is not set -# end of DTLS-based configurations - -# end of mbedTLS v2.28.x related +# CONFIG_MBEDTLS_SSL_KEEP_PEER_CERTIFICATE is not set +# end of mbedTLS v3.x related # # Certificate Bundle # -CONFIG_MBEDTLS_CERTIFICATE_BUNDLE=y -# CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_FULL is not set -# CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_CMN is not set CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_NONE=y CONFIG_MBEDTLS_CUSTOM_CERTIFICATE_BUNDLE=y -CONFIG_MBEDTLS_CUSTOM_CERTIFICATE_BUNDLE_PATH="../../lib/certificates/nina-fw/data/roots.pem" +CONFIG_MBEDTLS_CUSTOM_CERTIFICATE_BUNDLE_PATH="../../lib/certificates/data/roots.pem" # end of Certificate Bundle -CONFIG_MBEDTLS_ECP_RESTARTABLE=y -CONFIG_MBEDTLS_CMAC_C=y -CONFIG_MBEDTLS_HARDWARE_AES=y -CONFIG_MBEDTLS_AES_USE_INTERRUPT=y -CONFIG_MBEDTLS_HARDWARE_MPI=y -CONFIG_MBEDTLS_HARDWARE_SHA=y -CONFIG_MBEDTLS_ROM_MD5=y -# CONFIG_MBEDTLS_ATCA_HW_ECDSA_SIGN is not set -# CONFIG_MBEDTLS_ATCA_HW_ECDSA_VERIFY is not set -CONFIG_MBEDTLS_HAVE_TIME=y -# CONFIG_MBEDTLS_HAVE_TIME_DATE is not set -CONFIG_MBEDTLS_ECDSA_DETERMINISTIC=y -CONFIG_MBEDTLS_SHA512_C=y -CONFIG_MBEDTLS_TLS_SERVER_AND_CLIENT=y -# CONFIG_MBEDTLS_TLS_SERVER_ONLY is not set -# CONFIG_MBEDTLS_TLS_CLIENT_ONLY is not set -# CONFIG_MBEDTLS_TLS_DISABLED is not set -CONFIG_MBEDTLS_TLS_SERVER=y -CONFIG_MBEDTLS_TLS_CLIENT=y -CONFIG_MBEDTLS_TLS_ENABLED=y # # TLS Key Exchange Methods # -CONFIG_MBEDTLS_PSK_MODES=y -CONFIG_MBEDTLS_KEY_EXCHANGE_PSK=y -CONFIG_MBEDTLS_KEY_EXCHANGE_DHE_PSK=y -CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_PSK=y -CONFIG_MBEDTLS_KEY_EXCHANGE_RSA_PSK=y -CONFIG_MBEDTLS_KEY_EXCHANGE_RSA=y -CONFIG_MBEDTLS_KEY_EXCHANGE_DHE_RSA=y -CONFIG_MBEDTLS_KEY_EXCHANGE_ELLIPTIC_CURVE=y -CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_RSA=y -CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA=y -CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA=y -CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_RSA=y +# CONFIG_MBEDTLS_KEY_EXCHANGE_RSA is not set # end of TLS Key Exchange Methods -CONFIG_MBEDTLS_SSL_RENEGOTIATION=y -# CONFIG_MBEDTLS_SSL_PROTO_SSL3 is not set -# CONFIG_MBEDTLS_SSL_PROTO_TLS1 is not set -# CONFIG_MBEDTLS_SSL_PROTO_TLS1_1 is not set -CONFIG_MBEDTLS_SSL_PROTO_TLS1_2=y -# CONFIG_MBEDTLS_SSL_PROTO_GMTSSL1_1 is not set CONFIG_MBEDTLS_SSL_PROTO_DTLS=y -CONFIG_MBEDTLS_SSL_ALPN=y -CONFIG_MBEDTLS_CLIENT_SSL_SESSION_TICKETS=y -CONFIG_MBEDTLS_X509_CHECK_KEY_USAGE=y -CONFIG_MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE=y -CONFIG_MBEDTLS_SERVER_SSL_SESSION_TICKETS=y -# -# Symmetric Ciphers -# -CONFIG_MBEDTLS_AES_C=y -# CONFIG_MBEDTLS_CAMELLIA_C is not set -# CONFIG_MBEDTLS_DES_C is not set -CONFIG_MBEDTLS_RC4_DISABLED=y -# CONFIG_MBEDTLS_RC4_ENABLED_NO_DEFAULT is not set -# CONFIG_MBEDTLS_RC4_ENABLED is not set -# CONFIG_MBEDTLS_BLOWFISH_C is not set -# CONFIG_MBEDTLS_XTEA_C is not set -CONFIG_MBEDTLS_CCM_C=y -CONFIG_MBEDTLS_GCM_C=y -# CONFIG_MBEDTLS_NIST_KW_C is not set -# end of Symmetric Ciphers - -# CONFIG_MBEDTLS_RIPEMD160_C is not set # # Certificates # -CONFIG_MBEDTLS_PEM_PARSE_C=y -CONFIG_MBEDTLS_PEM_WRITE_C=y -CONFIG_MBEDTLS_X509_CRL_PARSE_C=y -CONFIG_MBEDTLS_X509_CSR_PARSE_C=y +# CONFIG_MBEDTLS_PEM_WRITE_C is not set # end of Certificates -CONFIG_MBEDTLS_ECP_C=y -CONFIG_MBEDTLS_ECDH_C=y -CONFIG_MBEDTLS_ECDSA_C=y -# CONFIG_MBEDTLS_ECJPAKE_C is not set -CONFIG_MBEDTLS_ECP_DP_SECP192R1_ENABLED=y -CONFIG_MBEDTLS_ECP_DP_SECP224R1_ENABLED=y -CONFIG_MBEDTLS_ECP_DP_SECP256R1_ENABLED=y -CONFIG_MBEDTLS_ECP_DP_SECP384R1_ENABLED=y -CONFIG_MBEDTLS_ECP_DP_SECP521R1_ENABLED=y -CONFIG_MBEDTLS_ECP_DP_SECP192K1_ENABLED=y -CONFIG_MBEDTLS_ECP_DP_SECP224K1_ENABLED=y -CONFIG_MBEDTLS_ECP_DP_SECP256K1_ENABLED=y -CONFIG_MBEDTLS_ECP_DP_BP256R1_ENABLED=y -CONFIG_MBEDTLS_ECP_DP_BP384R1_ENABLED=y -CONFIG_MBEDTLS_ECP_DP_BP512R1_ENABLED=y -CONFIG_MBEDTLS_ECP_DP_CURVE25519_ENABLED=y -CONFIG_MBEDTLS_ECP_NIST_OPTIM=y -# CONFIG_MBEDTLS_POLY1305_C is not set -# CONFIG_MBEDTLS_CHACHA20_C is not set -# CONFIG_MBEDTLS_HKDF_C is not set -# CONFIG_MBEDTLS_THREADING_C is not set -# CONFIG_MBEDTLS_LARGE_KEY_SOFTWARE_MPI is not set -# CONFIG_MBEDTLS_SECURITY_RISKS is not set +# CONFIG_MBEDTLS_ECP_DP_SECP192R1_ENABLED is not set +# CONFIG_MBEDTLS_ECP_DP_SECP224R1_ENABLED is not set +# CONFIG_MBEDTLS_ECP_DP_SECP521R1_ENABLED is not set +# CONFIG_MBEDTLS_ECP_DP_SECP192K1_ENABLED is not set +# CONFIG_MBEDTLS_ECP_DP_SECP224K1_ENABLED is not set +# CONFIG_MBEDTLS_ECP_DP_BP256R1_ENABLED is not set +# CONFIG_MBEDTLS_ECP_DP_BP384R1_ENABLED is not set +# CONFIG_MBEDTLS_ECP_DP_BP512R1_ENABLED is not set +# CONFIG_MBEDTLS_ECP_NIST_OPTIM is not set # end of mbedTLS -# -# mDNS -# -CONFIG_MDNS_MAX_SERVICES=10 -CONFIG_MDNS_TASK_PRIORITY=1 -CONFIG_MDNS_TASK_STACK_SIZE=4096 -# CONFIG_MDNS_TASK_AFFINITY_NO_AFFINITY is not set -CONFIG_MDNS_TASK_AFFINITY_CPU0=y -# CONFIG_MDNS_TASK_AFFINITY_CPU1 is not set -CONFIG_MDNS_TASK_AFFINITY=0x0 -CONFIG_MDNS_SERVICE_ADD_TIMEOUT_MS=2000 -# CONFIG_MDNS_STRICT_MODE is not set -CONFIG_MDNS_TIMER_PERIOD_MS=100 -# CONFIG_MDNS_NETWORKING_SOCKET is not set -CONFIG_MDNS_MULTIPLE_INSTANCE=y -# end of mDNS - -# -# Newlib -# -CONFIG_NEWLIB_STDOUT_LINE_ENDING_CRLF=y -# CONFIG_NEWLIB_STDOUT_LINE_ENDING_LF is not set -# CONFIG_NEWLIB_STDOUT_LINE_ENDING_CR is not set -# CONFIG_NEWLIB_STDIN_LINE_ENDING_CRLF is not set -# CONFIG_NEWLIB_STDIN_LINE_ENDING_LF is not set -CONFIG_NEWLIB_STDIN_LINE_ENDING_CR=y -# CONFIG_NEWLIB_NANO_FORMAT is not set -# end of Newlib - -# -# OpenThread -# -# CONFIG_OPENTHREAD_ENABLED is not set -# end of OpenThread - -# -# PThreads -# -CONFIG_PTHREAD_TASK_PRIO_DEFAULT=5 -CONFIG_PTHREAD_TASK_STACK_SIZE_DEFAULT=3072 -CONFIG_PTHREAD_STACK_MIN=768 -CONFIG_PTHREAD_DEFAULT_CORE_NO_AFFINITY=y -# CONFIG_PTHREAD_DEFAULT_CORE_0 is not set -# CONFIG_PTHREAD_DEFAULT_CORE_1 is not set -CONFIG_PTHREAD_TASK_CORE_DEFAULT=-1 -CONFIG_PTHREAD_TASK_NAME_DEFAULT="pthread" -# end of PThreads - # # SPI Flash driver # -# CONFIG_SPI_FLASH_VERIFY_WRITE is not set -# CONFIG_SPI_FLASH_ENABLE_COUNTERS is not set -CONFIG_SPI_FLASH_ROM_DRIVER_PATCH=y -# CONFIG_SPI_FLASH_ROM_IMPL is not set -CONFIG_SPI_FLASH_DANGEROUS_WRITE_ABORTS=y -# CONFIG_SPI_FLASH_DANGEROUS_WRITE_FAILS is not set -# CONFIG_SPI_FLASH_DANGEROUS_WRITE_ALLOWED is not set -# CONFIG_SPI_FLASH_USE_LEGACY_IMPL is not set -# CONFIG_SPI_FLASH_SHARE_SPI1_BUS is not set -# CONFIG_SPI_FLASH_BYPASS_BLOCK_ERASE is not set # CONFIG_SPI_FLASH_YIELD_DURING_ERASE is not set CONFIG_SPI_FLASH_WRITE_CHUNK_SIZE=4096 -# CONFIG_SPI_FLASH_SIZE_OVERRIDE is not set -# CONFIG_SPI_FLASH_CHECK_ERASE_TIMEOUT_DISABLED is not set -# CONFIG_SPI_FLASH_OVERRIDE_CHIP_DRIVER_LIST is not set -# -# Auto-detect flash chips -# -CONFIG_SPI_FLASH_SUPPORT_ISSI_CHIP=y -CONFIG_SPI_FLASH_SUPPORT_MXIC_CHIP=y -CONFIG_SPI_FLASH_SUPPORT_GD_CHIP=y -CONFIG_SPI_FLASH_SUPPORT_WINBOND_CHIP=y -CONFIG_SPI_FLASH_SUPPORT_BOYA_CHIP=y -CONFIG_SPI_FLASH_SUPPORT_TH_CHIP=y -CONFIG_SPI_FLASH_SUPPORT_MXIC_OPI_CHIP=y -# end of Auto-detect flash chips - -CONFIG_SPI_FLASH_ENABLE_ENCRYPTED_READ_WRITE=y # end of SPI Flash driver # -# Virtual file system -# -CONFIG_VFS_SUPPORT_IO=y -CONFIG_VFS_SUPPORT_DIR=y -CONFIG_VFS_SUPPORT_SELECT=y -CONFIG_VFS_SUPPRESS_SELECT_DEBUG_OUTPUT=y -CONFIG_VFS_SUPPORT_TERMIOS=y +# Camera configuration # -# Host File System I/O (Semihosting) -# -CONFIG_VFS_SEMIHOSTFS_MAX_MOUNT_POINTS=1 -CONFIG_VFS_SEMIHOSTFS_HOST_PATH_MAX_LEN=128 -# end of Host File System I/O (Semihosting) - -# end of Virtual file system - -# -# Supplicant -# -CONFIG_WPA_MBEDTLS_CRYPTO=y -# CONFIG_WPA_WAPI_PSK is not set -# CONFIG_WPA_SUITE_B_192 is not set -# CONFIG_WPA_DEBUG_PRINT is not set -# CONFIG_WPA_TESTING_OPTIONS is not set -# CONFIG_WPA_WPS_STRICT is not set -# CONFIG_WPA_11KV_SUPPORT is not set -# end of Supplicant +# CONFIG_OV7670_SUPPORT is not set +# CONFIG_NT99141_SUPPORT is not set +# CONFIG_OV2640_SUPPORT is not set +# CONFIG_GC2145_SUPPORT is not set +# CONFIG_GC032A_SUPPORT is not set +# CONFIG_GC0308_SUPPORT is not set +# CONFIG_BF3005_SUPPORT is not set +# CONFIG_BF20A6_SUPPORT is not set +# CONFIG_SC030IOT_SUPPORT is not set +# end of Camera configuration # end of Component config -# -# Compatibility options -# -# CONFIG_LEGACY_INCLUDE_COMMON_HEADERS is not set -# end of Compatibility options - -# -# Deprecated options for backward compatibility -# -# CONFIG_LOG_BOOTLOADER_LEVEL_NONE is not set -# CONFIG_LOG_BOOTLOADER_LEVEL_ERROR is not set -# CONFIG_LOG_BOOTLOADER_LEVEL_WARN is not set -CONFIG_LOG_BOOTLOADER_LEVEL_INFO=y -# CONFIG_LOG_BOOTLOADER_LEVEL_DEBUG is not set -# CONFIG_LOG_BOOTLOADER_LEVEL_VERBOSE is not set -CONFIG_LOG_BOOTLOADER_LEVEL=3 -# CONFIG_APP_ROLLBACK_ENABLE is not set -# CONFIG_FLASH_ENCRYPTION_ENABLED is not set -CONFIG_FLASHMODE_QIO=y -# CONFIG_FLASHMODE_QOUT is not set -# CONFIG_FLASHMODE_DIO is not set -# CONFIG_FLASHMODE_DOUT is not set -# CONFIG_MONITOR_BAUD_9600B is not set -# CONFIG_MONITOR_BAUD_57600B is not set -CONFIG_MONITOR_BAUD_115200B=y -# CONFIG_MONITOR_BAUD_230400B is not set -# CONFIG_MONITOR_BAUD_921600B is not set -# CONFIG_MONITOR_BAUD_2MB is not set -# CONFIG_MONITOR_BAUD_OTHER is not set -CONFIG_MONITOR_BAUD_OTHER_VAL=115200 -CONFIG_MONITOR_BAUD=115200 -# CONFIG_CXX_EXCEPTIONS is not set -CONFIG_STACK_CHECK_NONE=y -# CONFIG_STACK_CHECK_NORM is not set -# CONFIG_STACK_CHECK_STRONG is not set -# CONFIG_STACK_CHECK_ALL is not set -# CONFIG_WARN_WRITE_STRINGS is not set -# CONFIG_DISABLE_GCC8_WARNINGS is not set -CONFIG_ADC2_DISABLE_DAC=y -# CONFIG_EVENT_LOOP_PROFILING is not set -CONFIG_POST_EVENTS_FROM_ISR=y -CONFIG_POST_EVENTS_FROM_IRAM_ISR=y -CONFIG_IPC_TASK_STACK_SIZE=1536 -CONFIG_ESP_SYSTEM_PM_POWER_DOWN_CPU=y -CONFIG_SYSTEM_EVENT_QUEUE_SIZE=32 -CONFIG_SYSTEM_EVENT_TASK_STACK_SIZE=2304 -CONFIG_MAIN_TASK_STACK_SIZE=8192 -CONFIG_INT_WDT=y -CONFIG_INT_WDT_TIMEOUT_MS=300 -CONFIG_INT_WDT_CHECK_CPU1=y -# CONFIG_TASK_WDT is not set -CONFIG_TIMER_TASK_STACK_SIZE=3584 -# CONFIG_ENABLE_STATIC_TASK_CLEAN_UP_HOOK is not set -CONFIG_TIMER_TASK_PRIORITY=1 -CONFIG_TIMER_TASK_STACK_DEPTH=2048 -CONFIG_TIMER_QUEUE_LENGTH=10 -# CONFIG_L2_TO_L3_COPY is not set -# CONFIG_USE_ONLY_LWIP_SELECT is not set -CONFIG_ESP_GRATUITOUS_ARP=y -CONFIG_GARP_TMR_INTERVAL=60 -CONFIG_TCPIP_RECVMBOX_SIZE=32 -CONFIG_TCP_MAXRTX=12 -CONFIG_TCP_SYNMAXRTX=6 -CONFIG_TCP_MSS=1440 -CONFIG_TCP_MSL=60000 -CONFIG_TCP_SND_BUF_DEFAULT=2880 -CONFIG_TCP_WND_DEFAULT=2880 -CONFIG_TCP_RECVMBOX_SIZE=6 -CONFIG_TCP_QUEUE_OOSEQ=y -# CONFIG_ESP_TCP_KEEP_CONNECTION_WHEN_IP_CHANGES is not set -CONFIG_TCP_OVERSIZE_MSS=y -# CONFIG_TCP_OVERSIZE_QUARTER_MSS is not set -# CONFIG_TCP_OVERSIZE_DISABLE is not set -CONFIG_UDP_RECVMBOX_SIZE=6 -CONFIG_TCPIP_TASK_STACK_SIZE=3072 -CONFIG_TCPIP_TASK_AFFINITY_NO_AFFINITY=y -# CONFIG_TCPIP_TASK_AFFINITY_CPU0 is not set -# CONFIG_TCPIP_TASK_AFFINITY_CPU1 is not set -CONFIG_TCPIP_TASK_AFFINITY=0x7FFFFFFF -# CONFIG_PPP_SUPPORT is not set -CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ABORTS=y -# CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_FAILS is not set -# CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ALLOWED is not set -CONFIG_SUPPRESS_SELECT_DEBUG_OUTPUT=y -CONFIG_SUPPORT_TERMIOS=y -CONFIG_SEMIHOSTFS_MAX_MOUNT_POINTS=1 -CONFIG_SEMIHOSTFS_HOST_PATH_MAX_LEN=128 -# end of Deprecated options for backward compatibility +CONFIG_IDF_EXPERIMENTAL_FEATURES=y +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/esp-protocols b/ports/espressif/esp-protocols new file mode 160000 index 000000000000..ea54eef0d0fe --- /dev/null +++ b/ports/espressif/esp-protocols @@ -0,0 +1 @@ +Subproject commit ea54eef0d0fe59bd53a49c916f87065518b957eb diff --git a/ports/espressif/esp32-camera b/ports/espressif/esp32-camera deleted file mode 160000 index 2758089a06cc..000000000000 --- a/ports/espressif/esp32-camera +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 2758089a06ccae79d8fcab6c93e2ca3761646f9f diff --git a/ports/espressif/i2s_lcd_driver.h b/ports/espressif/i2s_lcd_driver.h deleted file mode 100644 index 27c4e66b067d..000000000000 --- a/ports/espressif/i2s_lcd_driver.h +++ /dev/null @@ -1,135 +0,0 @@ -/* *INDENT-OFF* */ -// Copyright 2015-2016 Espressif Systems (Shanghai) PTE LTD -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at - -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -#ifndef __I2S_LCD_DRIVER_H__ -#define __I2S_LCD_DRIVER_H__ - -#include "driver/i2s.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -#define LCD_CMD_LEV (0) -#define LCD_DATA_LEV (1) - -typedef void *i2s_lcd_handle_t; /** Handle of i2s lcd driver */ - -/** - * @brief Configuration of i2s lcd mode - * - */ -typedef struct { - int8_t data_width; /*!< Parallel data width, 16bit or 8bit available */ - int8_t pin_data_num[16]; /*!< Parallel data output IO*/ - int8_t pin_num_cs; /*!< CS io num */ - int8_t pin_num_wr; /*!< Write clk io*/ - int8_t pin_num_rs; /*!< RS io num */ - int clk_freq; /*!< I2s clock frequency */ - i2s_port_t i2s_port; /*!< I2S port number */ - bool swap_data; /*!< Swap the 2 bytes of RGB565 color */ - uint32_t buffer_size; /*!< DMA buffer size */ -} i2s_lcd_config_t; - -/** - * @brief Initialize i2s lcd driver. - * - * @param config configuration of i2s - * - * @return A handle to the created i2s lcd driver, or NULL in case of error. - */ -i2s_lcd_handle_t i2s_lcd_driver_init(const i2s_lcd_config_t *config); - -/** - * @brief Deinit i2s lcd driver. - * - * @param handle i2s lcd driver handle to deinitilize - * - * @return - * - ESP_OK on success - * - ESP_ERR_INVALID_ARG handle is invalid - */ -esp_err_t i2s_lcd_driver_deinit(i2s_lcd_handle_t handle); - -/** - * @brief Write a data to LCD - * - * @param handle i2s lcd driver handle - * @param data Data to write - * - * @return - * - ESP_OK on success - * - ESP_ERR_INVALID_ARG handle is invalid - */ -esp_err_t i2s_lcd_write_data(i2s_lcd_handle_t handle, uint16_t data); - -/** - * @brief Write a command to LCD - * - * @param handle Handle of i2s lcd driver - * @param cmd command to write - * - * @return - * - ESP_OK on success - * - ESP_ERR_INVALID_ARG handle is invalid - */ -esp_err_t i2s_lcd_write_cmd(i2s_lcd_handle_t handle, uint16_t cmd); - -/** - * @brief Write block data to LCD - * - * @param handle Handle of i2s lcd driver - * @param data Pointer of data - * @param length length of data - * - * @return - * - ESP_OK on success - * - ESP_ERR_INVALID_ARG handle is invalid - */ -esp_err_t i2s_lcd_write(i2s_lcd_handle_t handle, const uint8_t *data, uint32_t length); - -/** - * @brief acquire a lock - * - * @param handle Handle of i2s lcd driver - * - * @return Always return ESP_OK - */ -esp_err_t i2s_lcd_acquire(i2s_lcd_handle_t handle); - -/** - * @brief acquire a lock, but only wait a certain period of time - * - * @param handle Handle of i2s lcd driver - * - * @return true if the lock was acquired, false otherwise - */ -bool i2s_lcd_acquire_nonblocking(i2s_lcd_handle_t handle, TickType_t ticks_to_wait); - -/** - * @brief release a lock - * - * @param handle Handle of i2s lcd driver - * - * @return Always return ESP_OK - */ -esp_err_t i2s_lcd_release(i2s_lcd_handle_t handle); - - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/ports/espressif/i2s_lcd_esp32s2_driver.c b/ports/espressif/i2s_lcd_esp32s2_driver.c deleted file mode 100644 index 1bf8cd00f3af..000000000000 --- a/ports/espressif/i2s_lcd_esp32s2_driver.c +++ /dev/null @@ -1,489 +0,0 @@ -/* *INDENT-OFF* */ -// Copyright 2015-2020 Espressif Systems (Shanghai) PTE LTD -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at - -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "sdkconfig.h" -#if CONFIG_IDF_TARGET_ESP32S2 - -#include -#include -#include "freertos/FreeRTOS.h" -#include "freertos/task.h" -#include "freertos/semphr.h" -#include "esp_log.h" -#include "driver/gpio.h" -#include "driver/i2s.h" -#include "esp_heap_caps.h" -#include "esp32s2/rom/lldesc.h" -#include "soc/system_reg.h" -#include "i2s_lcd_driver.h" - - -static const char *TAG = "ESP32S2_I2S_LCD"; - -#define I2S_CHECK(a, str, ret) if (!(a)) { \ - ESP_LOGE(TAG, "%s:%d (%s):%s", __FILE__, __LINE__, __FUNCTION__, str); \ - return ret; \ -} - -#define LCD_CAM_DMA_NODE_BUFFER_MAX_SIZE (4000) // 4-byte aligned -#define LCD_DATA_MAX_WIDTH (24) /*!< Maximum width of LCD data bus */ - -typedef struct { - uint32_t dma_buffer_size; - uint32_t dma_half_buffer_size; - uint32_t dma_node_buffer_size; - uint32_t dma_node_cnt; - uint32_t dma_half_node_cnt; - lldesc_t *dma; - uint8_t *dma_buffer; - QueueHandle_t event_queue; - uint8_t width; - bool swap_data; -} lcd_obj_t; - -typedef struct { - lcd_obj_t lcd; - intr_handle_t lcd_cam_intr_handle; - i2s_dev_t *i2s_dev; -} lcd_cam_obj_t; - -typedef struct { - int rs_io_num; - lcd_cam_obj_t *lcd_cam_obj; - SemaphoreHandle_t mutex; -} i2s_lcd_driver_t; - -static void IRAM_ATTR i2s_isr(void *arg) { - BaseType_t HPTaskAwoken = pdFALSE; - lcd_cam_obj_t *lcd_cam_obj = (lcd_cam_obj_t *)arg; - i2s_dev_t *i2s_dev = lcd_cam_obj->i2s_dev; - - typeof(i2s_dev->int_st) status = i2s_dev->int_st; - i2s_dev->int_clr.val = status.val; - if (status.val == 0) { - return; - } - - if (status.out_eof) { - xQueueSendFromISR(lcd_cam_obj->lcd.event_queue, (void *)&status.val, &HPTaskAwoken); - } - - if (HPTaskAwoken == pdTRUE) { - portYIELD_FROM_ISR(); - } -} - - -static void lcd_dma_set_int(lcd_cam_obj_t *lcd_cam_obj) { - // Generate a data DMA linked list - for (int x = 0; x < lcd_cam_obj->lcd.dma_node_cnt; x++) { - lcd_cam_obj->lcd.dma[x].size = lcd_cam_obj->lcd.dma_node_buffer_size; - lcd_cam_obj->lcd.dma[x].length = lcd_cam_obj->lcd.dma_node_buffer_size; - lcd_cam_obj->lcd.dma[x].buf = (lcd_cam_obj->lcd.dma_buffer + lcd_cam_obj->lcd.dma_node_buffer_size * x); - lcd_cam_obj->lcd.dma[x].eof = !((x + 1) % lcd_cam_obj->lcd.dma_half_node_cnt); - lcd_cam_obj->lcd.dma[x].empty = (uint32_t)&lcd_cam_obj->lcd.dma[(x + 1) % lcd_cam_obj->lcd.dma_node_cnt]; - } - lcd_cam_obj->lcd.dma[lcd_cam_obj->lcd.dma_half_node_cnt - 1].empty = (uint32_t)NULL; - lcd_cam_obj->lcd.dma[lcd_cam_obj->lcd.dma_node_cnt - 1].empty = (uint32_t)NULL; -} - -static void lcd_dma_set_left(lcd_cam_obj_t *lcd_cam_obj, int pos, size_t len) { - int end_pos = 0, size = 0; - // Processing data length is an integer multiple of lcd_cam_obj->lcd.dma_node_buffer_size - if (len % lcd_cam_obj->lcd.dma_node_buffer_size) { - end_pos = (pos % 2) * lcd_cam_obj->lcd.dma_half_node_cnt + len / lcd_cam_obj->lcd.dma_node_buffer_size; - size = len % lcd_cam_obj->lcd.dma_node_buffer_size; - } else { - end_pos = (pos % 2) * lcd_cam_obj->lcd.dma_half_node_cnt + len / lcd_cam_obj->lcd.dma_node_buffer_size - 1; - size = lcd_cam_obj->lcd.dma_node_buffer_size; - } - // Process the tail node to make it a DMA tail - lcd_cam_obj->lcd.dma[end_pos].size = size; - lcd_cam_obj->lcd.dma[end_pos].length = size; - lcd_cam_obj->lcd.dma[end_pos].eof = 1; - lcd_cam_obj->lcd.dma[end_pos].empty = (uint32_t)NULL; -} - -static void lcd_i2s_start(i2s_dev_t *i2s_dev, uint32_t addr, size_t len) { - while (!i2s_dev->state.tx_idle) { - ; - } - i2s_dev->conf.tx_reset = 1; - i2s_dev->conf.tx_reset = 0; - i2s_dev->conf.tx_fifo_reset = 1; - i2s_dev->conf.tx_fifo_reset = 0; - i2s_dev->out_link.addr = addr; - i2s_dev->out_link.start = 1; - ets_delay_us(1); - i2s_dev->conf.tx_start = 1; -} - -static void i2s_write_data(lcd_cam_obj_t *lcd_cam_obj, uint8_t *data, size_t len) { - int event = 0; - int x = 0, y = 0, left = 0, cnt = 0; - if (len <= 0) { - ESP_LOGE(TAG, "wrong len!"); - return; - } - lcd_dma_set_int(lcd_cam_obj); - cnt = len / lcd_cam_obj->lcd.dma_half_buffer_size; - // Start signal - xQueueSend(lcd_cam_obj->lcd.event_queue, &event, 0); - // Process a complete piece of data, ping-pong operation - for (x = 0; x < cnt; x++) { - uint8_t *out = (uint8_t *)lcd_cam_obj->lcd.dma[(x % 2) * lcd_cam_obj->lcd.dma_half_node_cnt].buf; - uint8_t *in = data; - if (lcd_cam_obj->lcd.swap_data) { - for (y = 0; y < lcd_cam_obj->lcd.dma_half_buffer_size; y += 2) { - out[y + 1] = in[y + 0]; - out[y + 0] = in[y + 1]; - } - } else { - memcpy(out, in, lcd_cam_obj->lcd.dma_half_buffer_size); - } - data += lcd_cam_obj->lcd.dma_half_buffer_size; - xQueueReceive(lcd_cam_obj->lcd.event_queue, (void *)&event, portMAX_DELAY); - lcd_i2s_start(lcd_cam_obj->i2s_dev, ((uint32_t)&lcd_cam_obj->lcd.dma[(x % 2) * lcd_cam_obj->lcd.dma_half_node_cnt]) & 0xfffff, lcd_cam_obj->lcd.dma_half_buffer_size); - } - left = len % lcd_cam_obj->lcd.dma_half_buffer_size; - // Process remaining incomplete segment data - if (left) { - uint8_t *out = (uint8_t *)lcd_cam_obj->lcd.dma[(x % 2) * lcd_cam_obj->lcd.dma_half_node_cnt].buf; - uint8_t *in = data; - cnt = left - left % 2; - if (cnt) { - if (lcd_cam_obj->lcd.swap_data) { - for (y = 0; y < cnt; y += 2) { - out[y + 1] = in[y + 0]; - out[y + 0] = in[y + 1]; - } - } else { - memcpy(out, in, cnt); - } - } - - if (left % 2) { - out[cnt] = in[cnt]; - } - lcd_dma_set_left(lcd_cam_obj, x, left); - xQueueReceive(lcd_cam_obj->lcd.event_queue, (void *)&event, portMAX_DELAY); - lcd_i2s_start(lcd_cam_obj->i2s_dev, ((uint32_t)&lcd_cam_obj->lcd.dma[(x % 2) * lcd_cam_obj->lcd.dma_half_node_cnt]) & 0xfffff, left); - } - xQueueReceive(lcd_cam_obj->lcd.event_queue, (void *)&event, portMAX_DELAY); -} - - -static esp_err_t i2s_lcd_reg_config(i2s_dev_t *i2s_dev, uint16_t data_width, uint32_t clk_freq) { - // Configure the clock - i2s_dev->clkm_conf.clkm_div_num = 2; // 160MHz / 2 = 80MHz - i2s_dev->clkm_conf.clkm_div_b = 0; - i2s_dev->clkm_conf.clkm_div_a = 0; - i2s_dev->clkm_conf.clk_sel = 2; // PLL_160M_CLK - i2s_dev->clkm_conf.clk_en = 1; - - i2s_dev->conf.val = 0; - i2s_dev->fifo_conf.val = 0; - i2s_dev->fifo_conf.dscr_en = 1; - - i2s_dev->lc_conf.ahbm_fifo_rst = 1; - i2s_dev->lc_conf.ahbm_fifo_rst = 0; - i2s_dev->lc_conf.ahbm_rst = 1; - i2s_dev->lc_conf.ahbm_rst = 0; - i2s_dev->lc_conf.check_owner = 0; - - i2s_dev->timing.val = 0; - - i2s_dev->int_ena.val = 0; - i2s_dev->int_clr.val = ~0; - - i2s_dev->conf2.lcd_en = 1; - - // Configure sampling rate - // The datasheet states that Fws = Fbck / (W*2), but empirically storing - // 1 in the register gives the highest value of 20MHz, storing 2 gives - // 10MHz, (and storing 0 causes a freeze instead of acting as though 64 was - // specified). - int div_num = (20000000 + clk_freq - 1) / clk_freq; - if (div_num == 0) { - div_num = 1; - } - if (div_num > 63) { - div_num = 63; - } - i2s_dev->sample_rate_conf.tx_bck_div_num = div_num; - i2s_dev->sample_rate_conf.tx_bits_mod = data_width; - // Configuration data format - - i2s_dev->conf.tx_right_first = 1; - i2s_dev->conf.tx_msb_right = 1; - i2s_dev->conf.tx_dma_equal = 1; - - i2s_dev->conf1.tx_pcm_bypass = 1; - i2s_dev->conf1.tx_stop_en = 1; - - i2s_dev->conf2.lcd_en = 1; - - i2s_dev->conf_chan.tx_chan_mod = 1; - - i2s_dev->fifo_conf.tx_fifo_mod_force_en = 1; - i2s_dev->fifo_conf.tx_data_num = 32; - i2s_dev->fifo_conf.tx_fifo_mod = 2; - i2s_dev->fifo_conf.tx_24msb_en = 0; - - i2s_dev->lc_conf.out_rst = 1; - i2s_dev->lc_conf.out_rst = 0; - - i2s_dev->int_ena.out_eof = 1; - - - return ESP_OK; -} - -static esp_err_t lcd_set_pin(const i2s_lcd_config_t *config) { - PIN_FUNC_SELECT(GPIO_PIN_MUX_REG[config->pin_num_wr], PIN_FUNC_GPIO); - gpio_set_direction(config->pin_num_wr, GPIO_MODE_OUTPUT); - gpio_set_pull_mode(config->pin_num_wr, GPIO_FLOATING); - gpio_matrix_out(config->pin_num_wr, I2S0O_WS_OUT_IDX, true, false); - - for (int i = 0; i < config->data_width; i++) { - PIN_FUNC_SELECT(GPIO_PIN_MUX_REG[config->pin_data_num[i]], PIN_FUNC_GPIO); - gpio_set_direction(config->pin_data_num[i], GPIO_MODE_OUTPUT); - gpio_set_pull_mode(config->pin_data_num[i], GPIO_FLOATING); - // High bit aligned, OUT23 is always the highest bit - gpio_matrix_out(config->pin_data_num[i], I2S0O_DATA_OUT0_IDX + (LCD_DATA_MAX_WIDTH - config->data_width) + i, false, false); - } - - return ESP_OK; -} - -static esp_err_t lcd_dma_config(lcd_cam_obj_t *lcd_cam_obj, uint32_t max_dma_buffer_size) { - int cnt = 0; - if (LCD_CAM_DMA_NODE_BUFFER_MAX_SIZE % 2 != 0) { - ESP_LOGE(TAG, "ESP32 only supports 2-byte aligned data length"); - return ESP_FAIL; - } - if (max_dma_buffer_size >= LCD_CAM_DMA_NODE_BUFFER_MAX_SIZE * 2) { - lcd_cam_obj->lcd.dma_node_buffer_size = LCD_CAM_DMA_NODE_BUFFER_MAX_SIZE; - for (cnt = 0; cnt < max_dma_buffer_size - 8; cnt++) { // Find a buffer size that can divide dma_size - if ((max_dma_buffer_size - cnt) % (lcd_cam_obj->lcd.dma_node_buffer_size * 2) == 0) { - break; - } - } - lcd_cam_obj->lcd.dma_buffer_size = max_dma_buffer_size - cnt; - } else { - lcd_cam_obj->lcd.dma_node_buffer_size = max_dma_buffer_size / 2; - lcd_cam_obj->lcd.dma_buffer_size = lcd_cam_obj->lcd.dma_node_buffer_size * 2; - } - - lcd_cam_obj->lcd.dma_half_buffer_size = lcd_cam_obj->lcd.dma_buffer_size / 2; - lcd_cam_obj->lcd.dma_node_cnt = (lcd_cam_obj->lcd.dma_buffer_size) / lcd_cam_obj->lcd.dma_node_buffer_size; // Number of DMA nodes - lcd_cam_obj->lcd.dma_half_node_cnt = lcd_cam_obj->lcd.dma_node_cnt / 2; - - ESP_LOGI(TAG, "lcd_buffer_size: %d, lcd_dma_size: %d, lcd_dma_node_cnt: %d", lcd_cam_obj->lcd.dma_buffer_size, lcd_cam_obj->lcd.dma_node_buffer_size, lcd_cam_obj->lcd.dma_node_cnt); - - lcd_cam_obj->lcd.dma = (lldesc_t *)heap_caps_malloc(lcd_cam_obj->lcd.dma_node_cnt * sizeof(lldesc_t), MALLOC_CAP_DMA | MALLOC_CAP_8BIT); - lcd_cam_obj->lcd.dma_buffer = (uint8_t *)heap_caps_malloc(lcd_cam_obj->lcd.dma_buffer_size * sizeof(uint8_t), MALLOC_CAP_DMA | MALLOC_CAP_8BIT); - return ESP_OK; -} - -static esp_err_t lcd_cam_deinit(i2s_lcd_driver_t *drv) { - if (!drv->lcd_cam_obj) { - return ESP_FAIL; - } - - if (drv->lcd_cam_obj->lcd.event_queue) { - vQueueDelete(drv->lcd_cam_obj->lcd.event_queue); - } - if (drv->lcd_cam_obj->lcd.dma) { - heap_caps_free(drv->lcd_cam_obj->lcd.dma); - } - if (drv->lcd_cam_obj->lcd.dma_buffer) { - heap_caps_free(drv->lcd_cam_obj->lcd.dma_buffer); - } - - if (drv->lcd_cam_obj->lcd_cam_intr_handle) { - esp_intr_free(drv->lcd_cam_obj->lcd_cam_intr_handle); - } - - heap_caps_free(drv->lcd_cam_obj); - drv->lcd_cam_obj = NULL; - return ESP_OK; -} - -static esp_err_t lcd_cam_init(i2s_lcd_driver_t *drv, const i2s_lcd_config_t *config) { - esp_err_t ret = ESP_OK; - - lcd_cam_obj_t *lcd_cam_obj = (lcd_cam_obj_t *)heap_caps_calloc(1, sizeof(lcd_cam_obj_t), MALLOC_CAP_DMA); - if (lcd_cam_obj == NULL) { - ESP_LOGE(TAG, "lcd_cam object malloc error"); - return ESP_ERR_NO_MEM; - } - drv->lcd_cam_obj = lcd_cam_obj; - - if (I2S_NUM_0 == config->i2s_port) { - lcd_cam_obj->i2s_dev = &I2S0; - periph_module_enable(PERIPH_I2S0_MODULE); - } else { - ESP_LOGE(TAG, "Designated I2S peripheral not found"); - } - - ret |= i2s_lcd_reg_config(lcd_cam_obj->i2s_dev, config->data_width, config->clk_freq); - - if (ret != ESP_OK) { - ESP_LOGE(TAG, "lcd_cam config fail!"); - lcd_cam_deinit(drv); - return ESP_FAIL; - } - - ret |= lcd_set_pin(config); - ret |= lcd_dma_config(lcd_cam_obj, config->buffer_size); - - if (ret != ESP_OK) { - ESP_LOGE(TAG, "lcd config fail!"); - lcd_cam_deinit(drv); - return ESP_FAIL; - } - - lcd_cam_obj->lcd.event_queue = xQueueCreate(1, sizeof(int)); - lcd_cam_obj->lcd.width = config->data_width; - lcd_cam_obj->lcd.swap_data = config->swap_data; - - if (lcd_cam_obj->lcd.event_queue == NULL) { - ESP_LOGE(TAG, "lcd config fail!"); - lcd_cam_deinit(drv); - return ESP_FAIL; - } - - ret |= esp_intr_alloc(ETS_I2S0_INTR_SOURCE, ESP_INTR_FLAG_LOWMED | ESP_INTR_FLAG_IRAM, i2s_isr, lcd_cam_obj, &lcd_cam_obj->lcd_cam_intr_handle); - - if (ret != ESP_OK) { - ESP_LOGE(TAG, "lcd_cam intr alloc fail!"); - lcd_cam_deinit(drv); - return ESP_FAIL; - } - - ESP_LOGI(TAG, "lcd init ok"); - - return ESP_OK; -} - - -/**< Public functions */ - -i2s_lcd_handle_t i2s_lcd_driver_init(const i2s_lcd_config_t *config) { - I2S_CHECK(NULL != config, "config pointer invalid", NULL); - I2S_CHECK(GPIO_IS_VALID_GPIO(config->pin_num_wr), "GPIO WR invalid", NULL); - I2S_CHECK(GPIO_IS_VALID_GPIO(config->pin_num_rs), "GPIO RS invalid", NULL); - I2S_CHECK(config->data_width > 0 && config->data_width <= 16, "Bit width out of range", NULL); - I2S_CHECK(0 == (config->data_width % 8), "Bit width must be a multiple of 8", NULL); - uint64_t pin_mask = 0; - for (size_t i = 0; i < config->data_width; i++) { - uint64_t mask = 1ULL << config->pin_data_num[i]; - I2S_CHECK(!(pin_mask & mask), "Data bus GPIO has a duplicate", NULL); - I2S_CHECK(GPIO_IS_VALID_GPIO(config->pin_data_num[i]), "Data bus gpio invalid", NULL); - pin_mask |= mask; - } - - i2s_lcd_driver_t *i2s_lcd_drv = (i2s_lcd_driver_t *)heap_caps_malloc(sizeof(i2s_lcd_driver_t), MALLOC_CAP_INTERNAL | MALLOC_CAP_8BIT); - I2S_CHECK(NULL != i2s_lcd_drv, "Error malloc handle of i2s lcd driver", NULL); - - esp_err_t ret = lcd_cam_init(i2s_lcd_drv, config); - if (ESP_OK != ret) { - ESP_LOGE(TAG, "%s:%d (%s):%s", __FILE__, __LINE__, __FUNCTION__, "i2s lcd driver initialize failed"); - heap_caps_free(i2s_lcd_drv); - return NULL; - } - - i2s_lcd_drv->mutex = xSemaphoreCreateMutex(); - if (i2s_lcd_drv->mutex == NULL) { - ESP_LOGE(TAG, "%s:%d (%s):%s", __FILE__, __LINE__, __FUNCTION__, "lcd create mutex failed"); - lcd_cam_deinit(i2s_lcd_drv); - heap_caps_free(i2s_lcd_drv); - return NULL; - } - - if (config->pin_num_cs >= 0) { - gpio_pad_select_gpio(config->pin_num_cs); - gpio_set_direction(config->pin_num_cs, GPIO_MODE_OUTPUT); - gpio_set_level(config->pin_num_cs, 0); - } - - gpio_pad_select_gpio(config->pin_num_rs); - gpio_set_direction(config->pin_num_rs, GPIO_MODE_OUTPUT); - i2s_lcd_drv->rs_io_num = config->pin_num_rs; - return (i2s_lcd_handle_t)i2s_lcd_drv; -} - -esp_err_t i2s_lcd_driver_deinit(i2s_lcd_handle_t handle) { - i2s_lcd_driver_t *i2s_lcd_drv = (i2s_lcd_driver_t *)handle; - I2S_CHECK(NULL != i2s_lcd_drv, "handle pointer invalid", ESP_ERR_INVALID_ARG); - lcd_cam_deinit(i2s_lcd_drv); - vSemaphoreDelete(i2s_lcd_drv->mutex); - heap_caps_free(handle); - return ESP_OK; -} - -esp_err_t i2s_lcd_write_data(i2s_lcd_handle_t handle, uint16_t data) { - i2s_lcd_driver_t *i2s_lcd_drv = (i2s_lcd_driver_t *)handle; - I2S_CHECK(NULL != i2s_lcd_drv, "handle pointer invalid", ESP_ERR_INVALID_ARG); - i2s_write_data(i2s_lcd_drv->lcd_cam_obj, (uint8_t *)&data, 2); - return ESP_OK; -} - -esp_err_t i2s_lcd_write_cmd(i2s_lcd_handle_t handle, uint16_t cmd) { - i2s_lcd_driver_t *i2s_lcd_drv = (i2s_lcd_driver_t *)handle; - I2S_CHECK(NULL != i2s_lcd_drv, "handle pointer invalid", ESP_ERR_INVALID_ARG); - gpio_set_level(i2s_lcd_drv->rs_io_num, LCD_CMD_LEV); - i2s_write_data(i2s_lcd_drv->lcd_cam_obj, (uint8_t *)&cmd, 2); - gpio_set_level(i2s_lcd_drv->rs_io_num, LCD_DATA_LEV); - return ESP_OK; -} - -esp_err_t i2s_lcd_write(i2s_lcd_handle_t handle, const uint8_t *data, uint32_t length) { - i2s_lcd_driver_t *i2s_lcd_drv = (i2s_lcd_driver_t *)handle; - I2S_CHECK(NULL != i2s_lcd_drv, "handle pointer invalid", ESP_ERR_INVALID_ARG); - i2s_write_data(i2s_lcd_drv->lcd_cam_obj, (uint8_t *)data, length); - - return ESP_OK; -} - -esp_err_t i2s_lcd_acquire(i2s_lcd_handle_t handle) { - i2s_lcd_driver_t *i2s_lcd_drv = (i2s_lcd_driver_t *)handle; - I2S_CHECK(NULL != i2s_lcd_drv, "handle pointer invalid", ESP_ERR_INVALID_ARG); - BaseType_t ret = xSemaphoreTake(i2s_lcd_drv->mutex, portMAX_DELAY); - I2S_CHECK(pdTRUE == ret, "Take semaphore failed", ESP_FAIL); - return ESP_OK; -} - -bool i2s_lcd_acquire_nonblocking(i2s_lcd_handle_t handle, TickType_t ticks_to_wait) { - i2s_lcd_driver_t *i2s_lcd_drv = (i2s_lcd_driver_t *)handle; - return xSemaphoreTake(i2s_lcd_drv->mutex, ticks_to_wait); -} - -esp_err_t i2s_lcd_release(i2s_lcd_handle_t handle) { - i2s_lcd_driver_t *i2s_lcd_drv = (i2s_lcd_driver_t *)handle; - I2S_CHECK(NULL != i2s_lcd_drv, "handle pointer invalid", ESP_ERR_INVALID_ARG); - i2s_dev_t *i2s_dev = &I2S0; -// at this point, the DMA is done but there could still be data in the FIFO. so we need -// to wait for I2S_TX_IDLE so that it's safe e.g., for calling code to deassert CS - while (!i2s_dev->state.tx_idle) { - ; - } - BaseType_t ret = xSemaphoreGive(i2s_lcd_drv->mutex); - I2S_CHECK(pdTRUE == ret, "Give semaphore failed", ESP_FAIL); - return ESP_OK; -} - -#endif // CONFIG_IDF_TARGET_ESP32S2 diff --git a/ports/espressif/mpconfigport.h b/ports/espressif/mpconfigport.h index e4733356bb30..bb333ae4acbc 100644 --- a/ports/espressif/mpconfigport.h +++ b/ports/espressif/mpconfigport.h @@ -59,12 +59,10 @@ // Nearly all boards have this because it is used to enter the ROM bootloader. #ifndef CIRCUITPY_BOOT_BUTTON - #ifdef CONFIG_IDF_TARGET_ESP32C3 + #if defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32C6) || defined(CONFIG_IDF_TARGET_ESP32H2) #define CIRCUITPY_BOOT_BUTTON (&pin_GPIO9) - #else - #ifndef CONFIG_IDF_TARGET_ESP32 - #define CIRCUITPY_BOOT_BUTTON (&pin_GPIO0) - #endif + #elif !defined(CONFIG_IDF_TARGET_ESP32) + #define CIRCUITPY_BOOT_BUTTON (&pin_GPIO0) #endif #endif @@ -90,12 +88,6 @@ #define CIRCUITPY_I2C_ALLOW_INTERNAL_PULL_UP (0) #endif -// Define to (1) in mpconfigboard.h if the board uses the internal USB to -// Serial/JTAG to connect do USB. -#ifndef CIRCUITPY_ESP_USB_SERIAL_JTAG -#define CIRCUITPY_ESP_USB_SERIAL_JTAG (0) -#endif - #ifndef DEFAULT_RESERVED_PSRAM #define DEFAULT_RESERVED_PSRAM (0) #endif diff --git a/ports/espressif/mpconfigport.mk b/ports/espressif/mpconfigport.mk index 01cb22d39a99..84ac4f3e3435 100644 --- a/ports/espressif/mpconfigport.mk +++ b/ports/espressif/mpconfigport.mk @@ -2,11 +2,14 @@ INTERNAL_FLASH_FILESYSTEM = 1 # Internal math library is substantially smaller than toolchain one -INTERNAL_LIBM = 1 +INTERNAL_LIBM = 0 # Longints can be implemented as mpz, as longlong, or not LONGINT_IMPL = MPZ +# Default to no-psram +CIRCUITPY_ESP_PSRAM_SIZE ?= 0 + # Enable more features CIRCUITPY_FULL_BUILD ?= 1 @@ -33,6 +36,8 @@ CIRCUITPY_I2CTARGET ?= 1 CIRCUITPY_IMAGECAPTURE = 0 CIRCUITPY_MEMORYMAP ?= 1 CIRCUITPY_NVM ?= 1 +# Turn off because it uses the old I2S driver which conflicts with the new ADC driver. +CIRCUITPY_PARALLELDISPLAY ?= 0 CIRCUITPY_PS2IO ?= 1 CIRCUITPY_RGBMATRIX ?= 1 CIRCUITPY_ROTARYIO ?= 1 @@ -44,9 +49,8 @@ CIRCUITPY_WIFI ?= 1 # Conditionally turn off modules/features ifeq ($(IDF_TARGET),esp32) # Modules -CIRCUITPY_BLEIO = 0 -CIRCUITPY_PARALLELDISPLAY = 0 CIRCUITPY_RGBMATRIX = 0 +CIRCUITPY_BLEIO = 0 # Features CIRCUITPY_USB = 0 @@ -65,16 +69,55 @@ CIRCUITPY_TOUCHIO ?= 1 CIRCUITPY_TOUCHIO_USE_NATIVE = 0 # Features CIRCUITPY_USB = 0 +CIRCUITPY_ESP_USB_SERIAL_JTAG ?= 1 + +else ifeq ($(IDF_TARGET),esp32c6) +# Modules +CIRCUITPY_ALARM = 0 +CIRCUITPY_AUDIOBUSIO = 0 +CIRCUITPY_ESPCAMERA = 0 +CIRCUITPY_ESPULP = 0 +CIRCUITPY_MEMORYMAP = 0 +CIRCUITPY_PARALLELDISPLAY = 0 +CIRCUITPY_TOUCHIO ?= 1 +CIRCUITPY_TOUCHIO_USE_NATIVE = 0 +# Features +CIRCUITPY_USB = 0 +CIRCUITPY_ESP_USB_SERIAL_JTAG ?= 1 + +else ifeq ($(IDF_TARGET),esp32h2) +# Modules +CIRCUITPY_ALARM = 0 +# Turn off analogio because calibration is currently supported. +# https://github.com/espressif/esp-idf/issues/11038 +CIRCUITPY_ANALOGIO = 0 +CIRCUITPY_AUDIOBUSIO = 0 +CIRCUITPY_ESPCAMERA = 0 +CIRCUITPY_ESPULP = 0 +CIRCUITPY_MEMORYMAP = 0 +CIRCUITPY_PARALLELDISPLAY = 0 +CIRCUITPY_RGBMATRIX = 0 +CIRCUITPY_TOUCHIO ?= 1 +CIRCUITPY_TOUCHIO_USE_NATIVE = 0 +# Features +CIRCUITPY_USB = 0 +CIRCUITPY_ESP_USB_SERIAL_JTAG ?= 1 +CIRCUITPY_WIFI = 0 else ifeq ($(IDF_TARGET),esp32s2) # Modules CIRCUITPY_BLEIO = 0 CIRCUITPY_RGBMATRIX_USES_SUPERVISOR_ALLOCATION = 0 +CIRCUITPY_ESP_USB_SERIAL_JTAG ?= 0 + else ifeq ($(IDF_TARGET),esp32s3) # Modules CIRCUITPY_PARALLELDISPLAY = 0 CIRCUITPY_RGBMATRIX_USES_SUPERVISOR_ALLOCATION = 0 + +CIRCUITPY_ESP_USB_SERIAL_JTAG ?= 0 + endif # No room for dualbank on boards with 2MB flash diff --git a/ports/espressif/mphalport.c b/ports/espressif/mphalport.c index 76d2c05cc3ff..0342c56c116e 100644 --- a/ports/espressif/mphalport.c +++ b/ports/espressif/mphalport.c @@ -32,10 +32,16 @@ #include "components/esp_rom/include/esp32/rom/ets_sys.h" #elif defined(CONFIG_IDF_TARGET_ESP32C3) #include "components/esp_rom/include/esp32c3/rom/ets_sys.h" +#elif defined(CONFIG_IDF_TARGET_ESP32C6) +#include "components/esp_rom/include/esp32c6/rom/ets_sys.h" +#elif defined(CONFIG_IDF_TARGET_ESP32H2) +#include "components/esp_rom/include/esp32h2/rom/ets_sys.h" #elif defined(CONFIG_IDF_TARGET_ESP32S2) #include "components/esp_rom/include/esp32s2/rom/ets_sys.h" #elif defined(CONFIG_IDF_TARGET_ESP32S3) #include "components/esp_rom/include/esp32s3/rom/ets_sys.h" +#else +#error Unknown CONFIG_IDF_TARGET_xxx #endif void mp_hal_delay_us(mp_uint_t delay) { @@ -43,7 +49,7 @@ void mp_hal_delay_us(mp_uint_t delay) { } // This is provided by the esp-idf/components/xtensa/esp32s2/libhal.a binary blob. -#ifndef CONFIG_IDF_TARGET_ESP32C3 +#ifndef CONFIG_IDF_TARGET_ARCH_RISCV extern void xthal_window_spill(void); #endif @@ -61,7 +67,7 @@ mp_uint_t cpu_get_regs_and_sp(mp_uint_t *regs) { // there is a HAL call to do it. There is a bit of a race condition here // because the register value could change after it's been restored but that // is unlikely to happen with a heap pointer while we do a GC. - #ifndef CONFIG_IDF_TARGET_ESP32C3 + #ifndef CONFIG_IDF_TARGET_ARCH_RISCV xthal_window_spill(); #endif return (mp_uint_t)__builtin_frame_address(0); diff --git a/ports/espressif/peripherals/esp32c6/pins.c b/ports/espressif/peripherals/esp32c6/pins.c new file mode 100644 index 000000000000..51f68777c6ae --- /dev/null +++ b/ports/espressif/peripherals/esp32c6/pins.c @@ -0,0 +1,59 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 microDev + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "peripherals/pins.h" + +const mcu_pin_obj_t pin_GPIO0 = PIN(0, ADC_UNIT_1, ADC_CHANNEL_0, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO1 = PIN(1, ADC_UNIT_1, ADC_CHANNEL_1, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO2 = PIN(2, ADC_UNIT_1, ADC_CHANNEL_2, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO3 = PIN(3, ADC_UNIT_1, ADC_CHANNEL_3, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO4 = PIN(4, ADC_UNIT_1, ADC_CHANNEL_4, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO5 = PIN(5, ADC_UNIT_1, ADC_CHANNEL_5, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO6 = PIN(6, ADC_UNIT_1, ADC_CHANNEL_6, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO7 = PIN(7, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO8 = PIN(8, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO9 = PIN(9, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO10 = PIN(10, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO11 = PIN(11, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO12 = PIN(12, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO13 = PIN(13, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO14 = PIN(14, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO15 = PIN(15, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO16 = PIN(16, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO17 = PIN(17, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO18 = PIN(18, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO19 = PIN(19, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO20 = PIN(20, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO21 = PIN(21, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO22 = PIN(22, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO23 = PIN(23, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO24 = PIN(24, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO25 = PIN(25, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO26 = PIN(26, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO27 = PIN(27, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO28 = PIN(28, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO29 = PIN(29, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO30 = PIN(30, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); diff --git a/ports/espressif/peripherals/esp32c6/pins.h b/ports/espressif/peripherals/esp32c6/pins.h new file mode 100644 index 000000000000..4c2b4390e719 --- /dev/null +++ b/ports/espressif/peripherals/esp32c6/pins.h @@ -0,0 +1,94 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2023 Scott Shawcroft for Adafruit Industries LLC + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +// DO NOT include this file directly. +// Use shared-bindings/microcontroller/Pin.h instead. +// This ensures that all necessary includes are already included. + +#pragma once + +#define GPIO0_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO0; +#define GPIO1_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO1; +#define GPIO2_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO2; +#define GPIO3_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO3; +#define GPIO4_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO4; +#define GPIO5_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO5; +#define GPIO6_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO6; +#define GPIO7_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO7; +#define GPIO8_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO8; +#define GPIO9_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO9; +#define GPIO10_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO10; +#define GPIO11_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO11; +#define GPIO12_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO12; +#define GPIO13_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO13; +#define GPIO14_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO14; +#define GPIO15_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO15; +#define GPIO16_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO16; +#define GPIO17_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO17; +#define GPIO18_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO18; +#define GPIO19_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO19; +#define GPIO20_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO20; +#define GPIO21_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO21; +#define GPIO22_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO22; +#define GPIO23_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO23; +#define GPIO24_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO24; +#define GPIO25_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO25; +#define GPIO26_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO26; +#define GPIO27_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO27; +#define GPIO28_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO28; +#define GPIO29_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO29; +#define GPIO30_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO30; diff --git a/ports/espressif/peripherals/esp32h2/pins.c b/ports/espressif/peripherals/esp32h2/pins.c new file mode 100644 index 000000000000..a085ca09ae23 --- /dev/null +++ b/ports/espressif/peripherals/esp32h2/pins.c @@ -0,0 +1,47 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 microDev + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "peripherals/pins.h" + +const mcu_pin_obj_t pin_GPIO0 = PIN(0, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO1 = PIN(1, ADC_UNIT_1, ADC_CHANNEL_0, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO2 = PIN(2, ADC_UNIT_1, ADC_CHANNEL_1, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO3 = PIN(3, ADC_UNIT_1, ADC_CHANNEL_2, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO4 = PIN(4, ADC_UNIT_1, ADC_CHANNEL_3, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO5 = PIN(5, ADC_UNIT_1, ADC_CHANNEL_4, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO8 = PIN(8, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO9 = PIN(9, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO10 = PIN(10, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO11 = PIN(11, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO12 = PIN(12, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO13 = PIN(13, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO14 = PIN(14, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO22 = PIN(22, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO23 = PIN(23, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO24 = PIN(24, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO25 = PIN(25, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO26 = PIN(26, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO27 = PIN(27, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); diff --git a/ports/espressif/peripherals/esp32h2/pins.h b/ports/espressif/peripherals/esp32h2/pins.h new file mode 100644 index 000000000000..7d781ff733ee --- /dev/null +++ b/ports/espressif/peripherals/esp32h2/pins.h @@ -0,0 +1,70 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2023 Scott Shawcroft for Adafruit Industries LLC + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +// DO NOT include this file directly. +// Use shared-bindings/microcontroller/Pin.h instead. +// This ensures that all necessary includes are already included. + +#pragma once + +#define GPIO0_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO0; +#define GPIO1_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO1; +#define GPIO2_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO2; +#define GPIO3_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO3; +#define GPIO4_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO4; +#define GPIO5_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO5; +#define GPIO8_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO8; +#define GPIO9_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO9; +#define GPIO10_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO10; +#define GPIO11_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO11; +#define GPIO12_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO12; +#define GPIO13_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO13; +#define GPIO14_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO14; +#define GPIO22_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO22; +#define GPIO23_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO23; +#define GPIO24_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO24; +#define GPIO25_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO25; +#define GPIO26_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO26; +#define GPIO27_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO27; diff --git a/ports/espressif/peripherals/esp32s3/pins.c b/ports/espressif/peripherals/esp32s3/pins.c index 891cc398ae86..ef5b2462c6f3 100644 --- a/ports/espressif/peripherals/esp32s3/pins.c +++ b/ports/espressif/peripherals/esp32s3/pins.c @@ -26,6 +26,8 @@ #include "peripherals/pins.h" +// NOTE: These numbers do NOT always match the package and module pin number. +// These are by solely by GPIO numbers. const mcu_pin_obj_t pin_GPIO0 = PIN(0, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); const mcu_pin_obj_t pin_GPIO1 = PIN(1, ADC_UNIT_1, ADC_CHANNEL_0, TOUCH_PAD_NUM1); const mcu_pin_obj_t pin_GPIO2 = PIN(2, ADC_UNIT_1, ADC_CHANNEL_1, TOUCH_PAD_NUM2); diff --git a/ports/espressif/peripherals/i2c.c b/ports/espressif/peripherals/i2c.c index 7a85349f96be..d16f165d3838 100644 --- a/ports/espressif/peripherals/i2c.c +++ b/ports/espressif/peripherals/i2c.c @@ -35,7 +35,7 @@ typedef enum { static i2c_status_t i2c_status[I2C_NUM_MAX]; void i2c_reset(void) { - for (i2c_port_t num = 0; num < I2C_NUM_MAX; num++) { + for (i2c_port_t num = 0; num < (i2c_port_t)I2C_NUM_MAX; num++) { if (i2c_status[num] == STATUS_IN_USE) { i2c_driver_delete(num); i2c_status[num] = STATUS_FREE; @@ -70,7 +70,7 @@ void peripherals_i2c_deinit(i2c_port_t num) { i2c_port_t peripherals_i2c_get_free_num(void) { i2c_port_t i2c_num = I2C_NUM_MAX; - for (i2c_port_t num = 0; num < I2C_NUM_MAX; num++) { + for (i2c_port_t num = 0; num < (int)I2C_NUM_MAX; num++) { if (i2c_status[num] == STATUS_FREE) { i2c_num = num; break; diff --git a/ports/espressif/peripherals/pins.h b/ports/espressif/peripherals/pins.h index 9edad560c87f..5d759c661296 100644 --- a/ports/espressif/peripherals/pins.h +++ b/ports/espressif/peripherals/pins.h @@ -49,12 +49,12 @@ extern const mp_obj_type_t mcu_pin_type; #define NO_PIN (GPIO_NUM_NC) -#define NO_ADC 0 -#define NO_ADC_CHANNEL ADC_CHANNEL_MAX +#define NO_ADC SOC_ADC_PERIPH_NUM +#define NO_ADC_CHANNEL SOC_ADC_MAX_CHANNEL_NUM #define NO_TOUCH_CHANNEL TOUCH_PAD_MAX -// This macro is used to simplify pin definition in boards//pins.c +// This macro is used to simplify pin definition in peripherals//pins.c #define PIN(p_number, p_adc_index, p_adc_channel, p_touch_channel) \ { \ { &mcu_pin_type }, \ @@ -69,6 +69,10 @@ extern const mp_obj_type_t mcu_pin_type; #include "esp32/pins.h" #elif defined(CONFIG_IDF_TARGET_ESP32C3) #include "esp32c3/pins.h" +#elif defined(CONFIG_IDF_TARGET_ESP32C6) +#include "esp32c6/pins.h" +#elif defined(CONFIG_IDF_TARGET_ESP32H2) +#include "esp32h2/pins.h" #elif defined(CONFIG_IDF_TARGET_ESP32S2) #include "esp32s2/pins.h" #elif defined(CONFIG_IDF_TARGET_ESP32S3) diff --git a/ports/espressif/peripherals/rmt.h b/ports/espressif/peripherals/rmt.h index 24a43837896e..08a446636efc 100644 --- a/ports/espressif/peripherals/rmt.h +++ b/ports/espressif/peripherals/rmt.h @@ -27,9 +27,11 @@ #ifndef MICROPY_INCLUDED_ESPRESSIF_PERIPHERALS_RMT_H #define MICROPY_INCLUDED_ESPRESSIF_PERIPHERALS_RMT_H -#include "py/mphal.h" -#include "components/driver/include/driver/rmt.h" #include + +#include "py/mphal.h" +#include "driver/rmt.h" + #define TRANSMIT_MODE true #define RECEIVE_MODE false diff --git a/ports/espressif/peripherals/timer.h b/ports/espressif/peripherals/timer.h index c968b0f400f8..82dcc7838aa4 100644 --- a/ports/espressif/peripherals/timer.h +++ b/ports/espressif/peripherals/timer.h @@ -28,6 +28,7 @@ #define MICROPY_INCLUDED_ESPRESSIF_PERIPHERALS_TIMER_HANDLER_H #include "driver/timer.h" +#include "soc/timer_group_struct.h" typedef struct { timg_dev_t *hw; diff --git a/ports/espressif/supervisor/port.c b/ports/espressif/supervisor/port.c index 0224fe00738b..8962fb870fc9 100644 --- a/ports/espressif/supervisor/port.c +++ b/ports/espressif/supervisor/port.c @@ -74,10 +74,6 @@ #include "peripherals/touch.h" #endif -#if CIRCUITPY_AUDIOBUSIO -#include "common-hal/audiobusio/__init__.h" -#endif - #if CIRCUITPY_BLEIO #include "shared-bindings/_bleio/__init__.h" #endif @@ -86,21 +82,26 @@ #include "esp_camera.h" #endif -#ifndef CONFIG_IDF_TARGET_ESP32 -#include "soc/cache_memory.h" -#endif - #include "soc/efuse_reg.h" +#if defined(SOC_LP_AON_SUPPORTED) +#include "soc/lp_aon_reg.h" +#define CP_SAVED_WORD_REGISTER LP_AON_STORE0_REG +#else #include "soc/rtc_cntl_reg.h" - -#include "esp_debug_helpers.h" +#define CP_SAVED_WORD_REGISTER RTC_CNTL_STORE0_REG +#endif +#include "soc/spi_pins.h" #include "bootloader_flash_config.h" + +#include "esp_debug_helpers.h" #include "esp_efuse.h" #include "esp_ipc.h" #include "esp_rom_efuse.h" +#include "esp_timer.h" #ifdef CONFIG_IDF_TARGET_ESP32 +#include "hal/efuse_hal.h" #include "esp32/rom/efuse.h" #endif @@ -187,7 +188,7 @@ static void _never_reset_spi_ram_flash(void) { if (pkg_ver == EFUSE_RD_CHIP_VER_PKG_ESP32D2WDQ5) { never_reset_pin_number(D2WD_PSRAM_CLK_IO); never_reset_pin_number(D2WD_PSRAM_CS_IO); - } else if (pkg_ver == EFUSE_RD_CHIP_VER_PKG_ESP32PICOD4 && esp_efuse_get_chip_ver() >= 3) { + } else if (pkg_ver == EFUSE_RD_CHIP_VER_PKG_ESP32PICOD4 && efuse_hal_get_major_chip_version() >= 3) { // This chip is ESP32-PICO-V3 and doesn't have PSRAM. } else if ((pkg_ver == EFUSE_RD_CHIP_VER_PKG_ESP32PICOD2) || (pkg_ver == EFUSE_RD_CHIP_VER_PKG_ESP32PICOD4)) { never_reset_pin_number(PICO_PSRAM_CLK_IO); @@ -252,7 +253,7 @@ safe_mode_t port_init(void) { // Send the ROM output out of the UART. This includes early logs. #if DEBUG - ets_install_uart_printf(); + esp_rom_install_uart_printf(); #endif heap = NULL; @@ -285,6 +286,7 @@ safe_mode_t port_init(void) { #endif #if ENABLE_JTAG + ESP_LOGI(TAG, "Marking JTAG pins never_reset"); // JTAG #ifdef CONFIG_IDF_TARGET_ESP32C3 common_hal_never_reset_pin(&pin_GPIO4); @@ -382,10 +384,6 @@ void reset_port(void) { analogout_reset(); #endif - #if CIRCUITPY_AUDIOBUSIO - i2s_reset(); - #endif - #if CIRCUITPY_BUSIO i2c_reset(); spi_reset(); @@ -451,7 +449,7 @@ void reset_to_bootloader(void) { } void reset_cpu(void) { - #ifndef CONFIG_IDF_TARGET_ESP32C3 + #ifndef CONFIG_IDF_TARGET_ARCH_RISCV esp_backtrace_print(100); #endif esp_restart(); @@ -491,13 +489,12 @@ bool port_has_fixed_stack(void) { return true; } -// Place the word to save just after our BSS section that gets blanked. void port_set_saved_word(uint32_t value) { - REG_WRITE(RTC_CNTL_STORE0_REG, value); + REG_WRITE(CP_SAVED_WORD_REGISTER, value); } uint32_t port_get_saved_word(void) { - return REG_READ(RTC_CNTL_STORE0_REG); + return REG_READ(CP_SAVED_WORD_REGISTER); } uint64_t port_get_raw_ticks(uint8_t *subticks) { diff --git a/ports/espressif/supervisor/usb.c b/ports/espressif/supervisor/usb.c index 61e6b5f09d9a..ad4c95033389 100644 --- a/ports/espressif/supervisor/usb.c +++ b/ports/espressif/supervisor/usb.c @@ -35,8 +35,8 @@ #include "hal/usb_hal.h" #include "soc/usb_periph.h" -#include "components/driver/include/driver/gpio.h" -#include "components/driver/include/driver/periph_ctrl.h" +#include "driver/gpio.h" +#include "esp_private/periph_ctrl.h" #ifdef CONFIG_IDF_TARGET_ESP32C3 #include "components/esp_rom/include/esp32c3/rom/gpio.h" diff --git a/ports/espressif/tools/build_memory_info.py b/ports/espressif/tools/build_memory_info.py index bbcd3d2df755..04ed04331af8 100644 --- a/ports/espressif/tools/build_memory_info.py +++ b/ports/espressif/tools/build_memory_info.py @@ -38,12 +38,27 @@ ("Internal SRAM 1", (0x3FC8_0000, 0x4037_8000), 416 * 1024), ("Internal SRAM 2", (0x3FCF_0000,), 64 * 1024), ], + "esp32c2": [ + # Name, Start, Length + ("Internal SRAM 0", (0x4037_C000,), 16 * 1024), + ("Internal SRAM 1", (0x3FCA_0000, 0x4038_0000), 256 * 1024), + ], "esp32c3": [ # Name, Start, Length ("RTC Fast Memory", (0x5000_0000,), 8 * 1024), ("Internal SRAM 0", (0x4037_C000,), 16 * 1024), ("Internal SRAM 1", (0x3FC8_0000, 0x4038_0000), 384 * 1024), ], + "esp32c6": [ + # Name, Start, Length + ("LP SRAM", (0x5000_0000,), 16 * 1024), + ("HP SRAM", (0x4080_0000,), 512 * 1024), + ], + "esp32h2": [ + # Name, Start, Length + ("LP SRAM", (0x5000_0000,), 4 * 1024), + ("HP SRAM", (0x4080_0000,), 320 * 1024), + ], } diff --git a/ports/espressif/tools/update_all_board_sdkconfig.py b/ports/espressif/tools/update_all_board_sdkconfig.py new file mode 100644 index 000000000000..60f7c7e04536 --- /dev/null +++ b/ports/espressif/tools/update_all_board_sdkconfig.py @@ -0,0 +1,20 @@ +import pathlib +import sys +import shlex +import subprocess + + +def run(cmd): + proc = subprocess.run(shlex.split(cmd), capture_output=True) + return proc.returncode == 0 + + +failed_count = 0 +for board in sorted(list(pathlib.Path("boards/").glob("*/"))): + board = board.name + print(board) + if not run(f"make BOARD={board} clean update-board-sdkconfig"): + print(" Failed!") + failed_count += 1 + +print(f"{failed_count} boards failed") diff --git a/ports/espressif/tools/update_sdkconfig.py b/ports/espressif/tools/update_sdkconfig.py index 9639e064352a..efae6a4dc14e 100644 --- a/ports/espressif/tools/update_sdkconfig.py +++ b/ports/espressif/tools/update_sdkconfig.py @@ -4,6 +4,8 @@ import pathlib import click import copy +import kconfiglib +import os OPT_SETTINGS = [ "CONFIG_ESP_ERR_TO_NAME_LOOKUP", @@ -21,17 +23,14 @@ "CONFIG_OPTIMIZATION_ASSERTION_LEVEL", "CONFIG_OPTIMIZATION_ASSERTIONS_", "CONFIG_HAL_DEFAULT_ASSERTION_LEVEL", + "CONFIG_BOOTLOADER_LOG_LEVEL", + "LOG_DEFAULT_LEVEL", ] TARGET_SETTINGS = [ "CONFIG_IDF_TARGET", "CONFIG_IDF_FIRMWARE_CHIP_ID", "CONFIG_BOOTLOADER_OFFSET_IN_FLASH", - "CONFIG_ESP32_", - "CONFIG_ESP32C3_", - "CONFIG_ESP32S2_", - "CONFIG_ESP32S3_", - "CONFIG_ESP32H2_", "CONFIG_ESP_SLEEP_POWER_DOWN_FLASH", "CONFIG_ESP_SYSTEM_SINGLE_CORE_MODE", "CONFIG_ESP_SYSTEM_MEMPROT_", @@ -54,22 +53,42 @@ "CONFIG_NIMBLE_PINNED_TO_CORE", "CONFIG_BT_NIMBLE_PINNED_TO_CORE", "CONFIG_BT_CTRL_PINNED_TO_CORE", + "CONFIG_SPIRAM_SPEED_2", + "CONFIG_SPIRAM_BANKSWITCH_ENABLE", # For ESP32 ] BOARD_SETTINGS = [ - "PSRAM clock and cs IO for ESP32S3", - "CONFIG_SPIRAM", - "CONFIG_DEFAULT_PSRAM_", - "_SPIRAM_SUPPORT", "CONFIG_LWIP_LOCAL_HOSTNAME", ] -FLASH_SETTINGS = [ +FLASH_SIZE_SETTINGS = [ "CONFIG_ESPTOOLPY_FLASHSIZE", "CONFIG_PARTITION_TABLE_CUSTOM_FILENAME", "CONFIG_PARTITION_TABLE_FILENAME", ] +FLASH_MODE_SETTINGS = [ + "CONFIG_ESPTOOLPY_FLASHMODE_", + "CONFIG_ESPTOOLPY_OCT_FLASH", + "CONFIG_ESPTOOLPY_FLASH_SAMBLE_MODE_", +] + +FLASH_FREQ_SETTINGS = [ + "CONFIG_ESPTOOLPY_FLASHFREQ_", +] + +PSRAM_SETTINGS = ["CONFIG_SPIRAM"] + +PSRAM_SIZE_SETTINGS = ["CONFIG_SPIRAM_TYPE_"] + +PSRAM_MODE_SETTINGS = ["CONFIG_SPIRAM_MODE_"] + +PSRAM_FREQ_SETTINGS = ["CONFIG_SPIRAM_SPEED_"] + +# Some settings are target dependent but we want to always include them anyway +# because the files they are in will be used across targets. +ALWAYS_INCLUDE = FLASH_MODE_SETTINGS + FLASH_FREQ_SETTINGS + PSRAM_FREQ_SETTINGS + BLE_SETTINGS = ["CONFIG_BT_", "CONFIG_BLUEDROID_", "CONFIG_NIMBLE_", "CONFIG_SW_COEXIST_ENABLE"] # boards/lilygo_ttgo_t8_s2_st7789/sdkconfig @@ -102,6 +121,33 @@ def add_group(lines, last_group, current_group): return last_group +def sym_default(sym): + # Skip symbols that cannot be changed. Only check + # non-choice symbols, as selects don't affect choice + # symbols. + if not sym.choice and sym.visibility <= kconfiglib.expr_value(sym.rev_dep): + return True + + # Skip symbols whose value matches their default + if sym.str_value == sym._str_default(): + return True + + # Skip symbols that would be selected by default in a + # choice, unless the choice is optional or the symbol type + # isn't bool (it might be possible to set the choice mode + # to n or the symbol to m in those cases). + if ( + sym.choice + and not sym.choice.is_optional + and sym.choice._selection_from_defaults() is sym + and sym.orig_type is kconfiglib.BOOL + and sym.tri_value == 2 + ): + return True + + return False + + @click.command() @click.option("--debug") @click.option("--board") @@ -116,33 +162,106 @@ def update(debug, board, update_all): was likely modified by menuconfig.""" board_make = pathlib.Path(f"boards/{board}/mpconfigboard.mk") + psram_size = "0" + uf2_bootloader = None + ble_enabled = None for line in board_make.read_text().split("\n"): - if line.startswith("IDF_TARGET"): - target = line.split("=")[1].strip() - elif line.startswith("CIRCUITPY_ESP_FLASH_SIZE"): - flash = line.split("=")[1].strip() + if "=" not in line or line.startswith("#"): + continue + key, value = line.split("=", maxsplit=1) + key = key.strip() + value = value.strip() + if key == "IDF_TARGET": + target = value + if uf2_bootloader is None: + uf2_bootloader = target not in ("esp32", "esp32c3", "esp32c6", "esp32h2") + if ble_enabled is None: + ble_enabled = target not in ( + "esp32", + "esp32s2", + ) # ESP32 is disabled by us. S2 doesn't support it. + elif key == "CIRCUITPY_ESP_FLASH_SIZE": + flash_size = value + elif key == "CIRCUITPY_ESP_FLASH_MODE": + flash_mode = value + elif key == "CIRCUITPY_ESP_FLASH_FREQ": + flash_freq = value + elif key == "CIRCUITPY_ESP_PSRAM_SIZE": + psram_size = value + elif key == "CIRCUITPY_ESP_PSRAM_MODE": + psram_mode = value + elif key == "CIRCUITPY_ESP_PSRAM_FREQ": + psram_freq = value + elif key == "UF2_BOOTLOADER": + uf2_bootloader = not (value == "0") + elif key == "CIRCUITPY_BLEIO": + ble_enabled = not (value == "0") + + os.environ["IDF_TARGET"] = target + os.environ[ + "COMPONENT_KCONFIGS_PROJBUILD_SOURCE_FILE" + ] = f"build-{board}/esp-idf/kconfigs_projbuild.in" + os.environ["COMPONENT_KCONFIGS_SOURCE_FILE"] = f"build-{board}/esp-idf/kconfigs.in" + + kconfig_path = pathlib.Path(f"build-{board}/esp-idf/kconfigs.in") + + kconfig_path = pathlib.Path(f"esp-idf/Kconfig") + kconfig = kconfiglib.Kconfig(kconfig_path) input_config = pathlib.Path(f"build-{board}/esp-idf/sdkconfig") + kconfig.load_config(input_config) + + sdkconfigs = [] default_config = pathlib.Path("esp-idf-config/sdkconfig.defaults") + sdkconfigs.append(default_config) if debug: opt_config = pathlib.Path("esp-idf-config/sdkconfig-debug.defaults") else: opt_config = pathlib.Path("esp-idf-config/sdkconfig-opt.defaults") - flash_config = pathlib.Path(f"esp-idf-config/sdkconfig-{flash}.defaults") + sdkconfigs.append(opt_config) + size_options = "" + if flash_size == "2MB": + size_options = "-no-ota-no-uf2" + elif not uf2_bootloader: + # These boards don't have native USB. + size_options = "-no-uf2" + flash_size_config = pathlib.Path( + f"esp-idf-config/sdkconfig-flash-{flash_size}{size_options}.defaults" + ) + flash_mode_config = pathlib.Path(f"esp-idf-config/sdkconfig-flash-{flash_mode}.defaults") + flash_freq_config = pathlib.Path(f"esp-idf-config/sdkconfig-flash-{flash_freq}.defaults") + sdkconfigs.extend((flash_size_config, flash_mode_config, flash_freq_config)) + + if psram_size != "0": + psram_config = pathlib.Path(f"esp-idf-config/sdkconfig-psram.defaults") + psram_size_config = pathlib.Path(f"esp-idf-config/sdkconfig-psram-{psram_size}.defaults") + psram_mode_config = pathlib.Path(f"esp-idf-config/sdkconfig-psram-{psram_mode}.defaults") + psram_freq_config = pathlib.Path(f"esp-idf-config/sdkconfig-psram-{psram_freq}.defaults") + sdkconfigs.extend((psram_config, psram_size_config, psram_mode_config, psram_freq_config)) target_config = pathlib.Path(f"esp-idf-config/sdkconfig-{target}.defaults") - ble_config = pathlib.Path(f"esp-idf-config/sdkconfig-ble.defaults") + sdkconfigs.append(target_config) + if ble_enabled: + ble_config = pathlib.Path(f"esp-idf-config/sdkconfig-ble.defaults") + sdkconfigs.append(ble_config) board_config = pathlib.Path(f"boards/{board}/sdkconfig") + # Don't include the board file in cp defaults. The board may have custom + # overrides. - defaults = default_config.read_text().split("\n") - defaults.extend(opt_config.read_text().split("\n")) - defaults.extend(flash_config.read_text().split("\n")) - defaults.extend(target_config.read_text().split("\n")) - defaults.extend(ble_config.read_text().split("\n")) + cp_kconfig_defaults = kconfiglib.Kconfig(kconfig_path) + for default_file in sdkconfigs: + cp_kconfig_defaults.load_config(default_file, replace=False) board_settings = [] last_board_group = None - flash_settings = [] - last_flash_group = None + flash_size_settings = [] + last_flash_size_group = None + flash_mode_settings = [] + flash_freq_settings = [] + psram_settings = [] + last_psram_group = None + psram_size_settings = [] + psram_mode_settings = [] + psram_freq_settings = [] opt_settings = [] last_opt_group = None target_settings = [] @@ -151,58 +270,231 @@ def update(debug, board, update_all): last_ble_group = None default_settings = [] last_default_group = None + + target_kconfig_snippets = set() + target_symbols = set() + current_group = [] - for line in input_config.read_text().split("\n"): - # Normalize the deprecated section labels. - if line == "# End of deprecated options": - line = "# end of Deprecated options for backward compatibility" - if ( - line.startswith("# ") - and "CONFIG_" not in line - and "DO NOT EDIT" not in line - and "Project Configuration" not in line - and len(line) > 3 - ): - if line.startswith("# end of"): - current_group.pop() + + for sym in kconfig.unique_defined_syms: + sym._visited = False + + # This merges the normal `write_config`, `write_min_config` and CP settings to split into + # different files. + pending_nodes = [kconfig.top_node] + i = 0 + while pending_nodes: + node = pending_nodes.pop() + if node is None: + current_group.pop() + continue + + if node.item is kconfiglib.MENU: + if node.prompt: + print(" " * len(current_group), i, node.prompt[0]) + i += 1 + if node.next: + pending_nodes.append(node.next) + + # if i > 300: + # break + + # We have a configuration item. + item = node.item + if isinstance(item, kconfiglib.Symbol): + if item._visited: + continue + item._visited = True + + config_string = item.config_string.strip() + if not config_string: + cp_sym = cp_kconfig_defaults.syms[item.name] + if cp_sym.str_value == "n": + config_string = f"# CONFIG_{item.name} is not set" + else: + continue + + if node.list: + pending_nodes.append(node.list) + + matches_cp_default = cp_kconfig_defaults.syms[item.name].str_value == item.str_value + matches_esp_default = sym_default(item) + + print_debug = not matches_esp_default or (not update_all and not matches_cp_default) + if print_debug: + print(" " * len(current_group), i, config_string.strip()) + + # Some files are `rsource`d into another kconfig with $IDF_TARGET as + # part of the path. kconfiglib doesn't show this as a reference so + # we have to look ourselves. + target_reference = target in item.name_and_loc + if target_reference: + loc = item.name_and_loc.split("defined at ")[1].split(":")[0].replace(target, "*") + if loc not in target_kconfig_snippets: + differing_keys = set() + shared_keys = {} + first = True + for path in pathlib.Path(".").glob(loc): + kc = kconfiglib.Kconfig(path) + all_file_syms = set() + for sym in kc.unique_defined_syms: + all_file_syms.add(sym) + if sym.name in differing_keys: + continue + if first: + shared_keys[sym.name] = sym.str_value + elif ( + sym.name not in shared_keys + or shared_keys[sym.name] != sym.str_value + ): + differing_keys.add(sym.name) + if sym.name in shared_keys: + del shared_keys[sym.name] + # Any settings missing from a file are *not* shared. + shared_syms = set(shared_keys.keys()) + for missing in shared_syms - all_file_syms: + differing_keys.add(missing) + del shared_keys[missing] + first = False + target_kconfig_snippets.add(loc) + target_symbols = target_symbols.union(differing_keys) + + # kconfig settings can be set by others. item.referenced doesn't + # know this. So we collect all things that reference this using + # rev_dep. + all_references = set(item.referenced) + to_unpack = [item.rev_dep] + while to_unpack: + rdep = to_unpack.pop() + if isinstance(rdep, tuple): + to_unpack.extend(rdep) + elif isinstance(rdep, int): + # skip logic + pass + else: + all_references.add(rdep) + all_references.update(rdep.referenced) + psram_reference = False + for referenced in all_references: + if referenced.name.startswith("IDF_TARGET"): + target_reference = True + if referenced.name in target_symbols: + # Implicit target symbols + target_reference = True + if referenced.name == "SPIRAM": + psram_reference = True + + if (not update_all and not matches_cp_default) or ( + update_all + and matches_group(config_string, BOARD_SETTINGS) + and not matches_esp_default + ): + print(" " * (len(current_group) + 1), "board") + last_board_group = add_group(board_settings, last_board_group, current_group) + board_settings.append(config_string) + elif update_all: + target_setting = target_reference or matches_group(config_string, TARGET_SETTINGS) + if matches_group(config_string, FLASH_SIZE_SETTINGS): + print(" " * (len(current_group) + 1), "flash size") + last_flash_size_group = add_group( + flash_size_settings, last_flash_size_group, current_group + ) + flash_size_settings.append(config_string) + elif matches_group(config_string, FLASH_MODE_SETTINGS): + print(" " * (len(current_group) + 1), "flash mode") + flash_mode_settings.append(config_string) + elif matches_group(config_string, FLASH_FREQ_SETTINGS): + print(" " * (len(current_group) + 1), "flash freq") + flash_freq_settings.append(config_string) + elif matches_group(config_string, PSRAM_SIZE_SETTINGS): + print(" " * (len(current_group) + 1), "psram size") + psram_size_settings.append(config_string) + elif matches_group(config_string, PSRAM_MODE_SETTINGS): + print(" " * (len(current_group) + 1), "psram mode") + psram_mode_settings.append(config_string) + elif ( + matches_group(config_string, PSRAM_FREQ_SETTINGS) + and "26M" not in config_string + and "20M" not in config_string + ): + # The ESP32S2 has two frequencies (20M and 26M) that aren't on the S3 or ESP32. + # So, put those in target settings. + print(" " * (len(current_group) + 1), "psram freq") + psram_freq_settings.append(config_string) + elif matches_esp_default: + if print_debug: + print(" " * (len(current_group) + 1), "default") + # Always document the above settings. Settings below should + # be non-default. + pass + elif matches_group(config_string, PSRAM_SETTINGS) or psram_reference: + print(" " * (len(current_group) + 1), "psram shared") + last_psram_group = add_group(psram_settings, last_psram_group, current_group) + psram_settings.append(config_string) + elif matches_group(config_string, OPT_SETTINGS): + print(" " * (len(current_group) + 1), "opt") + last_opt_group = add_group(opt_settings, last_opt_group, current_group) + opt_settings.append(config_string) + elif target_setting: + print(" " * (len(current_group) + 1), "target") + last_target_group = add_group( + target_settings, last_target_group, current_group + ) + target_settings.append(config_string) + elif matches_group(config_string, BLE_SETTINGS): + print(" " * (len(current_group) + 1), "ble") + last_ble_group = add_group(ble_settings, last_ble_group, current_group) + ble_settings.append(config_string) + else: + print(" " * (len(current_group) + 1), "all") + last_default_group = add_group( + default_settings, last_default_group, current_group + ) + default_settings.append(config_string) + + else: + if item is kconfiglib.COMMENT: + print("comment", repr(item)) + elif item is kconfiglib.MENU: + if node.list: + current_group.append(node.prompt[0]) + pending_nodes.append(None) + pending_nodes.append(node.list) + elif isinstance(item, kconfiglib.Choice): + # Choices are made up of individual symbols that we need to check. + pending_nodes.append(node.list) else: - current_group.append(line[2:]) - elif (not update_all and line not in defaults) or ( - update_all and matches_group(line, BOARD_SETTINGS) - ): - last_board_group = add_group(board_settings, last_board_group, current_group) - board_settings.append(line) - elif update_all: - if matches_group(line, OPT_SETTINGS): - last_opt_group = add_group(opt_settings, last_opt_group, current_group) - opt_settings.append(line) - elif matches_group(line, FLASH_SETTINGS): - last_flash_group = add_group(flash_settings, last_flash_group, current_group) - flash_settings.append(line) - elif matches_group(line, TARGET_SETTINGS): - last_target_group = add_group(target_settings, last_target_group, current_group) - target_settings.append(line) - elif matches_group(line, BLE_SETTINGS): - last_ble_group = add_group(ble_settings, last_ble_group, current_group) - ble_settings.append(line) - elif "CONFIG_" in line: - last_default_group = add_group(default_settings, last_default_group, current_group) - default_settings.append(line) + print("unknown", repr(item)) add_group(board_settings, last_board_group, current_group) add_group(opt_settings, last_opt_group, current_group) - add_group(flash_settings, last_flash_group, current_group) + add_group(flash_size_settings, last_flash_size_group, current_group) + add_group(psram_settings, last_psram_group, current_group) add_group(target_settings, last_target_group, current_group) add_group(ble_settings, last_ble_group, current_group) add_group(default_settings, last_default_group, current_group) board_config.write_text("\n".join(board_settings)) if update_all: - flash_config.write_text("\n".join(flash_settings)) + # Add empty strings to get trailing newlines + flash_mode_settings.append("") + flash_freq_settings.append("") + flash_size_config.write_text("\n".join(flash_size_settings)) + flash_mode_config.write_text("\n".join(flash_mode_settings)) + flash_freq_config.write_text("\n".join(flash_freq_settings)) + if psram_size != "0": + psram_size_settings.append("") + psram_mode_settings.append("") + psram_freq_settings.append("") + psram_config.write_text("\n".join(psram_settings)) + psram_size_config.write_text("\n".join(psram_size_settings)) + psram_mode_config.write_text("\n".join(psram_mode_settings)) + psram_freq_config.write_text("\n".join(psram_freq_settings)) opt_config.write_text("\n".join(opt_settings)) default_config.write_text("\n".join(default_settings)) target_config.write_text("\n".join(target_settings)) - ble_config.write_text("\n".join(ble_settings)) + if ble_settings: + ble_config.write_text("\n".join(ble_settings)) if __name__ == "__main__": diff --git a/ports/nrf/common-hal/busio/UART.c b/ports/nrf/common-hal/busio/UART.c index 5c44ab16d548..5bc0854fe792 100644 --- a/ports/nrf/common-hal/busio/UART.c +++ b/ports/nrf/common-hal/busio/UART.c @@ -260,15 +260,8 @@ bool common_hal_busio_uart_deinited(busio_uart_obj_t *self) { } void common_hal_busio_uart_deinit(busio_uart_obj_t *self) { - volatile uint32_t *power_cycle = (void *)(self->uarte->p_reg) + 0xFFC; if (!common_hal_busio_uart_deinited(self)) { - nrfx_uarte_rx_abort(self->uarte); - nrfx_uarte_tx_abort(self->uarte); nrfx_uarte_uninit(self->uarte); - // power cycle the peripheral as per https://devzone.nordicsemi.com/f/nordic-q-a/26030/how-to-reach-nrf52840-uarte-current-supply-specification/102605#102605 - *power_cycle = 0; - *power_cycle; - *power_cycle = 1; reset_pin_number(self->tx_pin_number); reset_pin_number(self->rx_pin_number); reset_pin_number(self->rts_pin_number); diff --git a/ports/nrf/common-hal/watchdog/WatchDogTimer.c b/ports/nrf/common-hal/watchdog/WatchDogTimer.c index 99c360c46dd6..1ac0ee1076d7 100644 --- a/ports/nrf/common-hal/watchdog/WatchDogTimer.c +++ b/ports/nrf/common-hal/watchdog/WatchDogTimer.c @@ -33,12 +33,12 @@ #include "py/objproperty.h" #include "py/runtime.h" -#include "common-hal/watchdog/WatchDogTimer.h" - #include "shared-bindings/microcontroller/__init__.h" #include "shared-bindings/watchdog/__init__.h" #include "shared-bindings/watchdog/WatchDogTimer.h" +#include "common-hal/watchdog/WatchDogTimer.h" + #include "supervisor/port.h" #include "nrf/timers.h" @@ -107,10 +107,6 @@ void common_hal_watchdog_deinit(watchdog_watchdogtimer_obj_t *self) { self->mode = WATCHDOGMODE_NONE; } -void watchdog_reset(void) { - common_hal_watchdog_deinit(&common_hal_mcu_watchdogtimer_obj); -} - mp_float_t common_hal_watchdog_get_timeout(watchdog_watchdogtimer_obj_t *self) { return self->timeout; } diff --git a/ports/nrf/common-hal/watchdog/WatchDogTimer.h b/ports/nrf/common-hal/watchdog/WatchDogTimer.h index 1ff654c32189..e298a71ba7cf 100644 --- a/ports/nrf/common-hal/watchdog/WatchDogTimer.h +++ b/ports/nrf/common-hal/watchdog/WatchDogTimer.h @@ -28,6 +28,9 @@ #define MICROPY_INCLUDED_NRF_COMMON_HAL_WATCHDOG_WATCHDOGTIMER_H #include "py/obj.h" + +#include "shared-module/watchdog/__init__.h" + #include "shared-bindings/watchdog/WatchDogMode.h" #include "shared-bindings/watchdog/WatchDogTimer.h" @@ -37,8 +40,4 @@ struct _watchdog_watchdogtimer_obj_t { watchdog_watchdogmode_t mode; }; -// This needs to be called in order to disable the watchdog if it's set to -// "RAISE". If set to "RESET", then the watchdog cannot be reset. -void watchdog_reset(void); - #endif // MICROPY_INCLUDED_NRF_COMMON_HAL_WATCHDOG_WATCHDOGTIMER_H diff --git a/ports/raspberrypi/Makefile b/ports/raspberrypi/Makefile index 1a9cd35f5542..5a021494f6de 100644 --- a/ports/raspberrypi/Makefile +++ b/ports/raspberrypi/Makefile @@ -358,7 +358,7 @@ CFLAGS += \ -isystem $(TOP)/lib/mbedtls/include \ -DMBEDTLS_CONFIG_FILE='"mbedtls/mbedtls_config.h"' \ -$(BUILD)/x509_crt_bundle.S: $(TOP)/lib/certificates/nina-fw/data/roots.pem $(TOP)/tools/gen_crt_bundle.py +$(BUILD)/x509_crt_bundle.S: $(TOP)/lib/certificates/data/roots.pem $(TOP)/tools/gen_crt_bundle.py $(Q)$(PYTHON) $(TOP)/tools/gen_crt_bundle.py -i $< -o $@ --asm OBJ_MBEDTLS := $(BUILD)/x509_crt_bundle.o $(patsubst %.c,$(BUILD)/%.o,$(SRC_MBEDTLS))): CFLAGS += -Wno-suggest-attribute=format diff --git a/ports/raspberrypi/audio_dma.c b/ports/raspberrypi/audio_dma.c index b5bd8c069c83..940a383cbef3 100644 --- a/ports/raspberrypi/audio_dma.c +++ b/ports/raspberrypi/audio_dma.c @@ -64,20 +64,26 @@ STATIC size_t audio_dma_convert_samples(audio_dma_t *dma, uint8_t *input, uint32 if (dma->sample_resolution <= 8 && dma->output_resolution > 8) { // reading bytes, writing 16-bit words, so output buffer will be bigger. - output_length_used = output_length * 2; + output_length_used *= 2; if (output_length_used > output_length) { mp_raise_RuntimeError(translate("Internal audio buffer too small")); } - size_t shift = dma->output_resolution - dma->sample_resolution; + // Correct "rail-to-rail" scaling of arbitrary-depth input to output + // requires more operations than this, but at least the vital 8- to + // 16-bit cases are correctly scaled now. Prior code was only + // considering 8-to-16 anyway, but had a slight DC offset in the + // result, so this is no worse off WRT supported resolutions. + uint16_t mul = ((1 << dma->output_resolution) - 1) / ((1 << dma->sample_resolution) - 1); + uint16_t offset = (1 << dma->output_resolution) / 2; for (uint32_t i = 0; i < input_length; i += dma->sample_spacing) { if (dma->signed_to_unsigned) { - ((uint16_t *)output)[out_i] = ((uint16_t)((int8_t *)input)[i] + 0x80) << shift; + ((uint16_t *)output)[out_i] = (uint16_t)((((int8_t *)input)[i] + 0x80) * mul); } else if (dma->unsigned_to_signed) { - ((int16_t *)output)[out_i] = ((int16_t)((uint8_t *)input)[i] - 0x80) << shift; + ((int16_t *)output)[out_i] = (int16_t)(((uint8_t *)input)[i] * mul - offset); } else { - ((uint16_t *)output)[out_i] = ((uint16_t)((uint8_t *)input)[i]) << shift; + ((uint16_t *)output)[out_i] = (uint16_t)(((uint8_t *)input)[i] * mul); } out_i += 1; } diff --git a/ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c b/ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c index f23ccda7774e..61c71ccd62fe 100644 --- a/ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c +++ b/ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c @@ -25,45 +25,43 @@ */ #include "py/runtime.h" -#include "common-hal/watchdog/WatchDogTimer.h" #include "shared-bindings/watchdog/__init__.h" #include "shared-bindings/microcontroller/__init__.h" -#include "src/rp2_common/hardware_watchdog/include/hardware/watchdog.h" +#include "common-hal/watchdog/WatchDogTimer.h" + +#include "hardware/watchdog.h" + +#define WATCHDOG_ENABLE watchdog_enable(self->timeout * 1000, false) void common_hal_watchdog_feed(watchdog_watchdogtimer_obj_t *self) { watchdog_update(); } void common_hal_watchdog_deinit(watchdog_watchdogtimer_obj_t *self) { - if (self->mode == WATCHDOGMODE_RESET) { - mp_raise_RuntimeError(translate("WatchDogTimer cannot be deinitialized once mode is set to RESET")); - } else { - self->mode = WATCHDOGMODE_NONE; + if (self->mode == WATCHDOGMODE_NONE) { + return; } + hw_clear_bits(&watchdog_hw->ctrl, WATCHDOG_CTRL_ENABLE_BITS); + self->mode = WATCHDOGMODE_NONE; } -/* -void watchdog_reset(void) { - common_hal_watchdog_deinit(&common_hal_mcu_watchdogtimer_obj); -} -*/ - mp_float_t common_hal_watchdog_get_timeout(watchdog_watchdogtimer_obj_t *self) { return self->timeout; } void common_hal_watchdog_set_timeout(watchdog_watchdogtimer_obj_t *self, mp_float_t new_timeout) { - // max timeout is 8.388607 sec - // this is rounded down to 8.388 sec - uint64_t timeout = new_timeout * 1000; - if (timeout > 8388) { - mp_raise_ValueError(translate("timeout duration exceeded the maximum supported value")); + if (!(self->timeout < new_timeout || self->timeout > new_timeout)) { + return; } - if ((uint16_t)self->timeout != timeout) { - watchdog_enable(timeout, false); - self->timeout = new_timeout; + + // max timeout is 8.388607 sec, this is rounded down to 8 sec + mp_arg_validate_int_max(new_timeout, 8, MP_QSTR_timeout); + self->timeout = new_timeout; + + if (self->mode == WATCHDOGMODE_RESET) { + WATCHDOG_ENABLE; } } @@ -72,12 +70,23 @@ watchdog_watchdogmode_t common_hal_watchdog_get_mode(watchdog_watchdogtimer_obj_ } void common_hal_watchdog_set_mode(watchdog_watchdogtimer_obj_t *self, watchdog_watchdogmode_t new_mode) { - if (self->mode != new_mode) { - if (new_mode == WATCHDOGMODE_RAISE) { - mp_raise_NotImplementedError(translate("RAISE mode is not implemented")); - } else if (new_mode == WATCHDOGMODE_NONE) { + if (self->mode == new_mode) { + return; + } + + switch (new_mode) { + case WATCHDOGMODE_NONE: common_hal_watchdog_deinit(self); - } - self->mode = new_mode; + break; + case WATCHDOGMODE_RAISE: + mp_raise_NotImplementedError(NULL); + break; + case WATCHDOGMODE_RESET: + WATCHDOG_ENABLE; + break; + default: + return; } + + self->mode = new_mode; } diff --git a/ports/raspberrypi/common-hal/watchdog/WatchDogTimer.h b/ports/raspberrypi/common-hal/watchdog/WatchDogTimer.h index ce34f0b8ab1e..ae214a95e6b0 100644 --- a/ports/raspberrypi/common-hal/watchdog/WatchDogTimer.h +++ b/ports/raspberrypi/common-hal/watchdog/WatchDogTimer.h @@ -28,6 +28,9 @@ #define MICROPY_INCLUDED_RASPBERRYPI_COMMON_HAL_WATCHDOG_WATCHDOGTIMER_H #include "py/obj.h" + +#include "shared-module/watchdog/__init__.h" + #include "shared-bindings/watchdog/WatchDogMode.h" #include "shared-bindings/watchdog/WatchDogTimer.h" @@ -37,7 +40,4 @@ struct _watchdog_watchdogtimer_obj_t { watchdog_watchdogmode_t mode; }; -// This needs to be called in order to disable the watchdog -// void watchdog_reset(void); - #endif // MICROPY_INCLUDED_RASPBERRYPI_COMMON_HAL_WATCHDOG_WATCHDOGTIMER_H diff --git a/ports/raspberrypi/common-hal/wifi/Radio.c b/ports/raspberrypi/common-hal/wifi/Radio.c index 1508b764a2d4..ffccd4faf819 100644 --- a/ports/raspberrypi/common-hal/wifi/Radio.c +++ b/ports/raspberrypi/common-hal/wifi/Radio.c @@ -75,8 +75,13 @@ bool common_hal_wifi_radio_get_enabled(wifi_radio_obj_t *self) { } void common_hal_wifi_radio_set_enabled(wifi_radio_obj_t *self, bool enabled) { - self->enabled = enabled; // TODO: Actually enable and disable the WiFi module at this point. + if (self->enabled && !enabled) { + common_hal_wifi_radio_stop_station(self); + common_hal_wifi_radio_stop_ap(self); + } + self->enabled = enabled; + } mp_obj_t common_hal_wifi_radio_get_hostname(wifi_radio_obj_t *self) { diff --git a/ports/raspberrypi/common-hal/wifi/__init__.c b/ports/raspberrypi/common-hal/wifi/__init__.c index 91a45e8d92c9..63f09fc774ac 100644 --- a/ports/raspberrypi/common-hal/wifi/__init__.c +++ b/ports/raspberrypi/common-hal/wifi/__init__.c @@ -71,7 +71,7 @@ void common_hal_wifi_init(bool user_initiated) { void wifi_user_reset(void) { if (wifi_user_initiated) { - // wifi_reset(); + wifi_reset(); wifi_user_initiated = false; } } @@ -83,7 +83,7 @@ void wifi_reset(void) { // the cyw43 wifi chip is not reset due to https://github.com/raspberrypi/pico-sdk/issues/980 common_hal_wifi_monitor_deinit(MP_STATE_VM(wifi_monitor_singleton)); common_hal_wifi_radio_obj.current_scan = NULL; - // common_hal_wifi_radio_set_enabled(radio, false); + common_hal_wifi_radio_set_enabled(&common_hal_wifi_radio_obj, false); supervisor_workflow_request_background(); } diff --git a/ports/raspberrypi/supervisor/port.c b/ports/raspberrypi/supervisor/port.c index 5f18a4d2ed16..a872c7b463c4 100644 --- a/ports/raspberrypi/supervisor/port.c +++ b/ports/raspberrypi/supervisor/port.c @@ -207,6 +207,10 @@ void reset_port(void) { ssl_reset(); #endif + #if CIRCUITPY_WATCHDOG + watchdog_reset(); + #endif + #if CIRCUITPY_WIFI wifi_reset(); #endif diff --git a/ports/silabs/circuitpython_efr32.slcp b/ports/silabs/circuitpython_efr32.slcp index d645f2b1ed44..17c811850165 100644 --- a/ports/silabs/circuitpython_efr32.slcp +++ b/ports/silabs/circuitpython_efr32.slcp @@ -19,6 +19,7 @@ sdk_extension: - id: cp_efr32 version: 1.0.0 component: +- {id: device_init_dpll} - {id: bluetooth_feature_nvm} - {id: bluetooth_feature_gatt_server} - {id: bluetooth_feature_sm} diff --git a/ports/silabs/common-hal/microcontroller/Processor.c b/ports/silabs/common-hal/microcontroller/Processor.c index 841f3ba35f2d..12cf5ca80937 100644 --- a/ports/silabs/common-hal/microcontroller/Processor.c +++ b/ports/silabs/common-hal/microcontroller/Processor.c @@ -50,7 +50,7 @@ float common_hal_mcu_processor_get_voltage(void) { } uint32_t common_hal_mcu_processor_get_frequency(void) { - return CMU_ClockFreqGet(cmuClock_HCLK); + return CMU_ClockFreqGet(cmuClock_SYSCLK); } void common_hal_mcu_processor_get_uid(uint8_t raw_id[]) { diff --git a/ports/silabs/common-hal/watchdog/WatchDogTimer.c b/ports/silabs/common-hal/watchdog/WatchDogTimer.c index b6158e1cc679..d65c794833f7 100644 --- a/ports/silabs/common-hal/watchdog/WatchDogTimer.c +++ b/ports/silabs/common-hal/watchdog/WatchDogTimer.c @@ -41,10 +41,6 @@ void common_hal_watchdog_deinit(watchdog_watchdogtimer_obj_t *self) { WDOG_Enable(false); } -void watchdog_reset(void) { - common_hal_watchdog_deinit(&common_hal_mcu_watchdogtimer_obj); -} - mp_float_t common_hal_watchdog_get_timeout(watchdog_watchdogtimer_obj_t *self) { return self->timeout; } diff --git a/ports/silabs/common-hal/watchdog/WatchDogTimer.h b/ports/silabs/common-hal/watchdog/WatchDogTimer.h index d1538bd491f8..9aad655e734a 100644 --- a/ports/silabs/common-hal/watchdog/WatchDogTimer.h +++ b/ports/silabs/common-hal/watchdog/WatchDogTimer.h @@ -28,6 +28,9 @@ #define MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_WATCHDOG_WATCHDOGTIMER_H #include "py/obj.h" + +#include "shared-module/watchdog/__init__.h" + #include "shared-bindings/watchdog/WatchDogMode.h" #include "shared-bindings/watchdog/WatchDogTimer.h" @@ -37,7 +40,4 @@ struct _watchdog_watchdogtimer_obj_t { watchdog_watchdogmode_t mode; }; -// This needs to be called in order to disable the watchdog -void watchdog_reset(void); - #endif // MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_WATCHDOG_WATCHDOGTIMER_H diff --git a/ports/silabs/supervisor/port.c b/ports/silabs/supervisor/port.c index 8247c813a7ee..fba90882df7c 100644 --- a/ports/silabs/supervisor/port.c +++ b/ports/silabs/supervisor/port.c @@ -192,6 +192,10 @@ void reset_port(void) { #if CIRCUITPY_RTC rtc_reset(); #endif + + #if CIRCUITPY_WATCHDOG + watchdog_reset(); + #endif } void reset_to_bootloader(void) { diff --git a/py/argcheck.c b/py/argcheck.c index c3bde804d441..76c84e83b009 100644 --- a/py/argcheck.c +++ b/py/argcheck.c @@ -133,7 +133,28 @@ void mp_arg_parse_all(size_t n_pos, const mp_obj_t *pos, mp_map_t *kws, size_t n #if MICROPY_ERROR_REPORTING <= MICROPY_ERROR_REPORTING_TERSE mp_arg_error_terse_mismatch(); #else - // TODO better error message + #if CIRCUITPY_FULL_BUILD + mp_map_elem_t *elem = kws->table; + size_t alloc = kws->alloc; + for (size_t i = 0; i < alloc; i++) { + mp_obj_t key = elem[i].key; + if (key == MP_OBJ_NULL) { + continue; + } + bool seen = false; + for (size_t j = n_pos; j < n_allowed; j++) { + if (mp_obj_equal(MP_OBJ_NEW_QSTR(allowed[j].qst), key)) { + seen = true; + break; + } + } + if (!seen) { + mp_raise_msg_varg(&mp_type_TypeError, + MP_ERROR_TEXT("unexpected keyword argument '%q'"), mp_obj_str_get_qstr(key)); + } + } + #endif + // (for the !FULL_BUILD case, and as a fallthrough for the FULL_BUILD case, even though it SHOULD be unreachable in that case) mp_raise_TypeError(MP_ERROR_TEXT("extra keyword arguments given")); #endif } diff --git a/py/circuitpy_defns.mk b/py/circuitpy_defns.mk index 8be49dca0d55..3974e27df48b 100644 --- a/py/circuitpy_defns.mk +++ b/py/circuitpy_defns.mk @@ -603,6 +603,7 @@ SRC_SHARED_MODULE_ALL = \ displayio/TileGrid.c \ displayio/area.c \ displayio/__init__.c \ + dotclockframebuffer/__init__.c \ floppyio/__init__.c \ fontio/BuiltinFont.c \ fontio/__init__.c \ @@ -665,6 +666,7 @@ SRC_SHARED_MODULE_ALL = \ usb/core/__init__.c \ usb/core/Device.c \ ustack/__init__.c \ + watchdog/__init__.c \ zlib/__init__.c \ vectorio/Circle.c \ vectorio/Polygon.c \ diff --git a/py/circuitpy_mpconfig.mk b/py/circuitpy_mpconfig.mk index c400707ac1fe..e15383cc5fc3 100644 --- a/py/circuitpy_mpconfig.mk +++ b/py/circuitpy_mpconfig.mk @@ -243,6 +243,9 @@ CFLAGS += -DCIRCUITPY_ESPNOW=$(CIRCUITPY_ESPNOW) CIRCUITPY_ESPULP ?= 0 CFLAGS += -DCIRCUITPY_ESPULP=$(CIRCUITPY_ESPULP) +CIRCUITPY_ESP_USB_SERIAL_JTAG ?= 0 +CFLAGS += -DCIRCUITPY_ESP_USB_SERIAL_JTAG=$(CIRCUITPY_ESP_USB_SERIAL_JTAG) + CIRCUITPY_ESPCAMERA ?= 0 CFLAGS += -DCIRCUITPY_ESPCAMERA=$(CIRCUITPY_ESPCAMERA) diff --git a/py/makeqstrdefs.py b/py/makeqstrdefs.py index adf6195389c3..178149c6885c 100644 --- a/py/makeqstrdefs.py +++ b/py/makeqstrdefs.py @@ -94,7 +94,10 @@ def preprocess(): def pp(flags): def run(files): - return subprocess.check_output(args.pp + flags + files) + completed = subprocess.run(args.pp + flags + files, stdout=subprocess.PIPE) + if completed.returncode != 0: + raise RuntimeError() + return completed.stdout return run diff --git a/py/qstr.c b/py/qstr.c index 5ff8b3bd54bb..6b7aead5c8de 100644 --- a/py/qstr.c +++ b/py/qstr.c @@ -122,9 +122,13 @@ extern const qstr_pool_t MICROPY_QSTR_EXTRA_POOL; #define CONST_POOL mp_qstr_const_pool #endif -void qstr_init(void) { +void qstr_reset(void) { MP_STATE_VM(last_pool) = (qstr_pool_t *)&CONST_POOL; // we won't modify the const_pool since it has no allocated room left MP_STATE_VM(qstr_last_chunk) = NULL; +} + +void qstr_init(void) { + qstr_reset(); #if MICROPY_PY_THREAD && !MICROPY_PY_THREAD_GIL mp_thread_mutex_init(&MP_STATE_VM(qstr_mutex)); diff --git a/py/qstr.h b/py/qstr.h index c6c9768d0510..24e0e756a383 100644 --- a/py/qstr.h +++ b/py/qstr.h @@ -78,6 +78,7 @@ typedef struct _qstr_pool_t { #define QSTR_TOTAL() (MP_STATE_VM(last_pool)->total_prev_len + MP_STATE_VM(last_pool)->len) +void qstr_reset(void); void qstr_init(void); mp_uint_t qstr_compute_hash(const byte *data, size_t len); diff --git a/requirements-dev.txt b/requirements-dev.txt index 5efa084652bf..7d5766ec5a85 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -25,7 +25,8 @@ intelhex pyelftools # for mbedtls certificate store -cryptography +# version limit due to espressif +cryptography<36.1,>=2.1.4 # for web workflow minify minify_html diff --git a/shared-bindings/displayio/Display.c b/shared-bindings/displayio/Display.c index 5576e2cbfcfb..6b73ad2b6fc2 100644 --- a/shared-bindings/displayio/Display.c +++ b/shared-bindings/displayio/Display.c @@ -239,33 +239,6 @@ static displayio_display_obj_t *native_display(mp_obj_t display_obj) { return MP_OBJ_TO_PTR(native_display); } -//| def show(self, group: Group) -> None: -//| """ -//| .. note:: `show()` is deprecated and will be removed in CircuitPython 9.0.0. -//| Use ``.root_group = group`` instead. -//| -//| Switches to displaying the given group of layers. When group is None, the default -//| CircuitPython terminal will be shown. -//| -//| :param Group group: The group to show. -//| -//| """ -//| ... -STATIC mp_obj_t displayio_display_obj_show(mp_obj_t self_in, mp_obj_t group_in) { - displayio_display_obj_t *self = native_display(self_in); - displayio_group_t *group = NULL; - if (group_in != mp_const_none) { - group = MP_OBJ_TO_PTR(native_group(group_in)); - } - - bool ok = common_hal_displayio_display_show(self, group); - if (!ok) { - mp_raise_ValueError(translate("Group already used")); - } - return mp_const_none; -} -MP_DEFINE_CONST_FUN_OBJ_2(displayio_display_show_obj, displayio_display_obj_show); - //| def refresh( //| self, //| *, @@ -303,7 +276,7 @@ STATIC mp_obj_t displayio_display_obj_refresh(size_t n_args, const mp_obj_t *pos mp_arg_parse_all(n_args - 1, pos_args + 1, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args); displayio_display_obj_t *self = native_display(pos_args[0]); - uint32_t maximum_ms_per_real_frame = 0xffffffff; + uint32_t maximum_ms_per_real_frame = NO_FPS_LIMIT; mp_int_t minimum_frames_per_second = args[ARG_minimum_frames_per_second].u_int; if (minimum_frames_per_second > 0) { maximum_ms_per_real_frame = 1000 / minimum_frames_per_second; @@ -311,7 +284,7 @@ STATIC mp_obj_t displayio_display_obj_refresh(size_t n_args, const mp_obj_t *pos uint32_t target_ms_per_frame; if (args[ARG_target_frames_per_second].u_obj == mp_const_none) { - target_ms_per_frame = 0xffffffff; + target_ms_per_frame = NO_FPS_LIMIT; } else { target_ms_per_frame = 1000 / mp_obj_get_int(args[ARG_target_frames_per_second].u_obj); } @@ -512,7 +485,6 @@ STATIC mp_obj_t displayio_display_obj_fill_row(size_t n_args, const mp_obj_t *po MP_DEFINE_CONST_FUN_OBJ_KW(displayio_display_fill_row_obj, 1, displayio_display_obj_fill_row); STATIC const mp_rom_map_elem_t displayio_display_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_show), MP_ROM_PTR(&displayio_display_show_obj) }, { MP_ROM_QSTR(MP_QSTR_refresh), MP_ROM_PTR(&displayio_display_refresh_obj) }, { MP_ROM_QSTR(MP_QSTR_fill_row), MP_ROM_PTR(&displayio_display_fill_row_obj) }, diff --git a/shared-bindings/displayio/Display.h b/shared-bindings/displayio/Display.h index 35f23ae40f89..af813866ed3f 100644 --- a/shared-bindings/displayio/Display.h +++ b/shared-bindings/displayio/Display.h @@ -35,6 +35,7 @@ extern const mp_obj_type_t displayio_display_type; #define NO_BRIGHTNESS_COMMAND 0x100 +#define NO_FPS_LIMIT 0xffffffff void common_hal_displayio_display_construct(displayio_display_obj_t *self, mp_obj_t bus, uint16_t width, uint16_t height, @@ -46,9 +47,6 @@ void common_hal_displayio_display_construct(displayio_display_obj_t *self, bool single_byte_bounds, bool data_as_commands, bool auto_refresh, uint16_t native_frames_per_second, bool backlight_on_high, bool SH1107_addressing, uint16_t backlight_pwm_frequency); -bool common_hal_displayio_display_show(displayio_display_obj_t *self, - displayio_group_t *root_group); - bool common_hal_displayio_display_refresh(displayio_display_obj_t *self, uint32_t target_ms_per_frame, uint32_t maximum_ms_per_real_frame); bool common_hal_displayio_display_get_auto_refresh(displayio_display_obj_t *self); diff --git a/shared-bindings/displayio/EPaperDisplay.c b/shared-bindings/displayio/EPaperDisplay.c index cca8c919cc0b..afda693c7e5e 100644 --- a/shared-bindings/displayio/EPaperDisplay.c +++ b/shared-bindings/displayio/EPaperDisplay.c @@ -245,31 +245,6 @@ static displayio_epaperdisplay_obj_t *native_display(mp_obj_t display_obj) { return MP_OBJ_TO_PTR(native_display); } -//| def show(self, group: Group) -> None: -//| """ -//| .. note:: `show()` is deprecated and will be removed in CircuitPython 9.0.0. -//| Use ``.root_group = group`` instead. -//| -//| Switches to displaying the given group of layers. When group is None, the default -//| CircuitPython terminal will be shown. -//| -//| :param Group group: The group to show.""" -//| ... -STATIC mp_obj_t displayio_epaperdisplay_obj_show(mp_obj_t self_in, mp_obj_t group_in) { - displayio_epaperdisplay_obj_t *self = native_display(self_in); - displayio_group_t *group = NULL; - if (group_in != mp_const_none) { - group = MP_OBJ_TO_PTR(native_group(group_in)); - } - - bool ok = common_hal_displayio_epaperdisplay_show(self, group); - if (!ok) { - mp_raise_ValueError(translate("Group already used")); - } - return mp_const_none; -} -MP_DEFINE_CONST_FUN_OBJ_2(displayio_epaperdisplay_show_obj, displayio_epaperdisplay_obj_show); - //| def update_refresh_mode( //| self, start_sequence: ReadableBuffer, seconds_per_frame: float = 180 //| ) -> None: @@ -415,7 +390,6 @@ MP_PROPERTY_GETSET(displayio_epaperdisplay_root_group_obj, (mp_obj_t)&displayio_epaperdisplay_set_root_group_obj); STATIC const mp_rom_map_elem_t displayio_epaperdisplay_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_show), MP_ROM_PTR(&displayio_epaperdisplay_show_obj) }, { MP_ROM_QSTR(MP_QSTR_update_refresh_mode), MP_ROM_PTR(&displayio_epaperdisplay_update_refresh_mode_obj) }, { MP_ROM_QSTR(MP_QSTR_refresh), MP_ROM_PTR(&displayio_epaperdisplay_refresh_obj) }, diff --git a/shared-bindings/displayio/EPaperDisplay.h b/shared-bindings/displayio/EPaperDisplay.h index bdaad6130091..ba0b6d06959a 100644 --- a/shared-bindings/displayio/EPaperDisplay.h +++ b/shared-bindings/displayio/EPaperDisplay.h @@ -52,8 +52,6 @@ void common_hal_displayio_epaperdisplay_construct(displayio_epaperdisplay_obj_t bool common_hal_displayio_epaperdisplay_refresh(displayio_epaperdisplay_obj_t *self); -bool common_hal_displayio_epaperdisplay_show(displayio_epaperdisplay_obj_t *self, displayio_group_t *root_group); - mp_obj_t common_hal_displayio_epaperdisplay_get_root_group(displayio_epaperdisplay_obj_t *self); bool common_hal_displayio_epaperdisplay_set_root_group(displayio_epaperdisplay_obj_t *self, displayio_group_t *root_group); diff --git a/shared-bindings/displayio/OnDiskBitmap.c b/shared-bindings/displayio/OnDiskBitmap.c index d0dcba2339e1..99cf3c457612 100644 --- a/shared-bindings/displayio/OnDiskBitmap.c +++ b/shared-bindings/displayio/OnDiskBitmap.c @@ -50,7 +50,7 @@ //| //| board.DISPLAY.brightness = 0 //| splash = displayio.Group() -//| board.DISPLAY.show(splash) +//| board.DISPLAY.root_group = splash //| //| odb = displayio.OnDiskBitmap('/sample.bmp') //| face = displayio.TileGrid(odb, pixel_shader=odb.pixel_shader) diff --git a/shared-bindings/dotclockframebuffer/DotClockFramebuffer.c b/shared-bindings/dotclockframebuffer/DotClockFramebuffer.c index aac695e3eedb..6799618efa1a 100644 --- a/shared-bindings/dotclockframebuffer/DotClockFramebuffer.c +++ b/shared-bindings/dotclockframebuffer/DotClockFramebuffer.c @@ -166,8 +166,6 @@ STATIC mp_obj_t dotclockframebuffer_framebuffer_make_new(const mp_obj_type_t *ty validate_list_is_free_pins(MP_QSTR_green, green_pins, (mp_int_t)MP_ARRAY_SIZE(green_pins), args[ARG_green].u_obj, &num_green); validate_list_is_free_pins(MP_QSTR_blue, blue_pins, (mp_int_t)MP_ARRAY_SIZE(blue_pins), args[ARG_blue].u_obj, &num_blue); - mp_printf(&mp_plat_print, "#red=%d #green=%d #blue=%d\n", num_red, num_green, num_blue); - dotclockframebuffer_framebuffer_obj_t *self = &allocate_display_bus_or_raise()->dotclock; self->base.type = &dotclockframebuffer_framebuffer_type; @@ -271,6 +269,24 @@ MP_DEFINE_CONST_FUN_OBJ_1(dotclockframebuffer_framebuffer_get_row_stride_obj, do MP_PROPERTY_GETTER(dotclockframebuffer_framebuffer_row_stride_obj, (mp_obj_t)&dotclockframebuffer_framebuffer_get_row_stride_obj); +//| first_pixel_offset: int +//| """The first_pixel_offset of the display, in bytes +//| +//| Due to overscan or alignment requirements, the memory address for row N+1 may not be exactly ``2*width`` bytes after the memory address for row N. +//| This property gives the stride in **bytes**. +//| +//| On Espressif this value is **guaranteed** to be a multiple of the 2 (i.e., it is a whole number of pixels)""" +//| +STATIC mp_obj_t dotclockframebuffer_framebuffer_get_first_pixel_offset(mp_obj_t self_in) { + dotclockframebuffer_framebuffer_obj_t *self = (dotclockframebuffer_framebuffer_obj_t *)self_in; + check_for_deinit(self); + return MP_OBJ_NEW_SMALL_INT(common_hal_dotclockframebuffer_framebuffer_get_first_pixel_offset(self)); +} +MP_DEFINE_CONST_FUN_OBJ_1(dotclockframebuffer_framebuffer_get_first_pixel_offset_obj, dotclockframebuffer_framebuffer_get_first_pixel_offset); + +MP_PROPERTY_GETTER(dotclockframebuffer_framebuffer_first_pixel_offset_obj, + (mp_obj_t)&dotclockframebuffer_framebuffer_get_first_pixel_offset_obj); + STATIC mp_int_t dotclockframebuffer_framebuffer_get_buffer(mp_obj_t self_in, mp_buffer_info_t *bufinfo, mp_uint_t flags) { dotclockframebuffer_framebuffer_obj_t *self = (dotclockframebuffer_framebuffer_obj_t *)self_in; // a readonly framebuffer would be unusual but not impossible @@ -333,6 +349,11 @@ STATIC int dotclockframebuffer_framebuffer_get_row_stride_proto(mp_obj_t self_in return common_hal_dotclockframebuffer_framebuffer_get_row_stride(self); } +STATIC int dotclockframebuffer_framebuffer_get_first_pixel_offset_proto(mp_obj_t self_in) { + dotclockframebuffer_framebuffer_obj_t *self = (dotclockframebuffer_framebuffer_obj_t *)self_in; + return common_hal_dotclockframebuffer_framebuffer_get_first_pixel_offset(self); +} + STATIC const framebuffer_p_t dotclockframebuffer_framebuffer_proto = { MP_PROTO_IMPLEMENT(MP_QSTR_protocol_framebuffer) .get_bufinfo = dotclockframebuffer_framebuffer_get_bufinfo, @@ -342,6 +363,7 @@ STATIC const framebuffer_p_t dotclockframebuffer_framebuffer_proto = { .get_height = dotclockframebuffer_framebuffer_get_height_proto, .get_color_depth = dotclockframebuffer_framebuffer_get_color_depth_proto, .get_row_stride = dotclockframebuffer_framebuffer_get_row_stride_proto, + .get_first_pixel_offset = dotclockframebuffer_framebuffer_get_first_pixel_offset_proto, .get_bytes_per_cell = dotclockframebuffer_framebuffer_get_bytes_per_cell_proto, .get_native_frames_per_second = dotclockframebuffer_framebuffer_get_native_frames_per_second_proto, .swapbuffers = dotclockframebuffer_framebuffer_swapbuffers, @@ -353,6 +375,7 @@ STATIC const mp_rom_map_elem_t dotclockframebuffer_framebuffer_locals_dict_table { MP_ROM_QSTR(MP_QSTR_width), MP_ROM_PTR(&dotclockframebuffer_framebuffer_width_obj) }, { MP_ROM_QSTR(MP_QSTR_height), MP_ROM_PTR(&dotclockframebuffer_framebuffer_height_obj) }, { MP_ROM_QSTR(MP_QSTR_row_stride), MP_ROM_PTR(&dotclockframebuffer_framebuffer_row_stride_obj) }, + { MP_ROM_QSTR(MP_QSTR_first_pixel_offset), MP_ROM_PTR(&dotclockframebuffer_framebuffer_first_pixel_offset_obj) }, { MP_ROM_QSTR(MP_QSTR_frequency), MP_ROM_PTR(&dotclockframebuffer_framebuffer_frequency_obj) }, { MP_ROM_QSTR(MP_QSTR_refresh_rate), MP_ROM_PTR(&dotclockframebuffer_framebuffer_refresh_rate_obj) }, { MP_ROM_QSTR(MP_QSTR_refresh), MP_ROM_PTR(&dotclockframebuffer_framebuffer_refresh_obj) }, diff --git a/shared-bindings/dotclockframebuffer/DotClockFramebuffer.h b/shared-bindings/dotclockframebuffer/DotClockFramebuffer.h index 074625c4c0b7..0f99d2017e20 100644 --- a/shared-bindings/dotclockframebuffer/DotClockFramebuffer.h +++ b/shared-bindings/dotclockframebuffer/DotClockFramebuffer.h @@ -56,4 +56,5 @@ mp_int_t common_hal_dotclockframebuffer_framebuffer_get_height(dotclockframebuff mp_int_t common_hal_dotclockframebuffer_framebuffer_get_frequency(dotclockframebuffer_framebuffer_obj_t *self); mp_int_t common_hal_dotclockframebuffer_framebuffer_get_refresh_rate(dotclockframebuffer_framebuffer_obj_t *self); mp_int_t common_hal_dotclockframebuffer_framebuffer_get_row_stride(dotclockframebuffer_framebuffer_obj_t *self); +mp_int_t common_hal_dotclockframebuffer_framebuffer_get_first_pixel_offset(dotclockframebuffer_framebuffer_obj_t *self); void common_hal_dotclockframebuffer_framebuffer_refresh(dotclockframebuffer_framebuffer_obj_t *self); diff --git a/shared-bindings/dotclockframebuffer/__init__.c b/shared-bindings/dotclockframebuffer/__init__.c index a91964988ae7..30f4022d0f01 100644 --- a/shared-bindings/dotclockframebuffer/__init__.c +++ b/shared-bindings/dotclockframebuffer/__init__.c @@ -34,11 +34,128 @@ #include "shared-bindings/dotclockframebuffer/DotClockFramebuffer.h" //| """Native helpers for driving parallel displays""" +//| +//| Length = typing.Literal[1, 2] +//| +//| def ioexpander_send_init_sequence( +//| bus: busio.I2C, +//| init_sequence: ReadableBuffer, +//| *, +//| i2c_init_sequence: ReadableBuffer, +//| i2c_address: int, +//| gpio_address: int, +//| gpio_data_len: Length, +//| gpio_data: int, +//| cs_bit: int, +//| mosi_bit: int, +//| clk_bit: int, +//| reset_bit: Optional[int], +//| ): +//| """Send a displayio-style initialization sequence over an I2C I/O expander +//| +//| This function is highly generic in order to support various I/O expanders. +//| What's assumed is that all the GPIO can be updated by writing to a single I2C register. +//| Normal output polarity is assumed (CS and CLK are active low, data is not inverted). +//| Only 8-bit I2C addresses are supported. +//| 8- and 16-bit I2C addresses and data registers are supported. +//| The Data/Command bit is sent as part of the serial data. +//| +//| Normally this function is used via a convenience library that is specific to the display & I/O expander in use. +//| +//| If the board has an integrated I/O expander, ``**board.TFT_IO_EXPANDER`` expands to the proper arguments starting with ``gpio_address``. +//| Note that this may include the ``i2c_init_sequence`` argument which can change the direction & value of I/O expander pins. +//| If this is undesirable, take a copy of ``TFT_IO_EXPANDER`` and change or remove the ``i2c_init_sequence`` key. +//| +//| If the board has an integrated display that requires an initialization sequence, ``board.TFT_INIT_SEQUENCE`` is the initialization string for the display. +//| +//| :param busio.I2C bus: The I2C bus where the I/O expander resides +//| :param int busio.i2c_address: The I2C bus address of the I/O expander +//| :param ReadableBuffer init_sequence: The initialization sequence to send to the display +//| :param int gpio_address: The address portion of the I2C transaction (1 byte) +//| :param int gpio_data_len: The size of the data portion of the I2C transaction, 1 or 2 bytes +//| :param int gpio_data: The output value for all GPIO bits other than cs, mosi, and clk (needed because GPIO expanders may be unable to read back the current output value) +//| :param int cs_bit: The bit number (from 0 to 7, or from 0 to 15) of the chip select bit in the GPIO register +//| :param int mosi_value: The bit number (from 0 to 7, or from 0 to 15) of the data out bit in the GPIO register +//| :param int clk_value: The bit number (from 0 to 7, or from 0 to 15) of the clock out bit in the GPIO register +//| :param Optional[int] reset_value: The bit number (from 0 to 7, or from 0 to 15) of the display reset bit in the GPIO register +//| :param Optional[ReadableBuffer] i2c_init_sequence: An initialization sequence to send to the I2C expander +//| """ +//| +STATIC mp_obj_t ioexpander_send_init_sequence(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { + enum { ARG_bus, ARG_init_sequence, ARG_i2c_address, ARG_gpio_address, ARG_gpio_data_len, ARG_gpio_data, ARG_cs_bit, ARG_mosi_bit, ARG_clk_bit, ARG_reset_bit, ARG_i2c_init_sequence, NUM_ARGS }; + + static const mp_arg_t allowed_args[] = { + { MP_QSTR_bus, MP_ARG_REQUIRED | MP_ARG_OBJ }, + { MP_QSTR_init_sequence, MP_ARG_REQUIRED | MP_ARG_OBJ }, + { MP_QSTR_i2c_address, MP_ARG_KW_ONLY | MP_ARG_REQUIRED | MP_ARG_INT }, + { MP_QSTR_gpio_address, MP_ARG_KW_ONLY | MP_ARG_REQUIRED | MP_ARG_INT }, + { MP_QSTR_gpio_data_len, MP_ARG_KW_ONLY | MP_ARG_REQUIRED | MP_ARG_INT }, + { MP_QSTR_gpio_data, MP_ARG_KW_ONLY | MP_ARG_REQUIRED | MP_ARG_INT }, + { MP_QSTR_cs_bit, MP_ARG_KW_ONLY | MP_ARG_REQUIRED | MP_ARG_INT }, + { MP_QSTR_mosi_bit, MP_ARG_KW_ONLY | MP_ARG_REQUIRED | MP_ARG_INT }, + { MP_QSTR_clk_bit, MP_ARG_KW_ONLY | MP_ARG_REQUIRED | MP_ARG_INT }, + { MP_QSTR_reset_bit, MP_ARG_KW_ONLY | MP_ARG_OBJ, { .u_obj = MP_ROM_NONE } }, + { MP_QSTR_i2c_init_sequence, MP_ARG_KW_ONLY | MP_ARG_OBJ, { .u_obj = MP_ROM_NONE } }, + }; + + mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; + MP_STATIC_ASSERT(MP_ARRAY_SIZE(allowed_args) == NUM_ARGS); + mp_arg_parse_all(n_args, pos_args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args); + + mp_obj_t bus_obj = mp_arg_validate_type(args[ARG_bus].u_obj, &busio_i2c_type, MP_QSTR_bus); + mp_int_t i2c_address = args[ARG_i2c_address].u_int; + mp_int_t gpio_address = args[ARG_gpio_address].u_int; + mp_int_t gpio_data_len = args[ARG_gpio_data_len].u_int; + mp_int_t gpio_data = args[ARG_gpio_data].u_int; + mp_int_t cs_bit = args[ARG_cs_bit].u_int; + mp_int_t mosi_bit = args[ARG_mosi_bit].u_int; + mp_int_t clk_bit = args[ARG_clk_bit].u_int; + + mp_buffer_info_t bufinfo_display_init_sequence; + mp_get_buffer_raise(args[ARG_init_sequence].u_obj, &bufinfo_display_init_sequence, MP_BUFFER_READ); + + mp_arg_validate_int_range(i2c_address, 0, 127, MP_QSTR_i2c_address); + mp_arg_validate_int_range(gpio_data_len, 1, 2, MP_QSTR_gpio_dat_len); + + int max_bit = gpio_data_len * 8 - 1; + mp_arg_validate_int_range(cs_bit, 0, max_bit, MP_QSTR_cs_bit); + mp_arg_validate_int_range(mosi_bit, 0, max_bit, MP_QSTR_mosi_bit); + mp_arg_validate_int_range(clk_bit, 0, max_bit, MP_QSTR_clk_bit); + mp_arg_validate_int_range(gpio_data, 0, (1 << (max_bit * 8)) - 1, MP_QSTR_gpio_data); + mp_int_t reset_mask = 0; + if (args[ARG_reset_bit].u_obj != MP_ROM_NONE) { + mp_int_t reset_bit = mp_arg_validate_int_range(mp_arg_validate_type_int(args[ARG_reset_bit].u_obj, MP_QSTR_reset_bit), 0, max_bit, MP_QSTR_reset_bit); + reset_mask = 0x100 << reset_bit; + } + + mp_buffer_info_t bufinfo_i2c_init_sequence = {}; + if (args[ARG_i2c_init_sequence].u_obj != mp_const_none) { + mp_get_buffer_raise(args[ARG_i2c_init_sequence].u_obj, &bufinfo_i2c_init_sequence, MP_BUFFER_READ); + } + + dotclockframebuffer_ioexpander_spi_bus b = { + .bus = bus_obj, + .i2c_device_address = i2c_address, + .i2c_write_size = 1 + gpio_data_len, + // ASSERT(LITTLE_ENDIAN, "don't have to differentiate 8- vs 16-bits here") + .addr_reg_shadow = { .u32 = gpio_address | (gpio_data << 8) }, + .cs_mask = 0x100 << cs_bit, + .mosi_mask = 0x100 << mosi_bit, + .clk_mask = 0x100 << clk_bit, + .reset_mask = reset_mask, + }; + + dotclockframebuffer_ioexpander_send_init_sequence(&b, &bufinfo_i2c_init_sequence, &bufinfo_display_init_sequence); + return mp_const_none; +} + +STATIC MP_DEFINE_CONST_FUN_OBJ_KW(ioexpander_send_init_sequence_obj, 0, ioexpander_send_init_sequence); STATIC const mp_rom_map_elem_t dotclockframebuffer_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_dotclockframebuffer) }, { MP_ROM_QSTR(MP_QSTR_DotClockFramebuffer), MP_ROM_PTR(&dotclockframebuffer_framebuffer_type) }, + { MP_ROM_QSTR(MP_QSTR_ioexpander_send_init_sequence), MP_ROM_PTR(&ioexpander_send_init_sequence_obj) }, }; STATIC MP_DEFINE_CONST_DICT(dotclockframebuffer_module_globals, dotclockframebuffer_module_globals_table); diff --git a/shared-bindings/dotclockframebuffer/__init__.h b/shared-bindings/dotclockframebuffer/__init__.h index f7b42875a18f..864eac35731a 100644 --- a/shared-bindings/dotclockframebuffer/__init__.h +++ b/shared-bindings/dotclockframebuffer/__init__.h @@ -25,3 +25,33 @@ */ #pragma once + +#include "py/obj.h" +#include "shared-bindings/busio/I2C.h" + +typedef union { + struct { + uint8_t addr, data; + } a8d8; + struct { + uint16_t addr, data; // in little endian + } a16d16; + struct { + uint8_t addr; + uint16_t data; // in little endian + } __attribute__((packed)) a8d16; + uint32_t u32; +} dotclockframebuffer_ioexpander_addr_reg_t; + +typedef struct { + busio_i2c_obj_t *bus; + uint8_t i2c_device_address; + uint8_t i2c_write_size; + dotclockframebuffer_ioexpander_addr_reg_t addr_reg_shadow; + uint32_t cs_mask; + uint32_t mosi_mask; + uint32_t clk_mask; + uint32_t reset_mask; +} dotclockframebuffer_ioexpander_spi_bus; + +void dotclockframebuffer_ioexpander_send_init_sequence(dotclockframebuffer_ioexpander_spi_bus *bus, const mp_buffer_info_t *i2c_bus_init, const mp_buffer_info_t *display_init); diff --git a/shared-bindings/framebufferio/FramebufferDisplay.c b/shared-bindings/framebufferio/FramebufferDisplay.c index d57081e16fb2..955761c27308 100644 --- a/shared-bindings/framebufferio/FramebufferDisplay.c +++ b/shared-bindings/framebufferio/FramebufferDisplay.c @@ -99,61 +99,56 @@ static framebufferio_framebufferdisplay_obj_t *native_display(mp_obj_t display_o return MP_OBJ_TO_PTR(native_display); } -//| def show(self, group: displayio.Group) -> None: -//| """Switches to displaying the given group of layers. When group is None, the default -//| CircuitPython terminal will be shown. -//| -//| :param Group group: The group to show.""" -//| ... -STATIC mp_obj_t framebufferio_framebufferdisplay_obj_show(mp_obj_t self_in, mp_obj_t group_in) { - framebufferio_framebufferdisplay_obj_t *self = native_display(self_in); - displayio_group_t *group = NULL; - if (group_in != mp_const_none) { - group = MP_OBJ_TO_PTR(native_group(group_in)); - } - - bool ok = common_hal_framebufferio_framebufferdisplay_show(self, group); - if (!ok) { - mp_raise_ValueError(translate("Group already used")); - } - return mp_const_none; -} -MP_DEFINE_CONST_FUN_OBJ_2(framebufferio_framebufferdisplay_show_obj, framebufferio_framebufferdisplay_obj_show); - //| def refresh( -//| self, *, target_frames_per_second: int = 60, minimum_frames_per_second: int = 1 +//| self, +//| *, +//| target_frames_per_second: Optional[int] = None, +//| minimum_frames_per_second: int = 0 //| ) -> bool: -//| """When auto refresh is off, waits for the target frame rate and then refreshes the display, -//| returning True. If the call has taken too long since the last refresh call for the given -//| target frame rate, then the refresh returns False immediately without updating the screen to +//| """When auto_refresh is off, and :py:attr:`target_frames_per_second` is not `None` this waits +//| for the target frame rate and then refreshes the display, +//| returning `True`. If the call has taken too long since the last refresh call for the given +//| target frame rate, then the refresh returns `False` immediately without updating the screen to //| hopefully help getting caught up. //| //| If the time since the last successful refresh is below the minimum frame rate, then an -//| exception will be raised. Set minimum_frames_per_second to 0 to disable. +//| exception will be raised. The default :py:attr:`minimum_frames_per_second` of 0 disables this behavior. //| -//| When auto refresh is on, updates the display immediately. (The display will also update +//| When auto_refresh is off, and :py:attr:`target_frames_per_second` is `None` this +//| will update the display immediately. +//| +//| When auto_refresh is on, updates the display immediately. (The display will also update //| without calls to this.) //| -//| :param int target_frames_per_second: How many times a second `refresh` should be called and the screen updated. +//| :param Optional[int] target_frames_per_second: The target frame rate that :py:func:`refresh` should try to +//| achieve. Set to `None` for immediate refresh. //| :param int minimum_frames_per_second: The minimum number of times the screen should be updated per second. //| """ //| ... STATIC mp_obj_t framebufferio_framebufferdisplay_obj_refresh(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { enum { ARG_target_frames_per_second, ARG_minimum_frames_per_second }; static const mp_arg_t allowed_args[] = { - { MP_QSTR_target_frames_per_second, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 60} }, - { MP_QSTR_minimum_frames_per_second, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 1} }, + { MP_QSTR_target_frames_per_second, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_obj = mp_const_none} }, + { MP_QSTR_minimum_frames_per_second, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 0} }, }; + mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; mp_arg_parse_all(n_args - 1, pos_args + 1, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args); framebufferio_framebufferdisplay_obj_t *self = native_display(pos_args[0]); - uint32_t maximum_ms_per_real_frame = 0xffffffff; + uint32_t maximum_ms_per_real_frame = NO_FPS_LIMIT; mp_int_t minimum_frames_per_second = args[ARG_minimum_frames_per_second].u_int; if (minimum_frames_per_second > 0) { maximum_ms_per_real_frame = 1000 / minimum_frames_per_second; } - return mp_obj_new_bool(common_hal_framebufferio_framebufferdisplay_refresh(self, 1000 / args[ARG_target_frames_per_second].u_int, maximum_ms_per_real_frame)); + + uint32_t target_ms_per_frame; + if (args[ARG_target_frames_per_second].u_obj == mp_const_none) { + target_ms_per_frame = NO_FPS_LIMIT; + } else { + target_ms_per_frame = 1000 / mp_obj_get_int(args[ARG_target_frames_per_second].u_obj); + } + return mp_obj_new_bool(common_hal_framebufferio_framebufferdisplay_refresh(self, target_ms_per_frame, maximum_ms_per_real_frame)); } MP_DEFINE_CONST_FUN_OBJ_KW(framebufferio_framebufferdisplay_refresh_obj, 1, framebufferio_framebufferdisplay_obj_refresh); @@ -354,7 +349,6 @@ MP_PROPERTY_GETSET(framebufferio_framebufferdisplay_root_group_obj, (mp_obj_t)&framebufferio_framebufferdisplay_set_root_group_obj); STATIC const mp_rom_map_elem_t framebufferio_framebufferdisplay_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_show), MP_ROM_PTR(&framebufferio_framebufferdisplay_show_obj) }, { MP_ROM_QSTR(MP_QSTR_refresh), MP_ROM_PTR(&framebufferio_framebufferdisplay_refresh_obj) }, { MP_ROM_QSTR(MP_QSTR_fill_row), MP_ROM_PTR(&framebufferio_framebufferdisplay_fill_row_obj) }, diff --git a/shared-bindings/framebufferio/FramebufferDisplay.h b/shared-bindings/framebufferio/FramebufferDisplay.h index 6526e25afbe8..87f57b0aaaa8 100644 --- a/shared-bindings/framebufferio/FramebufferDisplay.h +++ b/shared-bindings/framebufferio/FramebufferDisplay.h @@ -36,15 +36,13 @@ extern const mp_obj_type_t framebufferio_framebufferdisplay_type; #define NO_BRIGHTNESS_COMMAND 0x100 +#define NO_FPS_LIMIT 0xffffffff void common_hal_framebufferio_framebufferdisplay_construct(framebufferio_framebufferdisplay_obj_t *self, mp_obj_t framebuffer, uint16_t rotation, bool auto_refresh); -bool common_hal_framebufferio_framebufferdisplay_show(framebufferio_framebufferdisplay_obj_t *self, - displayio_group_t *root_group); - bool common_hal_framebufferio_framebufferdisplay_refresh(framebufferio_framebufferdisplay_obj_t *self, uint32_t target_ms_per_frame, uint32_t maximum_ms_per_real_frame); bool common_hal_framebufferio_framebufferdisplay_get_auto_refresh(framebufferio_framebufferdisplay_obj_t *self); diff --git a/shared-bindings/i2ctarget/__init__.c b/shared-bindings/i2ctarget/__init__.c index f9a358eef4eb..65d224b933e1 100644 --- a/shared-bindings/i2ctarget/__init__.c +++ b/shared-bindings/i2ctarget/__init__.c @@ -30,7 +30,6 @@ #include "py/runtime.h" #include "shared-bindings/microcontroller/Pin.h" -// #include "shared-bindings/i2ctarget/__init__.h" #include "shared-bindings/i2ctarget/I2CTarget.h" #include "py/runtime.h" @@ -95,8 +94,6 @@ STATIC const mp_rom_map_elem_t i2ctarget_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_i2ctarget) }, { MP_ROM_QSTR(MP_QSTR_I2CTarget), MP_ROM_PTR(&i2ctarget_i2c_target_type) }, - // TODO: Remove for CircuitPython 9.0.0 - { MP_ROM_QSTR(MP_QSTR_I2CPeripheral), MP_ROM_PTR(&i2ctarget_i2c_target_type) }, }; STATIC MP_DEFINE_CONST_DICT(i2ctarget_module_globals, i2ctarget_module_globals_table); diff --git a/shared-bindings/rotaryio/IncrementalEncoder.c b/shared-bindings/rotaryio/IncrementalEncoder.c index 24df2b2d15c9..d2031432e62c 100644 --- a/shared-bindings/rotaryio/IncrementalEncoder.c +++ b/shared-bindings/rotaryio/IncrementalEncoder.c @@ -35,7 +35,9 @@ #include "shared-bindings/util.h" //| class IncrementalEncoder: -//| """IncrementalEncoder determines the relative rotational position based on two series of pulses.""" +//| """IncrementalEncoder determines the relative rotational position based on two series of pulses. +//| It assumes that the encoder's common pin(s) are connected to ground,and enables pull-ups on +//| pin_a and pin_b.""" //| //| def __init__( //| self, pin_a: microcontroller.Pin, pin_b: microcontroller.Pin, divisor: int = 4 diff --git a/shared-bindings/ssl/SSLContext.c b/shared-bindings/ssl/SSLContext.c index 5fc4238f751e..a132476614ac 100644 --- a/shared-bindings/ssl/SSLContext.c +++ b/shared-bindings/ssl/SSLContext.c @@ -100,7 +100,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_KW(ssl_sslcontext_load_cert_chain_obj, 1, ssl_ssl STATIC mp_obj_t ssl_sslcontext_load_verify_locations(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { enum { ARG_cadata }; static const mp_arg_t allowed_args[] = { - { MP_QSTR_cadata, MP_ARG_KW_ONLY | MP_ARG_OBJ, {.u_obj = mp_const_none} }, + { MP_QSTR_cadata, MP_ARG_OBJ, {.u_obj = mp_const_none} }, }; ssl_sslcontext_obj_t *self = MP_OBJ_TO_PTR(pos_args[0]); diff --git a/shared-bindings/watchdog/WatchDogMode.c b/shared-bindings/watchdog/WatchDogMode.c index c707054d2753..944ab451fad7 100644 --- a/shared-bindings/watchdog/WatchDogMode.c +++ b/shared-bindings/watchdog/WatchDogMode.c @@ -1,9 +1,9 @@ /* - * This file is part of the Micro Python project, http://micropython.org/ + * This file is part of the MicroPython project, http://micropython.org/ * * The MIT License (MIT) * - * Copyright (c) 2020 Sean Cross for Adafruit Industries + * Copyright (c) 2023 MicroDev * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -24,76 +24,28 @@ * THE SOFTWARE. */ +#include "py/enum.h" + #include "shared-bindings/watchdog/WatchDogMode.h" +MAKE_ENUM_VALUE(watchdog_watchdogmode_type, watchdogmode, RAISE, WATCHDOGMODE_RAISE); +MAKE_ENUM_VALUE(watchdog_watchdogmode_type, watchdogmode, RESET, WATCHDOGMODE_RESET); + //| class WatchDogMode: -//| """run state of the watchdog timer""" +//| """Run state of the watchdog timer.""" //| -//| def __init__(self) -> None: -//| """Enum-like class to define the run mode of the watchdog timer.""" //| RAISE: WatchDogMode -//| """Raise an exception when the WatchDogTimer expires. -//| -//| **Limitations:** ``RAISE`` mode is not supported on SAMD or RP2040. -//| -//| :type WatchDogMode:""" +//| """Raise an exception when the `WatchDogTimer` expires.""" //| //| RESET: WatchDogMode -//| """Reset the system if the WatchDogTimer expires. +//| """Reset the system when the `WatchDogTimer` expires.""" //| -//| :type WatchDogMode:""" -//| -const mp_obj_type_t watchdog_watchdogmode_type; - -const watchdog_watchdogmode_obj_t watchdog_watchdogmode_raise_obj = { - { &watchdog_watchdogmode_type }, +MAKE_ENUM_MAP(watchdog_watchdogmode) { + MAKE_ENUM_MAP_ENTRY(watchdogmode, RAISE), + MAKE_ENUM_MAP_ENTRY(watchdogmode, RESET), }; +STATIC MP_DEFINE_CONST_DICT(watchdog_watchdogmode_locals_dict, watchdog_watchdogmode_locals_table); -const watchdog_watchdogmode_obj_t watchdog_watchdogmode_reset_obj = { - { &watchdog_watchdogmode_type }, -}; +MAKE_PRINTER(watchdog, watchdog_watchdogmode); -watchdog_watchdogmode_t watchdog_watchdogmode_obj_to_type(mp_obj_t obj) { - if (obj == MP_ROM_PTR(&watchdog_watchdogmode_raise_obj)) { - return WATCHDOGMODE_RAISE; - } else if (obj == MP_ROM_PTR(&watchdog_watchdogmode_reset_obj)) { - return WATCHDOGMODE_RESET; - } - return WATCHDOGMODE_NONE; -} - -mp_obj_t watchdog_watchdogmode_type_to_obj(watchdog_watchdogmode_t mode) { - switch (mode) { - case WATCHDOGMODE_RAISE: - return (mp_obj_t)MP_ROM_PTR(&watchdog_watchdogmode_raise_obj); - case WATCHDOGMODE_RESET: - return (mp_obj_t)MP_ROM_PTR(&watchdog_watchdogmode_reset_obj); - case WATCHDOGMODE_NONE: - default: - return MP_ROM_NONE; - } -} - -STATIC const mp_rom_map_elem_t watchdog_watchdogmode_locals_dict_table[] = { - {MP_ROM_QSTR(MP_QSTR_RAISE), MP_ROM_PTR(&watchdog_watchdogmode_raise_obj)}, - {MP_ROM_QSTR(MP_QSTR_RESET), MP_ROM_PTR(&watchdog_watchdogmode_reset_obj)}, -}; -STATIC MP_DEFINE_CONST_DICT(watchdog_watchdogmode_locals_dict, watchdog_watchdogmode_locals_dict_table); - -STATIC void watchdog_watchdogmode_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - qstr runmode = MP_QSTR_None; - if (MP_OBJ_TO_PTR(self_in) == MP_ROM_PTR(&watchdog_watchdogmode_raise_obj)) { - runmode = MP_QSTR_RAISE; - } else if (MP_OBJ_TO_PTR(self_in) == MP_ROM_PTR(&watchdog_watchdogmode_reset_obj)) { - runmode = MP_QSTR_RESET; - } - mp_printf(print, "%q.%q.%q", MP_QSTR_watchdog, MP_QSTR_WatchDogMode, - runmode); -} - -const mp_obj_type_t watchdog_watchdogmode_type = { - { &mp_type_type }, - .name = MP_QSTR_WatchDogMode, - .print = watchdog_watchdogmode_print, - .locals_dict = (mp_obj_t)&watchdog_watchdogmode_locals_dict, -}; +MAKE_ENUM_TYPE(watchdog, WatchDogMode, watchdog_watchdogmode); diff --git a/shared-bindings/watchdog/WatchDogMode.h b/shared-bindings/watchdog/WatchDogMode.h index fb09445a9ff4..fd27d4d46a0e 100644 --- a/shared-bindings/watchdog/WatchDogMode.h +++ b/shared-bindings/watchdog/WatchDogMode.h @@ -1,5 +1,5 @@ /* - * This file is part of the Micro Python project, http://micropython.org/ + * This file is part of the MicroPython project, http://micropython.org/ * * The MIT License (MIT) * @@ -27,7 +27,7 @@ #ifndef MICROPY_INCLUDED_SHARED_BINDINGS_WATCHDOG_WATCHDOGMODE_H #define MICROPY_INCLUDED_SHARED_BINDINGS_WATCHDOG_WATCHDOGMODE_H -#include "py/obj.h" +#include "py/enum.h" typedef enum { WATCHDOGMODE_NONE, @@ -37,13 +37,4 @@ typedef enum { extern const mp_obj_type_t watchdog_watchdogmode_type; -watchdog_watchdogmode_t watchdog_watchdogmode_obj_to_type(mp_obj_t obj); -mp_obj_t watchdog_watchdogmode_type_to_obj(watchdog_watchdogmode_t mode); - -typedef struct { - mp_obj_base_t base; -} watchdog_watchdogmode_obj_t; -extern const watchdog_watchdogmode_obj_t watchdog_watchdogmode_raise_obj; -extern const watchdog_watchdogmode_obj_t watchdog_watchdogmode_reset_obj; - #endif // MICROPY_INCLUDED_SHARED_BINDINGS_WATCHDOG_WATCHDOGMODE_H diff --git a/shared-bindings/watchdog/WatchDogTimer.c b/shared-bindings/watchdog/WatchDogTimer.c index acfd353c34cd..49cfdaecb430 100644 --- a/shared-bindings/watchdog/WatchDogTimer.c +++ b/shared-bindings/watchdog/WatchDogTimer.c @@ -50,29 +50,31 @@ //| //| def __init__(self) -> None: -//| """Not currently dynamically supported. Access the sole instance through `microcontroller.watchdog`.""" +//| """Access the sole instance through `microcontroller.watchdog`.""" //| ... //| def feed(self) -> None: //| """Feed the watchdog timer. This must be called regularly, otherwise -//| the timer will expire.""" +//| the timer will expire. Silently does nothing if the watchdog isn't active.""" //| ... STATIC mp_obj_t watchdog_watchdogtimer_feed(mp_obj_t self_in) { watchdog_watchdogtimer_obj_t *self = MP_OBJ_TO_PTR(self_in); - watchdog_watchdogmode_t current_mode = common_hal_watchdog_get_mode(self); - - if (current_mode == WATCHDOGMODE_NONE) { - mp_raise_ValueError(translate("WatchDogTimer is not currently running")); + if (common_hal_watchdog_get_mode(self) != WATCHDOGMODE_NONE) { + common_hal_watchdog_feed(self); } - - common_hal_watchdog_feed(self); return mp_const_none; } STATIC MP_DEFINE_CONST_FUN_OBJ_1(watchdog_watchdogtimer_feed_obj, watchdog_watchdogtimer_feed); //| def deinit(self) -> None: -//| """Stop the watchdog timer. This may raise an error if the watchdog -//| timer cannot be disabled on this platform.""" +//| """Stop the watchdog timer. +//| +//| :raises RuntimeError: if the watchdog timer cannot be disabled on this platform. +//| +//| .. note:: This is deprecated in ``9.0.0`` and will be removed in ``10.0.0``. +//| Set watchdog `mode` to `None` instead. +//| +//| """ //| ... STATIC mp_obj_t watchdog_watchdogtimer_deinit(mp_obj_t self_in) { watchdog_watchdogtimer_obj_t *self = MP_OBJ_TO_PTR(self_in); @@ -83,7 +85,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_1(watchdog_watchdogtimer_deinit_obj, watchdog_wat //| timeout: float //| """The maximum number of seconds that can elapse between calls -//| to feed()""" +//| to `feed()`""" STATIC mp_obj_t watchdog_watchdogtimer_obj_get_timeout(mp_obj_t self_in) { watchdog_watchdogtimer_obj_t *self = MP_OBJ_TO_PTR(self_in); return mp_obj_new_float(common_hal_watchdog_get_timeout(self)); @@ -94,7 +96,7 @@ STATIC mp_obj_t watchdog_watchdogtimer_obj_set_timeout(mp_obj_t self_in, mp_obj_ watchdog_watchdogtimer_obj_t *self = MP_OBJ_TO_PTR(self_in); mp_float_t timeout = mp_obj_get_float(timeout_obj); - mp_arg_validate_int_min((int)timeout, 0, MP_QSTR_timeout); + mp_arg_validate_int_min(timeout, 0, MP_QSTR_timeout); common_hal_watchdog_set_timeout(self, timeout); return mp_const_none; @@ -105,44 +107,31 @@ MP_PROPERTY_GETSET(watchdog_watchdogtimer_timeout_obj, (mp_obj_t)&watchdog_watchdogtimer_get_timeout_obj, (mp_obj_t)&watchdog_watchdogtimer_set_timeout_obj); -//| mode: WatchDogMode -//| """The current operating mode of the WatchDogTimer `watchdog.WatchDogMode`. +//| mode: Optional[WatchDogMode] +//| """The current operating mode of the WatchDogTimer `watchdog.WatchDogMode` or `None` when +//| the timer is disabled. //| -//| Setting a WatchDogMode activates the WatchDog:: +//| Setting a `WatchDogMode` activates the WatchDog:: //| -//| import microcontroller -//| import watchdog +//| from microcontroller import watchdog +//| from watchdog import WatchDogMode //| -//| w = microcontroller.watchdog -//| w.timeout = 5 -//| w.mode = watchdog.WatchDogMode.RAISE +//| watchdog.timeout = 5 +//| watchdog.mode = WatchDogMode.RESET //| //| -//| Once set, the WatchDogTimer will perform the specified action if the timer expires.""" +//| Once set, the `WatchDogTimer` will perform the specified action if the timer expires.""" //| STATIC mp_obj_t watchdog_watchdogtimer_obj_get_mode(mp_obj_t self_in) { watchdog_watchdogtimer_obj_t *self = MP_OBJ_TO_PTR(self_in); - return watchdog_watchdogmode_type_to_obj(common_hal_watchdog_get_mode(self)); + return cp_enum_find(&watchdog_watchdogmode_type, common_hal_watchdog_get_mode(self)); } MP_DEFINE_CONST_FUN_OBJ_1(watchdog_watchdogtimer_get_mode_obj, watchdog_watchdogtimer_obj_get_mode); -STATIC mp_obj_t watchdog_watchdogtimer_obj_set_mode(mp_obj_t self_in, mp_obj_t mode_obj) { +STATIC mp_obj_t watchdog_watchdogtimer_obj_set_mode(mp_obj_t self_in, mp_obj_t obj) { watchdog_watchdogtimer_obj_t *self = MP_OBJ_TO_PTR(self_in); - watchdog_watchdogmode_t current_mode = common_hal_watchdog_get_mode(self); - watchdog_watchdogmode_t new_mode = watchdog_watchdogmode_obj_to_type(mode_obj); - mp_float_t current_timeout = common_hal_watchdog_get_timeout(self); - - // When setting the mode, the timeout value must be greater than zero - if (new_mode == WATCHDOGMODE_RESET || new_mode == WATCHDOGMODE_RAISE) { - mp_arg_validate_int_min((int)current_timeout, 0, MP_QSTR_timeout); - } - - // Don't allow changing the mode once the watchdog timer has been started - if (current_mode == WATCHDOGMODE_RESET && new_mode != WATCHDOGMODE_RESET) { - mp_raise_TypeError(translate("WatchDogTimer.mode cannot be changed once set to WatchDogMode.RESET")); - } - - common_hal_watchdog_set_mode(self, new_mode); + watchdog_watchdogmode_t mode = (obj == mp_const_none) ? WATCHDOGMODE_NONE : cp_enum_value(&watchdog_watchdogmode_type, obj, MP_QSTR_mode); + common_hal_watchdog_set_mode(self, mode); return mp_const_none; } MP_DEFINE_CONST_FUN_OBJ_2(watchdog_watchdogtimer_set_mode_obj, watchdog_watchdogtimer_obj_set_mode); diff --git a/shared-bindings/watchdog/WatchDogTimer.h b/shared-bindings/watchdog/WatchDogTimer.h index 48044748a900..a566b267d69c 100644 --- a/shared-bindings/watchdog/WatchDogTimer.h +++ b/shared-bindings/watchdog/WatchDogTimer.h @@ -27,14 +27,14 @@ #ifndef MICROPY_INCLUDED_SHARED_BINDINGS_WATCHDOG_WATCHDOGTIMER_H #define MICROPY_INCLUDED_SHARED_BINDINGS_WATCHDOG_WATCHDOGTIMER_H -#include +#include "py/obj.h" #include "shared-bindings/watchdog/WatchDogMode.h" typedef struct _watchdog_watchdogtimer_obj_t watchdog_watchdogtimer_obj_t; extern void common_hal_watchdog_feed(watchdog_watchdogtimer_obj_t *self); -extern void common_hal_watchdog_set_mode(watchdog_watchdogtimer_obj_t *self, watchdog_watchdogmode_t); +extern void common_hal_watchdog_set_mode(watchdog_watchdogtimer_obj_t *self, watchdog_watchdogmode_t mode); extern watchdog_watchdogmode_t common_hal_watchdog_get_mode(watchdog_watchdogtimer_obj_t *self); extern void common_hal_watchdog_set_timeout(watchdog_watchdogtimer_obj_t *self, mp_float_t timeout); diff --git a/shared-module/displayio/Display.c b/shared-module/displayio/Display.c index 093604214d12..94f29d2c931f 100644 --- a/shared-module/displayio/Display.c +++ b/shared-module/displayio/Display.c @@ -140,13 +140,6 @@ void common_hal_displayio_display_construct(displayio_display_obj_t *self, common_hal_displayio_display_set_auto_refresh(self, auto_refresh); } -bool common_hal_displayio_display_show(displayio_display_obj_t *self, displayio_group_t *root_group) { - if (root_group == NULL) { - root_group = &circuitpython_splash; - } - return displayio_display_core_set_root_group(&self->core, root_group); -} - uint16_t common_hal_displayio_display_get_width(displayio_display_obj_t *self) { return displayio_display_core_get_width(&self->core); } @@ -361,7 +354,7 @@ uint16_t common_hal_displayio_display_get_rotation(displayio_display_obj_t *self bool common_hal_displayio_display_refresh(displayio_display_obj_t *self, uint32_t target_ms_per_frame, uint32_t maximum_ms_per_real_frame) { - if (!self->auto_refresh && !self->first_manual_refresh && (target_ms_per_frame != 0xffffffff)) { + if (!self->auto_refresh && !self->first_manual_refresh && (target_ms_per_frame != NO_FPS_LIMIT)) { uint64_t current_time = supervisor_ticks_ms64(); uint32_t current_ms_since_real_refresh = current_time - self->core.last_refresh; // Test to see if the real frame time is below our minimum. diff --git a/shared-module/displayio/EPaperDisplay.c b/shared-module/displayio/EPaperDisplay.c index e79c6927668e..4db1b7cb5c2b 100644 --- a/shared-module/displayio/EPaperDisplay.c +++ b/shared-module/displayio/EPaperDisplay.c @@ -116,14 +116,7 @@ void common_hal_displayio_epaperdisplay_construct(displayio_epaperdisplay_obj_t // Set the group after initialization otherwise we may send pixels while we delay in // initialization. - common_hal_displayio_epaperdisplay_show(self, &circuitpython_splash); -} - -bool common_hal_displayio_epaperdisplay_show(displayio_epaperdisplay_obj_t *self, displayio_group_t *root_group) { - if (root_group == NULL) { - root_group = &circuitpython_splash; - } - return displayio_display_core_set_root_group(&self->core, root_group); + common_hal_displayio_epaperdisplay_set_root_group(self, &circuitpython_splash); } bool common_hal_displayio_epaperdisplay_set_root_group(displayio_epaperdisplay_obj_t *self, displayio_group_t *root_group) { @@ -503,6 +496,11 @@ void release_epaperdisplay(displayio_epaperdisplay_obj_t *self) { } } +void displayio_epaperdisplay_reset(displayio_epaperdisplay_obj_t *self) { + displayio_display_core_set_root_group(&self->core, &circuitpython_splash); + self->core.full_refresh = true; +} + void displayio_epaperdisplay_collect_ptrs(displayio_epaperdisplay_obj_t *self) { displayio_display_core_collect_ptrs(&self->core); gc_collect_ptr((void *)self->start_sequence); diff --git a/shared-module/displayio/EPaperDisplay.h b/shared-module/displayio/EPaperDisplay.h index 13cf84dbd310..d527ed2f50cc 100644 --- a/shared-module/displayio/EPaperDisplay.h +++ b/shared-module/displayio/EPaperDisplay.h @@ -62,6 +62,7 @@ typedef struct { void displayio_epaperdisplay_change_refresh_mode_parameters(displayio_epaperdisplay_obj_t *self, mp_buffer_info_t *start_sequence, float seconds_per_frame); void displayio_epaperdisplay_background(displayio_epaperdisplay_obj_t *self); +void displayio_epaperdisplay_reset(displayio_epaperdisplay_obj_t *self); void release_epaperdisplay(displayio_epaperdisplay_obj_t *self); size_t maybe_refresh_epaperdisplay(void); diff --git a/shared-module/displayio/__init__.c b/shared-module/displayio/__init__.c index f01cca781e33..c81dcb18c12f 100644 --- a/shared-module/displayio/__init__.c +++ b/shared-module/displayio/__init__.c @@ -43,6 +43,10 @@ #include "supervisor/spi_flash_api.h" #include "py/mpconfig.h" +#if CIRCUITPY_DOTCLOCKFRAMEBUFFER +#include "shared-bindings/dotclockframebuffer/DotClockFramebuffer.h" +#endif + #if CIRCUITPY_SHARPDISPLAY #include "shared-bindings/sharpdisplay/SharpMemoryFramebuffer.h" #include "shared-module/sharpdisplay/SharpMemoryFramebuffer.h" @@ -133,6 +137,10 @@ void common_hal_displayio_release_displays(void) { common_hal_displayio_fourwire_deinit(&display_buses[i].fourwire_bus); } else if (bus_type == &displayio_i2cdisplay_type) { common_hal_displayio_i2cdisplay_deinit(&display_buses[i].i2cdisplay_bus); + #if CIRCUITPY_DOTCLOCKFRAMEBUFFER + } else if (bus_type == &dotclockframebuffer_framebuffer_type) { + common_hal_dotclockframebuffer_framebuffer_deinit(&display_buses[i].dotclock); + #endif #if CIRCUITPY_PARALLELDISPLAY } else if (bus_type == ¶lleldisplay_parallelbus_type) { common_hal_paralleldisplay_parallelbus_deinit(&display_buses[i].parallel_bus); @@ -294,7 +302,7 @@ void reset_displays(void) { reset_display(&displays[i].display); } else if (display_type == &displayio_epaperdisplay_type) { displayio_epaperdisplay_obj_t *display = &displays[i].epaper_display; - common_hal_displayio_epaperdisplay_show(display, NULL); + displayio_epaperdisplay_reset(display); #if CIRCUITPY_FRAMEBUFFERIO } else if (display_type == &framebufferio_framebufferdisplay_type) { framebufferio_framebufferdisplay_reset(&displays[i].framebuffer_display); diff --git a/shared-module/dotclockframebuffer/__init__.c b/shared-module/dotclockframebuffer/__init__.c new file mode 100644 index 000000000000..1fa2426d2d8f --- /dev/null +++ b/shared-module/dotclockframebuffer/__init__.c @@ -0,0 +1,102 @@ +#include "shared-bindings/dotclockframebuffer/__init__.h" + +#include +#include +#include + +#define DELAY (0x80) + +static void pin_change(dotclockframebuffer_ioexpander_spi_bus *bus, uint32_t set_bits, uint32_t clear_bits) { + uint32_t data = (bus->addr_reg_shadow.u32 & ~clear_bits) | set_bits; + // no way to signal failure to caller! + (void)common_hal_busio_i2c_write(bus->bus, bus->i2c_device_address, (uint8_t *)&data, bus->i2c_write_size); + bus->addr_reg_shadow.u32 = data; +} + +static void ioexpander_bus_send(dotclockframebuffer_ioexpander_spi_bus *bus, + bool is_command, + const uint8_t *data, uint32_t data_length) { + + int dc_mask = is_command ? 0 : 0x100; + for (uint32_t i = 0; i < data_length; i++) { + int bits = data[i] | dc_mask; + + for (uint32_t j = 0; j < 9; j++) { + // CPOL=CPHA=0: output fresh data on falling edge of clk or cs + if (bits & 0x100) { + pin_change(bus, /* set */ bus->mosi_mask, /* clear */ bus->clk_mask | bus->cs_mask); + } else { + pin_change(bus, /* set */ 0, /* clear */ bus->mosi_mask | bus->clk_mask | bus->cs_mask); + } + // Display latches bit on rising edge of CLK + pin_change(bus, /* set */ bus->clk_mask, /* clear */ 0); + + // next bit + bits <<= 1; + } + } +} + +// Send a circuitpython-style display initialization sequence over an i2c-attached bus expander +// This always assumes +// * 9-bit SPI (no DC pin) +// * CPOL=CPHA=0 +// * CS deasserted after each init sequence step, but not otherwise just like +// displayio fourwire bus without data_as_commands +void dotclockframebuffer_ioexpander_send_init_sequence(dotclockframebuffer_ioexpander_spi_bus *bus, const mp_buffer_info_t *i2c_bus_init, const mp_buffer_info_t *display_init) { + while (!common_hal_busio_i2c_try_lock(bus->bus)) { + RUN_BACKGROUND_TASKS; + } + + // send i2c init sequence + { + size_t init_sequence_len = i2c_bus_init->len; + const uint8_t *init_sequence = i2c_bus_init->buf; + + for (size_t i = 0; i < init_sequence_len; /* NO INCREMENT */) { + uint8_t data_size = init_sequence[i]; + const uint8_t *data_ptr = &init_sequence[i + 1]; + (void)common_hal_busio_i2c_write(bus->bus, bus->i2c_device_address, data_ptr, data_size); + i = i + data_size + 1; + } + } + + // ensure deasserted CS and idle CLK (and set other pins according to addr_reg_shadow); enter reset mode if applicable + pin_change(bus, /* set */ bus->cs_mask, /* clear */ bus->clk_mask | bus->reset_mask); + + if (bus->reset_mask) { + mp_hal_delay_ms(10); // reset pulse length + pin_change(bus, /* set */ bus->reset_mask, /* clear */ 0); + mp_hal_delay_ms(100); // display start-up time + } + + size_t init_sequence_len = display_init->len; + const uint8_t *init_sequence = display_init->buf; + + for (size_t i = 0; i < init_sequence_len; /* NO INCREMENT */) { + const uint8_t *cmd = init_sequence + i; + uint8_t data_size = *(cmd + 1); + bool delay = (data_size & DELAY) != 0; + data_size &= ~DELAY; + const uint8_t *data = cmd + 2; + + ioexpander_bus_send(bus, true, cmd, 1); + ioexpander_bus_send(bus, false, data, data_size); + + // idle CLK + pin_change(bus, 0, /* clear */ bus->clk_mask); + // deassert CS + pin_change(bus, /* set */ bus->cs_mask, 0); + + if (delay) { + data_size++; + uint16_t delay_length_ms = *(cmd + 1 + data_size); + if (delay_length_ms == 255) { + delay_length_ms = 500; + } + mp_hal_delay_ms(delay_length_ms); + } + i += 2 + data_size; + } + common_hal_busio_i2c_unlock(bus->bus); +} diff --git a/shared-module/framebufferio/FramebufferDisplay.c b/shared-module/framebufferio/FramebufferDisplay.c index 6db2c3fec10b..df70010a0f3f 100644 --- a/shared-module/framebufferio/FramebufferDisplay.c +++ b/shared-module/framebufferio/FramebufferDisplay.c @@ -85,7 +85,7 @@ void common_hal_framebufferio_framebufferdisplay_construct(framebufferio_framebu } self->framebuffer_protocol->get_bufinfo(self->framebuffer, &self->bufinfo); - size_t framebuffer_size = self->first_pixel_offset + self->row_stride * self->core.height; + size_t framebuffer_size = self->first_pixel_offset + self->row_stride * (self->core.height - 1) + self->core.width * self->core.colorspace.depth / 8; mp_arg_validate_length_min(self->bufinfo.len, framebuffer_size, MP_QSTR_framebuffer); @@ -100,17 +100,10 @@ void common_hal_framebufferio_framebufferdisplay_construct(framebufferio_framebu // Set the group after initialization otherwise we may send pixels while we delay in // initialization. - common_hal_framebufferio_framebufferdisplay_show(self, &circuitpython_splash); + displayio_display_core_set_root_group(&self->core, &circuitpython_splash); common_hal_framebufferio_framebufferdisplay_set_auto_refresh(self, auto_refresh); } -bool common_hal_framebufferio_framebufferdisplay_show(framebufferio_framebufferdisplay_obj_t *self, displayio_group_t *root_group) { - if (root_group == NULL) { - root_group = &circuitpython_splash; - } - return displayio_display_core_set_root_group(&self->core, root_group); -} - uint16_t common_hal_framebufferio_framebufferdisplay_get_width(framebufferio_framebufferdisplay_obj_t *self) { return displayio_display_core_get_width(&self->core); } @@ -252,7 +245,9 @@ STATIC void _refresh_display(framebufferio_framebufferdisplay_obj_t *self) { displayio_display_core_start_refresh(&self->core); const displayio_area_t *current_area = _get_refresh_areas(self); if (current_area) { - uint8_t dirty_row_bitmask[(self->core.height + 7) / 8]; + bool transposed = (self->core.rotation == 90 || self->core.rotation == 270); + int row_count = transposed ? self->core.width : self->core.height; + uint8_t dirty_row_bitmask[(row_count + 7) / 8]; memset(dirty_row_bitmask, 0, sizeof(dirty_row_bitmask)); self->framebuffer_protocol->get_bufinfo(self->framebuffer, &self->bufinfo); while (current_area != NULL) { @@ -288,7 +283,7 @@ uint16_t common_hal_framebufferio_framebufferdisplay_get_rotation(framebufferio_ bool common_hal_framebufferio_framebufferdisplay_refresh(framebufferio_framebufferdisplay_obj_t *self, uint32_t target_ms_per_frame, uint32_t maximum_ms_per_real_frame) { - if (!self->auto_refresh && !self->first_manual_refresh) { + if (!self->auto_refresh && !self->first_manual_refresh && (target_ms_per_frame != NO_FPS_LIMIT)) { uint64_t current_time = supervisor_ticks_ms64(); uint32_t current_ms_since_real_refresh = current_time - self->core.last_refresh; // Test to see if the real frame time is below our minimum. @@ -358,7 +353,7 @@ void framebufferio_framebufferdisplay_reset(framebufferio_framebufferdisplay_obj const mp_obj_type_t *fb_type = mp_obj_get_type(self->framebuffer); if (fb_type != NULL && fb_type != &mp_type_NoneType) { common_hal_framebufferio_framebufferdisplay_set_auto_refresh(self, true); - common_hal_framebufferio_framebufferdisplay_show(self, NULL); + displayio_display_core_set_root_group(&self->core, &circuitpython_splash); self->core.full_refresh = true; } else { release_framebufferdisplay(self); diff --git a/shared-module/watchdog/__init__.c b/shared-module/watchdog/__init__.c new file mode 100644 index 000000000000..b348647c0699 --- /dev/null +++ b/shared-module/watchdog/__init__.c @@ -0,0 +1,47 @@ +/* + * This file is part of the Micro Python project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2023 MicroDev + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "py/runtime.h" + +#include "shared/runtime/pyexec.h" + +#include "shared-module/watchdog/__init__.h" + +#include "shared-bindings/watchdog/WatchDogTimer.h" +#include "shared-bindings/microcontroller/__init__.h" + +void watchdog_reset(void) { + watchdog_watchdogtimer_obj_t *self = &common_hal_mcu_watchdogtimer_obj; + if (self->mode == WATCHDOGMODE_RESET) { + mp_obj_t exception = pyexec_result()->exception; + if (exception != MP_OBJ_NULL && + exception != MP_OBJ_FROM_PTR(&MP_STATE_VM(mp_kbd_exception)) && + exception != MP_OBJ_FROM_PTR(&MP_STATE_VM(mp_reload_exception))) { + return; + } + } + common_hal_watchdog_deinit(self); +} diff --git a/shared-module/watchdog/__init__.h b/shared-module/watchdog/__init__.h new file mode 100644 index 000000000000..219ccfc7b4f8 --- /dev/null +++ b/shared-module/watchdog/__init__.h @@ -0,0 +1,32 @@ +/* + * This file is part of the Micro Python project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2023 MicroDev + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#ifndef MICROPY_INCLUDED_SHARED_MODULE_WATCHDOG___INIT___H +#define MICROPY_INCLUDED_SHARED_MODULE_WATCHDOG___INIT___H + +extern void watchdog_reset(void); + +#endif // MICROPY_INCLUDED_SHARED_MODULE_WATCHDOG___INIT___H diff --git a/shared/runtime/pyexec.h b/shared/runtime/pyexec.h index 411426eaaa26..d0c012fe4695 100644 --- a/shared/runtime/pyexec.h +++ b/shared/runtime/pyexec.h @@ -67,6 +67,10 @@ extern uint8_t pyexec_repl_active; int pyexec_exit_handler(const void *source, pyexec_result_t *result); #endif +#if CIRCUITPY_WATCHDOG +pyexec_result_t *pyexec_result(void); +#endif + #if MICROPY_REPL_INFO mp_obj_t pyb_set_repl_info(mp_obj_t o_value); MP_DECLARE_CONST_FUN_OBJ_1(pyb_set_repl_info_obj); diff --git a/supervisor/shared/web_workflow/web_workflow.c b/supervisor/shared/web_workflow/web_workflow.c index 2a8133a56203..ecf83b8bcb34 100644 --- a/supervisor/shared/web_workflow/web_workflow.c +++ b/supervisor/shared/web_workflow/web_workflow.c @@ -347,8 +347,7 @@ bool supervisor_start_web_workflow(bool reload) { #if CIRCUITPY_MDNS // Try to start MDNS if the user deinited it. if (mdns.base.type != &mdns_server_type || - common_hal_mdns_server_deinited(&mdns) || - reload) { // Always reconstruct on reload, since we don't know if the net changed. + common_hal_mdns_server_deinited(&mdns)) { mdns_server_construct(&mdns, true); mdns.base.type = &mdns_server_type; if (!common_hal_mdns_server_deinited(&mdns)) { diff --git a/tools/ci_check_duplicate_usb_vid_pid.py b/tools/ci_check_duplicate_usb_vid_pid.py index c311f1fd3a06..b8170aa9e385 100644 --- a/tools/ci_check_duplicate_usb_vid_pid.py +++ b/tools/ci_check_duplicate_usb_vid_pid.py @@ -95,7 +95,9 @@ def check_vid_pid(files, clusterlist): if duplicates are found, and lists the duplicates. """ - usb_pattern = re.compile(r"^CIRCUITPY_USB\s*=\s*0$|^IDF_TARGET = (esp32|esp32c3)$", flags=re.M) + usb_pattern = re.compile( + r"^CIRCUITPY_USB\s*=\s*0$|^IDF_TARGET = (esp32|esp32c3|esp32c6|esp32h2)$", flags=re.M + ) usb_ids = defaultdict(set) for board_config in files: diff --git a/tools/ci_fetch_deps.py b/tools/ci_fetch_deps.py index caaea8cea88e..92b87ba1fa13 100644 --- a/tools/ci_fetch_deps.py +++ b/tools/ci_fetch_deps.py @@ -24,7 +24,7 @@ "cxd56": ["extmod/ulab/", "lib/tinyusb/"], "espressif": [ "extmod/ulab/", - "lib/certificates/nina-fw/", + "lib/certificates/", "lib/protomatter/", "lib/quirc/", "lib/tinyusb/", @@ -37,7 +37,7 @@ "lib/adafruit_floppy/", "lib/mbedtls/", "lib/mp3/", - "lib/certificates/nina-fw/", + "lib/certificates/", "lib/protomatter/", "lib/quirc/", "lib/tinyusb/", diff --git a/tools/ci_set_matrix.py b/tools/ci_set_matrix.py index e5ac80c91269..15a6cb3ab87e 100755 --- a/tools/ci_set_matrix.py +++ b/tools/ci_set_matrix.py @@ -189,23 +189,20 @@ def get_settings(board): # Check frozen files to see if they are in each board if file.startswith("frozen"): - if file in settings.get("FROZEN_MPY_DIRS", ""): + if file in settings["FROZEN_MPY_DIRS"]: boards_to_build.add(board) continue # Check supervisor files # This is useful for limiting workflow changes to the relevant boards if file.startswith("supervisor"): - if file in settings.get("SRC_SUPERVISOR", ""): + if file in settings["SRC_SUPERVISOR"]: boards_to_build.add(board) continue if file.startswith("supervisor/shared/web_workflow/static/"): web_workflow = settings["CIRCUITPY_WEB_WORKFLOW"] - while web_workflow.startswith("$("): - web_workflow = settings[web_workflow[2:-1]] - if web_workflow != "0": boards_to_build.add(board) continue