Commit Graph

15 Commits

Author SHA1 Message Date
Michael Olson
d831eff5a2
fix pioasm python output (#694) (#695)
Issue:
    irq wait 0
    irq 0
are translated as:
    irq(wait, 0)                          # 0
    irq(nowait, 0)                        # 1
wait/nowait are incorrect, should be block or ommited (alt: noblock).

After change:
    irq(block, 0)                         # 0
    irq(0)                                # 1
2022-01-08 13:55:23 -06:00
Graham Sanderson
0a32023aac
fix arg parsing segfault (#595) 2021-10-08 09:01:56 -05:00
Philip Howard
e12713d70b
pio_assembler: typo fix (#538)
Change pleaced to placed
2021-10-04 13:11:03 -05:00
graham sanderson
529d7087eb fix operatore precedence of */ vs +- in pioasm 2021-07-06 16:00:02 +01:00
Uri Shaked
4328b2c75f
fix pioasm python output (#479)
While working on the [online pioasm](https://wokwi.com/tools/pioasm), I found several PIO instructions that result in invalid python code. Here is a small program that demonstrate the issue:

```
.program python_issue

    push block
    wait 0 irq 1 rel
    irq clear 1 rel
```

And the resulting Python program:

```python
# -------------------------------------------------- #
# This file is autogenerated by pioasm; do not edit! #
# -------------------------------------------------- #

import rp2
from machine import Pin
# ----------- #
# python_test #
# ----------- #

@rp2.asm_pio()
def python_test():
    wrap_target()
    push(, block)                         # 0
    wait(0, irq, 1 rel)                   # 1
    irq(clear 1 rel)                      # 2
    wrap()
```

After this fix, the above program compiles to a valid python syntax:

```python
# -------------------------------------------------- #
# This file is autogenerated by pioasm; do not edit! #
# -------------------------------------------------- #

import rp2
from machine import Pin
# ----------- #
# python_test #
# ----------- #

@rp2.asm_pio()
def python_test():
    wrap_target()
    push(block)                           # 0
    wait(0, irq, rel(1))                  # 1
    irq(clear, rel(1))                    # 2
    wrap()
```
2021-06-07 22:02:04 -05:00
Christian Flach
090c5cd83b
pio: Add 'pragma once' to generated header files (#237)
We can't really use traditional include guards, because the header file may be piped to stdout (which means we might not have a file name).
2021-03-08 12:21:36 -06:00
Jeremy Grosser
4639e75d0d pioasm: Ada output format 2021-03-04 21:22:48 -06:00
Luke Wren
df3e9c9536 Missing comma in pioasm python wait output 2021-03-04 21:22:48 -06:00
Graham Sanderson
0828178561 fixup not/reverse for pioasm python output (#146) 2021-03-04 21:22:48 -06:00
graham sanderson
2d5789eca8 remove static order dependency 2021-02-01 14:46:45 -06:00
graham sanderson
d131919a09 Fix python output of IN instruction in pioasm 2021-02-01 14:46:45 -06:00
graham sanderson
3e52e57f5f Standardise references to the Raspberry Pi Pico SDK 2021-02-01 14:46:45 -06:00
Tristan Miller
7b97967fe4 Move irq rel flag to setting bit 4 instead of bit 5 2021-02-01 14:46:45 -06:00
Tristan Miller
da22bf95de Push/Pull disassembly no longer incorrectly concatenates operands in disassembly 2021-02-01 14:46:45 -06:00
graham sanderson
26653ea81e Initial Release 2021-01-20 10:44:27 -06:00