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

    floitsch

    11/23/2025, 11:52 PM
    Weekly update: - fixed Jaguar (see new release above). - continued the new UART driver. We are seeing bytes, but needs more testing.
  • b

    bmentink

    11/24/2025, 5:44 AM
    Hi, I would like to know if there is an easy method to communicate with ESPHome. I am currently using MQTT but would like to remove the need for a Broker/Server ..Thanks
  • g

    GitHub

    11/24/2025, 7:27 AM
    message has been deleted
  • f

    floitsch

    11/26/2025, 4:36 PM
    I don't think anyone has done it yet, but ESPHome has a "Native API": https://esphome.io/components/api/ That uses protobuf. I don't think anyone has used it yet, but it's supposed to be a simple protocol, so maybe it's not too hard.
  • z

    z3ugma

    11/28/2025, 9:52 PM
    Copy code
    set(LINARO_URL "https://releases.linaro.org/components/toolchain/binaries/4.9-2017.01/arm-linux-gnueabi/gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabi.tar.xz")
    set(LINARO_TARBALL "${CMAKE_BINARY_DIR}/gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabi.tar.xz")
    set(LINARO_DIR "${CMAKE_BINARY_DIR}/linaro/src/linaro_toolchain")
    set(LINARO_BIN "${LINARO_DIR}/bin")
    
    # =====================================================
    # 2. Download & extract the toolchain using ExternalProject
    # =====================================================
    ExternalProject_Add(
        linaro_toolchain
        PREFIX ${CMAKE_BINARY_DIR}/linaro
        URL ${LINARO_URL}
        DOWNLOAD_DIR ${CMAKE_BINARY_DIR}
        CONFIGURE_COMMAND ""   # no configure step
        BUILD_COMMAND ""       # no build step
        INSTALL_COMMAND ""     # no install step
        UPDATE_DISCONNECTED 1
    )
    
    
    set(CMAKE_SYSTEM_NAME Linux)
    set(CMAKE_SYSTEM_PROCESSOR arm)
    set(CMAKE_C_COMPILER ${LINARO_BIN}/arm-linux-gnueabi-gcc)
    set(CMAKE_FIND_ROOT_PATH ${LINARO_DIR}/arm-linux-gnueabi/libc)
    set(CMAKE_SYSROOT ${CMAKE_FIND_ROOT_PATH})
    
    # Optional: Add flags, sysroot, etc.
    set(COMMON_COMPILE_FLAGS
        --sysroot=${CMAKE_SYSROOT}
        -march=armv7-a
        -std=c99
    )
    ^^I want to try to cross-compile Toit for arm7, running a very old Linux kernel, arm-linux-gnueabi-gcc, with linaro. what do you think the chances of this working are? then, I could run toit programs with -d host on this older linux system
  • f

    floitsch

    11/28/2025, 9:54 PM
    There is already a Toit version for that (on the release page)
  • f

    floitsch

    11/28/2025, 9:55 PM
    It might need a relatively recent glibc, though.
  • f

    floitsch

    11/28/2025, 9:56 PM
    If you want to compile from scratch, I think linaro would work too.
  • z

    z3ugma

    11/28/2025, 9:56 PM
    this one? https://github.com/toitlang/toit/releases/download/v2.0.0-alpha.189/toit-linux-armv7.tar.gz?
  • f

    floitsch

    11/28/2025, 9:56 PM
    Yes
  • z

    z3ugma

    11/28/2025, 10:04 PM
    is the bin/toit executable enough on its own? this is an embedded device which has only 20MB of storage free on its flash
  • z

    z3ugma

    11/28/2025, 10:04 PM
    or are the libraries also necessary
  • z

    z3ugma

    11/28/2025, 10:09 PM
    Copy code
    root@02AA01AC171401XF# ./toit
    FATAL: kernel too old
    alas, might need to come back to this
  • f

    floitsch

    11/28/2025, 10:30 PM
    There are different use cases. If you want to be able to run
    .toit
    programs on the device, you would need the libraries as well. Otherwise you could compile the
    .toit
    to an executable and just run that. Basically
    toit compile -o  ...
    . That would also work for cross-compilation, as long as you have the vessel built (which is an automatic step of building for a platform).
  • d

    davidg238

    11/29/2025, 1:24 AM
    in "toit-conventions.md" you nominate `- Use
    SNAKE_CASE
    for constants.` whereas in https://docs.toit.io/language/style/#classes you nominate
    Constants are written in all-caps with dashes:
    .... the latter is correct ?
  • f

    floitsch

    11/29/2025, 1:30 AM
    Yes. Kebab case is correct now. I will update the conventions document.
  • f

    floitsch

    11/30/2025, 1:18 PM
    Fixed.
  • f

    floitsch

    11/30/2025, 7:49 PM
    Weekly status update: - some minor cleanups. Specifically, the AI instructions at https://github.com/toitlang/ai-instructions were updated to state that constants should use
    KEBAB-CASE
    . Thanks to @addshore for pointing that out. I also found another places in our docs.toit.io pages. - updated all our CIs to use the new checkout action. Not sexy, but given the number of repositories we have, that took some time. - some reviews of PRs. Thanks to @exklibur and @milkmansson for subjecting themselves to that procedure. - made some good progress on the UART driver. I think it passes all existing tests now. I intend to write a few additional tests (especially latency and on other platforms than just ESP32), but there isn't much left.