pioasm python IN command generated incorrectly #47

Closed
opened 2021-01-29 09:04:57 -06:00 by blippy · 1 comment
blippy commented 2021-01-29 09:04:57 -06:00 (Migrated from github.com)

I built pioasm in ~/pico/pico-sdk/tools/pioasm/build

Its python output is wrong for the IN command. it generates "in", but it should be "in_".

Example: input file blah:

.program blah

.wrap_target
bitloop:
        IN pins, 1
.wrap

Running pioasm -o python blah generates:

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

import rp2
from machine import Pin
# ---- #
# blah #
# ---- #

@rp2.asm_pio()
def blah():
    wrap_target()
    in(pins, 1)                           # 0
    wrap()

The problem is that the line in(pins,1 should read in_(pins,1).

I built pioasm in `~/pico/pico-sdk/tools/pioasm/build` Its python output is wrong for the IN command. it generates "in", but it should be "in_". Example: input file `blah`: ``` .program blah .wrap_target bitloop: IN pins, 1 .wrap ``` Running `pioasm -o python blah` generates: ``` # -------------------------------------------------- # # This file is autogenerated by pioasm; do not edit! # # -------------------------------------------------- # import rp2 from machine import Pin # ---- # # blah # # ---- # @rp2.asm_pio() def blah(): wrap_target() in(pins, 1) # 0 wrap() ``` The problem is that the line `in(pins,1` should read `in_(pins,1)`.
kilograham commented 2021-01-31 16:52:46 -06:00 (Migrated from github.com)

merged into develop

merged into develop
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-raspberrypi/pico-sdk#47
No description provided.