[BUG] esp32s3: esp-hal-3rdparty fails to build with GCC 15 (ATOMIC_VAR_INIT removed)
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 72/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- c
- Área
- build-system, embedded-iot
Línea de trabajo
Empieza con el hash fijado en arch/xtensa/src/esp32s3/Make.defs (ESP_HAL_3RDPARTY_VERSION) y luego con la línea 13 fallida de esp_gpio_reserve.c, en arch/xtensa/src/esp32s3/esp-hal-3rdparty/components/esp_hw_support/. Reproduce el problema compilando esp32s3-devkit:nsh con GCC 15. Está terminado cuando la compilación pasa, ya sea reemplazando ATOMIC_VAR_INIT por una inicialización directa o actualizando el pin a un commit que ya lo haga así.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Description / Steps to reproduce the issue
Bug Description
NuttX fails to build for ESP32-S3 with GCC 15 due to ATOMIC_VAR_INIT being removed from the toolchain.
ATOMIC_VAR_INIT was deprecated in C17 and removed in GCC 15. The esp-hal-3rdparty code pinned by NuttX 13.1 still uses it.
Toolchain
xtensa-esp-elf-gcc (crosstool-NG esp-15.2.0_20251204) 15.2.0- ESP-IDF v6.1
NuttX 13.1 pins ESP_HAL_3RDPARTY_VERSION = b90b1837cb5ad24747deb4c895246037cc206ce5 in arch/xtensa/src/esp32s3/Make.defs.
Error
CC: chip/esp-hal-3rdparty/components/esp_hw_support/esp_gpio_reserve.c
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
make[1]: *** [Makefile:146:chip/esp-hal-3rdparty/components/esp_hw_support/esp_gpio_reserve.o] error 1
make: *** [tools/LibTargets.mk:170:arch/xtensa/src/libarch.a] error 2
Temporary Workaround
Modify arch/xtensa/src/esp32s3/esp-hal-3rdparty/components/esp_hw_support/esp_gpio_reserve.c line 13:
// from
static _Atomic uint64_t s_reserved_pin_mask = ATOMIC_VAR_INIT(~(SOC_GPIO_VALID_GPIO_MASK));
// to
static _Atomic uint64_t s_reserved_pin_mask = ~(SOC_GPIO_VALID_GPIO_MASK);
After this change, the build succeeded.
Suggested Fix
Either bump the pinned ESP_HAL_3RDPARTY_VERSION to a commit that already uses direct initialization, or document that GCC ≤ 14 is required for ESP32-S3.
### On which OS does this issue occur?
[OS: Linux]
### What is the version of your OS?
EndeavourOS Linux 7.2.9-arch1-1
### NuttX Version
releases/13.1
### Issue Architecture
[Arch: xtensa]
### Issue Area
[Area: Board support], [Area: Build System]
### Host information
### Host Info
- OS: Linux x86_64 (Arch)
- Toolchain: `xtensa-esp32s3-elf-gcc (crosstool-NG esp-15.2.0_20251204) 15.2.0`
- ESP-IDF: v6.1
- HAL version: `sync/master.c-nuttx-20260428-24-gb90b1837cb5`
- esptool: 5.6.0
- defconfig: `esp32s3-devkit:nsh`
### Verification
- [x] I have verified before submitting the report.
- Lenguaje dominante
- C
- Estrellas
- 4.1k
- Forks
- 1.7k
- Merge medio
- 1 d 9 h
- PR fusionados (30 d)
- 532
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de apache/nuttx
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
apache/nuttx#19435 · 8 comentarios ·
Los mantenedores suelen responder en 1 día
-
Type: Bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
apache/nuttx#17343 · 4 comentarios ·
Los mantenedores suelen responder en 1 día
-
[BUG] SDIO `callbackenable` should only exist if HPWORK queue support is enabledPosiblemente ocupada @Sarthak-Pandey la tomó hace 11 días. AbiertoArch: all Area: Drivers OS: Linux Type: Bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
apache/nuttx#17249 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Arch: all OS: Linux Type: Bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
apache/nuttx#16249 · 7 comentarios ·
Los mantenedores suelen responder en 1 día
-
arch/arm/stm32: serial setformat writes CR1 parity/word-length bits with UE=1 in several driversAbierto
Dificultad 4/5 3-5 días Aptitud para principiantes 55/100
Los mantenedores suelen responder en 1 día
Todos los issues de apache/nuttx
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
-
build help wanted new feature
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
AOMediaCodec/SVT-AV1#2516 · 2 comentarios ·
-
sist2-admin: stale ocr_lang is not cleared when disabling OCR, causing scan validation failureAbiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 63/100
Los mantenedores suelen responder en 4 días