Skip to content

Added support for heltec_wifi_lora_32_V3 and heltec_wifi_kit_32_V3 #7410

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Dec 21, 2022
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
241 changes: 241 additions & 0 deletions boards.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11383,6 +11383,105 @@ heltec_wifi_kit_32.menu.EraseFlash.all.upload.erase_cmd=-e

##############################################################

heltec_wifi_kit_32_V3.name=heltec WiFi Kit 32(V3)

heltec_wifi_kit_32_V3.vid.0=0x303a
heltec_wifi_kit_32_V3.pid.0=0x1001

heltec_wifi_kit_32_V3.bootloader.tool=esptool_py
heltec_wifi_kit_32_V3.bootloader.tool.default=esptool_py

heltec_wifi_kit_32_V3.upload.tool=esptool_py
heltec_wifi_kit_32_V3.upload.tool.default=esptool_py
heltec_wifi_kit_32_V3.upload.tool.network=esp_ota

heltec_wifi_kit_32_V3.upload.maximum_size=1310720
heltec_wifi_kit_32_V3.upload.maximum_data_size=327680
heltec_wifi_kit_32_V3.upload.flags=
heltec_wifi_kit_32_V3.upload.extra_flags=
heltec_wifi_kit_32_V3.upload.use_1200bps_touch=false
heltec_wifi_kit_32_V3.upload.wait_for_upload_port=false

heltec_wifi_kit_32_V3.serial.disableDTR=false
heltec_wifi_kit_32_V3.serial.disableRTS=false

heltec_wifi_kit_32_V3.build.tarch=xtensa
heltec_wifi_kit_32_V3.build.bootloader_addr=0x0
heltec_wifi_kit_32_V3.build.target=esp32s3
heltec_wifi_kit_32_V3.build.mcu=esp32s3
heltec_wifi_kit_32_V3.build.core=esp32
heltec_wifi_kit_32_V3.build.variant=heltec_wifi_kit_32_V3
heltec_wifi_kit_32_V3.build.board=heltec_wifi_kit_32_V3

heltec_wifi_kit_32_V3.build.usb_mode=1
heltec_wifi_kit_32_V3.build.cdc_on_boot=0
heltec_wifi_kit_32_V3.build.msc_on_boot=0
heltec_wifi_kit_32_V3.build.dfu_on_boot=0
heltec_wifi_kit_32_V3.build.f_cpu=240000000L
heltec_wifi_kit_32_V3.build.flash_size=8MB
heltec_wifi_kit_32_V3.build.flash_freq=80m
heltec_wifi_kit_32_V3.build.flash_mode=dio
heltec_wifi_kit_32_V3.build.boot=qio
heltec_wifi_kit_32_V3.build.boot_freq=80m
heltec_wifi_kit_32_V3.build.partitions=default_8MB
heltec_wifi_kit_32_V3.build.loop_core=
heltec_wifi_kit_32_V3.build.event_core=
heltec_wifi_kit_32_V3.build.psram_type=qspi
heltec_wifi_kit_32_V3.build.memory_type={build.boot}_{build.psram_type}

heltec_wifi_kit_32_V3.menu.LoopCore.1=Core 1
heltec_wifi_kit_32_V3.menu.LoopCore.1.build.loop_core=-DARDUINO_RUNNING_CORE=1
heltec_wifi_kit_32_V3.menu.LoopCore.0=Core 0
heltec_wifi_kit_32_V3.menu.LoopCore.0.build.loop_core=-DARDUINO_RUNNING_CORE=0

heltec_wifi_kit_32_V3.menu.EventsCore.1=Core 1
heltec_wifi_kit_32_V3.menu.EventsCore.1.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=1
heltec_wifi_kit_32_V3.menu.EventsCore.0=Core 0
heltec_wifi_kit_32_V3.menu.EventsCore.0.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=0

