UIFlow 2.0.0 firmware preview version



  • We plan to make a big optimization and change to UIFlow in 2022. At present, we have completed part of the optimization of the micropython firmware, but there is still a long way to go. Before the Chinese New Year, we released a very early version of the firmware for everyone to experience. Hope you can give us some feedback.

    The currently released firmware mainly has the following features:

    1. All features of micropython mainline v1.17 are supported
    2. The LCD underlying driver has been replaced with M5GFX
    3. Buttons and other drivers are completed by M5Unified
    4. The driver (precompiled) in the micorpython-lib repository is built into the file system.
    5. One firmware can be used on all M5STACK devices

    But this is a very early stage firmware and the following features are not yet supported:

    1. No menu system
    2. UIFlow development is not supported yet (pushing code etc.)
    3. The LCD API does not yet support displaying pictures
    4. Unit and Module not supported now.

    It is now recommended that you help us develop and test firmware using:

    1. Thonny (highly recommended)
    2. Putty (command line)
    3. Pymakr (VS code plugin, from pycom)

    How to write firmware:
    Please download the firmware, use esptool or Flash Download Tools to write the firmware at offset 0x1000.

    esptool.py --chip esp32 --port /dev/ttyUSBx --baud 1500000 write_flash 0x1000 uiflow-b084d9e-dirty.bin
    

    Finally, thank you for testing and giving us some feedback. We will deal with your feedback or your suggestions after the Chinese New Year on 2022-02-07, thank you very much.



  • Hey guy, can we have ulab and lvgl packed in the new firmware?



  • This is great news! The old MicroPython in M5Stack firmware was the last remaining obstacle holding me from removing some ugly workarounds in Thonny's MicroPython backend.

    I also like the decision to use common firmware for all M5 devices and the fact that now one can use the same esptool arguments as for other ESP32 devices. This means Thonny users can use the built-in flashing dialog for M5 devices.

    According to my quick initial test Thonny is happy with the new firmware. I tried the original gray M5Stack and Atom Lite. With the gray M5Stack even the "paste" communication mode, which for some reason did't work with M5 earlier firmwares, now seems to work without problems. With Atom Lite it still causes problems, which I'll investigate later.

    I'm considering adding a separate "MicroPython (M5Stack)" back-end in the upcoming Thonny 4.0, but this is warranted if it came together with M5-specific MicroPython stub files (.pyi) for autocompletion and static analysis (one of the main theme of Thonny 4.0 will be improved autocompletion).

    This is where you could help me. Most likely I don't find time for compiling the stubs from the scarce documentation myself, but if you created the pyi-files describing M5-specific modules, I would include them in Thonny 4.0 under "MicroPython (M5Stack)" back-end.

    Keep up the good job!

    Aivar
    (the main author of Thonny IDE)



  • @aivarannamaa Hi @aivarannamaa nice to hear from a Thonny program moderator.

    Apparently there is a different in the programming commands between the main cores and the stamps in that the stamps have the firmware downloaded to 0x0000 where the cores have the firmware installed to 0x1000.

    @m5stack does this include the stamp pico and stamp C3?



  • I found a bug in the firmaware when a programs draws lots of lines and the SD card is plugged in.
    This is my test program:

    import m5
    from m5 import lcd
    
    m5.begin()
    
    def lines_show(color):
        steps = 20
        w = lcd.width()
        h = lcd.height()
        ws = w / steps
        hs = h / steps
    
        lcd.startWrite()
    
        for s in range(steps):
            x1 = int(ws * s)
            x2 = w - 1
            y1 = 0
            y2 = int(hs * s)
            lcd.drawLine(x1, y1, x2, y2, color)
            
        for s in range(steps):
            x1 = w - 1
            y1 = int(hs * s)
            x2 = w - 1 - int(ws * s)
            y2 = h - 1
            lcd.drawLine(x1, y1, x2, y2, color)
            
        for s in range(steps):
            x1 = w - 1 - int(ws * s)
            y1 = h - 1
            x2 = 0
            y2 = h - 1 - int(hs * s)
            lcd.drawLine(x1, y1, x2, y2, color)
            
        for s in range(steps):
            x1 = 0
            y1 = h - 1 - int(hs * s)
            x2 = int(ws * s)
            y2 = 0
            lcd.drawLine(x1, y1, x2, y2, color)
    
        lcd.endWrite()
    
    lcd.fillScreen(lcd.BLACK)
    lines_show(lcd.WHITE)
    lines_show(lcd.RED)
    lines_show(lcd.GREEN)
    lines_show(lcd.YELLOW)
    lines_show(lcd.BLUE)
    

    If no SD is plugged in the drawing is correct:

    0_1643567308517_20220130_191439_2.jpg

    If an SD card is inserted the output changes. The drawing appear with wrong colors and and some artifacts (horizontal lines):

    0_1643567326519_20220130_191548_2.jpg



  • @genvex
    +1 to ulab in the firmare



  • @dario The same issue with m2core



  • @m5stack
    UIFLOW 1.9.1 is no longer uploading projects to my devices
    Im getting a red banner saying to check my api key or filename...
    This is absurd , I've opened a thread for this just now.![0_1643658726928_IMG_7501.jpg](Uploading 100%)
    PLEASE REPLY



  • Cannot import and begin m5 and also read the SD card, causes a reset with the following error:

    assert failed: dma_chan_free spi_common.c:321 (spi_dma_chan_enabled & BIT(dma_chan))

    Code:
    import m5
    from m5 import *
    m5.begin()
    from machine import SDCard
    from machine import Pin
    import os
    try:
    sd = SDCard(slot=3, miso=Pin(38), mosi=Pin(23), sck=Pin(18), cs=Pin(4))
    sd.info()
    os.mount(sd, '/sd')
    print("SD card mounted at "/sd"")
    except (KeyboardInterrupt, Exception) as e:
    print('SD mount caught exception {} {}'.format(type(e).name, e))
    pass



  • Is Uiflow site down?



  • Same here, flow.m5stack.com is not fully loading. It loads from a cached version in another browser but then will not upload to any device. I've tried Core2 and a Grey with new and old firmware.

    When I move the code to the desktop version only half of it loads. many of my functions are missing. I am 2 hours before a public showing and I need this up and running please help.



  • @m5stack said in UIFlow 2.0.0 firmware preview version:

    One firmware can be used on all M5STACK devices

    Hello @m5stack

    Trying the beta firmware on an M5Stamp C3 fails - I guess due to the risk architecture which probably requires a different bootloader. Or am I missing something?

    When I flash to 0x1000 I get "Invalid image block, can't boot."
    When I flash to 0x0000 I get "Invalid chip id. Expected 5 read 0. Bootloader for wrong chip?"

    Thanks
    Felix



  • Hello guys

    using Thonny and M5AtomLite running UiFlow 2.0.0 beta firmware

    MicroPython b084d9e-dirty on 2022-01-28; M5STACK with ESP32
    

    I tried to scan for WiFi networks with this code:

    import network
    nic = network.WLAN(network.STA_IF)
    nic.active(True)
    res = nic.scan()
    print(res)
    

    but I get an error:

    Traceback (most recent call last):
      File "<stdin>", line 2, in <module>
    RuntimeError: Wifi Unknown Error 0x0101
    

    Edit: when I install native ESP32 MicroPython firmware 1.17, e.g.

    MicroPython v1.17 on 2021-09-02; ESP32 module with ESP32
    

    the above code works to scan WiFi networks. What am I missing?

    Thanks
    Felix



  • @genvex

    Hi, sorry for taking so long to reply, just finished the Chinese New Year holiday :)

    ulab will support, but lvgl for micropython will take a lot of flash space, we may only support some devices (such as CORE2, TOUGH, etc.), because the early basic flash chip is only 4M in size.

    This needs to be discussed, maybe we will launch a service to generate firmware online, you can choose which functions or drivers are packaged into the firmware.

    Have a nice day.
    IAMLIUBO



  • @aivarannamaa

    Hi, sorry for taking so long to reply, just finished the Chinese New Year holiday :)

    This is great news! The old MicroPython in M5Stack firmware was the last remaining obstacle holding me from removing some ugly workarounds in Thonny's MicroPython backend.
    According to my quick initial test Thonny is happy with the new firmware. I tried the original gray M5Stack and Atom Lite. With the gray M5Stack even the "paste" communication mode, which for some reason did't work with M5 earlier firmwares, now seems to work without problems. With Atom Lite it still causes problems, which I'll investigate later.

    Thanks, the old MicroPython firmware for M5Stack(or UIFlow firmware) there are indeed some incompatibilities with micropython (such as paste code in repl mode).

    I also like the decision to use common firmware for all M5 devices and the fact that now one can use the same esptool arguments as for other ESP32 devices. This means Thonny users can use the built-in flashing dialog for M5 devices.

    Yes, one firmware that works for all M5 devices would be a good choice, but this would also be a limitation since the flash chip size is different for different devices, but we can guarantee that the esptool arguments will be the same (only For ESP32, if it is S2 or C3, may need to add some additional parameters).

    I'm considering adding a separate "MicroPython (M5Stack)" back-end in the upcoming Thonny 4.0, but this is warranted if it came together with M5-specific MicroPython stub files (.pyi) for autocompletion and static analysis (one of the main theme of Thonny 4.0 will be improved autocompletion).
    This is where you could help me. Most likely I don't find time for compiling the stubs from the scarce documentation myself, but if you created the pyi-files describing M5-specific modules, I would include them in Thonny 4.0 under "MicroPython (M5Stack)" back-end.

    Wow, this is really good news.Thank you very much, this is currently a very early preview firmware, and some API modifications and adjustments may be made later, but I am very willing to keep in touch with you, I will try to process a pyi file, is mypy tool okay?

    Have a nice day.
    IAMLIUBO



  • @ajb2k3

    Hi, sorry for taking so long to reply, just finished the Chinese New Year holiday :)

    does this include the stamp pico and stamp C3?

    I have not tested the STAMP series, but STAMP-C3 is not supported (the architecture is different and needs to be compiled separately)

    Have a nice day.
    IAMLIUBO



  • @dario

    Hi, sorry for taking so long to reply and thanks for report this bug, We will investigate this issue as soon as possible.

    Have a nice day.
    IAMLIUBO



  • Hi @lmartu68 @wkibler @Philip,

    Hi, sorry for taking so long to reply, just finished the Chinese New Year holiday :)

    We did have some issues with our servers during the holidays, sorry about that, it should be fixed now, sorry again.

    Have a nice day.
    IAMLIUBO



  • @felmue

    Hi, sorry for taking so long to reply.

    Trying the beta firmware on an M5Stamp C3 fails - I guess due to the risk architecture which probably requires a different bootloader. Or am I missing something?

    I'm very sorry, it's my problem, I didn't say that this firmware does not support C3 chip, it currently supports ESP32, because of the different architecture, it is impossible to make a firmware support esp32, esp32-c3, esp32-s2, esp32-s3 at the same time.



  • @IAMLIUBO I have been recommending a firmware builder for a while because of the issue you had with firmware size.

    Please, please, please me need a stand alone server that can be run on a raspberry pi!


Locked