This is an automated email from the ASF dual-hosted git repository. acassis pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 652f4f1fe18484e4d1a5d537a0224605ce3c4003 Author: Almir Okato <[email protected]> AuthorDate: Wed Jul 3 18:46:04 2024 +0200 esp32[s2|s3]: add volatile bitfields compilation flag This compilation flag was added in the same way as done for esp32 in order to avoid unexpected behaviors when accessing registers using struct bitfields. Signed-off-by: Almir Okato <[email protected]> --- arch/xtensa/src/esp32s2/Make.defs | 4 ++++ arch/xtensa/src/esp32s3/Make.defs | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/arch/xtensa/src/esp32s2/Make.defs b/arch/xtensa/src/esp32s2/Make.defs index 091f950f6c..3377ac2f26 100644 --- a/arch/xtensa/src/esp32s2/Make.defs +++ b/arch/xtensa/src/esp32s2/Make.defs @@ -168,6 +168,10 @@ chip/$(ESP_HAL_3RDPARTY_REPO): CFLAGS += -Wno-undef -Wno-unused-variable +# Enable strict volatile bitfield access + +CFLAGS += -fstrict-volatile-bitfields + CHIP_SERIES = $(patsubst "%",%,$(CONFIG_ESPRESSIF_CHIP_SERIES)) include chip/hal.mk diff --git a/arch/xtensa/src/esp32s3/Make.defs b/arch/xtensa/src/esp32s3/Make.defs index 2e87e8af2f..8b56fecfad 100644 --- a/arch/xtensa/src/esp32s3/Make.defs +++ b/arch/xtensa/src/esp32s3/Make.defs @@ -230,6 +230,10 @@ chip/$(ESP_HAL_3RDPARTY_REPO): CFLAGS += -Wno-undef -Wno-unused-variable CFLAGS += ${DEFINE_PREFIX}_RETARGETABLE_LOCKING +# Enable strict volatile bitfield access + +CFLAGS += -fstrict-volatile-bitfields + AFLAGS += $(CFLAGS) # Files that require the HAL recipe