heltec_wifi_kit_32_V3.menu.CPUFreq.240=240MHz (WiFi)
heltec_wifi_kit_32_V3.menu.CPUFreq.240.build.f_cpu=240000000L
heltec_wifi_kit_32_V3.menu.CPUFreq.160=160MHz (WiFi)
heltec_wifi_kit_32_V3.menu.CPUFreq.160.build.f_cpu=160000000L
heltec_wifi_kit_32_V3.menu.CPUFreq.80=80MHz (WiFi)
heltec_wifi_kit_32_V3.menu.CPUFreq.80.build.f_cpu=80000000L
heltec_wifi_kit_32_V3.menu.CPUFreq.40=40MHz
heltec_wifi_kit_32_V3.menu.CPUFreq.40.build.f_cpu=40000000L
heltec_wifi_kit_32_V3.menu.CPUFreq.20=20MHz
heltec_wifi_kit_32_V3.menu.CPUFreq.20.build.f_cpu=20000000L
heltec_wifi_kit_32_V3.menu.CPUFreq.10=10MHz
heltec_wifi_kit_32_V3.menu.CPUFreq.10.build.f_cpu=10000000L

heltec_wifi_kit_32_V3.menu.UploadSpeed.921600=921600
heltec_wifi_kit_32_V3.menu.UploadSpeed.921600.upload.speed=921600
heltec_wifi_kit_32_V3.menu.UploadSpeed.115200=115200
heltec_wifi_kit_32_V3.menu.UploadSpeed.115200.upload.speed=115200
heltec_wifi_kit_32_V3.menu.UploadSpeed.256000.windows=256000
heltec_wifi_kit_32_V3.menu.UploadSpeed.256000.upload.speed=256000
heltec_wifi_kit_32_V3.menu.UploadSpeed.230400.windows.upload.speed=256000
heltec_wifi_kit_32_V3.menu.UploadSpeed.230400=230400
heltec_wifi_kit_32_V3.menu.UploadSpeed.230400.upload.speed=230400
heltec_wifi_kit_32_V3.menu.UploadSpeed.460800.linux=460800
heltec_wifi_kit_32_V3.menu.UploadSpeed.460800.macosx=460800
heltec_wifi_kit_32_V3.menu.UploadSpeed.460800.upload.speed=460800
heltec_wifi_kit_32_V3.menu.UploadSpeed.512000.windows=512000
heltec_wifi_kit_32_V3.menu.UploadSpeed.512000.upload.speed=512000

heltec_wifi_kit_32_V3.menu.DebugLevel.none=None
heltec_wifi_kit_32_V3.menu.DebugLevel.none.build.code_debug=0
heltec_wifi_kit_32_V3.menu.DebugLevel.error=Error
heltec_wifi_kit_32_V3.menu.DebugLevel.error.build.code_debug=1
heltec_wifi_kit_32_V3.menu.DebugLevel.warn=Warn
heltec_wifi_kit_32_V3.menu.DebugLevel.warn.build.code_debug=2
heltec_wifi_kit_32_V3.menu.DebugLevel.info=Info
heltec_wifi_kit_32_V3.menu.DebugLevel.info.build.code_debug=3
heltec_wifi_kit_32_V3.menu.DebugLevel.debug=Debug
heltec_wifi_kit_32_V3.menu.DebugLevel.debug.build.code_debug=4
heltec_wifi_kit_32_V3.menu.DebugLevel.verbose=Verbose
heltec_wifi_kit_32_V3.menu.DebugLevel.verbose.build.code_debug=5

##############################################################

heltec_wifi_lora_32.name=Heltec WiFi LoRa 32

heltec_wifi_lora_32.bootloader.tool=esptool_py
Expand Down Expand Up @@ -11632,6 +11731,148 @@ heltec_wifi_lora_32_V2.menu.EraseFlash.all.upload.erase_cmd=-e

##############################################################

heltec_wifi_lora_V3.name=Heltec WiFi LoRa 32(V3) / Wireless shell(V3) / Wireless stick lite (V3)
heltec_wifi_lora_V3.vid.0=0x303a
heltec_wifi_lora_V3.pid.0=0x1001

heltec_wifi_lora_V3.bootloader.tool=esptool_py
heltec_wifi_lora_V3.bootloader.tool.default=esptool_py

heltec_wifi_lora_V3.upload.tool=esptool_py
heltec_wifi_lora_V3.upload.tool.default=esptool_py
heltec_wifi_lora_V3.upload.tool.network=esp_ota

heltec_wifi_lora_V3.upload.maximum_size=1310720
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here. When partition is fixed to default_8MB, I can't see that upload.maximus_size corresponds to the partition default_8MB.

esp32s3.menu.PartitionScheme.default_8MB.upload.maximum_size=3342336

heltec_wifi_lora_V3.upload.maximum_data_size=327680
heltec_wifi_lora_V3.upload.flags=
heltec_wifi_lora_V3.upload.extra_flags=
heltec_wifi_lora_V3.upload.use_1200bps_touch=false
heltec_wifi_lora_V3.upload.wait_for_upload_port=false

