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

    floitsch

    01/09/2025, 11:25 AM
    Try with
    jag flash esp32s3
  • m

    MichaelK

    01/09/2025, 11:44 AM
    Ok, jag flash esp32s3 works
  • m

    MichaelK

    01/09/2025, 11:45 AM
    Here is the hello.toit app: main: print "Hello, World!" micrcx@micrcx-desktop:~/toit$ jag run hello.toit Running 'hello.toit' on 'reversed-area' ... Success: Sent 37KB code to 'reversed-area' micrcx@micrcx-desktop:~/toit$ Why can't I see "Hello, World!" on the terminal?
  • f

    floitsch

    01/09/2025, 11:49 AM
    With Jaguar you need to
    jag monitor
    to watch the output of the chip.
  • f

    floitsch

    01/09/2025, 11:50 AM
    Jaguar doesn't send output of the program through the wireless connection.
  • f

    floitsch

    01/09/2025, 11:51 AM
    jag monitor
    connects to the chip vial the serial connection and prints the output of the chip. At the same time it automatically decodes stacktraces, ...
  • m

    MichaelK

    01/09/2025, 12:04 PM
    Yes, I see it now, but now need to use two terminals. It was simpler before with toit commands. [jaguar] INFO: program bd162137-39fc-f36d-97a0-d16b20cf83ed started Hello, World! [jaguar] INFO: program bd162137-39fc-f36d-97a0-d16b20cf83ed stopped Thanks anyway.
  • f

    floitsch

    01/09/2025, 12:05 PM
    Yes. This was easier before. We still have plans to support this feature again, but it hasn't had high enough priority yet.
  • m

    MichaelK

    01/09/2025, 12:09 PM
    I was just curious to try S3, but it requires using jag.
  • f

    floitsch

    01/09/2025, 12:10 PM
    Be aware that the old toit.io offering is deprecated and will soon shut down.
  • f

    floitsch

    01/09/2025, 12:10 PM
    So all chips require Jaguar (or Artemis).
  • m

    MichaelK

    01/09/2025, 12:14 PM
    I realized this a long time ago, so I tried using JAG as a backup option.
  • b

    bpmct

    05/12/2025, 9:04 PM
    Mostly curious: any plans to support raspberry pi pico?
  • f

    floitsch

    05/12/2025, 9:05 PM
    No plans, but it should be possible.
  • z

    z3ugma

    07/28/2025, 3:12 AM
    Is there a C6 envelope with no Bluetooth stack, the way there's a regular ESP32-no-ble?
  • f

    floitsch

    07/28/2025, 3:13 AM
    Not yet, but can be easily added
  • z

    z3ugma

    07/28/2025, 3:15 AM
    ok, Ive got a C6 with the onboard 512K of RAM. I want to drive a 320x320 TFT LCD display. I keep running into out-of-memory problems but I really am not taking very much care to figure out how to GC the bytes I am sending over SPI. I will be trying to implement
    pixel-display-impl_.toit
    and use the pixel-display library because I assume I am making some novice mistake that is causing me to run out of memory
  • f

    floitsch

    07/28/2025, 3:15 AM
    Do you also have network connections open?
  • z

    z3ugma

    07/28/2025, 3:16 AM
    it won't be necessary, no. a different chip will handle WIFI and BLE. This chip is only responsible for driving the LCD. Possibly also some I2S but much lower frequency
  • f

    floitsch

    07/28/2025, 3:18 AM
    Ok. One thing that could help: do you run out of memory early or over time? If it only happens after some time then it might be due to some memory leak or bad usage of the UI library.
  • z

    z3ugma

    07/28/2025, 3:20 AM
    no, right away. I get through the LCD setup commands, and then try to make a big for loop that writes a ton of pixels. It's clearly not the right way to do it:
    Copy code
    // LCDWriteCommand(0x36); //Memory Data Access Control
      // LCDWriteData(0x00);
      command-spi 0x36 #[0x60]
    
    
      start:= Time.monotonic-us
      // // LCDWriteCommand(0x2C);//Write GRAM
    
    
      3.repeat: |i|
        bluary := #[0x85, 0xc0, 0x21, 0x70, 0x08, 0x5c, 0x02, 0x17, 0x00]
        if i % 2 == 0:
          bluary = #[0x80, 0xc0, 0xa0, 0x70, 0x48, 0x2c, 0x1a, 0x0f, 0x08]
          
        chomps := #[]
    
        times := 256
        times.repeat:
          chomps += bluary
    
        device.transfer --command=0 #[0x2C]
        device = bus.device --cs=cs --frequency=11_000_000
        (320 * 320 / 4   / times).repeat: //8 chomps in bluary, so divide by 4 since it's 2 bytes of color data per memory location
          device.transfer chomps 
    
        end := Time.monotonic-us
        print "Duration: $((end - start) / 1_000) ms"
    
      sleep --ms=10
  • z

    z3ugma

    07/28/2025, 3:21 AM
    ^^here I am trying to preallocate this long
    chomps
    array and running out of memory
  • f

    floitsch

    07/28/2025, 3:23 AM
    Ah. The pixel-display library isn't designed to emit pixels like that
  • f

    floitsch

    07/28/2025, 3:24 AM
    We should add some support for bitmaps but it's not there yet
  • z

    z3ugma

    07/28/2025, 3:25 AM
    in the long run I don't intend to use bitmaps. I expect that there won't be enough RAM on the ESP32 to do that really
  • z

    z3ugma

    07/28/2025, 3:25 AM
    but if I can use the optimized things like text and polygons, then I think I'll be better off right? pixel-display is handling some of the lower-level rendering
  • f

    floitsch

    07/28/2025, 3:26 AM
    It could work if the data was stored in flash. But without support from the UI library...
  • z

    z3ugma

    07/28/2025, 3:27 AM
    is the theory that you'd stream a small amount from flash into RAM, then pump it out to the display, then overwrite the allocated part of RAM from the flash, and repeat
  • f

    floitsch

    07/28/2025, 3:28 AM
    The UI library paints the display block by block. The display library must provide the data as requested. If the data is in flash, it would just read it from there whenever needed.
  • f

    floitsch

    07/28/2025, 3:41 AM
    esp32c6-no-ble is building.