Skip to content

Commit

Permalink
cpu/esp32: disable warnings in ESP-IDF for gcc 12.2
Browse files Browse the repository at this point in the history
  • Loading branch information
gschorcht committed Apr 4, 2023
1 parent 9ef732b commit d27423d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cpu/esp32/bootloader/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,10 @@ INCLUDES = \
# CONFIG_ESPTOOLPY_FLASHFREQ_* and CONFIG_FLASHMODE_*
CFLAGS = -include '$(RIOTBUILD_CONFIG_HEADER_C)' \

# TODO: required to be able to compile with GCC 12.1, remove them after upgrade to ESP-IDF 5.1
CFLAGS += -Wno-error=format=
CFLAGS += -Wno-format

ifneq (,$(filter riscv32%,$(TARGET_ARCH)))
INCLUDES += -I$(ESP32_SDK_DIR)/components/riscv/include
CFLAGS += -DCONFIG_IDF_TARGET_ARCH_RISCV
Expand Down
8 changes: 8 additions & 0 deletions cpu/esp32/esp-idf/esp_idf_cflags.mk
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ CFLAGS += -Wno-enum-compare
# those are false positives.
CFLAGS += -Wno-cast-align

# TODO: required to be able to compile with GCC 12.1, remove them after upgrade to ESP-IDF 5.1
CFLAGS += -Wno-attributes
CFLAGS += -Wno-enum-conversion
CFLAGS += -Wno-error=format=
CFLAGS += -Wno-format
CFLAGS += -Wno-use-after-free
CFLAGS += -Wno-incompatible-pointer-types

# additional CFLAGS required for RISC-V architecture
ifneq (,$(filter riscv32%,$(TARGET_ARCH)))
INCLUDES += -I$(ESP32_SDK_DIR)/components/riscv/include
Expand Down
4 changes: 4 additions & 0 deletions cpu/esp32/esp-idf/nvs_flash/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ include ../esp_idf.mk
# those are false positives.
CFLAGS += -Wno-cast-align

# TODO: required to be able to compile with GCC 12.1, remove them after upgrade to ESP-IDF 5.1
CFLAGS += -Wno-error=format=
CFLAGS += -Wno-format

# additional CFLAGS required for RISC-V architecture
ifneq (,$(filter riscv32%,$(TARGET_ARCH)))
CFLAGS += -Wno-error=format=
Expand Down

0 comments on commit d27423d

Please sign in to comment.