{"record":{"id":"54d795d2a29686f6","repo":"arduino/Arduino","slug":"could-not-find-tool-0","errorCode":null,"errorMessage":"Could not find tool {0}","messagePattern":"Could not find tool (.+?)","errorType":"exception","errorClass":"RunnerException","httpStatus":null,"severity":"error","filePath":"arduino-core/src/cc/arduino/packages/uploaders/SerialUploader.java","lineNumber":358,"sourceCode":"    if (boardPreferences != null) {\n      prefs.putAll(boardPreferences);\n    }\n    prefs.putAll(programmerPrefs);\n\n    // Create configuration for bootloader tool\n    PreferencesMap toolPrefs = new PreferencesMap();\n    String tool = prefs.getOrExcept(\"bootloader.tool\");\n    if (tool.contains(\":\")) {\n      String[] split = tool.split(\":\", 2);\n      TargetPlatform platform = BaseNoGui.getCurrentTargetPlatformFromPackage(split[0]);\n      tool = split[1];\n      toolPrefs.putAll(platform.getTool(tool));\n      if (toolPrefs.size() == 0)\n        throw new RunnerException(I18n.format(tr(\"Could not find tool {0} from package {1}\"), tool, split[0]));\n    }\n    toolPrefs.putAll(targetPlatform.getTool(tool));\n    if (toolPrefs.size() == 0)\n      throw new RunnerException(I18n.format(tr(\"Could not find tool {0}\"), tool));\n\n    // Merge tool with global configuration\n    prefs.putAll(toolPrefs);\n    if (verbose) {\n      prefs.put(\"erase.verbose\", prefs.getOrExcept(\"erase.params.verbose\"));\n      prefs.put(\"bootloader.verbose\", prefs.getOrExcept(\"bootloader.params.verbose\"));\n    } else {\n      prefs.put(\"erase.verbose\", prefs.getOrExcept(\"erase.params.quiet\"));\n      prefs.put(\"bootloader.verbose\", prefs.getOrExcept(\"bootloader.params.quiet\"));\n    }\n\n    new LoadVIDPIDSpecificPreferences().load(prefs);\n\n    if (!runCommand(\"erase.pattern\", prefs))\n      return false;\n\n    return runCommand(\"bootloader.pattern\", prefs);\n  }","sourceCodeStart":340,"sourceCodeEnd":376,"githubUrl":"https://github.com/arduino/Arduino/blob/a0df6e0e83b652c72bc78b0a1376c54d6ebc3bee/arduino-core/src/cc/arduino/packages/uploaders/SerialUploader.java#L340-L376","documentation":"After checking any 'package:tool' qualified reference, burnBootloader resolves the plain tool name against the current target platform. If the platform defines no such tool (empty PreferencesMap), this RunnerException is thrown. The tool needed to burn the bootloader is simply not available for the selected board's platform.","triggerScenarios":"burnBootloader with a tool preference naming a tool that is not defined in the current target platform's platform.txt (e.g. a custom tool name, or the platform is missing the bundled upload tool).","commonSituations":"Manually installed/hand-copied hardware folders missing the tools directory; upgraded core where the tool was renamed (e.g. avrdude version dirs) leaving a stale tool reference; broken or partial download of a board package.","solutions":["Reinstall the board package via Boards Manager so its bundled tool (e.g. avrdude) is present in the hardware folder","Correct the tool name in boards.txt/platform.txt to match an existing tool entry in the platform","Check the hardware folder (e.g. hardware/arduino/avr/tools/) actually contains the tool and platform.txt declares it"],"exampleFix":"// platform.txt missing tool entry\n// after adding proper tool definition and reference:\nname=Arduino AVR Boards\ncompiler.path={runtime.tools.avrdude.path}/bin/avrdude\ntool=avrdude","handlingStrategy":"validation","validationCode":"String tool = prefs.get(\"bootloader.tool\");\nboolean available = targetPlatform.getTool(tool) != null && targetPlatform.getTool(tool).size() > 0;\nif (!available) throw new IllegalStateException(\"Tool \" + tool + \" missing from platform; reinstall the board package\");","typeGuard":null,"tryCatchPattern":"try { uploader.burnBootloader(); } catch (RunnerException e) { if (e.getMessage().startsWith(\"Could not find tool\")) { reinstallBoardPackage(); } else { throw e; } }","preventionTips":["Never hand-copy hardware folders; use Boards Manager for complete packages","Check hardware/<pkg>/<arch>/tools/ exists and platform.txt declares the tool","Keep board packages updated after core upgrades"],"tags":["toolchain","configuration","platform","arduino"],"backgroundTag":"entity-not-found","analyzedSha":"a0df6e0e83b652c72bc78b0a1376c54d6ebc3bee","analyzedAt":"2026-09-06T10:13:38.901Z","contentChangedAt":"2026-09-06T10:13:38.901Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}