From cff9dd13d85af1076d712f45e317efc863de7293 Mon Sep 17 00:00:00 2001 From: Linar Yusupov Date: Thu, 20 Jul 2023 18:34:38 +0300 Subject: [PATCH] Add Heltec Wireless Tracker --- .github/workflows/build_esp32.yml | 1 + ports/espressif/README.md | 3 + .../heltec_wireless_tracker/board.cmake | 2 + .../boards/heltec_wireless_tracker/board.h | 60 +++++++++++++++++++ .../boards/heltec_wireless_tracker/sdkconfig | 7 +++ 5 files changed, 73 insertions(+) create mode 100644 ports/espressif/boards/heltec_wireless_tracker/board.cmake create mode 100644 ports/espressif/boards/heltec_wireless_tracker/board.h create mode 100644 ports/espressif/boards/heltec_wireless_tracker/sdkconfig diff --git a/.github/workflows/build_esp32.yml b/.github/workflows/build_esp32.yml index 99ce78c04..0be51cfee 100644 --- a/.github/workflows/build_esp32.yml +++ b/.github/workflows/build_esp32.yml @@ -82,6 +82,7 @@ jobs: - 'espressif_esp32s3_devkitc_1' - 'espressif_esp32s3_devkitm_1' - 'espressif_esp32s3_eye' + - 'heltec_wireless_tracker' - 'lilygo_ttgo_t_twr_plus' - 'lilygo_ttgo_tbeam_s3' - 'lolin_s3' diff --git a/ports/espressif/README.md b/ports/espressif/README.md index 1f39f7264..54c5156b5 100644 --- a/ports/espressif/README.md +++ b/ports/espressif/README.md @@ -13,9 +13,12 @@ Following boards are supported: - [Espressif HMI 1](https://github.com/espressif/esp-dev-kits/tree/master/esp32-s2-hmi-devkit-1) - [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) +- [Heltec Wireless Tracker](https://heltec.org/project/wireless-tracker) - [LILYGO® TTGO T8 ESP32-S2 V1.1](http://www.lilygo.cn/prod_view.aspx?TypeId=50063&Id=1300&FId=t3:50063:3) - [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) +- [LILYGO® TTGO T-Beam Supreme](https://www.lilygo.cc/products/softrf-t-beamsupreme) +- [LILYGO® TTGO T-TWR Plus](https://www.lilygo.cc/products/t-twr-plus) - [LOLIN Wemos® S2 Pico](https://www.wemos.cc/en/latest/s2/s2_pico.html) - [Maker badge](https://github.com/dronecz/maker_badge) - [MicroDev microS2](https://github.com/microDev1/microS2/wiki) diff --git a/ports/espressif/boards/heltec_wireless_tracker/board.cmake b/ports/espressif/boards/heltec_wireless_tracker/board.cmake new file mode 100644 index 000000000..c1426c950 --- /dev/null +++ b/ports/espressif/boards/heltec_wireless_tracker/board.cmake @@ -0,0 +1,2 @@ +# Apply board specific content here +set(IDF_TARGET "esp32s3") diff --git a/ports/espressif/boards/heltec_wireless_tracker/board.h b/ports/espressif/boards/heltec_wireless_tracker/board.h new file mode 100644 index 000000000..bbf1d3953 --- /dev/null +++ b/ports/espressif/boards/heltec_wireless_tracker/board.h @@ -0,0 +1,60 @@ +/* + * The MIT License (MIT) + * + * Copyright (c) 2020 Ha Thach (tinyusb.org) for Adafruit Industries + * Copyright (c) 2023 Linar Yusupov + * + * 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 + +// Initial delay in milliseconds to detect user interaction to enter UF2 +#define UF2_DETECTION_DELAY_MS 1000 + +//--------------------------------------------------------------------+ +// LED +//--------------------------------------------------------------------+ + +// LED for indicator and writing flash +#define LED_PIN 18 +#define LED_STATE_ON 1 + +//--------------------------------------------------------------------+ +// USB UF2 +//--------------------------------------------------------------------+ + +#define USB_VID 0x303A // Espressif VID +#define USB_PID 0x81A1 // Espressif assigned PID +#define USB_MANUFACTURER "Heltec" +#define USB_PRODUCT "Wireless Tracker" + +#define UF2_PRODUCT_NAME USB_MANUFACTURER " " USB_PRODUCT +#define UF2_BOARD_ID "ESP32S3-HTIT-v1.0" +#define UF2_VOLUME_LABEL "HTBOOT" +#define UF2_INDEX_URL "https://heltec.org/project/wireless-tracker" diff --git a/ports/espressif/boards/heltec_wireless_tracker/sdkconfig b/ports/espressif/boards/heltec_wireless_tracker/sdkconfig new file mode 100644 index 000000000..329b9a9f2 --- /dev/null +++ b/ports/espressif/boards/heltec_wireless_tracker/sdkconfig @@ -0,0 +1,7 @@ +# Board Specific Config + +# Partition Table +CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-8MB.csv" + +# Serial flasher config +CONFIG_ESPTOOLPY_FLASHSIZE_8MB=y