Skip to content

Building with the pico-sdk requires gcc v9.1 or laterΒ #1788

@mattytrentini

Description

@mattytrentini

Building MicroPython with GCC 8.5 raises a build error:

In file included from micropython/ports/rp2/machine_pwm.c:32,
                 from micropython/extmod/machine_pwm.c:50:
micropython/lib/pico-sdk/src/rp2_common/hardware_pwm/include/hardware/pwm.h: In function 'pwm_set_irq_mask_enabled':
micropython/lib/pico-sdk/src/rp2_common/hardware_pwm/include/hardware/pwm.h:658:55: error: expected ',' before ')' token
     static_assert(PWM_IRQ_WRAP_1 == PWM_IRQ_WRAP_0 + 1);

This is because GCC versions "prior to v9.1 do not support the single-argument static_assert".

I've confirmed that building with GCC v12.2 resolves the issue but I haven't tried with earlier versions (given the documentation I would assume it works with v9.1 but I have yet to try).

I suggest that either the code should be changed to add the second argument to static_assert - and thus work with earlier gcc versions - or document that v9.1 or later is required.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions