From 984491a504619928838516603520f759be76a359 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 21 Mar 2022 11:58:13 +0100 Subject: [PATCH 1/3] Add LilyGo TTGO T8 ESP32-S2-WROOM --- .../lilygo_ttgo_t8_s2_wroom/board.cmake | 2 + .../boards/lilygo_ttgo_t8_s2_wroom/board.h | 49 +++++++++++++++++++ .../boards/lilygo_ttgo_t8_s2_wroom/sdkconfig | 7 +++ 3 files changed, 58 insertions(+) create mode 100644 ports/espressif/boards/lilygo_ttgo_t8_s2_wroom/board.cmake create mode 100644 ports/espressif/boards/lilygo_ttgo_t8_s2_wroom/board.h create mode 100644 ports/espressif/boards/lilygo_ttgo_t8_s2_wroom/sdkconfig diff --git a/ports/espressif/boards/lilygo_ttgo_t8_s2_wroom/board.cmake b/ports/espressif/boards/lilygo_ttgo_t8_s2_wroom/board.cmake new file mode 100644 index 000000000..6d7173e92 --- /dev/null +++ b/ports/espressif/boards/lilygo_ttgo_t8_s2_wroom/board.cmake @@ -0,0 +1,2 @@ +# Apply board specific content here +set(IDF_TARGET "esp32s2") diff --git a/ports/espressif/boards/lilygo_ttgo_t8_s2_wroom/board.h b/ports/espressif/boards/lilygo_ttgo_t8_s2_wroom/board.h new file mode 100644 index 000000000..80e5c0e88 --- /dev/null +++ b/ports/espressif/boards/lilygo_ttgo_t8_s2_wroom/board.h @@ -0,0 +1,49 @@ +/* + * The MIT License (MIT) + * + * Copyright (c) 2022 Fabian Affolter + * + * 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 + +//--------------------------------------------------------------------+ +// Button +//--------------------------------------------------------------------+ + +// Enter UF2 mode if GPIO is pressed while 2nd stage bootloader indicator +// is on e.g RGB = Purple. If it is GPIO0, user should not hold this while +// reset since that will instead run the 1st stage ROM bootloader +#define PIN_BUTTON_UF2 0 + +//--------------------------------------------------------------------+ +// USB UF2 +//--------------------------------------------------------------------+ + +#define USB_VID 0x303A // Espressif VID +#define USB_PID 0x80EB // Espressif assigned PID +#define USB_MANUFACTURER "LILYGO" +#define USB_PRODUCT "TTGO_T8_S2_WROOM" + +#define UF2_PRODUCT_NAME USB_MANUFACTURER " " USB_PRODUCT +#define UF2_BOARD_ID "ESP32S2-TTGOS2-WROOM-v1.1" +#define UF2_VOLUME_LABEL "TTGOS2BOOT" +#define UF2_INDEX_URL "http://www.lilygo.cn/prod_view.aspx?TypeId=50063&Id=1320&FId=t3:50063:3" + diff --git a/ports/espressif/boards/lilygo_ttgo_t8_s2_wroom/sdkconfig b/ports/espressif/boards/lilygo_ttgo_t8_s2_wroom/sdkconfig new file mode 100644 index 000000000..33a8c772b --- /dev/null +++ b/ports/espressif/boards/lilygo_ttgo_t8_s2_wroom/sdkconfig @@ -0,0 +1,7 @@ +# Board Specific Config + +# Partition Table +CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB.csv" + +# Serial flasher config +CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y From ab4aca4298b808c45e007807e857918e8be92f73 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 21 Mar 2022 11:58:35 +0100 Subject: [PATCH 2/3] Add entry for LilyGo TTGO T8 ESP32-S2-WROOM --- ports/espressif/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/espressif/README.md b/ports/espressif/README.md index 3061c9cfe..f151cb2e6 100644 --- a/ports/espressif/README.md +++ b/ports/espressif/README.md @@ -11,6 +11,7 @@ Following boards are supported: - [Espressif Saola 1R (WROVER) and 1M (WROOM)](https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/hw-reference/esp32s2/user-guide-saola-1-v1.2.html) - [Gravitech Cucumber RIS ESP32-S2 w/Sensors ](https://www.gravitech.us/curisdebowis.html) - [LILYGO® TTGO T8 ESP32-S2 V1.1 ST7789 ](http://www.lilygo.cn/prod_view.aspx?TypeId=50033&Id=1321&FId=t3:50033:3) +- [LILYGO® TTGO T8 ESP32-S2-WROOM](http://www.lilygo.cn/prod_view.aspx?TypeId=50063&Id=1320&FId=t3:50063:3) - [LOLIN Wemos® S2 Pico](https://www.wemos.cc/en/latest/s2/s2_pico.html) - [MicroDev microS2](https://github.com/microDev1/microS2/wiki) - [Morpheans MorphESP-240](https://github.com/ccadic/ESP32-S2-DevBoardTFT) or [MorphESP CrowdSupply](https://www.crowdsupply.com/morpheans/morphesp-240) From d15080956c0699df0a1686e6efea6629eecb425b Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 21 Mar 2022 11:58:48 +0100 Subject: [PATCH 3/3] Add entry for LilyGo TTGO T8 ESP32-S2-WROOM --- .github/workflows/build_esp32.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build_esp32.yml b/.github/workflows/build_esp32.yml index df9772d8a..271cf0ed5 100644 --- a/.github/workflows/build_esp32.yml +++ b/.github/workflows/build_esp32.yml @@ -38,6 +38,7 @@ jobs: - 'gravitech_cucumberRIS_v1.1' - 'hexky_s2' - 'lilygo_ttgo_t8_s2_st7789' + - 'lilygo_ttgo_t8_s2_wroom' - 'lolin_s2_mini' - 'lolin_s2_pico' - 'microdev_micro_s2'