53
53
54
54
ALL_PLATFORMS = {
55
55
# classic Arduino AVR
56
- "uno" : ["arduino:avr:uno" , None ],
57
- "leonardo" : ["arduino:avr:leonardo" , None ],
58
- "mega2560" : ["arduino:avr:mega:cpu=atmega2560" , None ],
56
+ "uno" : ["arduino:avr:uno" , None , None ],
57
+ "leonardo" : ["arduino:avr:leonardo" , None , None ],
58
+ "mega2560" : ["arduino:avr:mega:cpu=atmega2560" , None , None ],
59
59
# Arduino SAMD
60
- "zero" : ["arduino:samd:arduino_zero_native" , "0x68ed2b88" ],
61
- "cpx" : ["arduino:samd:adafruit_circuitplayground_m0" , "0x68ed2b88" ],
60
+ "zero" : ["arduino:samd:arduino_zero_native" , "0x68ed2b88" , None , None ],
61
+ "cpx" : ["arduino:samd:adafruit_circuitplayground_m0" , "0x68ed2b88" , None ],
62
62
# Espressif
63
- "esp8266" : ["esp8266:esp8266:huzzah:eesz=4M3M,xtal=80" , None ],
64
- "esp32" : ["esp32:esp32:featheresp32:FlashFreq=80" , None ],
65
- "feather_esp8266" : ["esp8266:esp8266:huzzah:xtal=80,vt=flash,exception=disabled,stacksmash=disabled,ssl=all,mmu=3232,non32xfer=fast,eesz=4M2M,ip=lm2f,dbg=Disabled,lvl=None____,wipe=none,baud=115200" , None ],
66
- "feather_esp32" : ["esp32:esp32:featheresp32:FlashFreq=80" , None ],
67
- "feather_esp32_v2" : ["esp32:esp32:adafruit_feather_esp32_v2" , None ],
68
- "magtag" : ["esp32:esp32:adafruit_magtag29_esp32s2" , "0xbfdd4eee" ],
69
- "funhouse" : ["esp32:esp32:adafruit_funhouse_esp32s2" , "0xbfdd4eee" ],
70
- "metroesp32s2" : ["esp32:esp32:adafruit_metro_esp32s2" , "0xbfdd4eee" ],
71
- "qtpy_esp32s2" : ["esp32:esp32:adafruit_qtpy_esp32s2" , "0xbfdd4eee" ],
72
- "feather_esp32s2" : ["esp32:esp32:adafruit_feather_esp32s2" , "0xbfdd4eee" ],
73
- "feather_esp32s2_tft" : ["esp32:esp32:adafruit_feather_esp32s2_tft" , "0xbfdd4eee" ],
74
- "feather_esp32s3" : ["esp32:esp32:adafruit_feather_esp32s3" , "0xc47e5767" ],
75
- "qtpy_esp32s3" : ["esp32:esp32:adafruit_qtpy_esp32s3" , "0xc47e5767" ],
63
+ "esp8266" : ["esp8266:esp8266:huzzah:eesz=4M3M,xtal=80" , None , None ],
64
+ "esp32" : ["esp32:esp32:featheresp32:FlashFreq=80" , None , None ],
65
+ "feather_esp8266" : ["esp8266:esp8266:huzzah:xtal=80,vt=flash,exception=disabled,stacksmash=disabled,ssl=all,mmu=3232,non32xfer=fast,eesz=4M2M,ip=lm2f,dbg=Disabled,lvl=None____,wipe=none,baud=115200" , None , None ],
66
+ "feather_esp32" : ["esp32:esp32:featheresp32:FlashFreq=80" , None , None ],
67
+ "feather_esp32_v2" : ["esp32:esp32:adafruit_feather_esp32_v2" , None , None ],
68
+ "magtag" : ["esp32:esp32:adafruit_magtag29_esp32s2" , "0xbfdd4eee" , None ],
69
+ "funhouse" : ["esp32:esp32:adafruit_funhouse_esp32s2" , "0xbfdd4eee" , None ],
70
+ "metroesp32s2" : ["esp32:esp32:adafruit_metro_esp32s2" , "0xbfdd4eee" , None ],
71
+ "qtpy_esp32s2" : ["esp32:esp32:adafruit_qtpy_esp32s2" , "0xbfdd4eee" , None ],
72
+ "feather_esp32s2" : ["esp32:esp32:adafruit_feather_esp32s2" , "0xbfdd4eee" , None ],
73
+ "feather_esp32s2_tft" : ["esp32:esp32:adafruit_feather_esp32s2_tft" , "0xbfdd4eee" , None ],
74
+ "feather_esp32s3" : ["esp32:esp32:adafruit_feather_esp32s3" , "0xc47e5767" , None ],
75
+ "qtpy_esp32s3" : ["esp32:esp32:adafruit_qtpy_esp32s3" , "0xc47e5767" , None ],
76
76
# Adafruit AVR
77
- "trinket_3v" : ["adafruit:avr:trinket3" , None ],
78
- "trinket_5v" : ["adafruit:avr:trinket5" , None ],
79
- "protrinket_3v" : ["adafruit:avr:protrinket3" , None ],
80
- "protrinket_5v" : ["adafruit:avr:protrinket5" , None ],
81
- "gemma" : ["adafruit:avr:gemma" , None ],
82
- "flora" : ["adafruit:avr:flora8" , None ],
83
- "feather32u4" : ["adafruit:avr:feather32u4" , None ],
84
- "cpc" : ["arduino:avr:circuitplay32u4cat" , None ],
77
+ "trinket_3v" : ["adafruit:avr:trinket3" , None , None ],
78
+ "trinket_5v" : ["adafruit:avr:trinket5" , None , None ],
79
+ "protrinket_3v" : ["adafruit:avr:protrinket3" , None , None ],
80
+ "protrinket_5v" : ["adafruit:avr:protrinket5" , None , None ],
81
+ "gemma" : ["adafruit:avr:gemma" , None , None ],
82
+ "flora" : ["adafruit:avr:flora8" , None , None ],
83
+ "feather32u4" : ["adafruit:avr:feather32u4" , None , None ],
84
+ "cpc" : ["arduino:avr:circuitplay32u4cat" , None , None ],
85
85
# Adafruit SAMD
86
- "gemma_m0" : ["adafruit:samd:adafruit_gemma_m0" , "0x68ed2b88" ],
87
- "trinket_m0" : ["adafruit:samd:adafruit_trinket_m0" , "0x68ed2b88" ],
88
- "feather_m0_express" : ["adafruit:samd:adafruit_feather_m0_express" , "0x68ed2b88" ],
89
- "feather_m4_express" : ["adafruit:samd:adafruit_feather_m4:speed=120" , "0x55114460" ],
90
- "feather_m4_express_tinyusb" : ["adafruit:samd:adafruit_feather_m4:speed=120,usbstack=tinyusb" , "0x55114460" ],
91
- "feather_m4_can" : ["adafruit:samd:adafruit_feather_m4_can:speed=120" , "0x55114460" ],
92
- "feather_m4_can_tinyusb" : ["adafruit:samd:adafruit_feather_m4_can:speed=120,usbstack=tinyusb" , "0x55114460" ],
93
- "metro_m0" : ["adafruit:samd:adafruit_metro_m0" , "0x68ed2b88" ],
94
- "metro_m0_tinyusb" : ["adafruit:samd:adafruit_metro_m0:usbstack=tinyusb" , "0x68ed2b88" ],
95
- "metro_m4" : ["adafruit:samd:adafruit_metro_m4:speed=120" , "0x55114460" ],
96
- "metro_m4_tinyusb" : ["adafruit:samd:adafruit_metro_m4:speed=120,usbstack=tinyusb" , "0x55114460" ],
97
- "metro_m4_airliftlite" : ["adafruit:samd:adafruit_metro_m4_airliftlite:speed=120" , "0x55114460" ],
98
- "metro_m4_airliftlite_tinyusb" : ["adafruit:samd:adafruit_metro_m4_airliftlite:speed=120,usbstack=tinyusb" , "0x55114460" ],
99
- "pybadge" : ["adafruit:samd:adafruit_pybadge_m4:speed=120" , "0x55114460" ],
100
- "pybadge_tinyusb" : ["adafruit:samd:adafruit_pybadge_m4:speed=120,usbstack=tinyusb" , "0x55114460" ],
101
- "pygamer" : ["adafruit:samd:adafruit_pygamer_m4:speed=120" , "0x55114460" ],
102
- "pygamer_tinyusb" : ["adafruit:samd:adafruit_pygamer_m4:speed=120,usbstack=tinyusb" , "0x55114460" ],
103
- "hallowing_m0" : ["adafruit:samd:adafruit_hallowing" , "0x68ed2b88" ],
104
- "hallowing_m4" : ["adafruit:samd:adafruit_hallowing_m4:speed=120" , "0x55114460" ],
105
- "hallowing_m4_tinyusb" : ["adafruit:samd:adafruit_hallowing_m4:speed=120,usbstack=tinyusb" , "0x55114460" ],
106
- "neotrellis_m4" : ["adafruit:samd:adafruit_trellis_m4:speed=120" , "0x55114460" ],
107
- "monster_m4sk" : ["adafruit:samd:adafruit_monster_m4sk:speed=120" , "0x55114460" ],
108
- "monster_m4sk_tinyusb" : ["adafruit:samd:adafruit_monster_m4sk:speed=120,usbstack=tinyusb" , "0x55114460" ],
109
- "pyportal" : ["adafruit:samd:adafruit_pyportal_m4:speed=120" , "0x55114460" ],
110
- "pyportal_tinyusb" : ["adafruit:samd:adafruit_pyportal_m4:speed=120,usbstack=tinyusb" , "0x55114460" ],
111
- "pyportal_titano" : ["adafruit:samd:adafruit_pyportal_m4_titano:speed=120" , "0x55114460" ],
112
- "pyportal_titano_tinyusb" : ["adafruit:samd:adafruit_pyportal_m4_titano:speed=120,usbstack=tinyusb" , "0x55114460" ],
113
- "cpx_ada" : ["adafruit:samd:adafruit_circuitplayground_m0" , "0x68ed2b88" ],
114
- "grand_central" : ["adafruit:samd:adafruit_grandcentral_m4:speed=120" , "0x55114460" ],
115
- "grand_central_tinyusb" : ["adafruit:samd:adafruit_grandcentral_m4:speed=120,usbstack=tinyusb" , "0x55114460" ],
116
- "matrixportal" : ["adafruit:samd:adafruit_matrixportal_m4:speed=120" , "0x55114460" ],
117
- "matrixportal_tinyusb" : ["adafruit:samd:adafruit_matrixportal_m4:speed=120,usbstack=tinyusb" , "0x55114460" ],
118
- "neotrinkey_m0" : ["adafruit:samd:adafruit_neotrinkey_m0" , "0x68ed2b88" ],
119
- "rotarytrinkey_m0" : ["adafruit:samd:adafruit_rotarytrinkey_m0" , "0x68ed2b88" ],
120
- "neokeytrinkey_m0" : ["adafruit:samd:adafruit_neokeytrinkey_m0" , "0x68ed2b88" ],
121
- "slidetrinkey_m0" : ["adafruit:samd:adafruit_slidetrinkey_m0" , "0x68ed2b88" ],
122
- "proxlighttrinkey_m0" : ["adafruit:samd:adafruit_proxlighttrinkey_m0" , "0x68ed2b88" ],
123
- "qtpy_m0" : ["adafruit:samd:adafruit_qtpy_m0" , "0x68ed2b88" ],
124
- "qtpy_m0_tinyusb" : ["adafruit:samd:adafruit_qtpy_m0:usbstack=tinyusb" , "0x68ed2b88" ],
86
+ "gemma_m0" : ["adafruit:samd:adafruit_gemma_m0" , "0x68ed2b88" , None ],
87
+ "trinket_m0" : ["adafruit:samd:adafruit_trinket_m0" , "0x68ed2b88" , None ],
88
+ "feather_m0_express" : ["adafruit:samd:adafruit_feather_m0_express" , "0x68ed2b88" , None ],
89
+ "feather_m4_express" : ["adafruit:samd:adafruit_feather_m4:speed=120" , "0x55114460" , None ],
90
+ "feather_m4_express_tinyusb" : ["adafruit:samd:adafruit_feather_m4:speed=120,usbstack=tinyusb" , "0x55114460" , None ],
91
+ "feather_m4_can" : ["adafruit:samd:adafruit_feather_m4_can:speed=120" , "0x55114460" , None ],
92
+ "feather_m4_can_tinyusb" : ["adafruit:samd:adafruit_feather_m4_can:speed=120,usbstack=tinyusb" , "0x55114460" , None ],
93
+ "metro_m0" : ["adafruit:samd:adafruit_metro_m0" , "0x68ed2b88" , None ],
94
+ "metro_m0_tinyusb" : ["adafruit:samd:adafruit_metro_m0:usbstack=tinyusb" , "0x68ed2b88" , None ],
95
+ "metro_m4" : ["adafruit:samd:adafruit_metro_m4:speed=120" , "0x55114460" , None ],
96
+ "metro_m4_tinyusb" : ["adafruit:samd:adafruit_metro_m4:speed=120,usbstack=tinyusb" , "0x55114460" , None ],
97
+ "metro_m4_airliftlite" : ["adafruit:samd:adafruit_metro_m4_airliftlite:speed=120" , "0x55114460" , None ],
98
+ "metro_m4_airliftlite_tinyusb" : ["adafruit:samd:adafruit_metro_m4_airliftlite:speed=120,usbstack=tinyusb" , "0x55114460" , None ],
99
+ "pybadge" : ["adafruit:samd:adafruit_pybadge_m4:speed=120" , "0x55114460" , None ],
100
+ "pybadge_tinyusb" : ["adafruit:samd:adafruit_pybadge_m4:speed=120,usbstack=tinyusb" , "0x55114460" , None ],
101
+ "pygamer" : ["adafruit:samd:adafruit_pygamer_m4:speed=120" , "0x55114460" , None ],
102
+ "pygamer_tinyusb" : ["adafruit:samd:adafruit_pygamer_m4:speed=120,usbstack=tinyusb" , "0x55114460" , None ],
103
+ "hallowing_m0" : ["adafruit:samd:adafruit_hallowing" , "0x68ed2b88" , None ],
104
+ "hallowing_m4" : ["adafruit:samd:adafruit_hallowing_m4:speed=120" , "0x55114460" , None ],
105
+ "hallowing_m4_tinyusb" : ["adafruit:samd:adafruit_hallowing_m4:speed=120,usbstack=tinyusb" , "0x55114460" , None ],
106
+ "neotrellis_m4" : ["adafruit:samd:adafruit_trellis_m4:speed=120" , "0x55114460" , None ],
107
+ "monster_m4sk" : ["adafruit:samd:adafruit_monster_m4sk:speed=120" , "0x55114460" , None ],
108
+ "monster_m4sk_tinyusb" : ["adafruit:samd:adafruit_monster_m4sk:speed=120,usbstack=tinyusb" , "0x55114460" , None ],
109
+ "pyportal" : ["adafruit:samd:adafruit_pyportal_m4:speed=120" , "0x55114460" , None ],
110
+ "pyportal_tinyusb" : ["adafruit:samd:adafruit_pyportal_m4:speed=120,usbstack=tinyusb" , "0x55114460" , None ],
111
+ "pyportal_titano" : ["adafruit:samd:adafruit_pyportal_m4_titano:speed=120" , "0x55114460" , None ],
112
+ "pyportal_titano_tinyusb" : ["adafruit:samd:adafruit_pyportal_m4_titano:speed=120,usbstack=tinyusb" , "0x55114460" , None ],
113
+ "cpx_ada" : ["adafruit:samd:adafruit_circuitplayground_m0" , "0x68ed2b88" , None ],
114
+ "grand_central" : ["adafruit:samd:adafruit_grandcentral_m4:speed=120" , "0x55114460" , None ],
115
+ "grand_central_tinyusb" : ["adafruit:samd:adafruit_grandcentral_m4:speed=120,usbstack=tinyusb" , "0x55114460" , None ],
116
+ "matrixportal" : ["adafruit:samd:adafruit_matrixportal_m4:speed=120" , "0x55114460" , None ],
117
+ "matrixportal_tinyusb" : ["adafruit:samd:adafruit_matrixportal_m4:speed=120,usbstack=tinyusb" , "0x55114460" , None ],
118
+ "neotrinkey_m0" : ["adafruit:samd:adafruit_neotrinkey_m0" , "0x68ed2b88" , None ],
119
+ "rotarytrinkey_m0" : ["adafruit:samd:adafruit_rotarytrinkey_m0" , "0x68ed2b88" , None ],
120
+ "neokeytrinkey_m0" : ["adafruit:samd:adafruit_neokeytrinkey_m0" , "0x68ed2b88" , None ],
121
+ "slidetrinkey_m0" : ["adafruit:samd:adafruit_slidetrinkey_m0" , "0x68ed2b88" , None ],
122
+ "proxlighttrinkey_m0" : ["adafruit:samd:adafruit_proxlighttrinkey_m0" , "0x68ed2b88" , None ],
123
+ "qtpy_m0" : ["adafruit:samd:adafruit_qtpy_m0" , "0x68ed2b88" , None ],
124
+ "qtpy_m0_tinyusb" : ["adafruit:samd:adafruit_qtpy_m0:usbstack=tinyusb" , "0x68ed2b88" , None ],
125
125
# Arduino SAMD
126
- "mkrwifi1010" : ["arduino:samd:mkrwifi1010" , "0x8054" ],
127
- "nano_33_iot" : ["arduino:samd:nano_33_iot" , "0x8057" ],
126
+ "mkrwifi1010" : ["arduino:samd:mkrwifi1010" , "0x8054" , None ],
127
+ "nano_33_iot" : ["arduino:samd:nano_33_iot" , "0x8057" , None ],
128
128
# Arduino nRF
129
- "microbit" : ["sandeepmistry:nRF5:BBCmicrobit:softdevice=s110" , None ],
129
+ "microbit" : ["sandeepmistry:nRF5:BBCmicrobit:softdevice=s110" , None , None ],
130
130
# Adafruit nRF
131
- "nrf52832" : ["adafruit:nrf52:feather52832:softdevice=s132v6,debug=l0" , None ],
132
- "nrf52840" : ["adafruit:nrf52:feather52840:softdevice=s140v6,debug=l0" , "0xada52840" ],
133
- "cpb" : ["adafruit:nrf52:cplaynrf52840:softdevice=s140v6,debug=l0" , "0xada52840" ],
134
- "clue" : ["adafruit:nrf52:cluenrf52840:softdevice=s140v6,debug=l0" , "0xada52840" ],
135
- "ledglasses_nrf52840" : ["adafruit:nrf52:ledglasses_nrf52840:softdevice=s140v6,debug=l0" , "0xada52840" ],
131
+ "nrf52832" : ["adafruit:nrf52:feather52832:softdevice=s132v6,debug=l0" , None , None ],
132
+ "nrf52840" : ["adafruit:nrf52:feather52840:softdevice=s140v6,debug=l0" , "0xada52840" , None ],
133
+ "cpb" : ["adafruit:nrf52:cplaynrf52840:softdevice=s140v6,debug=l0" , "0xada52840" , None ],
134
+ "clue" : ["adafruit:nrf52:cluenrf52840:softdevice=s140v6,debug=l0" , "0xada52840" , None ],
135
+ "ledglasses_nrf52840" : ["adafruit:nrf52:ledglasses_nrf52840:softdevice=s140v6,debug=l0" , "0xada52840" , None ],
136
136
# RP2040 (Philhower)
137
- "pico_rp2040" : ["rp2040:rp2040:rpipico:freq=125,flash=2097152_0" , "0xe48bff56" ],
138
- "pico_rp2040_tinyusb" : ["rp2040:rp2040:rpipico:flash=2097152_0,freq=125,dbgport=Disabled,dbglvl=None,usbstack=tinyusb" , "0xe48bff56" ],
139
- "feather_rp2040" : ["rp2040:rp2040:adafruit_feather:freq=125,flash=8388608_0" , "0xe48bff56" ],
140
- "feather_rp2040_tinyusb" : ["rp2040:rp2040:adafruit_feather:flash=8388608_0,freq=125,dbgport=Disabled,dbglvl=None,usbstack=tinyusb" , "0xe48bff56" ],
141
- "qt2040_trinkey" : ["rp2040:rp2040:adafruit_trinkeyrp2040qt:freq=125,flash=8388608_0" , "0xe48bff56" ],
142
- "qt2040_trinkey_tinyusb" : ["rp2040:rp2040:adafruit_trinkeyrp2040qt:flash=8388608_0,freq=125,dbgport=Disabled,dbglvl=None,usbstack=tinyusb" , "0xe48bff56" ],
137
+ "pico_rp2040" : ["rp2040:rp2040:rpipico:freq=125,flash=2097152_0" , "0xe48bff56" , None ],
138
+ "pico_rp2040_tinyusb" : ["rp2040:rp2040:rpipico:flash=2097152_0,freq=125,dbgport=Disabled,dbglvl=None,usbstack=tinyusb" , "0xe48bff56" , None ],
139
+ "feather_rp2040" : ["rp2040:rp2040:adafruit_feather:freq=125,flash=8388608_0" , "0xe48bff56" , None ],
140
+ "feather_rp2040_tinyusb" : ["rp2040:rp2040:adafruit_feather:flash=8388608_0,freq=125,dbgport=Disabled,dbglvl=None,usbstack=tinyusb" , "0xe48bff56" , None ],
141
+ "qt2040_trinkey" : ["rp2040:rp2040:adafruit_trinkeyrp2040qt:freq=125,flash=8388608_0" , "0xe48bff56" , None ],
142
+ "qt2040_trinkey_tinyusb" : ["rp2040:rp2040:adafruit_trinkeyrp2040qt:flash=8388608_0,freq=125,dbgport=Disabled,dbglvl=None,usbstack=tinyusb" , "0xe48bff56" , None ],
143
143
# Attiny8xy, 16xy, 32xy (SpenceKonde)
144
- "attiny3217" : ["megaTinyCore:megaavr:atxy7:chip=3217" , None ],
145
- "attiny3216" : ["megaTinyCore:megaavr:atxy6:chip=3216" , None ],
146
- "attiny1617" : ["megaTinyCore:megaavr:atxy7:chip=1617" , None ],
147
- "attiny1616" : ["megaTinyCore:megaavr:atxy6:chip=1616" , None ],
148
- "attiny1607" : ["megaTinyCore:megaavr:atxy7:chip=1607" , None ],
149
- "attiny1606" : ["megaTinyCore:megaavr:atxy6:chip=1606" , None ],
150
- "attiny817" : ["megaTinyCore:megaavr:atxy7:chip=817" , None ],
151
- "attiny816" : ["megaTinyCore:megaavr:atxy6:chip=816" , None ],
152
- "attiny807" : ["megaTinyCore:megaavr:atxy7:chip=807" , None ],
153
- "attiny806" : ["megaTinyCore:megaavr:atxy6:chip=806" , None ],
144
+ "attiny3217" : ["megaTinyCore:megaavr:atxy7:chip=3217" , None , None ],
145
+ "attiny3216" : ["megaTinyCore:megaavr:atxy6:chip=3216" , None , None ],
146
+ "attiny1617" : ["megaTinyCore:megaavr:atxy7:chip=1617" , None , None ],
147
+ "attiny1616" : ["megaTinyCore:megaavr:atxy6:chip=1616" , None , None ],
148
+ "attiny1607" : ["megaTinyCore:megaavr:atxy7:chip=1607" , None , None ],
149
+ "attiny1606" : ["megaTinyCore:megaavr:atxy6:chip=1606" , None , None ],
150
+ "attiny817" : ["megaTinyCore:megaavr:atxy7:chip=817" , None , None ],
151
+ "attiny816" : ["megaTinyCore:megaavr:atxy6:chip=816" , None , None ],
152
+ "attiny807" : ["megaTinyCore:megaavr:atxy7:chip=807" , None , None ],
153
+ "attiny806" : ["megaTinyCore:megaavr:atxy6:chip=806" , None , None ],
154
154
# groupings
155
155
"main_platforms" : ("uno" , "leonardo" , "mega2560" , "zero" , "qtpy_m0" ,
156
156
"esp8266" , "esp32" , "metro_m4" , "trinket_m0" ),
@@ -184,13 +184,14 @@ def print_info(message, end = '\n'):
184
184
def print_bold (message , end = '\n ' ):
185
185
sys .stdout .write ('\x1b [1;37m' + message .strip () + '\x1b [0m' + end )
186
186
187
- def manually_install_esp32_bsp ():
188
- # see - https://docs.espressif.com/projects/arduino-esp32/en/latest/installing.html#linux
187
+ def manually_install_esp32_bsp (repo_info ):
189
188
print ("Manually installing latest ESP32 BSP..." )
189
+ # Assemble git url
190
+ repo_url = "git clone -b {0} https://github.com/{1}/arduino-esp32.git esp32" .format (repo_info .split ("/" )[1 ], repo_info .split ("/" )[0 ])
191
+ # Locally clone repo (https://docs.espressif.com/projects/arduino-esp32/en/latest/installing.html#linux)
190
192
os .system ("mkdir -p /home/runner/Arduino/hardware/espressif" )
191
- # Locally clone repo
192
- print ("Cloning github.com/espressif/arduino-esp32.." )
193
- cmd = "cd /home/runner/Arduino/hardware/espressif && git clone https://github.com/espressif/arduino-esp32.git esp32"
193
+ print ("Cloning %s" % repo_url )
194
+ cmd = "cd /home/runner/Arduino/hardware/espressif && " + repo_url
194
195
proc = subprocess .Popen (cmd , stdout = subprocess .PIPE , stderr = subprocess .PIPE , shell = True )
195
196
r = proc .wait (timeout = 1000 )
196
197
out = proc .stdout .read ()
@@ -217,13 +218,12 @@ def manually_install_esp32_bsp():
217
218
print (out )
218
219
print ("Installed ESP32 BSP from source!" )
219
220
220
- def install_platform (fqbn , platform_name = None ):
221
+ def install_platform (fqbn , full_platform_name = None ):
221
222
print ("Installing" , fqbn , end = " " )
222
223
if fqbn == "adafruit:avr" : # we have a platform dep
223
224
install_platform ("arduino:avr" )
224
- if platform_name is not None :
225
- if "daily" in platform_name : # manually install ESP32 BSP from latest source
226
- manually_install_esp32_bsp ()
225
+ if full_platform_name [2 ] is not None :
226
+ manually_install_esp32_bsp (full_platform_name [2 ]) # build esp32 bsp from desired source and branch
227
227
if os .system ("arduino-cli core install " + fqbn + " --additional-urls " + BSP_URLS + " > /dev/null" ) != 0 :
228
228
ColorPrint .print_fail ("FAILED to install " + fqbn )
229
229
exit (- 1 )
@@ -336,7 +336,7 @@ def generate_uf2(example_path):
336
336
return output_file
337
337
338
338
# Generate using a hex file for all platforms except for ESP32-S2, ESP32-S3 (exports as .bin files)
339
- if not "esp32s2" or not "esp32s3" in fqbn :
339
+ if not any ( x in fqbn for x in [ "esp32s2" , "esp32s3" ]) :
340
340
cli_build_hex_path = "build/*.*." + fqbn .split (':' )[2 ] + "/*.hex"
341
341
hex_input_file = glob1 (os .path .join (example_path , cli_build_hex_path ))
342
342
output_file = os .path .splitext (hex_input_file )[0 ] + ".uf2"
@@ -513,7 +513,7 @@ def test_examples_in_learningrepo(folderpath):
513
513
fqbn = ALL_PLATFORMS [platform ][0 ]
514
514
print ('#' * 80 )
515
515
ColorPrint .print_info ("SWITCHING TO " + fqbn )
516
- install_platform (":" .join (fqbn .split (':' , 2 )[0 :2 ]), platform ) # take only first two elements
516
+ install_platform (":" .join (fqbn .split (':' , 2 )[0 :2 ]), ALL_PLATFORMS [ platform ] ) # take only first two elements
517
517
print ('#' * 80 )
518
518
if not IS_LEARNING_SYS :
519
519
test_examples_in_folder (BUILD_DIR + "/examples" )
0 commit comments