初始化提交
This commit is contained in:
@@ -0,0 +1,673 @@
|
||||
export default {
|
||||
'esp32:esp32:esp32c3': [
|
||||
'default',
|
||||
'defaultffat',
|
||||
'default_8MB',
|
||||
'minimal',
|
||||
'no_ota',
|
||||
'noota_3g',
|
||||
'noota_ffat',
|
||||
'noota_3gffat',
|
||||
'huge_app',
|
||||
'min_spiffs',
|
||||
'fatflash',
|
||||
'app3M_fat9M_16MB'
|
||||
],
|
||||
'esp32:esp32:esp32s2': [
|
||||
'default',
|
||||
'defaultffat',
|
||||
'default_8MB',
|
||||
'minimal',
|
||||
'no_ota',
|
||||
'noota_3g',
|
||||
'noota_ffat',
|
||||
'noota_3gffat',
|
||||
'huge_app',
|
||||
'min_spiffs',
|
||||
'fatflash',
|
||||
'app3M_fat9M_16MB'
|
||||
],
|
||||
'esp32:esp32:esp32': [
|
||||
'default',
|
||||
'defaultffat',
|
||||
'default_8MB',
|
||||
'minimal',
|
||||
'no_ota',
|
||||
'noota_3g',
|
||||
'noota_ffat',
|
||||
'noota_3gffat',
|
||||
'huge_app',
|
||||
'min_spiffs',
|
||||
'fatflash',
|
||||
'app3M_fat9M_16MB',
|
||||
'rainmaker'
|
||||
],
|
||||
'esp32:esp32:esp32wrover': [
|
||||
'default',
|
||||
'defaultffat',
|
||||
'default_8MB',
|
||||
'minimal',
|
||||
'no_ota',
|
||||
'noota_3g',
|
||||
'noota_ffat',
|
||||
'noota_3gffat',
|
||||
'huge_app',
|
||||
'min_spiffs',
|
||||
'fatflash'
|
||||
],
|
||||
'esp32:esp32:pico32': [
|
||||
'default',
|
||||
'no_ota',
|
||||
'min_spiffs'
|
||||
],
|
||||
'esp32:esp32:esp32wroverkit': [
|
||||
'default',
|
||||
'defaultffat',
|
||||
'default_8MB',
|
||||
'minimal',
|
||||
'no_ota',
|
||||
'noota_3g',
|
||||
'noota_ffat',
|
||||
'noota_3gffat',
|
||||
'huge_app',
|
||||
'min_spiffs',
|
||||
'fatflash'
|
||||
],
|
||||
'esp32:esp32:tinypico': [
|
||||
'default',
|
||||
'no_ota',
|
||||
'min_spiffs'
|
||||
],
|
||||
'esp32:esp32:feathers2': [
|
||||
'fatflash',
|
||||
'app3M_fat9M_16MB',
|
||||
'default',
|
||||
'defaultffat',
|
||||
'default_8MB',
|
||||
'minimal',
|
||||
'no_ota',
|
||||
'noota_3g',
|
||||
'noota_ffat',
|
||||
'noota_3gffat',
|
||||
'huge_app',
|
||||
'min_spiffs'
|
||||
],
|
||||
'esp32:esp32:tinys2': [
|
||||
'default',
|
||||
'defaultffat',
|
||||
'minimal',
|
||||
'no_ota',
|
||||
'noota_3g',
|
||||
'noota_ffat',
|
||||
'noota_3gffat',
|
||||
'huge_app',
|
||||
'min_spiffs'
|
||||
],
|
||||
'esp32:esp32:S_ODI_Ultra': [
|
||||
'default'
|
||||
],
|
||||
'esp32:esp32:micros2': [
|
||||
'fatflash',
|
||||
'app3M_fat9M_16MB',
|
||||
'default',
|
||||
'defaultffat',
|
||||
'default_8MB',
|
||||
'minimal',
|
||||
'no_ota',
|
||||
'noota_3g',
|
||||
'noota_ffat',
|
||||
'noota_3gffat',
|
||||
'huge_app',
|
||||
'min_spiffs'
|
||||
],
|
||||
'esp32:esp32:magicbit': [
|
||||
'default'
|
||||
],
|
||||
'esp32:esp32:turta_iot_node': [
|
||||
'default'
|
||||
],
|
||||
'esp32:esp32:ttgo-lora32-v1': [
|
||||
'default'
|
||||
],
|
||||
'esp32:esp32:ttgo-t1': [
|
||||
'default',
|
||||
'defaultffat',
|
||||
'minimal',
|
||||
'no_ota',
|
||||
'noota_3g',
|
||||
'noota_ffat',
|
||||
'noota_3gffat',
|
||||
'huge_app',
|
||||
'min_spiffs'
|
||||
],
|
||||
'esp32:esp32:ttgo-t7-v13-mini32': [
|
||||
'default',
|
||||
'defaultffat',
|
||||
'minimal',
|
||||
'no_ota',
|
||||
'noota_3g',
|
||||
'noota_ffat',
|
||||
'noota_3gffat',
|
||||
'huge_app',
|
||||
'min_spiffs'
|
||||
],
|
||||
'esp32:esp32:ttgo-t7-v14-mini32': [
|
||||
'default',
|
||||
'defaultffat',
|
||||
'minimal',
|
||||
'no_ota',
|
||||
'noota_3g',
|
||||
'noota_ffat',
|
||||
'noota_3gffat',
|
||||
'huge_app',
|
||||
'min_spiffs'
|
||||
],
|
||||
'esp32:esp32:cw02': [
|
||||
'default'
|
||||
],
|
||||
'esp32:esp32:esp32thing': [
|
||||
'default',
|
||||
'no_ota',
|
||||
'min_spiffs'
|
||||
],
|
||||
'esp32:esp32:esp32thing_plus': [
|
||||
'default',
|
||||
'large_spiffs'
|
||||
],
|
||||
'esp32:esp32:sparkfun_esp32s2_thing_plus': [
|
||||
'default',
|
||||
'defaultffat',
|
||||
'default_8MB',
|
||||
'minimal',
|
||||
'no_ota',
|
||||
'noota_3g',
|
||||
'noota_ffat',
|
||||
'noota_3gffat',
|
||||
'huge_app',
|
||||
'min_spiffs',
|
||||
'fatflash',
|
||||
'app3M_fat9M_16MB'
|
||||
],
|
||||
'esp32:esp32:sparkfun_lora_gateway_1-channel': [
|
||||
'default',
|
||||
'minimal',
|
||||
'no_ota',
|
||||
'min_spiffs'
|
||||
],
|
||||
'esp32:esp32:nina_w10': [
|
||||
'minimal'
|
||||
],
|
||||
'esp32:esp32:widora-air': [
|
||||
'default'
|
||||
],
|
||||
'esp32:esp32:esp320': [
|
||||
'default'
|
||||
],
|
||||
'esp32:esp32:nano32': [
|
||||
'default'
|
||||
],
|
||||
'esp32:esp32:d32': [
|
||||
'default',
|
||||
'minimal',
|
||||
'no_ota',
|
||||
'min_spiffs'
|
||||
],
|
||||
'esp32:esp32:d32_pro': [
|
||||
'default',
|
||||
'minimal',
|
||||
'no_ota',
|
||||
'min_spiffs'
|
||||
],
|
||||
'esp32:esp32:lolin32': [
|
||||
'default',
|
||||
'no_ota',
|
||||
'min_spiffs'
|
||||
],
|
||||
'esp32:esp32:lolin32-lite': [
|
||||
'default',
|
||||
'no_ota',
|
||||
'min_spiffs'
|
||||
],
|
||||
'esp32:esp32:pocket_32': [
|
||||
'default'
|
||||
],
|
||||
'esp32:esp32:WeMosBat': [
|
||||
'default'
|
||||
],
|
||||
'esp32:esp32:espea32': [
|
||||
'default'
|
||||
],
|
||||
'esp32:esp32:quantum': [
|
||||
'default'
|
||||
],
|
||||
'esp32:esp32:node32s': [
|
||||
'default',
|
||||
'no_ota',
|
||||
'min_spiffs'
|
||||
],
|
||||
'esp32:esp32:hornbill32dev': [
|
||||
'default'
|
||||
],
|
||||
'esp32:esp32:hornbill32minima': [
|
||||
'default'
|
||||
],
|
||||
'esp32:esp32:firebeetle32': [
|
||||
'default'
|
||||
],
|
||||
'esp32:esp32:intorobot-fig': [
|
||||
'default'
|
||||
],
|
||||
'esp32:esp32:onehorse32dev': [
|
||||
'default'
|
||||
],
|
||||
'esp32:esp32:featheresp32': [
|
||||
'default',
|
||||
'no_ota',
|
||||
'min_spiffs'
|
||||
],
|
||||
'esp32:esp32:adafruit_metro_esp32s2': [
|
||||
'default',
|
||||
'defaultffat',
|
||||
'default_8MB',
|
||||
'minimal',
|
||||
'no_ota',
|
||||
'noota_3g',
|
||||
'noota_ffat',
|
||||
'noota_3gffat',
|
||||
'huge_app',
|
||||
'min_spiffs',
|
||||
'fatflash',
|
||||
'app3M_fat9M_16MB'
|
||||
],
|
||||
'esp32:esp32:adafruit_magtag29_esp32s2': [
|
||||
'default',
|
||||
'defaultffat',
|
||||
'default_8MB',
|
||||
'minimal',
|
||||
'no_ota',
|
||||
'noota_3g',
|
||||
'noota_ffat',
|
||||
'noota_3gffat',
|
||||
'huge_app',
|
||||
'min_spiffs',
|
||||
'fatflash',
|
||||
'app3M_fat9M_16MB'
|
||||
],
|
||||
'esp32:esp32:adafruit_funhouse_esp32s2': [
|
||||
'default',
|
||||
'defaultffat',
|
||||
'default_8MB',
|
||||
'minimal',
|
||||
'no_ota',
|
||||
'noota_3g',
|
||||
'noota_ffat',
|
||||
'noota_3gffat',
|
||||
'huge_app',
|
||||
'min_spiffs',
|
||||
'fatflash',
|
||||
'app3M_fat9M_16MB'
|
||||
],
|
||||
'esp32:esp32:adafruit_feather_esp32s2_nopsram': [
|
||||
'default',
|
||||
'defaultffat',
|
||||
'default_8MB',
|
||||
'minimal',
|
||||
'no_ota',
|
||||
'noota_3g',
|
||||
'noota_ffat',
|
||||
'noota_3gffat',
|
||||
'huge_app',
|
||||
'min_spiffs',
|
||||
'fatflash',
|
||||
'app3M_fat9M_16MB'
|
||||
],
|
||||
'esp32:esp32:nodemcu-32s': [
|
||||
'default'
|
||||
],
|
||||
'esp32:esp32:mhetesp32devkit': [
|
||||
'default',
|
||||
'no_ota',
|
||||
'min_spiffs'
|
||||
],
|
||||
'esp32:esp32:mhetesp32minikit': [
|
||||
'default',
|
||||
'defaultffat',
|
||||
'no_ota',
|
||||
'min_spiffs'
|
||||
],
|
||||
'esp32:esp32:esp32vn-iot-uno': [
|
||||
'default'
|
||||
],
|
||||
'esp32:esp32:esp32doit-devkit-v1': [
|
||||
'default'
|
||||
],
|
||||
'esp32:esp32:esp32doit-espduino': [
|
||||
'default'
|
||||
],
|
||||
'esp32:esp32:esp32-evb': [
|
||||
'default',
|
||||
'no_ota',
|
||||
'min_spiffs'
|
||||
],
|
||||
'esp32:esp32:esp32-gateway': [
|
||||
'default',
|
||||
'no_ota',
|
||||
'min_spiffs'
|
||||
],
|
||||
'esp32:esp32:esp32-poe': [
|
||||
'default',
|
||||
'no_ota',
|
||||
'min_spiffs'
|
||||
],
|
||||
'esp32:esp32:esp32-poe-iso': [
|
||||
'default',
|
||||
'no_ota',
|
||||
'min_spiffs'
|
||||
],
|
||||
'esp32:esp32:esp32-DevKitLipo': [
|
||||
'default',
|
||||
'minimal',
|
||||
'no_ota',
|
||||
'huge_app',
|
||||
'min_spiffs',
|
||||
'fatflash'
|
||||
],
|
||||
'esp32:esp32:espino32': [
|
||||
'default'
|
||||
],
|
||||
'esp32:esp32:m5stack-core-esp32': [
|
||||
'default',
|
||||
'no_ota',
|
||||
'min_spiffs'
|
||||
],
|
||||
'esp32:esp32:m5stack-fire': [
|
||||
'default',
|
||||
'large_spiffs'
|
||||
],
|
||||
'esp32:esp32:m5stick-c': [
|
||||
'default',
|
||||
'no_ota',
|
||||
'min_spiffs'
|
||||
],
|
||||
'esp32:esp32:m5stack-atom': [
|
||||
'default',
|
||||
'no_ota',
|
||||
'min_spiffs'
|
||||
],
|
||||
'esp32:esp32:m5stack-core2': [
|
||||
'default',
|
||||
'large_spiffs',
|
||||
'minimal',
|
||||
'no_ota',
|
||||
'noota_3g',
|
||||
'huge_app',
|
||||
'min_spiffs'
|
||||
],
|
||||
'esp32:esp32:m5stack-timer-cam': [
|
||||
'default',
|
||||
'no_ota',
|
||||
'min_spiffs'
|
||||
],
|
||||
'esp32:esp32:m5stack-coreink': [
|
||||
'default',
|
||||
'no_ota',
|
||||
'min_spiffs'
|
||||
],
|
||||
'esp32:esp32:odroid_esp32': [
|
||||
'default',
|
||||
'no_ota',
|
||||
'min_spiffs'
|
||||
],
|
||||
'esp32:esp32:heltec_wifi_kit_32': [
|
||||
'default'
|
||||
],
|
||||
'esp32:esp32:heltec_wifi_lora_32': [
|
||||
'default'
|
||||
],
|
||||
'esp32:esp32:heltec_wifi_lora_32_V2': [
|
||||
'default_8MB'
|
||||
],
|
||||
'esp32:esp32:heltec_wireless_stick': [
|
||||
'default_8MB'
|
||||
],
|
||||
'esp32:esp32:heltec_wireless_stick_lite': [
|
||||
'default'
|
||||
],
|
||||
'esp32:esp32:espectro32': [
|
||||
'default'
|
||||
],
|
||||
'esp32:esp32:CoreESP32': [
|
||||
'default',
|
||||
'minimal',
|
||||
'no_ota',
|
||||
'min_spiffs',
|
||||
'fatflash'
|
||||
],
|
||||
'esp32:esp32:alksesp32': [
|
||||
'default',
|
||||
'defaultffat',
|
||||
'minimal',
|
||||
'no_ota',
|
||||
'noota_3g',
|
||||
'noota_ffat',
|
||||
'noota_3gffat',
|
||||
'huge_app',
|
||||
'min_spiffs',
|
||||
'fatflash'
|
||||
],
|
||||
'esp32:esp32:wipy3': [
|
||||
'default'
|
||||
],
|
||||
'esp32:esp32:bpi-bit': [
|
||||
'default'
|
||||
],
|
||||
'esp32:esp32:wesp32': [
|
||||
'default'
|
||||
],
|
||||
'esp32:esp32:t-beam': [
|
||||
'default'
|
||||
],
|
||||
'esp32:esp32:d-duino-32': [
|
||||
'default',
|
||||
'minimal',
|
||||
'no_ota',
|
||||
'min_spiffs',
|
||||
'fatflash'
|
||||
],
|
||||
'esp32:esp32:lopy': [
|
||||
'default'
|
||||
],
|
||||
'esp32:esp32:lopy4': [
|
||||
'default'
|
||||
],
|
||||
'esp32:esp32:oroca_edubot': [
|
||||
'huge_app',
|
||||
'min_spiffs'
|
||||
],
|
||||
'esp32:esp32:fm-devkit': [
|
||||
'default'
|
||||
],
|
||||
'esp32:esp32:frogboard': [
|
||||
'default',
|
||||
'minimal',
|
||||
'no_ota',
|
||||
'min_spiffs'
|
||||
],
|
||||
'esp32:esp32:esp32cam': [
|
||||
'huge_app'
|
||||
],
|
||||
'esp32:esp32:twatch': [
|
||||
'default',
|
||||
'large_spiffs'
|
||||
],
|
||||
'esp32:esp32:d1_mini32': [
|
||||
'default',
|
||||
'no_ota',
|
||||
'min_spiffs'
|
||||
],
|
||||
'esp32:esp32:gpy': [
|
||||
'default'
|
||||
],
|
||||
'esp32:esp32:vintlabs-devkit-v1': [
|
||||
'default',
|
||||
'defaultffat',
|
||||
'default_8MB',
|
||||
'minimal',
|
||||
'no_ota',
|
||||
'noota_3g',
|
||||
'noota_ffat',
|
||||
'noota_3gffat',
|
||||
'huge_app',
|
||||
'min_spiffs',
|
||||
'fatflash',
|
||||
'app3M_fat9M_16MB'
|
||||
],
|
||||
'esp32:esp32:honeylemon': [
|
||||
'default'
|
||||
],
|
||||
'esp32:esp32:mgbot-iotik32a': [
|
||||
'default',
|
||||
'defaultffat',
|
||||
'default_8MB',
|
||||
'minimal',
|
||||
'no_ota',
|
||||
'noota_3g',
|
||||
'noota_ffat',
|
||||
'noota_3gffat',
|
||||
'huge_app',
|
||||
'min_spiffs',
|
||||
'fatflash',
|
||||
'app3M_fat9M_16MB'
|
||||
],
|
||||
'esp32:esp32:mgbot-iotik32b': [
|
||||
'default',
|
||||
'defaultffat',
|
||||
'default_8MB',
|
||||
'minimal',
|
||||
'no_ota',
|
||||
'noota_3g',
|
||||
'noota_ffat',
|
||||
'noota_3gffat',
|
||||
'huge_app',
|
||||
'min_spiffs',
|
||||
'fatflash',
|
||||
'app3M_fat9M_16MB'
|
||||
],
|
||||
'esp32:esp32:piranha_esp-32': [
|
||||
'default',
|
||||
'no_ota',
|
||||
'min_spiffs'
|
||||
],
|
||||
'esp32:esp32:metro_esp-32': [
|
||||
'default',
|
||||
'no_ota',
|
||||
'min_spiffs'
|
||||
],
|
||||
'esp32:esp32:sensesiot_weizen': [
|
||||
'default'
|
||||
],
|
||||
'esp32:esp32:kits-edu': [
|
||||
'default',
|
||||
'no_ota',
|
||||
'min_spiffs'
|
||||
],
|
||||
'esp32:esp32:mPython': [
|
||||
'huge_app',
|
||||
'default',
|
||||
'defaultffat',
|
||||
'minimal',
|
||||
'no_ota',
|
||||
'noota_3g',
|
||||
'noota_ffat',
|
||||
'noota_3gffat',
|
||||
'min_spiffs',
|
||||
'fatflash'
|
||||
],
|
||||
'esp32:esp32:OpenKB': [
|
||||
'default'
|
||||
],
|
||||
'esp32:esp32:wifiduino32': [
|
||||
'default',
|
||||
'no_ota',
|
||||
'min_spiffs'
|
||||
],
|
||||
'esp32:esp32:ttgo-lora32-v21new': [
|
||||
'default'
|
||||
],
|
||||
'esp32:esp32:imbrios-logsens-v1p1': [
|
||||
'default',
|
||||
'no_ota',
|
||||
'min_spiffs'
|
||||
],
|
||||
'esp32:esp32:healthypi4': [
|
||||
'default',
|
||||
'no_ota',
|
||||
'min_spiffs'
|
||||
],
|
||||
'esp32:esp32:ET-Board': [
|
||||
'default',
|
||||
'no_ota',
|
||||
'min_spiffs'
|
||||
],
|
||||
'esp32:esp32:ch_denky': [
|
||||
'default',
|
||||
'no_ota',
|
||||
'min_spiffs'
|
||||
],
|
||||
'esp32:esp32:uPesy_wrover': [
|
||||
'default',
|
||||
'defaultffat',
|
||||
'minimal',
|
||||
'no_ota',
|
||||
'noota_3g',
|
||||
'noota_ffat',
|
||||
'noota_3gffat',
|
||||
'huge_app',
|
||||
'min_spiffs'
|
||||
],
|
||||
'esp32:esp32:uPesy_wroom': [
|
||||
'default',
|
||||
'defaultffat',
|
||||
'minimal',
|
||||
'no_ota',
|
||||
'noota_3g',
|
||||
'noota_ffat',
|
||||
'noota_3gffat',
|
||||
'huge_app',
|
||||
'min_spiffs'
|
||||
],
|
||||
'esp32:esp32:kb32': [
|
||||
'default',
|
||||
'defaultffat',
|
||||
'default_8MB',
|
||||
'minimal',
|
||||
'no_ota',
|
||||
'noota_3g',
|
||||
'noota_ffat',
|
||||
'noota_3gffat',
|
||||
'huge_app',
|
||||
'min_spiffs',
|
||||
'fatflash',
|
||||
'app3M_fat9M_16MB'
|
||||
],
|
||||
'esp32:esp32:deneyapkart': [
|
||||
'default',
|
||||
'defaultffat',
|
||||
'default_8MB',
|
||||
'minimal',
|
||||
'no_ota',
|
||||
'noota_3g',
|
||||
'noota_ffat',
|
||||
'noota_3gffat',
|
||||
'huge_app',
|
||||
'min_spiffs',
|
||||
'fatflash'
|
||||
],
|
||||
'esp32:esp32:esp32-trueverit-iot-driver': [
|
||||
'default'
|
||||
],
|
||||
'esp32:esp32:esp32-trueverit-iot-driver-mkii': [
|
||||
'default'
|
||||
]
|
||||
}
|
||||
;
|
||||
14
boards/default_src/arduino_esp32/mixly-modules/commands.js
Normal file
14
boards/default_src/arduino_esp32/mixly-modules/commands.js
Normal file
@@ -0,0 +1,14 @@
|
||||
export default {
|
||||
littlefs: {
|
||||
download: "{{&esptool}} --port {{&port}} --baud {{&baud}} read_flash {{&offset}} {{&size}} {{&img}} && {{&fsTool}} -u {{&usrFolder}} -b {{&blockSize}} -p {{&pageSize}} -s {{&size}} {{&img}}",
|
||||
upload: "{{&fsTool}} -c {{&usrFolder}} -b {{&blockSize}} -p {{&pageSize}} -s {{&size}} {{&img}} && {{&esptool}} --port {{&port}} --baud {{&baud}} write_flash --flash_mode {{&flashMode}} --flash_freq {{&flashFreq}} --flash_size {{&flashSize}} {{&offset}} {{&img}}"
|
||||
},
|
||||
spiffs: {
|
||||
download: "{{&esptool}} --port {{&port}} --baud {{&baud}} read_flash {{&offset}} {{&size}} {{&img}} && {{&fsTool}} -u {{&usrFolder}} -b {{&blockSize}} -p {{&pageSize}} -s {{&size}} {{&img}}",
|
||||
upload: "{{&fsTool}} -c {{&usrFolder}} -b {{&blockSize}} -p {{&pageSize}} -s {{&size}} {{&img}} && {{&esptool}} --port {{&port}} --baud {{&baud}} write_flash --flash_mode {{&flashMode}} --flash_freq {{&flashFreq}} --flash_size {{&flashSize}} {{&offset}} {{&img}}"
|
||||
},
|
||||
fatfs: {
|
||||
download: "{{&esptool}} --port {{&port}} --baud {{&baud}} read_flash {{&offset}} {{&size}} {{&img}} && {{&fsTool}} -u {{&usrFolder}} -t fatfs -s {{&size}} {{&img}}",
|
||||
upload: "{{&fsTool}} -c {{&usrFolder}} -t fatfs -s {{&size}} {{&img}} && {{&esptool}} --port {{&port}} --baud {{&baud}} write_flash --flash_mode {{&flashMode}} --flash_freq {{&flashFreq}} --flash_size {{&flashSize}} {{&offset}} {{&img}}"
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,91 @@
|
||||
import { Env, Boards, FSBoardHandler } from 'mixly';
|
||||
import * as path from 'path';
|
||||
import COMMANDS from './commands';
|
||||
import PARTITIONS from './partitions';
|
||||
import BOARDS_PARTITIONS_INFO from './boards-partitions-info';
|
||||
import MENU from './menu';
|
||||
import FS_INFO from './fs-info';
|
||||
|
||||
export default class FSArduEsp32Handler extends FSBoardHandler {
|
||||
constructor() {
|
||||
super();
|
||||
for (let key in COMMANDS) {
|
||||
this.setFSCommands(key, COMMANDS[key]);
|
||||
}
|
||||
}
|
||||
|
||||
onBeforeUpload() {
|
||||
const boardKey = Boards.getSelectedBoardKey();
|
||||
const flashMode = Boards.getSelectedBoardConfigParam('FlashMode') || 'keep';
|
||||
let flashFreq = Boards.getSelectedBoardConfigParam('FlashFreq') || 'keep';
|
||||
if (flashFreq !== 'keep') {
|
||||
flashFreq += 'm';
|
||||
}
|
||||
let flashSize = Boards.getSelectedBoardConfigParam('FlashSize') || 'detect';
|
||||
if (flashSize !== 'detect') {
|
||||
flashSize += 'B';
|
||||
}
|
||||
const baud = Boards.getSelectedBoardConfigParam('UploadSpeed') || '115200';
|
||||
let partitionScheme = Boards.getSelectedBoardConfigParam('PartitionScheme');
|
||||
let partitionsType = BOARDS_PARTITIONS_INFO[boardKey] ?? [];
|
||||
if (!partitionsType.includes(partitionScheme)) {
|
||||
if (partitionsType.length) {
|
||||
partitionScheme = partitionsType[0];
|
||||
} else {
|
||||
partitionScheme = 'default';
|
||||
}
|
||||
}
|
||||
const partition = { ...PARTITIONS[partitionScheme] };
|
||||
if (this.getFSType() === 'default') {
|
||||
this.setFSType(partition.type);
|
||||
}
|
||||
const fsTool = this.getFSToolPath();
|
||||
const img = path.join(Env.boardDirPath, 'build', 'script.img');
|
||||
this.updateConfig({ fsTool, img, flashMode, flashFreq, flashSize, baud, ...partition });
|
||||
}
|
||||
|
||||
onBeforeDownload() {
|
||||
const boardKey = Boards.getSelectedBoardKey();
|
||||
const baud = Boards.getSelectedBoardConfigParam('UploadSpeed') || '115200';
|
||||
let partitionScheme = Boards.getSelectedBoardConfigParam('PartitionScheme');
|
||||
let partitionsType = BOARDS_PARTITIONS_INFO[boardKey] ?? [];
|
||||
if (!partitionsType.includes(partitionScheme)) {
|
||||
if (partitionsType.length) {
|
||||
partitionScheme = partitionsType[0];
|
||||
} else {
|
||||
partitionScheme = 'default';
|
||||
}
|
||||
}
|
||||
const partition = { ...PARTITIONS[partitionScheme] };
|
||||
if (this.getFSType() === 'default') {
|
||||
this.setFSType(partition.type);
|
||||
}
|
||||
const fsTool = this.getFSToolPath();
|
||||
const img = path.join(Env.boardDirPath, 'build', 'script.img');
|
||||
this.updateConfig({ fsTool, img, baud, ...partition });
|
||||
}
|
||||
|
||||
getFSMenu() {
|
||||
return MENU;
|
||||
}
|
||||
|
||||
getFSToolPath() {
|
||||
const fsType = this.getFSType();
|
||||
let arch = 'x64';
|
||||
switch (process.arch) {
|
||||
case 'arm64':
|
||||
case 'arm':
|
||||
arch = 'arm';
|
||||
break;
|
||||
case 'ia32':
|
||||
arch = 'x32';
|
||||
break;
|
||||
case 'x64':
|
||||
default:
|
||||
arch = 'x64';
|
||||
}
|
||||
const platform = Env.currentPlatform;
|
||||
const fsToolInfo = FS_INFO[`mk${fsType}`];
|
||||
return path.join(Env.boardDirPath, 'build/tools', fsToolInfo[platform][arch]);
|
||||
}
|
||||
}
|
||||
50
boards/default_src/arduino_esp32/mixly-modules/fs-info.js
Normal file
50
boards/default_src/arduino_esp32/mixly-modules/fs-info.js
Normal file
@@ -0,0 +1,50 @@
|
||||
export default {
|
||||
"mkspiffs": {
|
||||
"version": "0.2.3",
|
||||
"linux": {
|
||||
"x32": "./mkspiffs/linux/mkspiffs-x32.bin",
|
||||
"x64": "./mkspiffs/linux/mkspiffs-x64.bin",
|
||||
"arm": "./mkspiffs/linux/mkspiffs-arm.bin"
|
||||
},
|
||||
"darwin": {
|
||||
"x64": "./mkspiffs/darwin/mkspiffs.bin",
|
||||
"arm": "./mkspiffs/darwin/mkspiffs.bin"
|
||||
},
|
||||
"win32": {
|
||||
"x32": "./mkspiffs/win32/mkspiffs.exe",
|
||||
"x64": "./mkspiffs/win32/mkspiffs.exe"
|
||||
}
|
||||
},
|
||||
"mklittlefs": {
|
||||
"version": "3.2.0",
|
||||
"linux": {
|
||||
"x32": "./mklittlefs/linux/mklittlefs-x64.bin",
|
||||
"x64": "./mklittlefs/linux/mklittlefs-x64.bin",
|
||||
"arm": "./mklittlefs/linux/mklittlefs-arm.bin"
|
||||
},
|
||||
"darwin": {
|
||||
"x64": "./mklittlefs/darwin/mklittlefs.bin",
|
||||
"arm": "./mklittlefs/darwin/mklittlefs.bin"
|
||||
},
|
||||
"win32": {
|
||||
"x32": "./mklittlefs/win32/mklittlefs-x32.exe",
|
||||
"x64": "./mklittlefs/win32/mklittlefs-x64.exe"
|
||||
}
|
||||
},
|
||||
"mkfatfs": {
|
||||
"version": "2.0.1",
|
||||
"linux": {
|
||||
"x32": "./mkfatfs/linux/mkfatfs-x64.bin",
|
||||
"x64": "./mkfatfs/linux/mkfatfs-x64.bin",
|
||||
"arm": "./mkfatfs/linux/mkfatfs-arm.bin"
|
||||
},
|
||||
"darwin": {
|
||||
"x64": "./mkfatfs/darwin/mkfatfs.bin",
|
||||
"arm": "./mkfatfs/darwin/mkfatfs.bin"
|
||||
},
|
||||
"win32": {
|
||||
"x32": "./mkfatfs/win32/mkfatfs.exe",
|
||||
"x64": "./mkfatfs/win32/mkfatfs.exe"
|
||||
}
|
||||
}
|
||||
};
|
||||
29
boards/default_src/arduino_esp32/mixly-modules/loader.js
Normal file
29
boards/default_src/arduino_esp32/mixly-modules/loader.js
Normal file
@@ -0,0 +1,29 @@
|
||||
import { Workspace, ContextMenu } from 'mixly';
|
||||
import FSArduEsp32Handler from './fs-board-handler';
|
||||
import { Msg } from 'blockly/core';
|
||||
|
||||
export default function addBoardFSItem () {
|
||||
const mainWorkspace = Workspace.getMain();
|
||||
const statusBarsManager = mainWorkspace.getStatusBarsManager();
|
||||
const dropdownMenu = statusBarsManager.getDropdownMenu();
|
||||
const menu = dropdownMenu.getItem('menu');
|
||||
menu.add({
|
||||
weight: 2,
|
||||
type: 'sep1',
|
||||
data: '---------'
|
||||
});
|
||||
menu.add({
|
||||
weight: 3,
|
||||
type: 'filesystem-tool',
|
||||
data: {
|
||||
isHtmlName: true,
|
||||
name: ContextMenu.getItem(Msg.BOARD_FS, ''),
|
||||
callback: () => {
|
||||
statusBarsManager.add('board-fs', 'board-fs', Msg.BOARD_FS, Msg.BOARD_FS);
|
||||
statusBarsManager.changeTo('board-fs');
|
||||
const fsStatusBar = statusBarsManager.getStatusBarById('board-fs');
|
||||
fsStatusBar.setHandler(new FSArduEsp32Handler());
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
15
boards/default_src/arduino_esp32/mixly-modules/menu.js
Normal file
15
boards/default_src/arduino_esp32/mixly-modules/menu.js
Normal file
@@ -0,0 +1,15 @@
|
||||
export default [
|
||||
{
|
||||
id: 'default',
|
||||
text: 'default'
|
||||
}, {
|
||||
id: 'spiffs',
|
||||
text: 'spiffs'
|
||||
}, {
|
||||
id: 'fatfs',
|
||||
text: 'fatfs'
|
||||
}, {
|
||||
id: 'littlefs',
|
||||
text: 'littlefs'
|
||||
}
|
||||
];
|
||||
107
boards/default_src/arduino_esp32/mixly-modules/partitions.js
Normal file
107
boards/default_src/arduino_esp32/mixly-modules/partitions.js
Normal file
@@ -0,0 +1,107 @@
|
||||
import { FSBoardHandler } from 'mixly';
|
||||
|
||||
export default {
|
||||
'app3M_fat9M_16MB': {
|
||||
type: FSBoardHandler.FsType.FATFS,
|
||||
offset: 0x610000,
|
||||
size: 0x9F0000,
|
||||
blockSize: 4096,
|
||||
pageSize: 256
|
||||
},
|
||||
'default': {
|
||||
type: FSBoardHandler.FsType.SPIFFS,
|
||||
offset: 0x290000,
|
||||
size: 0x160000,
|
||||
blockSize: 4096,
|
||||
pageSize: 256
|
||||
},
|
||||
'default_8MB': {
|
||||
type: FSBoardHandler.FsType.SPIFFS,
|
||||
offset: 0x670000,
|
||||
size: 0x190000,
|
||||
blockSize: 4096,
|
||||
pageSize: 256
|
||||
},
|
||||
'default_16MB': {
|
||||
type: FSBoardHandler.FsType.SPIFFS,
|
||||
offset: 0xc90000,
|
||||
size: 0x370000,
|
||||
blockSize: 4096,
|
||||
pageSize: 256
|
||||
},
|
||||
'defaultffat': {
|
||||
type: FSBoardHandler.FsType.FATFS,
|
||||
offset: 0x290000 + 4096,
|
||||
size: 0x160000 - 4096,
|
||||
blockSize: 4096,
|
||||
pageSize: 256
|
||||
},
|
||||
'ffat': {
|
||||
type: FSBoardHandler.FsType.FATFS,
|
||||
offset: 0x410000 + 4096,
|
||||
size: 0xBF0000,
|
||||
blockSize: 4096,
|
||||
pageSize: 256
|
||||
},
|
||||
'huge_app': {
|
||||
type: FSBoardHandler.FsType.SPIFFS,
|
||||
offset: 0x310000,
|
||||
size: 0xF0000,
|
||||
blockSize: 4096,
|
||||
pageSize: 256
|
||||
},
|
||||
'large_spiffs_16MB': {
|
||||
type: FSBoardHandler.FsType.SPIFFS,
|
||||
offset: 0x910000,
|
||||
size: 0x6F0000,
|
||||
blockSize: 4096,
|
||||
pageSize: 256
|
||||
},
|
||||
'min_spiffs': {
|
||||
type: FSBoardHandler.FsType.SPIFFS,
|
||||
offset: 0x3D0000,
|
||||
size: 0x30000,
|
||||
blockSize: 4096,
|
||||
pageSize: 256
|
||||
},
|
||||
'minimal': {
|
||||
type: FSBoardHandler.FsType.SPIFFS,
|
||||
offset: 0x150000,
|
||||
size: 0xB0000
|
||||
},
|
||||
'no_ota': {
|
||||
type: FSBoardHandler.FsType.SPIFFS,
|
||||
offset: 0x210000,
|
||||
size: 0x1F0000,
|
||||
blockSize: 4096,
|
||||
pageSize: 256
|
||||
},
|
||||
'noota_3g': {
|
||||
type: FSBoardHandler.FsType.SPIFFS,
|
||||
offset: 0x110000,
|
||||
size: 0x2F0000,
|
||||
blockSize: 4096,
|
||||
pageSize: 256
|
||||
},
|
||||
'noota_3gffat': {
|
||||
type: FSBoardHandler.FsType.FATFS,
|
||||
offset: 0x110000,
|
||||
size: 0x2F0000,
|
||||
blockSize: 4096,
|
||||
pageSize: 256
|
||||
},
|
||||
'noota_ffat': {
|
||||
type: FSBoardHandler.FsType.FATFS,
|
||||
offset: 0x210000,
|
||||
size: 0x1F0000,
|
||||
blockSize: 4096,
|
||||
pageSize: 256
|
||||
},
|
||||
'rainmaker': {
|
||||
type: FSBoardHandler.FsType.FATFS,
|
||||
offset: 0x290000,
|
||||
size: 0x160000,
|
||||
blockSize: 4096,
|
||||
pageSize: 256
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user