heltec_wifi_lora_V3.serial.disableDTR=false
heltec_wifi_lora_V3.serial.disableRTS=false

heltec_wifi_lora_V3.build.tarch=xtensa
heltec_wifi_lora_V3.build.bootloader_addr=0x0
heltec_wifi_lora_V3.build.target=esp32s3
heltec_wifi_lora_V3.build.mcu=esp32s3
heltec_wifi_lora_V3.build.core=esp32
heltec_wifi_lora_V3.build.variant=heltec_heltec_wifi_lora_V3
heltec_wifi_lora_V3.build.board=heltec_heltec_wifi_lora_V3

heltec_wifi_lora_V3.build.usb_mode=1
heltec_wifi_lora_V3.build.cdc_on_boot=0
heltec_wifi_lora_V3.build.msc_on_boot=0
heltec_wifi_lora_V3.build.dfu_on_boot=0
heltec_wifi_lora_V3.build.f_cpu=240000000L
heltec_wifi_lora_V3.build.flash_size=8MB
heltec_wifi_lora_V3.build.flash_freq=80m
heltec_wifi_lora_V3.build.flash_mode=dio
heltec_wifi_lora_V3.build.boot=qio
heltec_wifi_lora_V3.build.boot_freq=80m
heltec_wifi_lora_V3.build.partitions=default_8MB
heltec_wifi_lora_V3.build.loop_core=
heltec_wifi_lora_V3.build.event_core=
heltec_wifi_lora_V3.build.psram_type=qspi
heltec_wifi_lora_V3.build.memory_type={build.boot}_{build.psram_type}

heltec_wifi_lora_V3.menu.LoopCore.1=Core 1
heltec_wifi_lora_V3.menu.LoopCore.1.build.loop_core=-DARDUINO_RUNNING_CORE=1
heltec_wifi_lora_V3.menu.LoopCore.0=Core 0
heltec_wifi_lora_V3.menu.LoopCore.0.build.loop_core=-DARDUINO_RUNNING_CORE=0

heltec_wifi_lora_V3.menu.EventsCore.1=Core 1
heltec_wifi_lora_V3.menu.EventsCore.1.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=1
heltec_wifi_lora_V3.menu.EventsCore.0=Core 0
heltec_wifi_lora_V3.menu.EventsCore.0.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=0

heltec_wifi_lora_V3.menu.CPUFreq.240=240MHz (WiFi)
heltec_wifi_lora_V3.menu.CPUFreq.240.build.f_cpu=240000000L
heltec_wifi_lora_V3.menu.CPUFreq.160=160MHz (WiFi)
heltec_wifi_lora_V3.menu.CPUFreq.160.build.f_cpu=160000000L
heltec_wifi_lora_V3.menu.CPUFreq.80=80MHz (WiFi)
heltec_wifi_lora_V3.menu.CPUFreq.80.build.f_cpu=80000000L
heltec_wifi_lora_V3.menu.CPUFreq.40=40MHz
heltec_wifi_lora_V3.menu.CPUFreq.40.build.f_cpu=40000000L
heltec_wifi_lora_V3.menu.CPUFreq.20=20MHz
heltec_wifi_lora_V3.menu.CPUFreq.20.build.f_cpu=20000000L
heltec_wifi_lora_V3.menu.CPUFreq.10=10MHz
heltec_wifi_lora_V3.menu.CPUFreq.10.build.f_cpu=10000000L

heltec_wifi_lora_V3.menu.UploadSpeed.921600=921600
heltec_wifi_lora_V3.menu.UploadSpeed.921600.upload.speed=921600
heltec_wifi_lora_V3.menu.UploadSpeed.115200=115200
heltec_wifi_lora_V3.menu.UploadSpeed.115200.upload.speed=115200
heltec_wifi_lora_V3.menu.UploadSpeed.256000.windows=256000
heltec_wifi_lora_V3.menu.UploadSpeed.256000.upload.speed=256000
heltec_wifi_lora_V3.menu.UploadSpeed.230400.windows.upload.speed=256000
heltec_wifi_lora_V3.menu.UploadSpeed.230400=230400
heltec_wifi_lora_V3.menu.UploadSpeed.230400.upload.speed=230400
heltec_wifi_lora_V3.menu.UploadSpeed.460800.linux=460800
heltec_wifi_lora_V3.menu.UploadSpeed.460800.macosx=460800
heltec_wifi_lora_V3.menu.UploadSpeed.460800.upload.speed=460800
heltec_wifi_lora_V3.menu.UploadSpeed.512000.windows=512000
heltec_wifi_lora_V3.menu.UploadSpeed.512000.upload.speed=512000

