Where to modify tools.uploaders?

Hi !

I am using an ESP8266 and I tried to modify the file ~/.platformio/packages/framework-arduinoespressif/platform.txt to add a new programmer, but it does not work.
Even if I try to modify tools.esptool.cmd=fakeProgram, I have no errors and esptools still used.

I try to check the documentation but did not find, where can I modify the program used to upload ?

Thanks, and nice soft by the way !

PlatformIO has own build system and infrastructure. We don’t use Arduino IDE or etc.

See Redirecting...

Oh, it was in the doc… shame on me !! :sweat_smile:
By the way there might be a mistake in the documentation : Import('env') gives in a error that env is not found, but this referenced snippet works.

For future reference, here is a code I wrote:

from SCons.Script import DefaultEnvironment

env = DefaultEnvironment()

env.Replace(
    PYESPTOOL="esptool.py",
    PYESPTOOLFLAGS=[
        "--baud", "$UPLOAD_SPEED",
        "--port", "\"$UPLOAD_PORT\""
    ],
    PYESPTOOLCMD="write_flash",
    PYESPTOOLFLAGSEXTRA=[
        "-fm", "dio", # Flash mode
        "-fs", "32m", # Flash size
        "-ff", "40m" # SPI Flash frequency
    ],
    PYESPTOOLADRESS=0x00000,
    UPLOADCMD='$PYESPTOOL $PYESPTOOLFLAGS $PYESPTOOLCMD $PYESPTOOLFLAGSEXTRA $PYESPTOOLADRESS $SOURCE',
)

Are you sure that use PlatformIO 3.0? What do you see with pio --version?