Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pioasm: python output for RP2350 mov pindirs incorrect #2166

Open
magy00 opened this issue Jan 7, 2025 · 3 comments
Open

pioasm: python output for RP2350 mov pindirs incorrect #2166

magy00 opened this issue Jan 7, 2025 · 3 comments
Labels

Comments

@magy00
Copy link

magy00 commented Jan 7, 2025

word() is prepended with part of the mov() that it replaces:

$ cat test.pio
.program test
.pio_version 1
_:  mov pindirs, null
jmp _
$ pioasm -o python test.pio
# -------------------------------------------------- #
# This file is autogenerated by pioasm; do not edit! #
# -------------------------------------------------- #

import rp2
from machine import Pin
# ---- #
# test #
# ---- #

@rp2.asm_pio()
def test():
    wrap_target()
    label("0")
    mov(, null)             word(41059)                           # 0
    jmp("0")                              # 1
    wrap()

Ideally, this could look something like:

import rp2
from machine import Pin
# ---- #
# test #
# ---- #

@rp2.asm_pio()
def test():
    wrap_target()
    label(0)
    word(0xa063)  # mov(pindirs, null)  # 0
    jmp(0)                              # 1
    wrap()
@lurch
Copy link
Contributor

lurch commented Jan 7, 2025

ping @dpgeorge Just out of curiosity, does the PIO support in MicroPython include the new instructions / options added for RP2350? (which I guess would be "nicer" than just emitting word() functions?)

@lurch lurch added the pioasm label Jan 7, 2025
@magy00
Copy link
Author

magy00 commented Jan 7, 2025

There's a thread in the forum with some hacks to add some of the features:
https://forums.raspberrypi.com/viewtopic.php?t=375677
https://github.com/orgs/micropython/discussions/16487

@dpgeorge
Copy link

does the PIO support in MicroPython include the new instructions / options added for RP2350?

No, we don't support the new RP2350 PIO options yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants