Wiznet makers

ruilixin6

Published July 30, 2026 ©

43 UCC

0 VAR

0 Contests

0 Followers

0 Following

Embedded 101: MicroPython v1.23.0 vs v1.27.0 on Pico — In-Depth Iteration Comparison

It covers flashing MicroPython UF2 firmware for Pico, firmware types, and differences between v1.23.0 and later versions.

COMPONENTS
PROJECT DESCRIPTION

【Preliminary Note】The original hardware example in this article was written based on the RP2040. The actual hardware used in this hands-on demonstration features the W55RP20 as the main controller chip. The circuit logic and UF2 flashing operation principles are universally applicable, with only the main controller model differing. The original chip model mentioned in the circuit descriptions below is provided for reference purposes only.

 

1. Flashing MicroPython Firmware to Raspberry Pi Pico

In most parts of this tutorial, the Raspberry Pi Pico uses the MicroPython firmware version RPI_PICO-20240602-v1.23.0. uf2.
You can download it via the following link: https://micropython.org/download/RPI_PICO/
If you do not want to use the pre-built version — for example, if you want to develop an extended C module for MicroPython — you will need to obtain the source code of MicroPython, modify it, and then perform a cross-compilation to build your own MicroPython firmware binary.
When flashing the firmware, you first need to hold down the BOOTSEL button on the Raspberry Pi Pico, then connect the Raspberry Pi Pico to your computer via a USB cable while keeping the button pressed. Note: if your computer does not prompt that a new device is connected, it is most likely because the USB cable you are using is a charging cable rather than a data cable.
After the Raspberry Pi Pico is connected to a computer via USB, the Pico will be recognized as a mass storage device. When you open This PC, you will find a new RPI-RP2 volume appears:
Open Device Manager, and by default two devices will appear: Universal Serial Bus Device and disk Drive.
Simply drag the prepared firmware RPI_PICO-20240602-v1.23.0. uf2 file into the drive that pops up after you plug in the Pico, and this will program the firmware into the flash memory of the Raspberry Pi Pico:
Programming the UF2 file into the flash takes a few seconds; once completed, the development board will automatically restart, causing the RPI-RP2 drive to disappear, and then MicroPython will start running.
Open Device Manager to check the ports, and you will find a new COM port appears in Device Manager. We can access the REPL (similar to a command line) of the Raspberry Pi Pico through this port (which is actually the USB virtual serial port on the Raspberry Pi Pico).

2. MicroPython Firmware Version on Raspberry Pi Pico

