This change will be transparent to most MicroPython users and will not affect them.
But it will potentially affect anyone who has created PIO Assemblers or Disassemblers for use with MicroPython so hence the heads-up.
With the release of MicroPython v1.26-preview-519 there has been a breaking change in respect of PIO Code Wrappers, the list which gets passed to StateMachine methods to define the PIO Code, the returned result of the function preceded by '@asm_pio()'.
This was previously an 8 item list but has now become a 9 item list in order to facilitate use of the third PIO engine available on the RP235X. This is the case for MicroPython running on RP2040 as well as on RP235X.
Illustrative code to run under MicroPython -Previously -Now -
But it will potentially affect anyone who has created PIO Assemblers or Disassemblers for use with MicroPython so hence the heads-up.
With the release of MicroPython v1.26-preview-519 there has been a breaking change in respect of PIO Code Wrappers, the list which gets passed to StateMachine methods to define the PIO Code, the returned result of the function preceded by '@asm_pio()'.
This was previously an 8 item list but has now become a 9 item list in order to facilitate use of the third PIO engine available on the RP235X. This is the case for MicroPython running on RP2040 as well as on RP235X.
Illustrative code to run under MicroPython -
Code:
import osfrom rp2 import asm_pio@asm_pio()def code(): label("loop") pull(noblock) nop() jmp("loop")print(os.uname().version.split()[0])print("Code Wrapper - {} items".format(len(code)))print(" {}".format(code))print("Code - {} words".format(len(code[0])))for pc in range(len(code[0])): print(" {:04X}".format(code[0][pc]))Code:
v1.26.0-preview.142.ga1ee42cd3.dirtyCode Wrapper - 8 items [array('H', [32896, 41026, 0]), -1, -1, 8192, 0, None, None, None]Code - 3 words 8080 A042 0000Code:
v1.26.0-preview.519.ge6739fc87.dirtyCode Wrapper - 9 items [array('H', [32896, 41026, 0]), -1, -1, -1, 8192, 0, None, None, None]Code - 3 words 8080 A042 0000Statistics: Posted by hippy — Fri Aug 01, 2025 7:54 pm