1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-25 14:33:52 +01:00

cpu/esp_common: ESP32 variant independent makefiles

This commit is contained in:
Gunar Schorcht 2022-03-09 16:50:33 +01:00
parent 1f25ac8893
commit cdd1ec81a4
3 changed files with 17 additions and 10 deletions

View File

@ -1,6 +1,9 @@
# add a list of subdirectories, that should also be build
DIRS += periph
DIRS += vendor
ifneq (,$(filter xtensa%,$(TARGET_ARCH)))
DIRS += vendor
endif
ifneq (,$(filter esp_freertos_common,$(USEMODULE)))
DIRS += freertos

View File

@ -20,7 +20,9 @@ ifeq (,$(filter stdio_% slipdev_stdio,$(USEMODULE)))
USEMODULE += stdio_uart
endif
USEMODULE += xtensa
ifneq (,$(filter esp8266 esp32 esp32s%,$(CPU)))
USEMODULE += xtensa
endif
# Features used by ESP*

View File

@ -27,9 +27,16 @@ INCLUDES += -I$(RIOTCPU)/esp_common/vendor/esp
# Flags
CFLAGS += -Wno-unused-parameter -Wformat=0
CFLAGS += -mlongcalls -mtext-section-literals -fstrict-volatile-bitfields
CFLAGS += -fdata-sections -ffunction-sections -fzero-initialized-in-bss
CFLAGS += -Wno-unused-parameter
CFLAGS += -Wformat=0
CFLAGS += -fstrict-volatile-bitfields
CFLAGS += -fdata-sections
CFLAFS += -ffunction-sections
CFLAGS += -fzero-initialized-in-bss
ifeq (,$(filter esp32c% esp32h%,$(CPU)))
CFLAGS += -mlongcalls -mtext-section-literals
endif
OPTIONAL_CFLAGS_BLACKLIST += -Wformat-overflow
OPTIONAL_CFLAGS_BLACKLIST += -Wformat-truncation
@ -88,11 +95,6 @@ CFLAGS += $(if $(findstring dout,$(FLASH_MODE)),-DFLASH_MODE_DOUT=1)
ARCHIVES += -lg -lc
LINKFLAGS += $(CFLAGS_OPT) $(CFLAGS_DBG)
#ifneq ($(CPU),esp8266)
# esp8266 flags are added by the SDK pkg in pkg/esp8266_sdk
#LINKFLAGS += -L$(ESP_SDK_DIR)/components/$(CPU)
#LINKFLAGS += -L$(ESP_SDK_DIR)/components/$(CPU)/lib
#endif
LINKFLAGS += -nostdlib -Wl,-gc-sections -Wl,-static
# use the wrapper functions for calloc to add correct overflow detection missing