heltec_wifi_lora_V3.menu.DebugLevel.none=None
heltec_wifi_lora_V3.menu.DebugLevel.none.build.code_debug=0
heltec_wifi_lora_V3.menu.DebugLevel.error=Error
heltec_wifi_lora_V3.menu.DebugLevel.error.build.code_debug=1
heltec_wifi_lora_V3.menu.DebugLevel.warn=Warn
heltec_wifi_lora_V3.menu.DebugLevel.warn.build.code_debug=2
heltec_wifi_lora_V3.menu.DebugLevel.info=Info
heltec_wifi_lora_V3.menu.DebugLevel.info.build.code_debug=3
heltec_wifi_lora_V3.menu.DebugLevel.debug=Debug
heltec_wifi_lora_V3.menu.DebugLevel.debug.build.code_debug=4
heltec_wifi_lora_V3.menu.DebugLevel.verbose=Verbose
heltec_wifi_lora_V3.menu.DebugLevel.verbose.build.code_debug=5

heltec_wifi_lora_V3.menu.LORAWAN_REGION.0=REGION_EU868
heltec_wifi_lora_V3.menu.LORAWAN_REGION.0.build.band=REGION_EU868
heltec_wifi_lora_V3.menu.LORAWAN_REGION.1=REGION_EU433
heltec_wifi_lora_V3.menu.LORAWAN_REGION.1.build.band=REGION_EU433
heltec_wifi_lora_V3.menu.LORAWAN_REGION.2=REGION_CN470
heltec_wifi_lora_V3.menu.LORAWAN_REGION.2.build.band=REGION_CN470
heltec_wifi_lora_V3.menu.LORAWAN_REGION.3=REGION_US915
heltec_wifi_lora_V3.menu.LORAWAN_REGION.3.build.band=REGION_US915
heltec_wifi_lora_V3.menu.LORAWAN_REGION.4=REGION_AU915
heltec_wifi_lora_V3.menu.LORAWAN_REGION.4.build.band=REGION_AU915
heltec_wifi_lora_V3.menu.LORAWAN_REGION.5=REGION_CN779
heltec_wifi_lora_V3.menu.LORAWAN_REGION.5.build.band=REGION_CN779
heltec_wifi_lora_V3.menu.LORAWAN_REGION.6=REGION_AS923
heltec_wifi_lora_V3.menu.LORAWAN_REGION.6.build.band=REGION_AS923
heltec_wifi_lora_V3.menu.LORAWAN_REGION.7=REGION_KR920
heltec_wifi_lora_V3.menu.LORAWAN_REGION.7.build.band=REGION_KR920
heltec_wifi_lora_V3.menu.LORAWAN_REGION.8=REGION_IN865
heltec_wifi_lora_V3.menu.LORAWAN_REGION.8.build.band=REGION_IN865
heltec_wifi_lora_V3.menu.LORAWAN_REGION.9=REGION_US915_HYBRID
heltec_wifi_lora_V3.menu.LORAWAN_REGION.9.build.band=REGION_US915_HYBRID

heltec_wifi_lora_V3.menu.LoRaWanDebugLevel.0=None
heltec_wifi_lora_V3.menu.LoRaWanDebugLevel.0.build.LoRaWanDebugLevel=0
heltec_wifi_lora_V3.menu.LoRaWanDebugLevel.1=Freq
heltec_wifi_lora_V3.menu.LoRaWanDebugLevel.1.build.LoRaWanDebugLevel=1
heltec_wifi_lora_V3.menu.LoRaWanDebugLevel.2=Freq && DIO
heltec_wifi_lora_V3.menu.LoRaWanDebugLevel.2.build.LoRaWanDebugLevel=2
heltec_wifi_lora_V3.menu.LoRaWanDebugLevel.3=Freq && DIO && PW
heltec_wifi_lora_V3.menu.LoRaWanDebugLevel.3.build.LoRaWanDebugLevel=3

