Just find out a way to convert UiFlow microPython codes into .bin file
-
The method is very simple: download the UiFlow firmware source code, copy the microPython code generated in UiFlow to main.py, change the boot option so that the device runs main.py after powering on, compile the UiFlow firmware, and you will get a .bin file running directly into main.py.
Step 1: Setting up ESP-IDF environment and download UiFlow source code
https://github.com/m5stack/uiflow-micropython
Follow the "How to build" instrument to setting up ESP-IDF environment and clone the UiFlow source code.Step 2: Change the main.py file and modify boot option
Open up location /m5stack/fs/user/main.py and paste your code generated by UiFlow.
Open up location /m5stack/fs/user/boot.py and edit line 37-40try: boot_option = nvs.get_u8("boot_option") except: boot_option = 1 # default
into
boot_option = 0
By editing these codes, your device will directly runs main.py after booting. Don't forget to save the files.
Step 3: Build the firmware and flash into your device
Just follow the "Building the firmware" instrument, it will generate a .bin file in /m5stack/build-%YOUR_BOARD_NAME%/ and flash it into your device
Now you have your own .bin with microPython codes, you can publish it in the "User Custom" of M5Burner or other places.If there is any better or easier way, please discuss it with me.
-