Skip to content

[Feature] Boards added: Pycom LoPy & LoPy4 #1984

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 10 commits into from
Nov 19, 2018
Merged
Changes from all 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
118 changes: 118 additions & 0 deletions boards.txt
Original file line number Diff line number Diff line change
@@ -2439,3 +2439,121 @@ t-beam.menu.DebugLevel.debug.build.code_debug=4
t-beam.menu.DebugLevel.verbose=Verbose
t-beam.menu.DebugLevel.verbose.build.code_debug=5

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

lopy.name=LoPy

lopy.upload.tool=esptool
lopy.upload.maximum_size=1310720
lopy.upload.maximum_data_size=327680
lopy.upload.wait_for_upload_port=true

lopy.serial.disableDTR=true
lopy.serial.disableRTS=true

lopy.build.mcu=esp32
lopy.build.core=esp32
lopy.build.variant=lopy
lopy.build.board=LoPy

lopy.build.f_cpu=240000000L
lopy.build.flash_mode=dio
lopy.build.flash_size=4MB
lopy.build.boot=dio
lopy.build.partitions=default

lopy.menu.FlashFreq.80=80MHz
lopy.menu.FlashFreq.80.build.flash_freq=80m
lopy.menu.FlashFreq.40=40MHz
lopy.menu.FlashFreq.40.build.flash_freq=40m

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

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

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

lopy4.name=LoPy4

lopy4.upload.tool=esptool
lopy4.upload.maximum_size=1310720
lopy4.upload.maximum_data_size=327680
lopy4.upload.wait_for_upload_port=true

lopy4.serial.disableDTR=true
lopy4.serial.disableRTS=true

lopy4.build.mcu=esp32
lopy4.build.core=esp32
lopy4.build.variant=lopy4
lopy4.build.board=LoPy4

lopy4.build.f_cpu=240000000L
lopy4.build.flash_mode=dio
lopy4.build.flash_size=4MB
lopy4.build.boot=dio
lopy4.build.partitions=default

lopy4.menu.PSRAM.disabled=Disabled
lopy4.menu.PSRAM.disabled.build.defines=
lopy4.menu.PSRAM.enabled=Enabled
lopy4.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue

lopy4.menu.FlashFreq.80=80MHz
lopy4.menu.FlashFreq.80.build.flash_freq=80m
lopy4.menu.FlashFreq.40=40MHz
lopy4.menu.FlashFreq.40.build.flash_freq=40m

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

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


73 changes: 73 additions & 0 deletions variants/lopy/pins_arduino.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
#ifndef Pins_Arduino_h
#define Pins_Arduino_h

#include <stdint.h>

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

#define analogInputToDigitalPin(p) (((p)<40)?(esp32_adc2gpio[(p)]):-1)
#define digitalPinToInterrupt(p) (((p)<40)?(p):-1)
#define digitalPinHasPWM(p) (p < 34)

// SPI LoRa Radio
#define LORA_SCK 5 // GPIO5 - SX1276 SCK
#define LORA_MISO 19 // GPIO19 - SX1276 MISO
#define LORA_MOSI 27 // GPIO27 - SX1276 MOSI
#define LORA_CS 17 // GPIO17 - SX1276 CS
#define LORA_RST 18 // GPIO18 - SX1276 RST
#define LORA_IO0 23 // GPIO23 - SX1276 IO0
#define LORA_IO1 23 // GPIO23 - SX1276 IO1 tied by diode to IO0
#define LORA_IO2 23 // GPIO23 - SX1276 IO2 tied by diode to IO0

static const uint8_t LED_BUILTIN = 0; // ->2812 RGB !!!
#define BUILTIN_LED LED_BUILTIN // backward compatibility

#define ANT_SELECT 16 // GPIO16 - External Antenna Switch

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

static const uint8_t SDA = 12;
static const uint8_t SCL = 13;

static const uint8_t SS = 17;
static const uint8_t MOSI = 22;
static const uint8_t MISO = 37;
static const uint8_t SCK = 13;

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 A14 = 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;

#endif /* Pins_Arduino_h */
71 changes: 71 additions & 0 deletions variants/lopy4/pins_arduino.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
#ifndef Pins_Arduino_h
#define Pins_Arduino_h

#include <stdint.h>

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

#define analogInputToDigitalPin(p) (((p)<40)?(esp32_adc2gpio[(p)]):-1)
#define digitalPinToInterrupt(p) (((p)<40)?(p):-1)
#define digitalPinHasPWM(p) (p < 34)

// SPI LoRa Radio
#define LORA_SCK 5 // GPIO5 - SX1276 SCK
#define LORA_MISO 19 // GPIO19 - SX1276 MISO
#define LORA_MOSI 27 // GPIO27 - SX1276 MOSI
#define LORA_CS 18 // GPIO18 - SX1276 CS
#define LORA_IO0 23 // GPIO23 - SX1276 IO0
#define LORA_IO1 23 // GPIO23 - SX1276 IO1 tied by diode to IO0
#define LORA_IO2 23 // GPIO23 - SX1276 IO2 tied by diode to IO0

static const uint8_t LED_BUILTIN = 0; // ->2812 RGB !!!
#define BUILTIN_LED LED_BUILTIN // backward compatibility

#define ANT_SELECT 21 // GPIO21 - External Antenna Switch

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

static const uint8_t SDA = 12;
static const uint8_t SCL = 13;

static const uint8_t MOSI = 22;
static const uint8_t MISO = 37;
static const uint8_t SCK = 13;

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 A14 = 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;

#endif /* Pins_Arduino_h */
2 changes: 2 additions & 0 deletions variants/wipy3/pins_arduino.h
Original file line number Diff line number Diff line change
@@ -14,6 +14,8 @@
static const uint8_t LED_BUILTIN = 0; // ->2812 RGB !!!
#define BUILTIN_LED LED_BUILTIN // backward compatibility

#define ANT_SELECT 21 // GPIO21 - External Antenna Switch

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