Skip to content

RP2040 cannot be compiled with C11 enabled #54190

Closed
@ThadHouse

Description

@ThadHouse

Describe the bug
When compiling a project targeting RP2040 and C11 enabled, errors occur because both assert.h (from the std lib) and config_autogen.h (from zephyr) define static_assert as a macro, with the one in config_autogen not being guarded.

To Reproduce
Steps to reproduce the behavior:

  1. Set C11 flag on any project (set_property(TARGET tgt PROPERTY C_STANDARD 11))
  2. mkdir build; cd build
  3. cmake -DBOARD=rpi_pico
  4. make
  5. See error

Expected behavior
No compiler error

Impact
C11 cannot be used for RP2040 projects

Environment (please complete the following information):

  • OS: Linux and Windows
  • Toolchain: Zephyr SDK 0.15.0
  • Zephyr 3.1 (Still occurs in 3.2)

Metadata

Metadata

Assignees

Labels

bugThe issue is a bug, or the PR is fixing a bugplatform: Raspberry Pi PicoRaspberry Pi Pico (RPi Pico)priority: lowLow impact/importance bug

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions