{"record":{"id":"d7955cd5ca653174","repo":"arduino/Arduino","slug":"could-not-find-tool-0-from-package-1","errorCode":null,"errorMessage":"Could not find tool {0} from package {1}","messagePattern":"Could not find tool (.+?) from package (.+?)","errorType":"exception","errorClass":"RunnerException","httpStatus":null,"severity":"error","filePath":"arduino-core/src/cc/arduino/packages/uploaders/SerialUploader.java","lineNumber":354,"sourceCode":"\n    // Build configuration for the current programmer\n    PreferencesMap prefs = PreferencesData.getMap();\n    PreferencesMap boardPreferences = BaseNoGui.getBoardPreferences();\n    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))","sourceCodeStart":336,"sourceCodeEnd":372,"githubUrl":"https://github.com/arduino/Arduino/blob/a0df6e0e83b652c72bc78b0a1376c54d6ebc3bee/arduino-core/src/cc/arduino/packages/uploaders/SerialUploader.java#L336-L372","documentation":"When the burn-bootloader tool preference specifies a tool qualified with a package name ('package:tool'), burnBootloader resolves it against that package's target platform. If the platform defines no tool with that name (platform.getTool returns an empty PreferencesMap), this RunnerException is thrown. It means the referenced tool does not exist in the named package.","triggerScenarios":"The bootloader/tool preference in boards.txt or platform.txt uses a 'package:tool' reference (e.g. 'arduino:avrdude') whose package's platform does not define that tool, typically because the package is not installed or the tool name is misspelled.","commonSituations":"Third-party board definitions referencing an 'arduino:avrdude'-style tool while only a differently named tool version exists; board package installed without its required tool dependency; renaming of tools across IDE/core versions.","solutions":["Install the missing tool/package via Boards Manager (or place the tool under the package's tools/ directory) so platform.getTool finds it","Fix the tool reference in boards.txt/platform.txt so 'package:tool' matches a tool actually defined in that package's platform.txt (check exact tool name and version)","Fall back to an unqualified tool name present in the current target platform"],"exampleFix":"// boards.txt before\ntool=arduino:avrdud\n// after\ntool=arduino:avrdude","handlingStrategy":"validation","validationCode":"String toolPref = prefs.get(\"bootloader.tool\");\nif (toolPref != null && toolPref.contains(\":\")) {\n  String pkg = toolPref.split(\":\", 2)[0];\n  if (BaseNoGui.getCurrentTargetPlatformFromPackage(pkg) == null) throw new IllegalStateException(\"Package \" + pkg + \" not installed; install it via Boards Manager\");\n}","typeGuard":null,"tryCatchPattern":"try { uploader.burnBootloader(); } catch (RunnerException e) { if (e.getMessage().startsWith(\"Could not find tool\")) { logMissingToolAndSuggestBoardsManager(e); } else { throw e; } }","preventionTips":["Verify 'package:tool' references in boards.txt match tools defined in that package's platform.txt","Install all tool dependencies of third-party board packages","After IDE/core upgrades, re-check tool names for renames"],"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-14T00:17:10.932Z"}