From 0175623f54534dd80aa3de49b7cff48b142b9895 Mon Sep 17 00:00:00 2001 From: per1234 Date: Sat, 26 Nov 2022 07:40:53 -0800 Subject: [PATCH 1/2] Correct upload tool name for "ESP32 FM DevKit" The upload tool name was changed from `esptool` to `esptool_py`. The author of the "ESP32 FM DevKit" board definition used the old tool name and evidently never tested it, since the upload fails: java.lang.NullPointerException at cc.arduino.packages.uploaders.SerialUploader.uploadUsingProgrammer(SerialUploader.java:295) at cc.arduino.packages.uploaders.SerialUploader.uploadUsingPreferences(SerialUploader.java:90) at cc.arduino.UploaderUtils.upload(UploaderUtils.java:77) at processing.app.SketchController.upload(SketchController.java:732) at processing.app.SketchController.exportApplet(SketchController.java:703) at processing.app.Editor$UploadHandler.run(Editor.java:2055) at java.lang.Thread.run(Thread.java:748) --- boards.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boards.txt b/boards.txt index 2edd8d6ce94..5449b3fa3a9 100644 --- a/boards.txt +++ b/boards.txt @@ -13121,7 +13121,7 @@ oroca_edubot.menu.EraseFlash.all.upload.erase_cmd=-e fm-devkit.name=ESP32 FM DevKit -fm-devkit.upload.tool=esptool +fm-devkit.upload.tool=esptool_py fm-devkit.upload.maximum_size=1310720 fm-devkit.upload.maximum_data_size=327680 fm-devkit.upload.flags= From 3f27b757563d409f5b42a9826e7b2cbe34753415 Mon Sep 17 00:00:00 2001 From: per1234 Date: Sat, 26 Nov 2022 07:45:59 -0800 Subject: [PATCH 2/2] Add protocol-explicit `upload.tool` properties required for pluggable discovery compatibility A new flexible and powerful "pluggable discovery" system was added to the Arduino boards platform framework. This system makes it easy for Arduino boards platform authors to use any arbitrary communication channel between the board and development tools. Boards platform configurations that use the old property syntax are automatically translated to the new syntax by Arduino CLI: https://arduino.github.io/arduino-cli/latest/platform-specification/#sketch-upload-configuration > For backward compatibility with IDE 1.8.15 and older the previous syntax is still supported This translation is only done in platforms that use the old syntax exclusively. If `pluggable_discovery` properties are defined for the platform then the new pluggable discovery-style `upload.tool.` properties must be defined for each board as well. This platform was converted to use the new pluggable discovery platform properties syntax, so those properties are required. Although such properties were added to board definitions at the time the syntax was changed, some board definitions were missed at that time, or added later without the required properties. Those missing properties caused uploads to fail for users of the recent versions of Arduino IDE and Arduino CLI with an error of the form: Error during Upload: Property 'upload.tool.' is undefined (where `` is the protocol of the selected port, if any) It is also important to provide compatibility with versions of Arduino development tools from before the introduction of the modern pluggable discovery system. For this reason, the old style `.upload.tool` properties are retained. Old versions of the development tools will treat the `.upload.tool.` properties as an unused arbitrary user defined property with no special significance and the new versions of the development tools will do the same for the `upload.tool` properties. --- boards.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/boards.txt b/boards.txt index 5449b3fa3a9..69fce0e320b 100644 --- a/boards.txt +++ b/boards.txt @@ -2209,6 +2209,9 @@ rmp.vid.0=0x303a rmp.pid.0=0x80F6 rmp.upload.tool=esptool_py +rmp.upload.tool.default=esptool_py +rmp.upload.tool.network=esp_ota + rmp.upload.maximum_size=1310720 rmp.upload.maximum_data_size=327680 rmp.upload.flags= @@ -9968,6 +9971,9 @@ esp32doit-devkit-v1.menu.EraseFlash.all.upload.erase_cmd=-e esp32doit-espduino.name=DOIT ESPduino32 esp32doit-espduino.upload.tool=esptool_py +esp32doit-espduino.upload.tool.default=esptool_py +esp32doit-espduino.upload.tool.network=esp_ota + esp32doit-espduino.upload.maximum_size=1310720 esp32doit-espduino.upload.maximum_data_size=327680 esp32doit-espduino.upload.wait_for_upload_port=true @@ -13122,6 +13128,9 @@ oroca_edubot.menu.EraseFlash.all.upload.erase_cmd=-e fm-devkit.name=ESP32 FM DevKit fm-devkit.upload.tool=esptool_py +fm-devkit.upload.tool.default=esptool_py +fm-devkit.upload.tool.network=esp_ota + fm-devkit.upload.maximum_size=1310720 fm-devkit.upload.maximum_data_size=327680 fm-devkit.upload.flags=