'arm-none-eabi-g++' is not recognized as an internal or external command, operable program or batch file

Trying to follow this guide for installing a beta package for Teensyduino. I created the platform packages and included them in my platformio.ini:

platform_packages =

Packages are correctly installed, but it fails to compile the project:

‘arm-none-eabi-g++’ is not recognized as an internal or external command, operable program or batch file.

Why is this happening? “.platformio/toolchain-gccarmnoneeabi” definitely contains the correct windows binaries. Without using custom platform_packages it works fine. Tried removing all .cache or .pio folder (as suggested in other threads), but same problem.

PIO version: 6.1.10b1

This post is outdated. The platform now expects the toolchain package be named toolchain-gccarmnoneeabi-teensy if the Arduino framework is used, if you are using a recent version of platform-teensy.

That has to be reflected in the package.json in /Users/XX/Desktop/teensy-1.59-beta/toolchain-gccarmnoneeabi as well as in the platform_packages command.

Also, if the compiler didn’t change, you don’t need to update it. PlatformIO already has version 11.3.1 per PlatformIO Registry.

1 Like

I renamed it in the package.json and the platform_packages, but I am still seeing the issue :confused:
Cleared all cache folders.

And removing this line completely?

Ahh, seems that when not trying to overwrite the toolchain package it starts compiling. Thanks!

@maxgerhardt It’s building now, but fails to find teensy_size:

‘teensy_size’ is not recognized as an internal or external command,
operable program or batch file.

So for some reason it generally doesn’t know how to resolve paths inside folders provided by platform_packages

Is that part of tool-teensy? Are you sure you put the package.json at the right place so that the root of the package is correct? It should match previous versions, like


Oh, I just realized that tool-teensy\ only contains teensy.exe, but not all the other binaries. According to the guide (mentioned in the first post) I should copy over “Arduino15\packages\teensy\tools\teensy-tools”, but that in fact only contains teensy.exe as well. So seems that for the tool-teensy package there’s more to do than just copying the Arduino package folder. Not sure if I even need a new version of tool-teensy for the 1.59 Beta. Seems to work fine with the 1.58 package

Well these binaries

gotta be somewhere too in the beta Teensyduino package. PlatformIO at least groups them into tool-teensy.But if the old one works fine, it’s also okay.

1 Like

Ok I redownloaded 0.59.2 via Arduino and now the binaries are there. Copied them over to my PIO tool-teensy/ folder, but I am still seeing this:

‘teensy_size’ is not recognized as an internal or external command,
operable program or batch file.

I compared hashes of teensy.exe between 1.58 and 1.59 and they differ, so probably not the best idea to continue using 1.58 teensy.exe.

Either the .exe is just plain corrupted, the location of the file within tool-teensy is incorrect, the location of the package.json is incorrect, or you’ve copied over a binary for a different architecture / operating system over, or the platform_packages declaration is wrong.

When you manually open a command terminal and drag-and-drop the Teensyduino 1.59 beta teensy_size.exe in it and press enter, do you at least get some output?

teensy_size: usage: teensy_size <file.elf>

The exe is not corrupted and can be executed on CL:


The platform_packages declaration:

platform_packages =

Content of tool-teensy:


  "description": "Upload tools for Teensy boards",
  "homepage": "https://www.pjrc.com/teensy/loader.html",
  "keywords": [
  "name": "tool-teensy",
  "system": [
  "version": "1.159.221217"

OMG, by posting this I just realized it says “darwin_arm64” for OSX… Damn should really not follow that guide anymore. That make sense now!

What is going on here? The system declaration is for MacOS and I’m seeing .exe Windows files? This ain’t right at all. Darwin is the MacOS kernel name.

Set system to the appropriate array with windows_amd64 and windows_x86 in it, like the hover-over text in the linked