heltec_wifi_lora_V3.menu.LORAWAN_DEVEUI.0=CUSTOM
heltec_wifi_lora_V3.menu.LORAWAN_DEVEUI.0.build.LORAWAN_DEVEUI_AUTO=0
heltec_wifi_lora_V3.menu.LORAWAN_DEVEUI.1=Generate By ChipID
heltec_wifi_lora_V3.menu.LORAWAN_DEVEUI.1.build.LORAWAN_DEVEUI_AUTO=1

heltec_wifi_lora_V3.menu.LORAWAN_PREAMBLE_LENGTH.0=8(default)
heltec_wifi_lora_V3.menu.LORAWAN_PREAMBLE_LENGTH.0.build.LORAWAN_PREAMBLE_LENGTH=8
heltec_wifi_lora_V3.menu.LORAWAN_PREAMBLE_LENGTH.1=16(For M00 and M00L)
heltec_wifi_lora_V3.menu.LORAWAN_PREAMBLE_LENGTH.1.build.LORAWAN_PREAMBLE_LENGTH=16

heltec_wifi_lora_V3.build.defines=-D{build.band} -DLoRaWAN_DEBUG_LEVEL={build.LoRaWanDebugLevel} -DACTIVE_REGION=LORAMAC_{build.band} -DLORAWAN_PREAMBLE_LENGTH={build.LORAWAN_PREAMBLE_LENGTH} -DLORAWAN_DEVEUI_AUTO={build.LORAWAN_DEVEUI_AUTO} -D{build.board}
heltec_wifi_lora_V3.build.extra_libs=-lheltec

##############################################################


heltec_wireless_stick.name=Heltec Wireless Stick

heltec_wireless_stick.bootloader.tool=esptool_py
Expand Down
75 changes: 75 additions & 0 deletions variants/heltec_wifi_kit_32_v3/pins_arduino.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
#ifndef Pins_Arduino_h
#define Pins_Arduino_h

#include <stdint.h>

#define WIFI_Kit_32_V3 true
#define DISPLAY_HEIGHT 64
#define DISPLAY_WIDTH 128

#define EXTERNAL_NUM_INTERRUPTS 16
#define NUM_DIGITAL_PINS 40
#define NUM_ANALOG_INPUTS 16

#define analogInputToDigitalPin(p) (((p)<20)?(analogChannelToDigitalPin(p)):-1)
#define digitalPinToInterrupt(p) (((p)<40)?(p):-1)
#define digitalPinHasPWM(p) (p < 34)

static const uint8_t LED_BUILTIN = 25;
#define BUILTIN_LED LED_BUILTIN // backward compatibility
#define LED_BUILTIN LED_BUILTIN

static const uint8_t KEY_BUILTIN = 0;

static const uint8_t TX = 1;
static const uint8_t RX = 3;

static const uint8_t SDA = 21;
static const uint8_t SCL = 22;

static const uint8_t SS = 5;
static const uint8_t MOSI = 23;
static const uint8_t MISO = 19;
static const uint8_t SCK = 18;

static const uint8_t A0 = 36;
static const uint8_t A1 = 37;
static const uint8_t A2 = 38;
static const uint8_t A3 = 39;
static const uint8_t A4 = 32;
static const uint8_t A5 = 33;
static const uint8_t A6 = 34;
static const uint8_t A7 = 35;

static const uint8_t A10 = 4;
static const uint8_t A11 = 0;
static const uint8_t A12 = 2;
static const uint8_t A13 = 15;
static const uint8_t A14 = 13;
static const uint8_t A15 = 12;
static const uint8_t A16 = 14;
static const uint8_t A17 = 27;
static const uint8_t A18 = 25;
static const uint8_t A19 = 26;

static const uint8_t T0 = 4;
static const uint8_t T1 = 0;
static const uint8_t T2 = 2;
static const uint8_t T3 = 15;
static const uint8_t T4 = 13;
static const uint8_t T5 = 12;
static const uint8_t T6 = 14;
static const uint8_t T7 = 27;
static const uint8_t T8 = 33;
static const uint8_t T9 = 32;

static const uint8_t DAC1 = 25;
static const uint8_t DAC2 = 26;

static const uint8_t Vext = 36;
static const uint8_t LED = 35;
static const uint8_t RST_OLED = 21;
static const uint8_t SCL_OLED = 18;
static const uint8_t SDA_OLED = 17;

#endif /* Pins_Arduino_h */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add new line at the end of the file to keep standart formatting.

Loading