Skip to content

Commit be855a1

Browse files
Update Heltec ESP32 series boards definition
1 parent 6b01143 commit be855a1

File tree

7 files changed

+279
-220
lines changed

7 files changed

+279
-220
lines changed

boards.txt

+201-212
Large diffs are not rendered by default.

platform.txt

+3-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ compiler.warning_flags.all=-Wall -Werror=all -Wextra
2222

2323
compiler.path={runtime.tools.xtensa-esp32-elf-gcc.path}/bin/
2424
compiler.sdk.path={runtime.platform.path}/tools/sdk
25-
compiler.cpreprocessor.flags=-DESP_PLATFORM -DMBEDTLS_CONFIG_FILE="mbedtls/esp_config.h" -DHAVE_CONFIG_H -DGCC_NOT_5_2_0=0 -DWITH_POSIX "-I{compiler.sdk.path}/include/config" "-I{compiler.sdk.path}/include/app_trace" "-I{compiler.sdk.path}/include/app_update" "-I{compiler.sdk.path}/include/asio" "-I{compiler.sdk.path}/include/bootloader_support" "-I{compiler.sdk.path}/include/bt" "-I{compiler.sdk.path}/include/coap" "-I{compiler.sdk.path}/include/console" "-I{compiler.sdk.path}/include/driver" "-I{compiler.sdk.path}/include/efuse" "-I{compiler.sdk.path}/include/esp-tls" "-I{compiler.sdk.path}/include/esp32" "-I{compiler.sdk.path}/include/esp_adc_cal" "-I{compiler.sdk.path}/include/esp_event" "-I{compiler.sdk.path}/include/esp_http_client" "-I{compiler.sdk.path}/include/esp_http_server" "-I{compiler.sdk.path}/include/esp_https_ota" "-I{compiler.sdk.path}/include/esp_https_server" "-I{compiler.sdk.path}/include/esp_ringbuf" "-I{compiler.sdk.path}/include/esp_websocket_client" "-I{compiler.sdk.path}/include/espcoredump" "-I{compiler.sdk.path}/include/ethernet" "-I{compiler.sdk.path}/include/expat" "-I{compiler.sdk.path}/include/fatfs" "-I{compiler.sdk.path}/include/freemodbus" "-I{compiler.sdk.path}/include/freertos" "-I{compiler.sdk.path}/include/heap" "-I{compiler.sdk.path}/include/idf_test" "-I{compiler.sdk.path}/include/jsmn" "-I{compiler.sdk.path}/include/json" "-I{compiler.sdk.path}/include/libsodium" "-I{compiler.sdk.path}/include/log" "-I{compiler.sdk.path}/include/lwip" "-I{compiler.sdk.path}/include/mbedtls" "-I{compiler.sdk.path}/include/mdns" "-I{compiler.sdk.path}/include/micro-ecc" "-I{compiler.sdk.path}/include/mqtt" "-I{compiler.sdk.path}/include/newlib" "-I{compiler.sdk.path}/include/nghttp" "-I{compiler.sdk.path}/include/nimble" "-I{compiler.sdk.path}/include/nvs_flash" "-I{compiler.sdk.path}/include/openssl" "-I{compiler.sdk.path}/include/protobuf-c" "-I{compiler.sdk.path}/include/protocomm" "-I{compiler.sdk.path}/include/pthread" "-I{compiler.sdk.path}/include/sdmmc" "-I{compiler.sdk.path}/include/smartconfig_ack" "-I{compiler.sdk.path}/include/soc" "-I{compiler.sdk.path}/include/spi_flash" "-I{compiler.sdk.path}/include/spiffs" "-I{compiler.sdk.path}/include/tcp_transport" "-I{compiler.sdk.path}/include/tcpip_adapter" "-I{compiler.sdk.path}/include/ulp" "-I{compiler.sdk.path}/include/unity" "-I{compiler.sdk.path}/include/vfs" "-I{compiler.sdk.path}/include/wear_levelling" "-I{compiler.sdk.path}/include/wifi_provisioning" "-I{compiler.sdk.path}/include/wpa_supplicant" "-I{compiler.sdk.path}/include/xtensa-debug-module" "-I{compiler.sdk.path}/include/esp-face" "-I{compiler.sdk.path}/include/esp32-camera" "-I{compiler.sdk.path}/include/esp-face" "-I{compiler.sdk.path}/include/fb_gfx"
25+
compiler.cpreprocessor.flags=-DESP_PLATFORM -DMBEDTLS_CONFIG_FILE="mbedtls/esp_config.h" -D{build.band} -DLoRaWAN_DEBUG_LEVEL={build.LoRaWanDebugLevel} -DACTIVE_REGION=LORAMAC_{build.band} -DHAVE_CONFIG_H -DGCC_NOT_5_2_0=0 -DWITH_POSIX "-I{compiler.sdk.path}/include/config" "-I{compiler.sdk.path}/include/app_trace" "-I{compiler.sdk.path}/include/app_update" "-I{compiler.sdk.path}/include/asio" "-I{compiler.sdk.path}/include/bootloader_support" "-I{compiler.sdk.path}/include/bt" "-I{compiler.sdk.path}/include/coap" "-I{compiler.sdk.path}/include/console" "-I{compiler.sdk.path}/include/driver" "-I{compiler.sdk.path}/include/efuse" "-I{compiler.sdk.path}/include/esp-tls" "-I{compiler.sdk.path}/include/esp32" "-I{compiler.sdk.path}/include/esp_adc_cal" "-I{compiler.sdk.path}/include/esp_event" "-I{compiler.sdk.path}/include/esp_http_client" "-I{compiler.sdk.path}/include/esp_http_server" "-I{compiler.sdk.path}/include/esp_https_ota" "-I{compiler.sdk.path}/include/esp_https_server" "-I{compiler.sdk.path}/include/esp_ringbuf" "-I{compiler.sdk.path}/include/esp_websocket_client" "-I{compiler.sdk.path}/include/espcoredump" "-I{compiler.sdk.path}/include/ethernet" "-I{compiler.sdk.path}/include/expat" "-I{compiler.sdk.path}/include/fatfs" "-I{compiler.sdk.path}/include/freemodbus" "-I{compiler.sdk.path}/include/freertos" "-I{compiler.sdk.path}/include/heap" "-I{compiler.sdk.path}/include/idf_test" "-I{compiler.sdk.path}/include/jsmn" "-I{compiler.sdk.path}/include/json" "-I{compiler.sdk.path}/include/libsodium" "-I{compiler.sdk.path}/include/log" "-I{compiler.sdk.path}/include/lwip" "-I{compiler.sdk.path}/include/mbedtls" "-I{compiler.sdk.path}/include/mdns" "-I{compiler.sdk.path}/include/micro-ecc" "-I{compiler.sdk.path}/include/mqtt" "-I{compiler.sdk.path}/include/newlib" "-I{compiler.sdk.path}/include/nghttp" "-I{compiler.sdk.path}/include/nimble" "-I{compiler.sdk.path}/include/nvs_flash" "-I{compiler.sdk.path}/include/openssl" "-I{compiler.sdk.path}/include/protobuf-c" "-I{compiler.sdk.path}/include/protocomm" "-I{compiler.sdk.path}/include/pthread" "-I{compiler.sdk.path}/include/sdmmc" "-I{compiler.sdk.path}/include/smartconfig_ack" "-I{compiler.sdk.path}/include/soc" "-I{compiler.sdk.path}/include/spi_flash" "-I{compiler.sdk.path}/include/spiffs" "-I{compiler.sdk.path}/include/tcp_transport" "-I{compiler.sdk.path}/include/tcpip_adapter" "-I{compiler.sdk.path}/include/ulp" "-I{compiler.sdk.path}/include/unity" "-I{compiler.sdk.path}/include/vfs" "-I{compiler.sdk.path}/include/wear_levelling" "-I{compiler.sdk.path}/include/wifi_provisioning" "-I{compiler.sdk.path}/include/wpa_supplicant" "-I{compiler.sdk.path}/include/xtensa-debug-module" "-I{compiler.sdk.path}/include/esp-face" "-I{compiler.sdk.path}/include/esp32-camera" "-I{compiler.sdk.path}/include/esp-face" "-I{compiler.sdk.path}/include/fb_gfx"
2626

2727
compiler.c.cmd=xtensa-esp32-elf-gcc
2828
compiler.c.flags=-std=gnu99 -Os -g3 -fstack-protector -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -mlongcalls -nostdlib -Wpointer-arith {compiler.warning_flags} -Wno-maybe-uninitialized -Wno-unused-function -Wno-unused-but-set-variable -Wno-unused-variable -Wno-deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -Wno-old-style-declaration -MMD -c
@@ -51,6 +51,8 @@ build.flash_size=4MB
5151
build.flash_mode=dio
5252
build.boot=bootloader
5353
build.code_debug=0
54+
build.band=LORAMAC_REGION_EU868
55+
build.LoRaWanDebugLevel=0
5456
build.defines=
5557
build.extra_flags=-DESP32 -DCORE_DEBUG_LEVEL={build.code_debug} {build.defines}
5658

variants/heltec_wifi_kit_32/pins_arduino.h

-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
static const uint8_t LED_BUILTIN = 25;
1919
#define BUILTIN_LED LED_BUILTIN // backward compatibility
20-
#define LED_BUILTIN LED_BUILTIN
2120

2221
static const uint8_t KEY_BUILTIN = 0;
2322

variants/heltec_wifi_lora_32/pins_arduino.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
#include <stdint.h>
55

6-
#define WIFI_LoRa_32
6+
#define WIFI_LoRa_32 true
77
#define DISPLAY_HEIGHT 64
88
#define DISPLAY_WIDTH 128
99

@@ -17,7 +17,6 @@
1717

1818
static const uint8_t LED_BUILTIN = 25;
1919
#define BUILTIN_LED LED_BUILTIN // backward compatibility
20-
#define LED_BUILTIN LED_BUILTIN
2120

2221
static const uint8_t KEY_BUILTIN = 0;
2322

variants/heltec_wifi_lora_32_V2/pins_arduino.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
#include <stdint.h>
55

6-
#define WIFI_LoRa_32_V2
6+
#define WIFI_LoRa_32_V2 true
77
#define DISPLAY_HEIGHT 64
88
#define DISPLAY_WIDTH 128
99

@@ -17,7 +17,6 @@
1717

1818
static const uint8_t LED_BUILTIN = 25;
1919
#define BUILTIN_LED LED_BUILTIN // backward compatibility
20-
#define LED_BUILTIN LED_BUILTIN
2120

2221
static const uint8_t KEY_BUILTIN = 0;
2322

variants/heltec_wireless_stick/pins_arduino.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
#include <stdint.h>
55

6-
#define Wireless_Stick
6+
#define Wireless_Stick true
77
#define DISPLAY_HEIGHT 32
88
#define DISPLAY_WIDTH 64
99

@@ -17,7 +17,6 @@
1717

1818
static const uint8_t LED_BUILTIN = 25;
1919
#define BUILTIN_LED LED_BUILTIN // backward compatibility
20-
#define LED_BUILTIN LED_BUILTIN
2120

2221
static const uint8_t KEY_BUILTIN = 0;
2322

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
#ifndef Pins_Arduino_h
2+
#define Pins_Arduino_h
3+
4+
#include <stdint.h>
5+
6+
#define Wireless_Stick_Lite true
7+
#define DISPLAY_HEIGHT 0
8+
#define DISPLAY_WIDTH 0
9+
10+
#define EXTERNAL_NUM_INTERRUPTS 16
11+
#define NUM_DIGITAL_PINS 40
12+
#define NUM_ANALOG_INPUTS 16
13+
14+
#define analogInputToDigitalPin(p) (((p)<20)?(esp32_adc2gpio[(p)]):-1)
15+
#define digitalPinToInterrupt(p) (((p)<40)?(p):-1)
16+
#define digitalPinHasPWM(p) (p < 34)
17+
18+
static const uint8_t LED_BUILTIN = 25;
19+
#define BUILTIN_LED LED_BUILTIN // backward compatibility
20+
21+
static const uint8_t KEY_BUILTIN = 0;
22+
23+
static const uint8_t TX = 1;
24+
static const uint8_t RX = 3;
25+
26+
static const uint8_t SDA = 21;
27+
static const uint8_t SCL = 22;
28+
29+
static const uint8_t SS = 18;
30+
static const uint8_t MOSI = 27;
31+
static const uint8_t MISO = 19;
32+
static const uint8_t SCK = 5;
33+
34+
static const uint8_t A0 = 36;
35+
static const uint8_t A3 = 39;
36+
static const uint8_t A4 = 32;
37+
static const uint8_t A5 = 33;
38+
static const uint8_t A6 = 34;
39+
static const uint8_t A7 = 35;
40+
static const uint8_t A10 = 4;
41+
static const uint8_t A11 = 0;
42+
static const uint8_t A12 = 2;
43+
static const uint8_t A13 = 15;
44+
static const uint8_t A14 = 13;
45+
static const uint8_t A15 = 12;
46+
static const uint8_t A16 = 14;
47+
static const uint8_t A17 = 27;
48+
static const uint8_t A18 = 25;
49+
static const uint8_t A19 = 26;
50+
51+
static const uint8_t T0 = 4;
52+
static const uint8_t T1 = 0;
53+
static const uint8_t T2 = 2;
54+
static const uint8_t T3 = 15;
55+
static const uint8_t T4 = 13;
56+
static const uint8_t T5 = 12;
57+
static const uint8_t T6 = 14;
58+
static const uint8_t T7 = 27;
59+
static const uint8_t T8 = 33;
60+
static const uint8_t T9 = 32;
61+
62+
static const uint8_t DAC1 = 25;
63+
static const uint8_t DAC2 = 26;
64+
65+
static const uint8_t Vext = 21;
66+
static const uint8_t LED = 25;
67+
static const uint8_t RST_LoRa = 14;
68+
static const uint8_t DIO0 = 26;
69+
static const uint8_t DIO1 = 35;
70+
static const uint8_t DIO2 = 34;
71+
72+
#endif /* Pins_Arduino_h */

0 commit comments

Comments
 (0)