Skip to content

Commit

Permalink
New version of the ESP32-EVB/Gateway/PoE boards (#2397)
Browse files Browse the repository at this point in the history
In Board.txt file added board revision submenu to distinguish the different revisions of the same board. By selecting different revision in the Arduino menu different value of the predefined macro will be applied which is used inside the pins_arduino.h file to make different defines and values for the specific revision.
In addition to this esp32-poe pin definitions is added ethernet power enable pin and also defined macro: BOARD_HAS_1BIT_SDMMC
  • Loading branch information
Stanimir-Petev authored and me-no-dev committed Feb 14, 2019
1 parent f6b9e9c commit c1344ae
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 1 deletion.
36 changes: 35 additions & 1 deletion boards.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ menu.FlashSize=Flash Size
menu.PartitionScheme=Partition Scheme
menu.DebugLevel=Core Debug Level
menu.PSRAM=PSRAM
menu.Revision=Board Revision

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

Expand Down Expand Up @@ -1697,6 +1698,15 @@ esp32-evb.menu.FlashFreq.40.build.flash_freq=40m
esp32-evb.menu.UploadSpeed.115200=115200
esp32-evb.menu.UploadSpeed.115200.upload.speed=115200

esp32-evb.menu.PartitionScheme.default=Default
esp32-evb.menu.PartitionScheme.default.build.partitions=default
esp32-evb.menu.PartitionScheme.no_ota=No OTA (Large APP)
esp32-evb.menu.PartitionScheme.no_ota.build.partitions=no_ota
esp32-evb.menu.PartitionScheme.no_ota.upload.maximum_size=2097152
esp32-evb.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (Large APPS with OTA)
esp32-evb.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs
esp32-evb.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080

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

esp32-gateway.name=OLIMEX ESP32-GATEWAY
Expand All @@ -1712,7 +1722,13 @@ esp32-gateway.serial.disableRTS=true
esp32-gateway.build.mcu=esp32
esp32-gateway.build.core=esp32
esp32-gateway.build.variant=esp32-gateway
esp32-gateway.build.board=ESP32_GATEWAY
#esp32-gateway.build.board=ESP32_GATEWAY
esp32-gateway.menu.Revision.RevC=Revision C or older
esp32-gateway.menu.Revision.RevC.build.board=ESP32_GATEWAY='C'
esp32-gateway.menu.Revision.RevE=Revision E
esp32-gateway.menu.Revision.RevE.build.board=ESP32_GATEWAY='E'
esp32-gateway.menu.Revision.RevF=Revision F
esp32-gateway.menu.Revision.RevF.build.board=ESP32_GATEWAY='F'

esp32-gateway.build.f_cpu=240000000L
esp32-gateway.build.flash_mode=dio
Expand All @@ -1730,6 +1746,15 @@ esp32-gateway.menu.FlashFreq.40.build.flash_freq=40m
esp32-gateway.menu.UploadSpeed.115200=115200
esp32-gateway.menu.UploadSpeed.115200.upload.speed=115200

esp32-gateway.menu.PartitionScheme.default=Default
esp32-gateway.menu.PartitionScheme.default.build.partitions=default
esp32-gateway.menu.PartitionScheme.no_ota=No OTA (Large APP)
esp32-gateway.menu.PartitionScheme.no_ota.build.partitions=no_ota
esp32-gateway.menu.PartitionScheme.no_ota.upload.maximum_size=2097152
esp32-gateway.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (Large APPS with OTA)
esp32-gateway.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs
esp32-gateway.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080

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

esp32-poe.name=OLIMEX ESP32-PoE
Expand Down Expand Up @@ -1763,6 +1788,15 @@ esp32-poe.menu.FlashFreq.40.build.flash_freq=40m
esp32-poe.menu.UploadSpeed.115200=115200
esp32-poe.menu.UploadSpeed.115200.upload.speed=115200

esp32-poe.menu.PartitionScheme.default=Default
esp32-poe.menu.PartitionScheme.default.build.partitions=default
esp32-poe.menu.PartitionScheme.no_ota=No OTA (Large APP)
esp32-poe.menu.PartitionScheme.no_ota.build.partitions=no_ota
esp32-poe.menu.PartitionScheme.no_ota.upload.maximum_size=2097152
esp32-poe.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (Large APPS with OTA)
esp32-poe.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs
esp32-poe.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080

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

espino32.name=ThaiEasyElec's ESPino32
Expand Down
9 changes: 9 additions & 0 deletions variants/esp32-gateway/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
#define digitalPinToInterrupt(p) (((p)<40)?(p):-1)
#define digitalPinHasPWM(p) (p < 34)

#if ARDUINO_ESP32_GATEWAY >= 'D'
#define ETH_CLK_MODE ETH_CLOCK_GPIO17_OUT
#define ETH_PHY_POWER 5
#endif

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

Expand All @@ -35,4 +40,8 @@ static const uint8_t A7 = 35;

static const uint8_t T9 = 32;

#if ARDUINO_ESP32_GATEWAY >= 'F'
#define BOARD_HAS_1BIT_SDMMC
#endif

#endif /* Pins_Arduino_h */
4 changes: 4 additions & 0 deletions variants/esp32-poe/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
#define digitalPinToInterrupt(p) (((p)<40)?(p):-1)
#define digitalPinHasPWM(p) (p < 34)

#define ETH_CLK_MODE ETH_CLOCK_GPIO17_OUT
#define ETH_PHY_POWER 12

static const uint8_t KEY_BUILTIN = 34;

Expand All @@ -25,4 +27,6 @@ static const uint8_t MOSI = 2;
static const uint8_t MISO = 15;
static const uint8_t SCK = 14;

#define BOARD_HAS_1BIT_SDMMC

#endif /* Pins_Arduino_h */

0 comments on commit c1344ae

Please sign in to comment.