https://toitlang.org/ logo
Join Discord
Powered by
# general
  • 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
  • g

    GitHub

    11/20/2025, 1:34 PM
    message has been deleted
  • f

    floitsch

    11/20/2025, 1:34 PM
    I'm pretty confident this release finally fixes the probing issue.
  • n

    nas2011

    11/21/2025, 8:30 PM
    Forgive me if this is very elementary but I'm missing it: is there a mechanism for copying objects? Like make one instance of a class and then make a copy that is a new instance?
  • f

    floitsch

    11/21/2025, 8:32 PM
    No. That doesn't exist. Some classes provide their own copy methods. For containers it's typically called
    copy
    and for other objects it's often
    with
    (and then optional parameters to modify some properties)
  • f

    floitsch

    11/21/2025, 8:33 PM
    https://libs.toit.io/core/collections/class-Set#copy(0%2C0%2C0%2C)
  • f

    floitsch

    11/21/2025, 8:33 PM
    https://libs.toit.io/core/time/class-TimeInfo#with(8%2C0%2C0%2Cday%2Cdst%2Ch%2Cm%2Cmonth%2Cns%2Cs%2Cyear)
  • f

    floitsch

    11/21/2025, 8:33 PM
    As examples