{"id":3227,"date":"2025-02-13T08:02:35","date_gmt":"2025-02-13T08:02:35","guid":{"rendered":"https:\/\/blog.embeddedexpert.io\/?p=3227"},"modified":"2025-02-13T08:02:37","modified_gmt":"2025-02-13T08:02:37","slug":"how-to-compile-and-flash-micropython-for-stm32f411-nucleo-64-boards","status":"publish","type":"post","link":"https:\/\/blog.embeddedexpert.io\/?p=3227","title":{"rendered":"How to Compile and Flash micropython for STM32F411 Nucleo-64 Boards"},"content":{"rendered":"\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"1024\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/02\/DALL\u00b7E-2025-02-13-09.56.17-A-detailed-high-quality-digital-illustration-depicting-the-process-of-compiling-and-flashing-MicroPython-onto-an-STM32F411-Nucleo-board.-The-image-sh.webp\" alt=\"\" class=\"wp-image-3228\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/02\/DALL\u00b7E-2025-02-13-09.56.17-A-detailed-high-quality-digital-illustration-depicting-the-process-of-compiling-and-flashing-MicroPython-onto-an-STM32F411-Nucleo-board.-The-image-sh.webp 1024w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/02\/DALL\u00b7E-2025-02-13-09.56.17-A-detailed-high-quality-digital-illustration-depicting-the-process-of-compiling-and-flashing-MicroPython-onto-an-STM32F411-Nucleo-board.-The-image-sh-300x300.webp 300w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/02\/DALL\u00b7E-2025-02-13-09.56.17-A-detailed-high-quality-digital-illustration-depicting-the-process-of-compiling-and-flashing-MicroPython-onto-an-STM32F411-Nucleo-board.-The-image-sh-150x150.webp 150w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/02\/DALL\u00b7E-2025-02-13-09.56.17-A-detailed-high-quality-digital-illustration-depicting-the-process-of-compiling-and-flashing-MicroPython-onto-an-STM32F411-Nucleo-board.-The-image-sh-768x768.webp 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/02\/DALL\u00b7E-2025-02-13-09.56.17-A-detailed-high-quality-digital-illustration-depicting-the-process-of-compiling-and-flashing-MicroPython-onto-an-STM32F411-Nucleo-board.-The-image-sh-750x750.webp 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/02\/DALL\u00b7E-2025-02-13-09.56.17-A-detailed-high-quality-digital-illustration-depicting-the-process-of-compiling-and-flashing-MicroPython-onto-an-STM32F411-Nucleo-board.-The-image-sh-400x400.webp 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/02\/DALL\u00b7E-2025-02-13-09.56.17-A-detailed-high-quality-digital-illustration-depicting-the-process-of-compiling-and-flashing-MicroPython-onto-an-STM32F411-Nucleo-board.-The-image-sh-250x250.webp 250w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>In this guide, we shall see how to compile the micropython core for STM32F411 Nucleo-64 and burn the compiled version to the board.<\/p>\n\n\n\n<p>In this guide, we shall cover the following:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Compiling the micropython core.<\/li>\n\n\n\n<li>Installing STM32CubeProg.<\/li>\n\n\n\n<li>Flashing The firmware.<\/li>\n\n\n\n<li>Testing the micropython.<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">1. Compiling the Micropython:<\/h2>\n\n\n\n<p>Note: Here we are assume that your linux has been installed and running perfectly without any issues.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>We start by opening terminal window on your linux machine (Linux Minet 22 in this guide):<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"512\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/02\/2025-02-13_10-21-21-1024x512.jpg\" alt=\"\" class=\"wp-image-3230\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/02\/2025-02-13_10-21-21-1024x512.jpg 1024w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/02\/2025-02-13_10-21-21-300x150.jpg 300w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/02\/2025-02-13_10-21-21-768x384.jpg 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/02\/2025-02-13_10-21-21-1536x768.jpg 1536w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/02\/2025-02-13_10-21-21-1150x575.jpg 1150w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/02\/2025-02-13_10-21-21-750x375.jpg 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/02\/2025-02-13_10-21-21-400x200.jpg 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/02\/2025-02-13_10-21-21-250x125.jpg 250w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/02\/2025-02-13_10-21-21.jpg 1888w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>First create folder with name of uPython as following:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-csrc&quot;,&quot;theme&quot;:&quot;dracula&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;C&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;c&quot;}\">mkdir uPython<\/pre><\/div>\n\n\n\n<p>This will create new folder with name of uPython.<\/p>\n\n\n\n<p>Navigate to the uPython folder as following:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-csrc&quot;,&quot;theme&quot;:&quot;dracula&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;C&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;c&quot;}\">cd uPython<\/pre><\/div>\n\n\n\n<p>Next, ensure all dependencies are up to date using the following two commands:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-csrc&quot;,&quot;theme&quot;:&quot;dracula&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;C&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;c&quot;}\">sudo apt update<\/pre><\/div>\n\n\n\n<p>After the command has been completed, run the following command:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-csrc&quot;,&quot;theme&quot;:&quot;dracula&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;C&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;c&quot;}\">sudo apt install build-essential libncurses5-dev libffi-dev \\\n    libssl-dev git cmake python3 python3-pip python3-venv<\/pre><\/div>\n\n\n\n<p>After the command has completed, we shall download the micropython core as following:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-csrc&quot;,&quot;theme&quot;:&quot;dracula&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;C&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;c&quot;}\">git clone --recurse-submodules https:\/\/github.com\/micropython\/micropython.git<\/pre><\/div>\n\n\n\n<p>Next navigate the downloaded micro python folder as following:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-csrc&quot;,&quot;theme&quot;:&quot;dracula&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;C&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;c&quot;}\">cd micropython<\/pre><\/div>\n\n\n\n<p>Next, navigate to mpy-cross folder as following:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-csrc&quot;,&quot;theme&quot;:&quot;dracula&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;C&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;c&quot;}\">cd mpy-cross<\/pre><\/div>\n\n\n\n<p>Build the micropython cross compiler as following:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-csrc&quot;,&quot;theme&quot;:&quot;dracula&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;C&quot;,&quot;language&quot;:&quot;C&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;c&quot;}\">make -j$(nproc)<\/pre><\/div>\n\n\n\n<p>This will build the compiler and it will take few minutes (depending on your machine).<\/p>\n\n\n\n<p>Navigate back to the micropython folder as following:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-csrc&quot;,&quot;theme&quot;:&quot;dracula&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;C&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;c&quot;}\">cd ..<\/pre><\/div>\n\n\n\n<p>Next, build the micropython for STM32F411 Nucleo-64 as following:<\/p>\n\n\n\n<p>First, navigate to the STM32 port as following:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-csrc&quot;,&quot;theme&quot;:&quot;dracula&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;C&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;c&quot;}\">cd ports\/stm32<\/pre><\/div>\n\n\n\n<p>Build the micropython core for STM32 as following:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-csrc&quot;,&quot;theme&quot;:&quot;dracula&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;C&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;c&quot;}\">make submodules<\/pre><\/div>\n\n\n\n<p>Next, build the micropython for the board:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-csrc&quot;,&quot;theme&quot;:&quot;dracula&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;C&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;c&quot;}\">make BOARD=NUCLEO_F411RE -j$(nproc)<\/pre><\/div>\n\n\n\n<p>This will generate the hex file.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">2. Installing STM32CubeProg:<\/h2>\n\n\n\n<p>After the build has been completed, go <a href=\"https:\/\/www.st.com\/en\/development-tools\/stm32cubeprog.html\" data-type=\"link\" data-id=\"https:\/\/www.st.com\/en\/development-tools\/stm32cubeprog.html\">this website to download STM32CubeProg<\/a>.<\/p>\n\n\n\n<p>After the download which is by default in download folder, rename it to something easy like STM32CubeProg:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"814\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/02\/2025-02-13_10-27-14-1024x814.jpg\" alt=\"\" class=\"wp-image-3231\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/02\/2025-02-13_10-27-14-1024x814.jpg 1024w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/02\/2025-02-13_10-27-14-300x239.jpg 300w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/02\/2025-02-13_10-27-14-768x611.jpg 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/02\/2025-02-13_10-27-14-1536x1221.jpg 1536w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/02\/2025-02-13_10-27-14-2048x1629.jpg 2048w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/02\/2025-02-13_10-27-14-1150x914.jpg 1150w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/02\/2025-02-13_10-27-14-750x596.jpg 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/02\/2025-02-13_10-27-14-400x318.jpg 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/02\/2025-02-13_10-27-14-250x199.jpg 250w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>After the rename. Right click and extract  the zip folder<\/p>\n\n\n\n<p>Open the terminal again and navigate to downloads folder as following:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-csrc&quot;,&quot;theme&quot;:&quot;dracula&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;C&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;c&quot;}\">cd Downloads<\/pre><\/div>\n\n\n\n<p>Then navigate the folder where STM32CubeProg has been extracted as following:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-csrc&quot;,&quot;theme&quot;:&quot;dracula&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;C&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;c&quot;}\">cd STM32CubeProg<\/pre><\/div>\n\n\n\n<p>Next, we shall make the installer executable as following:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-csrc&quot;,&quot;theme&quot;:&quot;dracula&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;C&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;c&quot;}\">chmod +x SetupSTM32CubeProgrammer-*.linux<\/pre><\/div>\n\n\n\n<p>Replace the start with the version you downloaded.<\/p>\n\n\n\n<p>Run the installer as following:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-csrc&quot;,&quot;theme&quot;:&quot;dracula&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;C&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;c&quot;}\">.\/SetupSTM32CubeProgrammer-*.linux<\/pre><\/div>\n\n\n\n<p>Follow the instructions in the GUI:<\/p>\n\n\n\n<p>Once the program has been installed, added it to the path as following:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-csrc&quot;,&quot;theme&quot;:&quot;dracula&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;C&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;c&quot;}\">echo 'export PATH=$PATH:\/opt\/STMicroelectronics\/STM32CubeProgrammer\/bin' &gt;&gt; ~\/.bashrc\n\nsource ~\/.bashrc<\/pre><\/div>\n\n\n\n<p>Now, STM32CubeProg has been installed.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">3. Flashing the Micropython Firmware:<\/h2>\n\n\n\n<p>Open STM32CubeProg and you should see the following:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"623\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/02\/2025-02-13_10-40-08-1024x623.jpg\" alt=\"\" class=\"wp-image-3232\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/02\/2025-02-13_10-40-08-1024x623.jpg 1024w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/02\/2025-02-13_10-40-08-300x183.jpg 300w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/02\/2025-02-13_10-40-08-768x467.jpg 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/02\/2025-02-13_10-40-08-1536x935.jpg 1536w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/02\/2025-02-13_10-40-08-2048x1246.jpg 2048w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/02\/2025-02-13_10-40-08-1150x700.jpg 1150w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/02\/2025-02-13_10-40-08-750x456.jpg 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/02\/2025-02-13_10-40-08-400x243.jpg 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/02\/2025-02-13_10-40-08-250x152.jpg 250w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>Next, connect your Nucloe board and click on connect connect from right side as following:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"477\" height=\"1024\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/02\/2025-02-13_10-50-08-477x1024.jpg\" alt=\"\" class=\"wp-image-3233\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/02\/2025-02-13_10-50-08-477x1024.jpg 477w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/02\/2025-02-13_10-50-08-140x300.jpg 140w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/02\/2025-02-13_10-50-08-715x1536.jpg 715w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/02\/2025-02-13_10-50-08-400x859.jpg 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/02\/2025-02-13_10-50-08-250x537.jpg 250w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/02\/2025-02-13_10-50-08.jpg 728w\" sizes=\"(max-width: 477px) 100vw, 477px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>After the connection has been stablished, open erasing and programming from left side as set it as following:<\/p>\n\n\n\n<p>Click on brows and head to this location:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-csrc&quot;,&quot;theme&quot;:&quot;dracula&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;C&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;c&quot;}\">\/uPython\/micropython\/ports\/stm32<\/pre><\/div>\n\n\n\n<p>Select the firmware.elf<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"592\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/02\/2025-02-13_10-52-12-1024x592.jpg\" alt=\"\" class=\"wp-image-3234\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/02\/2025-02-13_10-52-12-1024x592.jpg 1024w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/02\/2025-02-13_10-52-12-300x173.jpg 300w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/02\/2025-02-13_10-52-12-768x444.jpg 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/02\/2025-02-13_10-52-12-1536x888.jpg 1536w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/02\/2025-02-13_10-52-12-2048x1184.jpg 2048w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/02\/2025-02-13_10-52-12-1150x665.jpg 1150w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/02\/2025-02-13_10-52-12-750x434.jpg 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/02\/2025-02-13_10-52-12-400x231.jpg 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/02\/2025-02-13_10-52-12-250x145.jpg 250w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Click on start programming.<\/p>\n\n\n\n<p>This will flash the Nucleo board with latest version.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">4. Testing Micropython:<\/h2>\n\n\n\n<p><\/p>\n\n\n\n<p>Open your favourite Serial terminal. Once it has been opened, reset the Nucleo board using the black push button and you should get the following:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"464\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/02\/2025-02-13_10-59-09-1024x464.jpg\" alt=\"\" class=\"wp-image-3235\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/02\/2025-02-13_10-59-09-1024x464.jpg 1024w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/02\/2025-02-13_10-59-09-300x136.jpg 300w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/02\/2025-02-13_10-59-09-768x348.jpg 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/02\/2025-02-13_10-59-09-1536x696.jpg 1536w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/02\/2025-02-13_10-59-09-1150x521.jpg 1150w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/02\/2025-02-13_10-59-09-750x340.jpg 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/02\/2025-02-13_10-59-09-400x181.jpg 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/02\/2025-02-13_10-59-09-250x113.jpg 250w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2025\/02\/2025-02-13_10-59-09.jpg 1632w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Type the following:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-csrc&quot;,&quot;theme&quot;:&quot;dracula&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;C&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;c&quot;}\">help()<\/pre><\/div>\n\n\n\n<p>And you should see help.<\/p>\n\n\n\n<p>Now, you are ready for your Micropython journey.<\/p>\n\n\n\n<p>Happy coding \ud83d\ude09<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this guide, we shall see how to compile the micropython core for STM32F411 Nucleo-64 and burn the compiled version to the board. In this guide, we shall cover the following: 1. Compiling the Micropython: Note: Here we are assume that your linux has been installed and running perfectly without any issues. We start by [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,12],"tags":[],"class_list":["post-3227","post","type-post","status-publish","format-standard","hentry","category-embedded-systems","category-stm32"],"_links":{"self":[{"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=\/wp\/v2\/posts\/3227"}],"collection":[{"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3227"}],"version-history":[{"count":1,"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=\/wp\/v2\/posts\/3227\/revisions"}],"predecessor-version":[{"id":3236,"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=\/wp\/v2\/posts\/3227\/revisions\/3236"}],"wp:attachment":[{"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3227"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3227"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3227"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}