https://toitlang.org/ logo
Join Discord
Powered by
# general
  • f

    floitsch

    11/19/2025, 2:01 PM
    It is requesting the path from the
    toit
    SDK tool.
  • a

    addshore

    11/19/2025, 2:01 PM
    oh hmmm.... yeah, esptool should be availible.. So my error is
    Error: failed to probe chip type: failed to probe chip type: exec: "esptool.py": executable file not found in %PATH%:
  • f

    floitsch

    11/19/2025, 2:02 PM
    hmm. if
    toit toolfirmware tool esptool
    fails, then it falls back to
    esptool.py
    . I guess we should just drop that fallback and print the error message.
  • f

    floitsch

    11/19/2025, 2:03 PM
    or at least print the error message.
  • a

    addshore

    11/19/2025, 2:03 PM
    both
    jag toit tool firmware tool esptool
    and
    toit tool firmware tool esptool
    seem to do something on this system
  • f

    floitsch

    11/19/2025, 2:03 PM
    could you try to add a
    println(err.Error())
    before line 193?
  • f

    floitsch

    11/19/2025, 2:04 PM
    The exact command we run is
    jag toit --output-format json tool firmware tool esptool -e unused
  • a

    addshore

    11/19/2025, 2:04 PM
    gotta dash to a meeting now
  • a

    addshore

    11/19/2025, 2:04 PM
    by something, i mean they print the help
  • f

    floitsch

    11/19/2025, 2:05 PM
    I thought I had fixed it (and tested it a bit), but if it isn't working for you, I would be grateful for feedback on what's going wrong.
  • a

    addshore

    11/19/2025, 2:05 PM
    Copy code
    jag toit tool firmware --envelope=foo tool esptool
    Command: [C:/Users/adam/.cache/jaguar/sdk/bin/../lib/toit/bin/esptool.exe]
    Version: esptool.py v4.8.1
    4.8.1
    and
    Copy code
    toit tool firmware --envelope=foo tool esptool
    Command: [C:/Users/adam/AppData/Local/Programs/toit/bin/../tools/esptool.exe]
    Version: esptool.py v4.8.1
    4.8.1
  • f

    floitsch

    11/19/2025, 2:05 PM
    looks correct...
  • a

    addshore

    11/19/2025, 2:06 PM
    and then
    Copy code
    jag flash
    Error: failed to probe chip type: failed to probe chip type: exec: "esptool.py": executable file not found in %PATH%:
    PS Microsoft.PowerShell.Core\FileSystem::\\wsl.localhost\Ubuntu\home\adam\dev\lb\io\toit-envelopes>
  • f

    floitsch

    11/19/2025, 2:06 PM
    Yes. clearly the command fails and falls back. We need to print the
    err
    .
  • a

    addshore

    11/19/2025, 2:06 PM
    right, yeah so issue in https://github.com/toitlang/jaguar/blob/main/cmd/jag/commands/util.go#L173-L188
  • a

    addshore

    11/19/2025, 2:07 PM
    Copy code
    toit tool firmware  --output-format json tool esptool -e unused
    {"command":["C:/Users/adam/AppData/Local/Programs/toit/bin/../tools/esptool.exe"],"version":"esptool.py v4.8.1\r\n4.8.1\r\n"}
  • k

    kasperl

    11/19/2025, 2:08 PM
    This is your own build of
    jag
    ? Make sure you're not being burnt by JAG_TOIT_REPO_PATH.
  • a

    addshore

    11/19/2025, 2:08 PM
    nope, this is your latest jag release
  • k

    kasperl

    11/19/2025, 2:08 PM
    Official builds ignore that.
  • f

    floitsch

    11/19/2025, 2:08 PM
    Should still show the correct thing with
    jag toit ...
    .
  • a

    addshore

    11/19/2025, 2:08 PM
    Copy code
    toit tool firmware  --output-format json tool esptool -e unused --port COM14 chip-id
    
    Error: Unknown option: --port
    ?
  • f

    floitsch

    11/19/2025, 2:09 PM
    As I said: we are hitting https://github.com/toitlang/jaguar/blob/3223101b6c26fee9eeaa17a105752f64287c8b2a/cmd/jag/commands/util.go#L193
  • f

    floitsch

    11/19/2025, 2:09 PM
    So something went wrong when trying to find the path of the esptool.
  • a

    addshore

    11/19/2025, 2:09 PM
    Is this "unknown option" port the error that is liekly happeneing though?
  • f

    floitsch

    11/19/2025, 2:09 PM
    Without the error message it's hard to figure out what exactly.
  • a

    addshore

    11/19/2025, 2:09 PM
    as I see
    cmd := sdk.EspTool(ctx, "--port", port, "chip-id")
    is what is being run, which I think results in the command above?
  • f

    floitsch

    11/19/2025, 2:10 PM
    so adding a
    println(err.Error())
    is what we need to add to figure out why it's not working.
  • f

    floitsch

    11/19/2025, 2:10 PM
    The
    cmd :=
    is already after.
  • f

    floitsch

    11/19/2025, 2:11 PM
    In the meantime you can work around it by using
    --chip=esp32c6
    (or whatever your chip is). Then it skips the probing.
  • f

    floitsch

    11/19/2025, 8:54 PM
    Fix is out for review. https://github.com/toitlang/jaguar/pull/649