Skip to content

[BUG] ESP32C3 implicit declaration of ATOMIC_VAR_INIT #18805

Description

@linguini1

Description / Steps to reproduce the issue

Reproduce:

$ ./tools/configure.sh esp32c3-xiao:nimble
$ make -j
Cloning Espressif HAL for 3rd Party Platforms
Clone: chip/esp-hal-3rdparty   % Total    % Received % Xferd  Average Speed  Time    Time    Time   Current
                                 Dload  Upload  Total   Spent   Left   Speed
  0      0   0      0   0      0      0      0                              0LN: platform/board to /home/linguini/coding/nuttx-space/apps/platform/dummy
  0      0   0      0   0      0      0      0                              0
100  1.77M   0  1.77M   0      0  1.28M      0           00:01          1.39M
Register: dumpstack
Register: hello
Register: dd
Register: nimble
Register: nsh
Register: sh
Espressif HAL for 3rd Party Platforms: cleaning current repository...
Espressif HAL for 3rd Party Platforms: d41c921a724da2b4955832ca9d4b117b004b61c6
Espressif HAL for 3rd Party Platforms: initializing submodules...
Applying patches...
chip/esp-hal-3rdparty/components/esp_hw_support/esp_gpio_reserve.c:13:47: error: implicit declaration of function 'ATOMIC_VAR_INIT'; did you mean 'ATOMIC_FLAG_INIT'? [-Wimplicit-function-declaration]
   13 | static _Atomic uint64_t s_reserved_pin_mask = ATOMIC_VAR_INIT(~(SOC_GPIO_VALID_GPIO_MASK));
      |                                               ^~~~~~~~~~~~~~~
      |                                               ATOMIC_FLAG_INIT
chip/esp-hal-3rdparty/components/esp_hw_support/esp_gpio_reserve.c:13:47: error: initializer element is not constant
CC:  obstack/lib_obstack_copy.c make[1]: *** [Makefile:144: chip/esp-hal-3rdparty/components/esp_hw_support/esp_gpio_reserve.o] Error 1
make[1]: *** Waiting for unfinished jobs....
CC:  mmap/fs_anonmap.c make: *** [tools/LibTargets.mk:170: arch/risc-v/src/libarch.a] Error 2
make: *** Waiting for unfinished jobs....

It appears this is an issue in the ESP32 HAL.

On which OS does this issue occur?

[OS: Linux]

What is the version of your OS?

Linux 6.19.11-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 02 Apr 2026 23:33:01 +0000 x86_64 GNU/Linux

NuttX Version

master

Issue Architecture

[Arch: risc-v]

Issue Area

[Area: Board support]

Host information

$ make host_info
No matching array found.

Looks like another bug with make host_info?

Verification

  • I have verified before submitting the report.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Arch: risc-vIssues related to the RISC-V (32-bit or 64-bit) architectureArea: Board supportBoard support issuesOS: LinuxIssues related to Linux (building system, etc)Type: BugSomething isn't working

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions