Skip to content

Commit 1fdc660

Browse files
cyberman54me-no-dev
authored andcommitted
[Feature] Boards added: Pycom LoPy & LoPy4 (espressif#1984)
* Create pins_arduino.h * Update boards.txt Pycom LoPy + LoPy4 boards added * Create pins_arduino.h * Update pins_arduino.h bugfix antenna switch GPIO port 16 -> 21 * Update pins_arduino.h * Update pins_arduino.h * Update pins_arduino.h * Update pins_arduino.h * Update pins_arduino.h * Update boards.txt
1 parent a53c9de commit 1fdc660

File tree

4 files changed

+264
-0
lines changed

4 files changed

+264
-0
lines changed

‎boards.txt‎

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2445,3 +2445,121 @@ t-beam.menu.DebugLevel.debug.build.code_debug=4
24452445
t-beam.menu.DebugLevel.verbose=Verbose
24462446
t-beam.menu.DebugLevel.verbose.build.code_debug=5
24472447

2448+
##############################################################
2449+
2450+
lopy.name=LoPy
2451+
2452+
lopy.upload.tool=esptool
2453+
lopy.upload.maximum_size=1310720
2454+
lopy.upload.maximum_data_size=327680
2455+
lopy.upload.wait_for_upload_port=true
2456+
2457+
lopy.serial.disableDTR=true
2458+
lopy.serial.disableRTS=true
2459+
2460+
lopy.build.mcu=esp32
2461+
lopy.build.core=esp32
2462+
lopy.build.variant=lopy
2463+
lopy.build.board=LoPy
2464+
2465+
lopy.build.f_cpu=240000000L
2466+
lopy.build.flash_mode=dio
2467+
lopy.build.flash_size=4MB
2468+
lopy.build.boot=dio
2469+
lopy.build.partitions=default
2470+
2471+
lopy.menu.FlashFreq.80=80MHz
2472+
lopy.menu.FlashFreq.80.build.flash_freq=80m
2473+
lopy.menu.FlashFreq.40=40MHz
2474+
lopy.menu.FlashFreq.40.build.flash_freq=40m
2475+
2476+
lopy.menu.UploadSpeed.921600=921600
2477+
lopy.menu.UploadSpeed.921600.upload.speed=921600
2478+
lopy.menu.UploadSpeed.115200=115200
2479+
lopy.menu.UploadSpeed.115200.upload.speed=115200
2480+
lopy.menu.UploadSpeed.256000.windows=256000
2481+
lopy.menu.UploadSpeed.256000.upload.speed=256000
2482+
lopy.menu.UploadSpeed.230400.windows.upload.speed=256000
2483+
lopy.menu.UploadSpeed.230400=230400
2484+
lopy.menu.UploadSpeed.230400.upload.speed=230400
2485+
lopy.menu.UploadSpeed.460800.linux=460800
2486+
lopy.menu.UploadSpeed.460800.macosx=460800
2487+
lopy.menu.UploadSpeed.460800.upload.speed=460800
2488+
lopy.menu.UploadSpeed.512000.windows=512000
2489+
lopy.menu.UploadSpeed.512000.upload.speed=512000
2490+
2491+
lopy.menu.DebugLevel.none=None
2492+
lopy.menu.DebugLevel.none.build.code_debug=0
2493+
lopy.menu.DebugLevel.error=Error
2494+
lopy.menu.DebugLevel.error.build.code_debug=1
2495+
lopy.menu.DebugLevel.warn=Warn
2496+
lopy.menu.DebugLevel.warn.build.code_debug=2
2497+
lopy.menu.DebugLevel.info=Info
2498+
lopy.menu.DebugLevel.info.build.code_debug=3
2499+
lopy.menu.DebugLevel.debug=Debug
2500+
lopy.menu.DebugLevel.debug.build.code_debug=4
2501+
lopy.menu.DebugLevel.verbose=Verbose
2502+
lopy.menu.DebugLevel.verbose.build.code_debug=5
2503+
2504+
##############################################################
2505+
2506+
lopy4.name=LoPy4
2507+
2508+
lopy4.upload.tool=esptool
2509+
lopy4.upload.maximum_size=1310720
2510+
lopy4.upload.maximum_data_size=327680
2511+
lopy4.upload.wait_for_upload_port=true
2512+
2513+
lopy4.serial.disableDTR=true
2514+
lopy4.serial.disableRTS=true
2515+
2516+
lopy4.build.mcu=esp32
2517+
lopy4.build.core=esp32
2518+
lopy4.build.variant=lopy4
2519+
lopy4.build.board=LoPy4
2520+
2521+
lopy4.build.f_cpu=240000000L
2522+
lopy4.build.flash_mode=dio
2523+
lopy4.build.flash_size=4MB
2524+
lopy4.build.boot=dio
2525+
lopy4.build.partitions=default
2526+
2527+
lopy4.menu.PSRAM.disabled=Disabled
2528+
lopy4.menu.PSRAM.disabled.build.defines=
2529+
lopy4.menu.PSRAM.enabled=Enabled
2530+
lopy4.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue
2531+
2532+
lopy4.menu.FlashFreq.80=80MHz
2533+
lopy4.menu.FlashFreq.80.build.flash_freq=80m
2534+
lopy4.menu.FlashFreq.40=40MHz
2535+
lopy4.menu.FlashFreq.40.build.flash_freq=40m
2536+
2537+
lopy4.menu.UploadSpeed.921600=921600
2538+
lopy4.menu.UploadSpeed.921600.upload.speed=921600
2539+
lopy4.menu.UploadSpeed.115200=115200
2540+
lopy4.menu.UploadSpeed.115200.upload.speed=115200
2541+
lopy4.menu.UploadSpeed.256000.windows=256000
2542+
lopy4.menu.UploadSpeed.256000.upload.speed=256000
2543+
lopy4.menu.UploadSpeed.230400.windows.upload.speed=256000
2544+
lopy4.menu.UploadSpeed.230400=230400
2545+
lopy4.menu.UploadSpeed.230400.upload.speed=230400
2546+
lopy4.menu.UploadSpeed.460800.linux=460800
2547+
lopy4.menu.UploadSpeed.460800.macosx=460800
2548+
lopy4.menu.UploadSpeed.460800.upload.speed=460800
2549+
lopy4.menu.UploadSpeed.512000.windows=512000
2550+
lopy4.menu.UploadSpeed.512000.upload.speed=512000
2551+
2552+
lopy4.menu.DebugLevel.none=None
2553+
lopy4.menu.DebugLevel.none.build.code_debug=0
2554+
lopy4.menu.DebugLevel.error=Error
2555+
lopy4.menu.DebugLevel.error.build.code_debug=1
2556+
lopy4.menu.DebugLevel.warn=Warn
2557+
lopy4.menu.DebugLevel.warn.build.code_debug=2
2558+
lopy4.menu.DebugLevel.info=Info
2559+
lopy4.menu.DebugLevel.info.build.code_debug=3
2560+
lopy4.menu.DebugLevel.debug=Debug
2561+
lopy4.menu.DebugLevel.debug.build.code_debug=4
2562+
lopy4.menu.DebugLevel.verbose=Verbose
2563+
lopy4.menu.DebugLevel.verbose.build.code_debug=5
2564+
2565+

‎variants/lopy/pins_arduino.h‎

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
#ifndefPins_Arduino_h
2+
#definePins_Arduino_h
3+
4+
#include<stdint.h>
5+
6+
#defineEXTERNAL_NUM_INTERRUPTS 16
7+
#defineNUM_DIGITAL_PINS 40
8+
#defineNUM_ANALOG_INPUTS 18
9+
10+
#defineanalogInputToDigitalPin(p) (((p)<40)?(esp32_adc2gpio[(p)]):-1)
11+
#definedigitalPinToInterrupt(p) (((p)<40)?(p):-1)
12+
#definedigitalPinHasPWM(p) (p < 34)
13+
14+
// SPI LoRa Radio
15+
#defineLORA_SCK 5 // GPIO5 - SX1276 SCK
16+
#defineLORA_MISO 19 // GPIO19 - SX1276 MISO
17+
#defineLORA_MOSI 27 // GPIO27 - SX1276 MOSI
18+
#defineLORA_CS 17 // GPIO17 - SX1276 CS
19+
#defineLORA_RST 18 // GPIO18 - SX1276 RST
20+
#defineLORA_IO0 23 // GPIO23 - SX1276 IO0
21+
#defineLORA_IO1 23 // GPIO23 - SX1276 IO1 tied by diode to IO0
22+
#defineLORA_IO2 23 // GPIO23 - SX1276 IO2 tied by diode to IO0
23+
24+
staticconstuint8_tLED_BUILTIN=0; // ->2812 RGB !!!
25+
#defineBUILTIN_LED LED_BUILTIN // backward compatibility
26+
27+
#defineANT_SELECT 16 // GPIO16 - External Antenna Switch
28+
29+
staticconstuint8_tTX=1;
30+
staticconstuint8_tRX=3;
31+
32+
staticconstuint8_tSDA=12;
33+
staticconstuint8_tSCL=13;
34+
35+
staticconstuint8_tSS=17;
36+
staticconstuint8_tMOSI=22;
37+
staticconstuint8_tMISO=37;
38+
staticconstuint8_tSCK=13;
39+
40+
staticconstuint8_tA0=36;
41+
staticconstuint8_tA1=37;
42+
staticconstuint8_tA2=38;
43+
staticconstuint8_tA3=39;
44+
staticconstuint8_tA4=32;
45+
staticconstuint8_tA5=33;
46+
staticconstuint8_tA6=34;
47+
staticconstuint8_tA7=35;
48+
staticconstuint8_tA10=4;
49+
staticconstuint8_tA11=0;
50+
staticconstuint8_tA12=2;
51+
staticconstuint8_tA13=15;
52+
staticconstuint8_tA14=13;
53+
staticconstuint8_tA14=12;
54+
staticconstuint8_tA16=14;
55+
staticconstuint8_tA17=27;
56+
staticconstuint8_tA18=25;
57+
staticconstuint8_tA19=26;
58+
59+
staticconstuint8_tT0=4;
60+
staticconstuint8_tT1=0;
61+
staticconstuint8_tT2=2;
62+
staticconstuint8_tT3=15;
63+
staticconstuint8_tT4=13;
64+
staticconstuint8_tT5=12;
65+
staticconstuint8_tT6=14;
66+
staticconstuint8_tT7=27;
67+
staticconstuint8_tT8=33;
68+
staticconstuint8_tT9=32;
69+
70+
staticconstuint8_tDAC1=25;
71+
staticconstuint8_tDAC2=26;
72+
73+
#endif/* Pins_Arduino_h */

‎variants/lopy4/pins_arduino.h‎

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
#ifndefPins_Arduino_h
2+
#definePins_Arduino_h
3+
4+
#include<stdint.h>
5+
6+
#defineEXTERNAL_NUM_INTERRUPTS 16
7+
#defineNUM_DIGITAL_PINS 40
8+
#defineNUM_ANALOG_INPUTS 18
9+
10+
#defineanalogInputToDigitalPin(p) (((p)<40)?(esp32_adc2gpio[(p)]):-1)
11+
#definedigitalPinToInterrupt(p) (((p)<40)?(p):-1)
12+
#definedigitalPinHasPWM(p) (p < 34)
13+
14+
// SPI LoRa Radio
15+
#defineLORA_SCK 5 // GPIO5 - SX1276 SCK
16+
#defineLORA_MISO 19 // GPIO19 - SX1276 MISO
17+
#defineLORA_MOSI 27 // GPIO27 - SX1276 MOSI
18+
#defineLORA_CS 18 // GPIO18 - SX1276 CS
19+
#defineLORA_IO0 23 // GPIO23 - SX1276 IO0
20+
#defineLORA_IO1 23 // GPIO23 - SX1276 IO1 tied by diode to IO0
21+
#defineLORA_IO2 23 // GPIO23 - SX1276 IO2 tied by diode to IO0
22+
23+
staticconstuint8_tLED_BUILTIN=0; // ->2812 RGB !!!
24+
#defineBUILTIN_LED LED_BUILTIN // backward compatibility
25+
26+
#defineANT_SELECT 21 // GPIO21 - External Antenna Switch
27+
28+
staticconstuint8_tTX=1;
29+
staticconstuint8_tRX=3;
30+
31+
staticconstuint8_tSDA=12;
32+
staticconstuint8_tSCL=13;
33+
34+
staticconstuint8_tMOSI=22;
35+
staticconstuint8_tMISO=37;
36+
staticconstuint8_tSCK=13;
37+
38+
staticconstuint8_tA0=36;
39+
staticconstuint8_tA1=37;
40+
staticconstuint8_tA2=38;
41+
staticconstuint8_tA3=39;
42+
staticconstuint8_tA4=32;
43+
staticconstuint8_tA5=33;
44+
staticconstuint8_tA6=34;
45+
staticconstuint8_tA7=35;
46+
staticconstuint8_tA10=4;
47+
staticconstuint8_tA11=0;
48+
staticconstuint8_tA12=2;
49+
staticconstuint8_tA13=15;
50+
staticconstuint8_tA14=13;
51+
staticconstuint8_tA14=12;
52+
staticconstuint8_tA16=14;
53+
staticconstuint8_tA17=27;
54+
staticconstuint8_tA18=25;
55+
staticconstuint8_tA19=26;
56+
57+
staticconstuint8_tT0=4;
58+
staticconstuint8_tT1=0;
59+
staticconstuint8_tT2=2;
60+
staticconstuint8_tT3=15;
61+
staticconstuint8_tT4=13;
62+
staticconstuint8_tT5=12;
63+
staticconstuint8_tT6=14;
64+
staticconstuint8_tT7=27;
65+
staticconstuint8_tT8=33;
66+
staticconstuint8_tT9=32;
67+
68+
staticconstuint8_tDAC1=25;
69+
staticconstuint8_tDAC2=26;
70+
71+
#endif/* Pins_Arduino_h */

‎variants/wipy3/pins_arduino.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
staticconstuint8_tLED_BUILTIN=0; // ->2812 RGB !!!
1515
#defineBUILTIN_LED LED_BUILTIN // backward compatibility
1616

17+
#defineANT_SELECT 21 // GPIO21 - External Antenna Switch
18+
1719
staticconstuint8_tTX=1;
1820
staticconstuint8_tRX=3;
1921

0 commit comments

Comments
(0)