<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Just find out a way to convert UiFlow microPython codes into .bin file]]></title><description><![CDATA[<p dir="auto">The method is very simple: download the UiFlow firmware source code, copy the microPython code generated in UiFlow to <a href="http://main.py" target="_blank" rel="noopener noreferrer nofollow ugc">main.py</a>, change the boot option so that the device runs <a href="http://main.py" target="_blank" rel="noopener noreferrer nofollow ugc">main.py</a> after powering on, compile the UiFlow firmware, and you will get a .bin file running directly into <a href="http://main.py" target="_blank" rel="noopener noreferrer nofollow ugc">main.py</a>.</p>
<h4>Step 1: Setting up ESP-IDF environment and download UiFlow source code</h4>
<p dir="auto"><a href="https://github.com/m5stack/uiflow-micropython" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/m5stack/uiflow-micropython</a><br />
Follow the "How to build" instrument to setting up ESP-IDF environment and clone the UiFlow source code.</p>
<h4>Step 2: Change the <a href="http://main.py" target="_blank" rel="noopener noreferrer nofollow ugc">main.py</a> file and modify boot option</h4>
<p dir="auto">Open up location /m5stack/fs/user/main.py and paste your code generated by UiFlow.<br />
Open up location /m5stack/fs/user/boot.py and edit line 37-40</p>
<pre><code>try:
        boot_option = nvs.get_u8("boot_option")
    except:
        boot_option = 1  # default
</code></pre>
<p dir="auto">into</p>
<pre><code>boot_option = 0 
</code></pre>
<p dir="auto">By editing these codes, your device will directly runs <a href="http://main.py" target="_blank" rel="noopener noreferrer nofollow ugc">main.py</a> after booting. Don't forget to save the files.</p>
<h4>Step 3: Build the firmware and flash into your device</h4>
<p dir="auto">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<br />
Now you have your own .bin with microPython codes, you can publish it in the "User Custom" of M5Burner or other places.</p>
<p dir="auto">If there is any better or easier way, please discuss it with me.</p>
]]></description><link>https://community.m5stack.com/topic/6936/just-find-out-a-way-to-convert-uiflow-micropython-codes-into-bin-file</link><generator>RSS for Node</generator><lastBuildDate>Sun, 08 Mar 2026 04:13:39 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/6936.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 29 Oct 2024 09:06:57 GMT</pubDate><ttl>60</ttl></channel></rss>