diff --git a/.travis.yml b/.travis.yml index 58d8ed8..bc61382 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,7 @@ language: python python: - "2.7" + - "3.5" env: - PLATFORMIO_PROJECT_DIR=examples/arduino-blink diff --git a/boards/alksesp32.json b/boards/alksesp32.json index 437dd59..6fd1401 100644 --- a/boards/alksesp32.json +++ b/boards/alksesp32.json @@ -27,18 +27,6 @@ "maximum_ram_size": 327680, "maximum_size": 4194304, "protocol": "esptool", - "protocols": [ - "esptool", - "esp-prog", - "jlink", - "olimex-arm-usb-tiny-h", - "olimex-arm-usb-ocd-h", - "olimex-arm-usb-ocd", - "olimex-jtag-tiny", - "iot-bus-jtag", - "tumpa", - "minimodule" - ], "require_upload_port": true, "speed": 115200 }, diff --git a/boards/bpi-bit.json b/boards/bpi-bit.json new file mode 100644 index 0000000..b5c3521 --- /dev/null +++ b/boards/bpi-bit.json @@ -0,0 +1,33 @@ +{ + "build": { + "core": "esp32", + "extra_flags": "-DARDUINO_BPI_BIT", + "f_cpu": "160000000L", + "f_flash": "40000000L", + "flash_mode": "dio", + "ldscript": "esp32_out.ld", + "mcu": "esp32", + "variant": "bpi-bit" + }, + "connectivity": [ + "wifi", + "bluetooth", + "ethernet", + "can" + ], + "frameworks": [ + "arduino", + "espidf" + ], + "name": "BPI-Bit", + "upload": { + "flash_size": "4MB", + "maximum_ram_size": 327680, + "maximum_size": 4194304, + "protocol": "esptool", + "require_upload_port": true, + "speed": 921600 + }, + "url": "https://en.wikipedia.org/wiki/ESP32", + "vendor": "BPI Tech" +} diff --git a/boards/d-duino-32.json b/boards/d-duino-32.json new file mode 100644 index 0000000..03adcb7 --- /dev/null +++ b/boards/d-duino-32.json @@ -0,0 +1,36 @@ +{ + "build": { + "core": "esp32", + "extra_flags": "-DARDUINO_D_DUINO_32", + "f_cpu": "240000000L", + "f_flash": "40000000L", + "flash_mode": "dio", + "ldscript": "esp32_out.ld", + "mcu": "esp32", + "variant": "d-duino-32" + }, + "connectivity": [ + "wifi", + "bluetooth", + "ethernet", + "can" + ], + "debug": { + "openocd_board": "esp-wroom-32.cfg" + }, + "frameworks": [ + "arduino", + "espidf" + ], + "name": "D-duino-32", + "upload": { + "flash_size": "4MB", + "maximum_ram_size": 327680, + "maximum_size": 4194304, + "protocol": "esptool", + "require_upload_port": true, + "speed": 921600 + }, + "url": "https://www.tindie.com/products/lspoplove/dstike-d-duino-32-v3/", + "vendor": "DSTIKE" +} diff --git a/boards/esp-wrover-kit.json b/boards/esp-wrover-kit.json index 6b8a5b4..2f2dce7 100644 --- a/boards/esp-wrover-kit.json +++ b/boards/esp-wrover-kit.json @@ -1,7 +1,7 @@ { "build": { "core": "esp32", - "extra_flags": "-DARDUINO_ESP32_DEV -DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue", + "extra_flags": "-DARDUINO_ESP32_DEV", "f_cpu": "240000000L", "f_flash": "40000000L", "flash_mode": "dio", @@ -40,16 +40,7 @@ "protocol": "esptool", "protocols": [ "esptool", - "ftdi", - "esp-prog", - "jlink", - "olimex-arm-usb-tiny-h", - "olimex-arm-usb-ocd-h", - "olimex-arm-usb-ocd", - "olimex-jtag-tiny", - "iot-bus-jtag", - "tumpa", - "minimodule" + "ftdi" ], "require_upload_port": true, "speed": 921600 diff --git a/boards/esp32-evb.json b/boards/esp32-evb.json index 4dff358..97b9bb7 100644 --- a/boards/esp32-evb.json +++ b/boards/esp32-evb.json @@ -28,18 +28,6 @@ "maximum_ram_size": 327680, "maximum_size": 4194304, "protocol": "esptool", - "protocols": [ - "esptool", - "esp-prog", - "jlink", - "olimex-arm-usb-tiny-h", - "olimex-arm-usb-ocd-h", - "olimex-arm-usb-ocd", - "olimex-jtag-tiny", - "iot-bus-jtag", - "tumpa", - "minimodule" - ], "require_upload_port": true, "speed": 921600 }, diff --git a/boards/esp32-gateway.json b/boards/esp32-gateway.json index 60edc4e..cb9ac03 100644 --- a/boards/esp32-gateway.json +++ b/boards/esp32-gateway.json @@ -28,18 +28,6 @@ "maximum_ram_size": 327680, "maximum_size": 4194304, "protocol": "esptool", - "protocols": [ - "esptool", - "esp-prog", - "jlink", - "olimex-arm-usb-tiny-h", - "olimex-arm-usb-ocd-h", - "olimex-arm-usb-ocd", - "olimex-jtag-tiny", - "iot-bus-jtag", - "tumpa", - "minimodule" - ], "require_upload_port": true, "speed": 921600 }, diff --git a/boards/esp32-poe.json b/boards/esp32-poe.json new file mode 100644 index 0000000..c9d1bb1 --- /dev/null +++ b/boards/esp32-poe.json @@ -0,0 +1,33 @@ +{ + "build": { + "core": "esp32", + "extra_flags": "-DARDUINO_ESP32_POE", + "f_cpu": "240000000L", + "f_flash": "40000000L", + "flash_mode": "dio", + "ldscript": "esp32_out.ld", + "mcu": "esp32", + "variant": "esp32-poe" + }, + "connectivity": [ + "wifi", + "bluetooth", + "ethernet", + "can" + ], + "frameworks": [ + "arduino", + "espidf" + ], + "name": "me=OLIMEX ESP32-PoE", + "upload": { + "flash_size": "4MB", + "maximum_ram_size": 327680, + "maximum_size": 4194304, + "protocol": "esptool", + "require_upload_port": true, + "speed": 921600 + }, + "url": "https://www.olimex.com/Products/IoT/ESP32/ESP32-POE/open-source-hardware", + "vendor": "OLIMEX" +} diff --git a/boards/esp32-pro.json b/boards/esp32-pro.json index 8e1b18b..cc99c5e 100644 --- a/boards/esp32-pro.json +++ b/boards/esp32-pro.json @@ -25,9 +25,6 @@ "maximum_ram_size": 327680, "maximum_size": 4194304, "protocol": "esptool", - "protocols": [ - "esptool" - ], "require_upload_port": true, "speed": 921600 }, diff --git a/boards/esp320.json b/boards/esp320.json index fe2c064..08fe3d1 100644 --- a/boards/esp320.json +++ b/boards/esp320.json @@ -25,9 +25,6 @@ "maximum_ram_size": 327680, "maximum_size": 4194304, "protocol": "esptool", - "protocols": [ - "esptool" - ], "require_upload_port": true, "speed": 921600 }, diff --git a/boards/esp32dev.json b/boards/esp32dev.json index 60850cd..e9271ed 100644 --- a/boards/esp32dev.json +++ b/boards/esp32dev.json @@ -28,18 +28,6 @@ "maximum_ram_size": 327680, "maximum_size": 4194304, "protocol": "esptool", - "protocols": [ - "esptool", - "esp-prog", - "jlink", - "olimex-arm-usb-tiny-h", - "olimex-arm-usb-ocd-h", - "olimex-arm-usb-ocd", - "olimex-jtag-tiny", - "iot-bus-jtag", - "tumpa", - "minimodule" - ], "require_upload_port": true, "speed": 921600 }, diff --git a/boards/esp32doit-devkit-v1.json b/boards/esp32doit-devkit-v1.json index e8a5e0c..9e06162 100644 --- a/boards/esp32doit-devkit-v1.json +++ b/boards/esp32doit-devkit-v1.json @@ -28,18 +28,6 @@ "maximum_ram_size": 327680, "maximum_size": 4194304, "protocol": "esptool", - "protocols": [ - "esptool", - "esp-prog", - "jlink", - "olimex-arm-usb-tiny-h", - "olimex-arm-usb-ocd-h", - "olimex-arm-usb-ocd", - "olimex-jtag-tiny", - "iot-bus-jtag", - "tumpa", - "minimodule" - ], "require_upload_port": true, "speed": 921600 }, diff --git a/boards/esp32thing.json b/boards/esp32thing.json index 056faae..550a5cb 100644 --- a/boards/esp32thing.json +++ b/boards/esp32thing.json @@ -28,18 +28,6 @@ "maximum_ram_size": 327680, "maximum_size": 4194304, "protocol": "esptool", - "protocols": [ - "esptool", - "esp-prog", - "jlink", - "olimex-arm-usb-tiny-h", - "olimex-arm-usb-ocd-h", - "olimex-arm-usb-ocd", - "olimex-jtag-tiny", - "iot-bus-jtag", - "tumpa", - "minimodule" - ], "require_upload_port": true, "speed": 921600 }, diff --git a/boards/esp32vn-iot-uno.json b/boards/esp32vn-iot-uno.json index a9d4dc5..0a9c39a 100644 --- a/boards/esp32vn-iot-uno.json +++ b/boards/esp32vn-iot-uno.json @@ -28,18 +28,6 @@ "maximum_ram_size": 327680, "maximum_size": 4194304, "protocol": "esptool", - "protocols": [ - "esptool", - "esp-prog", - "jlink", - "olimex-arm-usb-tiny-h", - "olimex-arm-usb-ocd-h", - "olimex-arm-usb-ocd", - "olimex-jtag-tiny", - "iot-bus-jtag", - "tumpa", - "minimodule" - ], "require_upload_port": true, "speed": 921600 }, diff --git a/boards/espea32.json b/boards/espea32.json index 1b94555..6bb3d52 100644 --- a/boards/espea32.json +++ b/boards/espea32.json @@ -25,9 +25,6 @@ "maximum_ram_size": 327680, "maximum_size": 4194304, "protocol": "esptool", - "protocols": [ - "esptool" - ], "require_upload_port": true, "speed": 921600 }, diff --git a/boards/espectro32.json b/boards/espectro32.json index e09e2ca..30fe0d2 100644 --- a/boards/espectro32.json +++ b/boards/espectro32.json @@ -28,18 +28,6 @@ "maximum_ram_size": 327680, "maximum_size": 4194304, "protocol": "esptool", - "protocols": [ - "esptool", - "esp-prog", - "jlink", - "olimex-arm-usb-tiny-h", - "olimex-arm-usb-ocd-h", - "olimex-arm-usb-ocd", - "olimex-jtag-tiny", - "iot-bus-jtag", - "tumpa", - "minimodule" - ], "require_upload_port": true, "speed": 2000000 }, diff --git a/boards/espino32.json b/boards/espino32.json index 7a99c12..82664aa 100644 --- a/boards/espino32.json +++ b/boards/espino32.json @@ -28,18 +28,6 @@ "maximum_ram_size": 327680, "maximum_size": 4194304, "protocol": "esptool", - "protocols": [ - "esptool", - "esp-prog", - "jlink", - "olimex-arm-usb-tiny-h", - "olimex-arm-usb-ocd-h", - "olimex-arm-usb-ocd", - "olimex-jtag-tiny", - "iot-bus-jtag", - "tumpa", - "minimodule" - ], "require_upload_port": true, "speed": 921600 }, diff --git a/boards/featheresp32.json b/boards/featheresp32.json index a00b76a..bed8f15 100644 --- a/boards/featheresp32.json +++ b/boards/featheresp32.json @@ -28,18 +28,6 @@ "maximum_ram_size": 327680, "maximum_size": 4194304, "protocol": "esptool", - "protocols": [ - "esptool", - "esp-prog", - "jlink", - "olimex-arm-usb-tiny-h", - "olimex-arm-usb-ocd-h", - "olimex-arm-usb-ocd", - "olimex-jtag-tiny", - "iot-bus-jtag", - "tumpa", - "minimodule" - ], "require_upload_port": true, "speed": 921600 }, diff --git a/boards/firebeetle32.json b/boards/firebeetle32.json index 2d7a341..98678f2 100644 --- a/boards/firebeetle32.json +++ b/boards/firebeetle32.json @@ -28,18 +28,6 @@ "maximum_ram_size": 327680, "maximum_size": 4194304, "protocol": "esptool", - "protocols": [ - "esptool", - "esp-prog", - "jlink", - "olimex-arm-usb-tiny-h", - "olimex-arm-usb-ocd-h", - "olimex-arm-usb-ocd", - "olimex-jtag-tiny", - "iot-bus-jtag", - "tumpa", - "minimodule" - ], "require_upload_port": true, "speed": 921600 }, diff --git a/boards/fm-devkit.json b/boards/fm-devkit.json new file mode 100644 index 0000000..23897c4 --- /dev/null +++ b/boards/fm-devkit.json @@ -0,0 +1,36 @@ +{ + "build": { + "core": "esp32", + "extra_flags": "-DARDUINO_fm_devkit", + "f_cpu": "240000000L", + "f_flash": "40000000L", + "flash_mode": "dio", + "ldscript": "esp32_out.ld", + "mcu": "esp32", + "variant": "fm-devkit" + }, + "connectivity": [ + "wifi", + "bluetooth", + "ethernet", + "can" + ], + "debug": { + "openocd_board": "esp-wroom-32.cfg" + }, + "frameworks": [ + "arduino", + "espidf" + ], + "name": "ESP32 FM DevKit", + "upload": { + "flash_size": "4MB", + "maximum_ram_size": 327680, + "maximum_size": 4194304, + "protocol": "esptool", + "require_upload_port": true, + "speed": 921600 + }, + "url": "https://github.com/dragon-engineer/esp32_fmdevkit", + "vendor": "Unknown" +} diff --git a/boards/heltec_wifi_kit_32.json b/boards/heltec_wifi_kit_32.json index 6e3c7bc..5d4db01 100644 --- a/boards/heltec_wifi_kit_32.json +++ b/boards/heltec_wifi_kit_32.json @@ -25,9 +25,6 @@ "maximum_ram_size": 327680, "maximum_size": 4194304, "protocol": "esptool", - "protocols": [ - "esptool" - ], "require_upload_port": true, "speed": 921600 }, diff --git a/boards/heltec_wifi_lora_32.json b/boards/heltec_wifi_lora_32.json index ee48d15..f39ff1f 100644 --- a/boards/heltec_wifi_lora_32.json +++ b/boards/heltec_wifi_lora_32.json @@ -15,6 +15,9 @@ "ethernet", "can" ], + "debug": { + "openocd_board": "esp-wroom-32.cfg" + }, "frameworks": [ "arduino", "espidf" @@ -25,9 +28,6 @@ "maximum_ram_size": 327680, "maximum_size": 4194304, "protocol": "esptool", - "protocols": [ - "esptool" - ], "require_upload_port": true, "speed": 921600 }, diff --git a/boards/hornbill32dev.json b/boards/hornbill32dev.json index 98e1bd3..0114770 100644 --- a/boards/hornbill32dev.json +++ b/boards/hornbill32dev.json @@ -28,18 +28,6 @@ "maximum_ram_size": 327680, "maximum_size": 4194304, "protocol": "esptool", - "protocols": [ - "esptool", - "esp-prog", - "jlink", - "olimex-arm-usb-tiny-h", - "olimex-arm-usb-ocd-h", - "olimex-arm-usb-ocd", - "olimex-jtag-tiny", - "iot-bus-jtag", - "tumpa", - "minimodule" - ], "require_upload_port": true, "speed": 921600 }, diff --git a/boards/hornbill32minima.json b/boards/hornbill32minima.json index 3c79e85..838b8cf 100644 --- a/boards/hornbill32minima.json +++ b/boards/hornbill32minima.json @@ -28,18 +28,6 @@ "maximum_ram_size": 327680, "maximum_size": 4194304, "protocol": "esptool", - "protocols": [ - "esptool", - "esp-prog", - "jlink", - "olimex-arm-usb-tiny-h", - "olimex-arm-usb-ocd-h", - "olimex-arm-usb-ocd", - "olimex-jtag-tiny", - "iot-bus-jtag", - "tumpa", - "minimodule" - ], "require_upload_port": true, "speed": 921600 }, diff --git a/boards/intorobot.json b/boards/intorobot.json index 5ab27c1..097f271 100644 --- a/boards/intorobot.json +++ b/boards/intorobot.json @@ -25,9 +25,6 @@ "maximum_ram_size": 327680, "maximum_size": 4194304, "protocol": "esptool", - "protocols": [ - "esptool" - ], "require_upload_port": true, "speed": 921600 }, diff --git a/boards/iotbusio.json b/boards/iotbusio.json index 6c7adf2..6ad310d 100644 --- a/boards/iotbusio.json +++ b/boards/iotbusio.json @@ -9,6 +9,7 @@ "mcu": "esp32", "variant": "esp32" }, + "certified": true, "connectivity": [ "wifi", "bluetooth", @@ -29,18 +30,6 @@ "maximum_ram_size": 327680, "maximum_size": 4194304, "protocol": "esptool", - "protocols": [ - "esptool", - "esp-prog", - "jlink", - "olimex-arm-usb-tiny-h", - "olimex-arm-usb-ocd-h", - "olimex-arm-usb-ocd", - "olimex-jtag-tiny", - "iot-bus-jtag", - "tumpa", - "minimodule" - ], "require_upload_port": true, "speed": 921600 }, diff --git a/boards/iotbusproteus.json b/boards/iotbusproteus.json index a06994b..a0112de 100644 --- a/boards/iotbusproteus.json +++ b/boards/iotbusproteus.json @@ -9,6 +9,7 @@ "mcu": "esp32", "variant": "esp32" }, + "certified": true, "connectivity": [ "wifi", "bluetooth", @@ -23,24 +24,12 @@ "arduino", "espidf" ], - "name": "oddWires Proteus IoT-Bus", + "name": "oddWires IoT-Bus Proteus", "upload": { "flash_size": "4MB", "maximum_ram_size": 327680, "maximum_size": 4194304, "protocol": "esptool", - "protocols": [ - "esptool", - "esp-prog", - "jlink", - "olimex-arm-usb-tiny-h", - "olimex-arm-usb-ocd-h", - "olimex-arm-usb-ocd", - "olimex-jtag-tiny", - "iot-bus-jtag", - "tumpa", - "minimodule" - ], "require_upload_port": true, "speed": 921600 }, diff --git a/boards/lolin32.json b/boards/lolin32.json index 1a84a2e..e487d78 100644 --- a/boards/lolin32.json +++ b/boards/lolin32.json @@ -28,18 +28,6 @@ "maximum_ram_size": 327680, "maximum_size": 4194304, "protocol": "esptool", - "protocols": [ - "esptool", - "esp-prog", - "jlink", - "olimex-arm-usb-tiny-h", - "olimex-arm-usb-ocd-h", - "olimex-arm-usb-ocd", - "olimex-jtag-tiny", - "iot-bus-jtag", - "tumpa", - "minimodule" - ], "require_upload_port": true, "speed": 921600 }, diff --git a/boards/lolin_d32.json b/boards/lolin_d32.json index c13480b..29a8816 100644 --- a/boards/lolin_d32.json +++ b/boards/lolin_d32.json @@ -28,18 +28,6 @@ "maximum_ram_size": 327680, "maximum_size": 4194304, "protocol": "esptool", - "protocols": [ - "esptool", - "esp-prog", - "jlink", - "olimex-arm-usb-tiny-h", - "olimex-arm-usb-ocd-h", - "olimex-arm-usb-ocd", - "olimex-jtag-tiny", - "iot-bus-jtag", - "tumpa", - "minimodule" - ], "require_upload_port": true, "speed": 921600 }, diff --git a/boards/lolin_d32_pro.json b/boards/lolin_d32_pro.json index 1930a03..696ab3f 100644 --- a/boards/lolin_d32_pro.json +++ b/boards/lolin_d32_pro.json @@ -28,18 +28,6 @@ "maximum_ram_size": 327680, "maximum_size": 4194304, "protocol": "esptool", - "protocols": [ - "esptool", - "esp-prog", - "jlink", - "olimex-arm-usb-tiny-h", - "olimex-arm-usb-ocd-h", - "olimex-arm-usb-ocd", - "olimex-jtag-tiny", - "iot-bus-jtag", - "tumpa", - "minimodule" - ], "require_upload_port": true, "speed": 921600 }, diff --git a/boards/lopy.json b/boards/lopy.json new file mode 100644 index 0000000..f1afd28 --- /dev/null +++ b/boards/lopy.json @@ -0,0 +1,36 @@ +{ + "build": { + "core": "esp32", + "extra_flags": "-DARDUINO_LoPy", + "f_cpu": "240000000L", + "f_flash": "40000000L", + "flash_mode": "dio", + "ldscript": "esp32_out.ld", + "mcu": "esp32", + "variant": "lopy" + }, + "connectivity": [ + "wifi", + "bluetooth", + "can", + "ethernet" + ], + "debug": { + "openocd_board": "esp-wroom-32.cfg" + }, + "frameworks": [ + "arduino", + "espidf" + ], + "name": "Pycom LoPy", + "upload": { + "flash_size": "4MB", + "maximum_ram_size": 327680, + "maximum_size": 4194304, + "protocol": "esptool", + "require_upload_port": true, + "speed": 921600 + }, + "url": "https://pycom.io/", + "vendor": "Pycom Ltd." +} diff --git a/boards/lopy4.json b/boards/lopy4.json new file mode 100644 index 0000000..007c120 --- /dev/null +++ b/boards/lopy4.json @@ -0,0 +1,36 @@ +{ + "build": { + "core": "esp32", + "extra_flags": "-DARDUINO_LoPy4", + "f_cpu": "240000000L", + "f_flash": "40000000L", + "flash_mode": "dio", + "ldscript": "esp32_out.ld", + "mcu": "esp32", + "variant": "lopy4" + }, + "connectivity": [ + "wifi", + "bluetooth", + "can", + "ethernet" + ], + "debug": { + "openocd_board": "esp-wroom-32.cfg" + }, + "frameworks": [ + "arduino", + "espidf" + ], + "name": "Pycom LoPy4", + "upload": { + "flash_size": "4MB", + "maximum_ram_size": 1310720, + "maximum_size": 4194304, + "protocol": "esptool", + "require_upload_port": true, + "speed": 921600 + }, + "url": "https://pycom.io/", + "vendor": "Pycom Ltd." +} diff --git a/boards/m5stack-core-esp32.json b/boards/m5stack-core-esp32.json index dcd382b..59f14e7 100644 --- a/boards/m5stack-core-esp32.json +++ b/boards/m5stack-core-esp32.json @@ -25,9 +25,6 @@ "maximum_ram_size": 327680, "maximum_size": 4194304, "protocol": "esptool", - "protocols": [ - "esptool" - ], "require_upload_port": true, "speed": 921600 }, diff --git a/boards/m5stack-fire.json b/boards/m5stack-fire.json index c2953d2..d2cf137 100644 --- a/boards/m5stack-fire.json +++ b/boards/m5stack-fire.json @@ -7,6 +7,7 @@ "flash_mode": "dio", "ldscript": "esp32_out.ld", "mcu": "esp32", + "partitions": "default_16MB.csv", "variant": "m5stack_fire" }, "connectivity": [ @@ -22,12 +23,9 @@ "name": "M5Stack FIRE", "upload": { "flash_size": "16MB", - "maximum_ram_size": 327680, + "maximum_ram_size": 6553600, "maximum_size": 16777216, "protocol": "esptool", - "protocols": [ - "esptool" - ], "require_upload_port": true, "speed": 921600 }, diff --git a/boards/mhetesp32devkit.json b/boards/mhetesp32devkit.json index 4ad8aa5..dc3ad6c 100644 --- a/boards/mhetesp32devkit.json +++ b/boards/mhetesp32devkit.json @@ -28,18 +28,6 @@ "maximum_ram_size": 327680, "maximum_size": 4194304, "protocol": "esptool", - "protocols": [ - "esptool", - "esp-prog", - "jlink", - "olimex-arm-usb-tiny-h", - "olimex-arm-usb-ocd-h", - "olimex-arm-usb-ocd", - "olimex-jtag-tiny", - "iot-bus-jtag", - "tumpa", - "minimodule" - ], "require_upload_port": true, "speed": 921600 }, diff --git a/boards/mhetesp32minikit.json b/boards/mhetesp32minikit.json index a2d6cf9..ef3c21c 100644 --- a/boards/mhetesp32minikit.json +++ b/boards/mhetesp32minikit.json @@ -28,18 +28,6 @@ "maximum_ram_size": 327680, "maximum_size": 4194304, "protocol": "esptool", - "protocols": [ - "esptool", - "esp-prog", - "jlink", - "olimex-arm-usb-tiny-h", - "olimex-arm-usb-ocd-h", - "olimex-arm-usb-ocd", - "olimex-jtag-tiny", - "iot-bus-jtag", - "tumpa", - "minimodule" - ], "require_upload_port": true, "speed": 921600 }, diff --git a/boards/microduino-core-esp32.json b/boards/microduino-core-esp32.json index 4d000ba..9677eed 100644 --- a/boards/microduino-core-esp32.json +++ b/boards/microduino-core-esp32.json @@ -25,9 +25,6 @@ "maximum_ram_size": 327680, "maximum_size": 4194304, "protocol": "esptool", - "protocols": [ - "esptool" - ], "require_upload_port": true, "speed": 2000000 }, diff --git a/boards/nano32.json b/boards/nano32.json index 79e9cf6..204b56c 100644 --- a/boards/nano32.json +++ b/boards/nano32.json @@ -27,9 +27,6 @@ "maximum_ram_size": 327680, "maximum_size": 4194304, "protocol": "esptool", - "protocols": [ - "esptool" - ], "require_upload_port": true, "speed": 921600 }, diff --git a/boards/nina_w10.json b/boards/nina_w10.json index 8099566..3ae4680 100644 --- a/boards/nina_w10.json +++ b/boards/nina_w10.json @@ -26,9 +26,6 @@ "maximum_ram_size": 327680, "maximum_size": 2097152, "protocol": "esptool", - "protocols": [ - "esptool" - ], "require_upload_port": true, "speed": 921600 }, diff --git a/boards/node32s.json b/boards/node32s.json index 59e4174..72fa136 100644 --- a/boards/node32s.json +++ b/boards/node32s.json @@ -28,18 +28,6 @@ "maximum_ram_size": 327680, "maximum_size": 4194304, "protocol": "esptool", - "protocols": [ - "esptool", - "esp-prog", - "jlink", - "olimex-arm-usb-tiny-h", - "olimex-arm-usb-ocd-h", - "olimex-arm-usb-ocd", - "olimex-jtag-tiny", - "iot-bus-jtag", - "tumpa", - "minimodule" - ], "require_upload_port": true, "speed": 921600 }, diff --git a/boards/nodemcu-32s.json b/boards/nodemcu-32s.json index ed8325b..13e3711 100644 --- a/boards/nodemcu-32s.json +++ b/boards/nodemcu-32s.json @@ -28,18 +28,6 @@ "maximum_ram_size": 327680, "maximum_size": 4194304, "protocol": "esptool", - "protocols": [ - "esptool", - "esp-prog", - "jlink", - "olimex-arm-usb-tiny-h", - "olimex-arm-usb-ocd-h", - "olimex-arm-usb-ocd", - "olimex-jtag-tiny", - "iot-bus-jtag", - "tumpa", - "minimodule" - ], "require_upload_port": true, "speed": 921600 }, diff --git a/boards/odroid_esp32.json b/boards/odroid_esp32.json index 4edcb93..3eebbb3 100644 --- a/boards/odroid_esp32.json +++ b/boards/odroid_esp32.json @@ -25,9 +25,6 @@ "maximum_ram_size": 327680, "maximum_size": 16777216, "protocol": "esptool", - "protocols": [ - "esptool" - ], "require_upload_port": true, "speed": 921600 }, diff --git a/boards/onehorse32dev.json b/boards/onehorse32dev.json index d383639..5adcafc 100644 --- a/boards/onehorse32dev.json +++ b/boards/onehorse32dev.json @@ -25,9 +25,6 @@ "maximum_ram_size": 327680, "maximum_size": 4194304, "protocol": "esptool", - "protocols": [ - "esptool" - ], "require_upload_port": true, "speed": 921600 }, diff --git a/boards/oroca_edubot.json b/boards/oroca_edubot.json new file mode 100644 index 0000000..9b2e922 --- /dev/null +++ b/boards/oroca_edubot.json @@ -0,0 +1,33 @@ +{ + "build": { + "core": "esp32", + "extra_flags": "-DARDUINO_OROCA_EDUBOT", + "f_cpu": "240000000L", + "f_flash": "40000000L", + "flash_mode": "dio", + "ldscript": "esp32_out.ld", + "mcu": "esp32", + "variant": "oroca_edubot" + }, + "connectivity": [ + "wifi", + "bluetooth", + "ethernet", + "can" + ], + "frameworks": [ + "arduino", + "espidf" + ], + "name": "OROCA EduBot", + "upload": { + "flash_size": "4MB", + "maximum_ram_size": 327680, + "maximum_size": 4194304, + "protocol": "esptool", + "require_upload_port": true, + "speed": 921600 + }, + "url": "https://github.com/oroca/OROCA-EduBot", + "vendor": "OROCA" +} diff --git a/boards/pico32.json b/boards/pico32.json index 223510d..b786a94 100644 --- a/boards/pico32.json +++ b/boards/pico32.json @@ -25,9 +25,6 @@ "maximum_ram_size": 327680, "maximum_size": 4194304, "protocol": "esptool", - "protocols": [ - "esptool" - ], "require_upload_port": true, "speed": 921600 }, diff --git a/boards/pocket_32.json b/boards/pocket_32.json index 441ef9c..15cc54e 100644 --- a/boards/pocket_32.json +++ b/boards/pocket_32.json @@ -28,18 +28,6 @@ "maximum_ram_size": 327680, "maximum_size": 4194304, "protocol": "esptool", - "protocols": [ - "esptool", - "esp-prog", - "jlink", - "olimex-arm-usb-tiny-h", - "olimex-arm-usb-ocd-h", - "olimex-arm-usb-ocd", - "olimex-jtag-tiny", - "iot-bus-jtag", - "tumpa", - "minimodule" - ], "require_upload_port": true, "speed": 921600 }, diff --git a/boards/quantum.json b/boards/quantum.json index a0dac53..701274b 100644 --- a/boards/quantum.json +++ b/boards/quantum.json @@ -25,9 +25,6 @@ "maximum_ram_size": 327680, "maximum_size": 16777216, "protocol": "esptool", - "protocols": [ - "esptool" - ], "require_upload_port": true, "speed": 921600 }, diff --git a/boards/ttgo-lora32-v1.json b/boards/ttgo-lora32-v1.json index 2cd54b4..b8af8d3 100644 --- a/boards/ttgo-lora32-v1.json +++ b/boards/ttgo-lora32-v1.json @@ -28,18 +28,6 @@ "maximum_ram_size": 327680, "maximum_size": 4194304, "protocol": "esptool", - "protocols": [ - "esptool", - "esp-prog", - "jlink", - "olimex-arm-usb-tiny-h", - "olimex-arm-usb-ocd-h", - "olimex-arm-usb-ocd", - "olimex-jtag-tiny", - "iot-bus-jtag", - "tumpa", - "minimodule" - ], "require_upload_port": true, "speed": 921600 }, diff --git a/boards/ttgo-t-beam.json b/boards/ttgo-t-beam.json new file mode 100644 index 0000000..85a038d --- /dev/null +++ b/boards/ttgo-t-beam.json @@ -0,0 +1,36 @@ +{ + "build": { + "core": "esp32", + "extra_flags": "-DARDUINO_T_Beam", + "f_cpu": "240000000L", + "f_flash": "40000000L", + "flash_mode": "dio", + "ldscript": "esp32_out.ld", + "mcu": "esp32", + "variant": "t-beam" + }, + "connectivity": [ + "wifi", + "bluetooth", + "can", + "ethernet" + ], + "debug": { + "openocd_board": "esp-wroom-32.cfg" + }, + "frameworks": [ + "arduino", + "espidf" + ], + "name": "TTGO T-Beam", + "upload": { + "flash_size": "4MB", + "maximum_ram_size": 1310720, + "maximum_size": 4194304, + "protocol": "esptool", + "require_upload_port": true, + "speed": 921600 + }, + "url": "https://github.com/LilyGO/TTGO-T-Beam", + "vendor": "TTGO" +} diff --git a/boards/turta_iot_node.json b/boards/turta_iot_node.json new file mode 100644 index 0000000..8b4e0c0 --- /dev/null +++ b/boards/turta_iot_node.json @@ -0,0 +1,33 @@ +{ + "build": { + "core": "esp32", + "extra_flags": "-DARDUINO_ESP32_PICO", + "f_cpu": "240000000L", + "f_flash": "40000000L", + "flash_mode": "dio", + "ldscript": "esp32_out.ld", + "mcu": "esp32", + "variant": "pico32" + }, + "connectivity": [ + "wifi", + "bluetooth", + "ethernet", + "can" + ], + "frameworks": [ + "arduino", + "espidf" + ], + "name": "Turta IoT Node", + "upload": { + "flash_size": "4MB", + "maximum_ram_size": 327680, + "maximum_size": 4194304, + "protocol": "esptool", + "require_upload_port": true, + "speed": 921600 + }, + "url": "https://www.turta.io/en/iotnode", + "vendor": "Turta" +} diff --git a/boards/wemosbat.json b/boards/wemosbat.json index b81dd21..4b74638 100644 --- a/boards/wemosbat.json +++ b/boards/wemosbat.json @@ -22,24 +22,12 @@ "arduino", "espidf" ], - "name": "WeMos WiFi & Bluetooth Battery", + "name": "WeMos WiFi and Bluetooth Battery", "upload": { "flash_size": "4MB", "maximum_ram_size": 327680, "maximum_size": 4194304, "protocol": "esptool", - "protocols": [ - "esptool", - "esp-prog", - "jlink", - "olimex-arm-usb-tiny-h", - "olimex-arm-usb-ocd-h", - "olimex-arm-usb-ocd", - "olimex-jtag-tiny", - "iot-bus-jtag", - "tumpa", - "minimodule" - ], "require_upload_port": true, "speed": 921600 }, diff --git a/boards/wesp32.json b/boards/wesp32.json new file mode 100644 index 0000000..d05efb8 --- /dev/null +++ b/boards/wesp32.json @@ -0,0 +1,36 @@ +{ + "build": { + "core": "esp32", + "extra_flags": "-DARDUINO_WESP32", + "f_cpu": "240000000L", + "f_flash": "40000000L", + "flash_mode": "dio", + "ldscript": "esp32_out.ld", + "mcu": "esp32", + "variant": "wesp32" + }, + "connectivity": [ + "wifi", + "bluetooth", + "ethernet", + "can" + ], + "debug": { + "openocd_board": "esp-wroom-32.cfg" + }, + "frameworks": [ + "arduino", + "espidf" + ], + "name": "Silicognition wESP32", + "upload": { + "flash_size": "4MB", + "maximum_ram_size": 327680, + "maximum_size": 4194304, + "protocol": "esptool", + "require_upload_port": true, + "speed": 921600 + }, + "url": "https://wesp32.com/", + "vendor": "Silicognition" +} diff --git a/boards/widora-air.json b/boards/widora-air.json index 7b5dcae..15dee83 100644 --- a/boards/widora-air.json +++ b/boards/widora-air.json @@ -25,9 +25,6 @@ "maximum_ram_size": 327680, "maximum_size": 16777216, "protocol": "esptool", - "protocols": [ - "esptool" - ], "require_upload_port": true, "speed": 921600 }, diff --git a/boards/xinabox_cw02.json b/boards/xinabox_cw02.json index cff66b4..38e4e62 100644 --- a/boards/xinabox_cw02.json +++ b/boards/xinabox_cw02.json @@ -28,18 +28,6 @@ "maximum_ram_size": 327680, "maximum_size": 4194304, "protocol": "esptool", - "protocols": [ - "esptool", - "esp-prog", - "jlink", - "olimex-arm-usb-tiny-h", - "olimex-arm-usb-ocd-h", - "olimex-arm-usb-ocd", - "olimex-jtag-tiny", - "iot-bus-jtag", - "tumpa", - "minimodule" - ], "require_upload_port": true, "speed": 921600 }, diff --git a/builder/frameworks/_embedtxt_files.py b/builder/frameworks/_embedtxt_files.py index 5d64c56..1be72aa 100644 --- a/builder/frameworks/_embedtxt_files.py +++ b/builder/frameworks/_embedtxt_files.py @@ -36,7 +36,7 @@ def prepare_files(files): fp.seek(-1, SEEK_END) if fp.read(1) != '\0': fp.seek(0, SEEK_CUR) - fp.write('\0') + fp.write(b'\0') def extract_files(cppdefines): diff --git a/builder/main.py b/builder/main.py index 45fa449..1e3ea14 100644 --- a/builder/main.py +++ b/builder/main.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -import re +import socket import sys from os.path import isfile, join @@ -95,6 +95,10 @@ def _update_max_upload_size(env): env.BoardConfig().update("upload.maximum_size", max(sizes)) +def _to_unix_slashes(path): + return path.replace('\\', '/') + + # # SPIFFS helpers # @@ -146,6 +150,12 @@ env.Replace( SIZECHECKCMD="$SIZETOOL -A -d $SOURCES", SIZEPRINTCMD="$SIZETOOL -B -d $SOURCES", + ERASEFLAGS=[ + "--chip", "esp32", + "--port", '"$UPLOAD_PORT"' + ], + ERASECMD='"$PYTHONEXE" "$OBJCOPY" $ERASEFLAGS erase_flash', + MKSPIFFSTOOL="mkspiffs_${PIOPLATFORM}_${PIOFRAMEWORK}", PROGSUFFIX=".elf" ) @@ -290,9 +300,10 @@ if upload_protocol == "esptool": # Handle uploading via OTA ota_port = None if env.get("UPLOAD_PORT"): - ota_port = re.match( - r"\"?((([0-9]{1,3}\.){3}[0-9]{1,3})|.+\.local)\"?$", - env.get("UPLOAD_PORT")) + try: + ota_port = socket.gethostbyname(env.get("UPLOAD_PORT")) + except socket.error: + pass if ota_port: env.Replace(UPLOADCMD="$UPLOADOTACMD") @@ -304,17 +315,19 @@ if upload_protocol == "esptool": elif upload_protocol in debug_tools: openocd_dir = platform.get_package_dir("tool-openocd-esp32") or "" - uploader_flags = ["-s", openocd_dir] + uploader_flags = ["-s", _to_unix_slashes(openocd_dir)] uploader_flags.extend( debug_tools.get(upload_protocol).get("server").get("arguments", [])) - uploader_flags.extend(["-c", 'program_esp32 "{{$SOURCE}}" 0x10000 verify']) + uploader_flags.extend(["-c", 'program_esp32 {{$SOURCE}} 0x10000 verify']) for image in env.get("FLASH_EXTRA_IMAGES", []): uploader_flags.extend( - ["-c", 'program_esp32 "%s" %s verify' % (image[1], image[0])]) + ["-c", 'program_esp32 {{%s}} %s verify' % ( + _to_unix_slashes(image[1]), image[0])]) uploader_flags.extend(["-c", "reset run; shutdown"]) for i, item in enumerate(uploader_flags): if "$PACKAGE_DIR" in item: - uploader_flags[i] = item.replace("$PACKAGE_DIR", openocd_dir) + uploader_flags[i] = item.replace( + "$PACKAGE_DIR", _to_unix_slashes(openocd_dir)) env.Replace( UPLOADER="openocd", @@ -323,7 +336,7 @@ elif upload_protocol in debug_tools: upload_actions = [env.VerboseAction("$UPLOADCMD", "Uploading $SOURCE")] # custom upload tool -elif "UPLOADCMD" in env: +elif upload_protocol == "custom": upload_actions = [env.VerboseAction("$UPLOADCMD", "Uploading $SOURCE")] else: @@ -331,6 +344,17 @@ else: AlwaysBuild(env.Alias(["upload", "uploadfs"], target_firm, upload_actions)) +# +# Target: Erase Flash +# + +AlwaysBuild( + env.Alias("erase", None, [ + env.VerboseAction(env.AutodetectUploadPort, + "Looking for serial port..."), + env.VerboseAction("$ERASECMD", "Ready for erasing") + ])) + # # Default targets # diff --git a/examples/pumbaa-blink/.skiptest b/examples/pumbaa-blink/.skiptest new file mode 100644 index 0000000..05e3ca0 --- /dev/null +++ b/examples/pumbaa-blink/.skiptest @@ -0,0 +1 @@ +.skiptest diff --git a/platform.json b/platform.json index f18abce..0442c17 100644 --- a/platform.json +++ b/platform.json @@ -6,13 +6,13 @@ "homepage": "http://platformio.org/platforms/espressif32", "license": "Apache-2.0", "engines": { - "platformio": "^3.0.0" + "platformio": "<5" }, "repository": { "type": "git", "url": "https://github.com/platformio/platform-espressif32.git" }, - "version": "1.5.0", + "version": "1.6.0", "packageRepositories": [ "https://dl.bintray.com/platformio/dl-packages/manifest.json", "http://dl.platformio.org/packages/manifest.json", @@ -45,12 +45,12 @@ "framework-arduinoespressif32": { "type": "framework", "optional": true, - "version": "~2.10000.0" + "version": "~2.10001.190111" }, "framework-espidf": { "type": "framework", "optional": true, - "version": "~3.30101.0" + "version": "~3.30102.190109" }, "framework-simba": { "type": "framework", @@ -64,7 +64,7 @@ }, "tool-esptoolpy": { "type": "uploader", - "version": "~1.20500.0" + "version": "~1.20600.0" }, "tool-espotapy": { "type": "uploader", diff --git a/platform.py b/platform.py index 61f023e..f3a0991 100644 --- a/platform.py +++ b/platform.py @@ -37,15 +37,33 @@ class Espressif32Platform(PlatformBase): return result def _add_default_debug_tools(self, board): - debug = board.manifest.get("debug", {}) + non_debug_protocols = ["esptool"] + supported_debug_tools = [ + "esp-prog", + "iot-bus-jtag", + "jlink", + "minimodule", + "olimex-arm-usb-tiny-h", + "olimex-arm-usb-ocd-h", + "olimex-arm-usb-ocd", + "olimex-jtag-tiny", + "tumpa" + ] + debug = board.manifest.get("debug", {}) + upload_protocol = board.manifest.get("upload", {}).get("protocol") upload_protocols = board.manifest.get("upload", {}).get( "protocols", []) + if debug: + upload_protocols.extend(supported_debug_tools) + if upload_protocol and upload_protocol not in upload_protocols: + upload_protocols.append(upload_protocol) + + board.manifest['upload']['protocols'] = upload_protocols + if "tools" not in debug: debug['tools'] = {} - non_debug_protocols = ["esptool"] - # Only FTDI based debug probes for link in upload_protocols: if link in non_debug_protocols or link in debug['tools']: