uiflow-micropython build for M5PaperS3 experience
-
Hi, members!
I would like to share with you my experiences when, today, I tried to build MStack's uiflow-micropython:First a little history of the past days, if you don't mind:
Two days ago I flashed my M5PaperS3 with UIFlow2 firmware, however I encountered various problems. One of them: notwithstanding the fact that I, from within M5Burner, I was logged in; did "bind" the M5PaperS3 successfully to my account, this fact was not recognized by Uiflow online. Also on the "</> CODE information" on the display of the M5PaperS3 under "ACCOUNT" was shown the text: "None". Beside this problem, inside UIFlow2 I find myself "caged". I cannot do what I want. I am missing functionalities.
That is why I "left" the UIFlow2 "road", so to speak.
Next I flashed the M5PaperS3 with the latest, standard version of micropython fw for an ESP32S3. Using this fw I ran into several problems like: trying to make WiFi connection or connecting to the SD-card.Then I searched for a solution. I discovered that M5Stack published a repo called "uiflow-micropython" link.
After reading the README.md instructions, I decided to try to build this fw for the M5PaperS3.
Below the problems I encountered as the changes I made to finally be able to build the fw successfully: As a development platform I used a Raspberry Pi CM5.The first build ended with an error that the module "future" was missing. When I tried to use pip to install this module, the result was:
paulsk@RPiCM5:~/uiflow_workspace/uiflow_micropython/m5stack $ pip3 install future Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Requirement already satisfied: future in /home/paulsk/.espressif/python_env/idf5.2_py3.11_env/lib/python3.11/site-packages (1.0.0)
To solve this I made a change to the file: ~/.profile I added these lines:
# Needed to make M5Stack uiflow_micropython for the M5PaperS3 if [ -d "$HOME/home/paulsk/.espressif/python_env/idf5.2_py3.11_env/lib/python3.11/site-packages (1.0.0)" ] ; then path="$HOME/home/paulsk/.espressif/python_env/idf5.2_py3.11_env/lib/python3.11/site-packages (1.0.0):PATH" fi
then I issued the CLI-command:
source ~/.profile
to make the new PATH known.
Other changes I made to have a successful build and flash on the development platform were:
In the file: paulsk@RPiCM5:~/uiflow_workspace/uiflow_micropython/m5stack/Makefile
change the line: "BOARD ?= M5STACK_AtomS3"
into: "BOARD ?= M5STACK_PaperS3"
In the same file, below the line: "Device serial settings.", change the line: "PORT ?= /dev/ttyUSB0"
into: "PORT ?= /dev/ttyACM0".next, executing the CLI-command:
make flash_all
finished OK. See the last lines below:
PAPERS3: m5stack/build-M5STACK_PaperS3/uiflow-cf61f739-esp32s3-spiram-16mb-papers3-v2.2.5-20250412.bin esptool.py --chip esp32s3 --port /dev/ttyACM0 --baud 1500000 write_flash 0x0 build-M5STACK_PaperS3/uiflow-cf61f739.bin esptool.py v4.8.1 Serial port /dev/ttyACM0 Connecting... Chip is ESP32-S3 (QFN56) (revision v0.2) Features: WiFi, BLE, Embedded PSRAM 8MB (AP_3v3) Crystal is 40MHz MAC: a0:85:e3:f0:ad:4c Uploading stub... Running stub... Stub running... Changing baud rate to 1500000 Changed. Configuring flash size... Flash will be erased from 0x00000000 to 0x00ffefff... Compressed 16773120 bytes to 3585048... Writing at 0x00272df4... (49 %) Lost connection, retrying... Waiting for the chip to reconnect Connecting... Uploading stub... Running stub... Stub running... Compressed 16773120 bytes to 3585048... Wrote 16773120 bytes (3585048 compressed) at 0x00000000 in 53.3 seconds (effective 2515.8 kbit/s)... Hash of data verified. Leaving... Hard resetting via RTS pin...
After these successful build and flash steps, I learned that it was not necessary to make changes to the files: CMakeLists.txt and Makefile. The instruction from M5Stack says:
The default board build the M5STACK_AtomS3 one, You can specify a different board by passing BOARD=<board> to the make commands. More BOARD type define is under m5satck/boards path.
As a final check, I connected the M5PaperS3 to a USB port of my desktop PC running MS Windows 11 Pro. Then I started Thonny. In Tools > Interpreter > Port I selected the correct COM port.
After pressing the "Stop" button of Thonny, the M5PaperS3 replied with:
MicroPython v1.24.0-dirty on 2025-04-12; M5STACK PaperS3 with ESP32S3 Type "help()" for more information. >>> MPY: soft reboot _ __ _ _ _(_)/ _| | _____ __ | | | | | |_| |/ _ \ \ /\ / / | |_| | | _| | (_) \ V V / \__,_|_|_| |_|\___/ \_/\_/ V2.2.5
That's all folks!
Have a nice weekend y'all.
Paulskpt -
Afterburner:
I was able to create and run a small display test script.
See the image -
P Paulskpt referenced this topic