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: .set not allowed for pio version 0 #1950

Open
magy00 opened this issue Sep 25, 2024 · 0 comments
Open

pioasm: .set not allowed for pio version 0 #1950

magy00 opened this issue Sep 25, 2024 · 0 comments
Assignees
Milestone

Comments

@magy00
Copy link

magy00 commented Sep 25, 2024

Resubmission of #1860:

test.pio:

.program test
.out 1 right 32
.set 1
$ ~/.pico-sdk/tools/2.0.0/pioasm/pioasm -v 0 test.pio
test.pio:3.1-6: PIO version 1 is required for '.in'
    3 | .set 1
      | ^~~~~~

Since .out also requires SDK 2.0, .set should probably also be allowed.

$ ~/.pico-sdk/tools/2.0.0/pioasm/pioasm -v 1 test.pio
// -------------------------------------------------- //
// This file is autogenerated by pioasm; do not edit! //
// -------------------------------------------------- //

#pragma once

#if !PICO_NO_HARDWARE
#include "hardware/pio.h"
#endif

// ---- //
// test //
// ---- //

#define test_wrap_target 0
#define test_wrap 0
#define test_pio_version 1

static const uint16_t test_program_instructions[] = {
};

#if !PICO_NO_HARDWARE
static const struct pio_program test_program = {
    .instructions = test_program_instructions,
    .length = 0,
    .origin = -1,
    .pio_version = 1,
#if PICO_PIO_VERSION > 0
    .used_gpio_ranges = 0x0
#endif
};

static inline pio_sm_config test_program_get_default_config(uint offset) {
    pio_sm_config c = pio_get_default_sm_config();
    sm_config_set_wrap(&c, offset + test_wrap_target, offset + test_wrap);
    sm_config_set_out_pin_count(&c, 1);
    sm_config_set_out_shift(&c, 1, 0, 32);
    sm_config_set_set_pin_count(&c, 1);
    return c;
}
#endif

And here

.pio_version = 1,

could possibly be

.pio_version = test_pio_version,

@kilograham kilograham added this to the 2.1.0 milestone Nov 11, 2024
@kilograham kilograham self-assigned this Nov 18, 2024
kilograham added a commit that referenced this issue Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants