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 <almir.okato@espressif.com>
This commit is contained in:
parent
593dc946d1
commit
652f4f1fe1
@ -168,6 +168,10 @@ chip/$(ESP_HAL_3RDPARTY_REPO):
|
|||||||
|
|
||||||
CFLAGS += -Wno-undef -Wno-unused-variable
|
CFLAGS += -Wno-undef -Wno-unused-variable
|
||||||
|
|
||||||
|
# Enable strict volatile bitfield access
|
||||||
|
|
||||||
|
CFLAGS += -fstrict-volatile-bitfields
|
||||||
|
|
||||||
CHIP_SERIES = $(patsubst "%",%,$(CONFIG_ESPRESSIF_CHIP_SERIES))
|
CHIP_SERIES = $(patsubst "%",%,$(CONFIG_ESPRESSIF_CHIP_SERIES))
|
||||||
|
|
||||||
include chip/hal.mk
|
include chip/hal.mk
|
||||||
|
@ -230,6 +230,10 @@ chip/$(ESP_HAL_3RDPARTY_REPO):
|
|||||||
CFLAGS += -Wno-undef -Wno-unused-variable
|
CFLAGS += -Wno-undef -Wno-unused-variable
|
||||||
CFLAGS += ${DEFINE_PREFIX}_RETARGETABLE_LOCKING
|
CFLAGS += ${DEFINE_PREFIX}_RETARGETABLE_LOCKING
|
||||||
|
|
||||||
|
# Enable strict volatile bitfield access
|
||||||
|
|
||||||
|
CFLAGS += -fstrict-volatile-bitfields
|
||||||
|
|
||||||
AFLAGS += $(CFLAGS)
|
AFLAGS += $(CFLAGS)
|
||||||
|
|
||||||
# Files that require the HAL recipe
|
# Files that require the HAL recipe
|
||||||
|
Loading…
Reference in New Issue
Block a user