Some of you may have noticed that the latest version of the MicroPython firmware currently is v1.27.0+, so why do most of the codes in our tutorials use v1.23.0?
Here we list the change table of MicroPython firmware versions v1.23.0 to v1.27.0 for Raspberry Pi Pico:
版本 (发布日期)与 rp2 / Pico 相关的主要变更(精要)对 Pico 用户的影响(简述)建议的动作
v1.23.0 (≈2024-05/06) (GitHub)引入 动态 USB 设备 (machine.USBDevice);对 VM 和运行时做性能优化(约 +10%);改进 PIO/SPI FIFO 的 DMA 访问;修复 threads、lightsleep、UART IRQ 延迟等问题。USB 设备/CDC 更灵活(可在运行时配置);性能与 I/O 稳定性提升,lightsleep/IRQ 行为更可靠。对 Pico W 网络/USB 交互有正面影响。若使用 USBDevice 或深度睡眠/IRQ,请升级并回归测试(USB 在 lightsleep 下的行为、UART 中断延迟)。
v1.24.0 (2024-10-26) (GitHub)支持 RP2350(Pico 2 / RPi Pico2),加强 RISC-V 原生 emitter (RV32IMC)、统一 TinyUSB CDC 代码、可移植的 UART IRQ API;rp2 更新 pico-sdk v2.0.0;USB 在 lightsleep 时保持激活;IPv6 默认可用等。为新一代 Pico(Pico 2 / RP2350)提供原生支持(含 ARM & RISC-V 模式)。TinyUSB 改进使 REPL/启动输出在主机连接后更可靠;UART IRQ 接口在各板间行为更一致。如果使用 Pico2/RP2350:刷合适固件并测试 RISC-V native 特性、PIO、PSRAM(若有);迁移 UART IRQ 代码以利用新 API;验证 TinyUSB 的启动缓冲与 REPL 行为。
v1.25.0 (2025-04-15) (GitHub)增加 ROMFS(只读内置、memory-mapped filesystem) 支持(可原地执行 .mpy),并提供 mpremote romfs 工具;在 rp2 上启用 DTLS(mbedTLS 更新)并改进网络和 lwIP;对 RP2350 增强(PIO side_pindir、SPI 更灵活、WPA3 等)。ROMFS 可显著降低 RAM 占用并加快模块导入,适合内存敏感的 Pico 项目;网络(含 DTLS)在 Pico W/2W 上功能更强但会消耗更多内存;RP2350 的外设与 Wi-Fi 功能更完善。评估把常用库/资源打入 ROMFS(flash 有 ROMFS 分区的板或自行启用);若用 TLS/DTLS,做内存/并发测试;在 Pico W 上验证 WPA3、mDNS 与网络可靠性。
v1.26.0 (2025-08-09) (GitHub)rp2:启用压缩错误信息(节省 ~3 KB);切回并使用 pico-sdk alarm pool(睡眠/定时器改进);支持 machine.I2CTarget(I²C 从设备在 rp2 可用);Thumb/ARM native emitter 改进(RP2040 支持更长跳转)。固件体积更小,但错误文本更紧凑;lightsleep 与 alarm 的实现更稳定;现在能在 Pico(rp2)上用 Python 实现 I²C 从机设备(有教育/原型价值);native 编译器能生成更大/更高效的本机函数(利于加速)。若依赖完整 verbose 错误日志,注意 compressed errors;对低功耗功能/定时器重新验证(alarm pool);尝试 machine.I2CTarget 做从机原型(或用作测试夹具);若使用 native,重测编译/堆栈影响。
v1.27.0 (2025-12-06) (GitHub)修复 DMA 通道释放逻辑;PIO 支持引脚环绕、修复 RP2350B 上半区引脚问题;修复编号>31 引脚的备用功能配置;RP2350 新增 UART_AUX/XIP_CS1 等备用功能;启用 hashlib.md5;更新 TinyUSB 至 0.19.0-24;支持 Timer 软硬中断回调;sys 模块默认全功能启用。DMA 资源泄漏问题解决,长时间运行稳定性提升;PIO 开发更灵活,Pico 2 高编号引脚外设功能可用;新增 MD5 哈希能力;USB 兼容性与稳定性优化;Timer 中断响应更灵活;无需额外配置即可使用 sys 模块功能。测试依赖 DMA 的项目(如 PIO 数据传输、ADC 批量采样)稳定性;验证 Pico 2 高编号引脚及 PIO 引脚环绕功能;利用 hashlib.md5 实现数据校验;更新 USB 相关代码并测试兼容性;适配 Timer 软硬中断回调新特性。
Table 1.1 Overview of Version Differences and Improvements of MicroPython Firmware (v1.23.0 → v1.27.0)
From a pedagogical perspective, most of the core fundamentals of MicroPython fundamentals remain unchanged: Python syntax/REPL interaction model, the basic machine API concepts (GPIO, ADC, PWM, basic I²C/SPI read/write operations), module import mechanism, and the debugging/serial interaction workflow have stayed consistent between v1.23 and v1.27. As a result, classroom examples and exercise code can continue to be used in the vast majority of cases without modification or only with minor adjustments.
Only a few low-level or advanced features have been modified (such as the addition of RP2350 support and RISC-V native emitter, in-place execution of ROMFS. mpy, DTLS/mbedTLS updates, machine. I2CTarget (I²C slave), TinyUSB startup buffer, sys. exit ()/exception behavior and error message compression, etc.), and we will gradually update these new features in subsequent tutorials.
Documents
Comments Write