cpu/esp32: fixes compile problems
This commit is contained in:
parent
fa520a09cc
commit
16f0bf4fdc
@ -23,6 +23,9 @@
|
|||||||
#ifndef BOARD_COMMON_H
|
#ifndef BOARD_COMMON_H
|
||||||
#define BOARD_COMMON_H
|
#define BOARD_COMMON_H
|
||||||
|
|
||||||
|
/* not required when compiling ESP32 vendor code parts */
|
||||||
|
#ifndef ESP32_IDF_CODE
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#include "cpu.h"
|
#include "cpu.h"
|
||||||
@ -161,5 +164,6 @@ void print_board_config (void);
|
|||||||
} /* end extern "C" */
|
} /* end extern "C" */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif /* ESP32_IDF_CODE */
|
||||||
#endif /* BOARD_COMMON_H */
|
#endif /* BOARD_COMMON_H */
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|||||||
@ -37,6 +37,16 @@ ifneq (,$(filter esp_wifi_any,$(USEMODULE)))
|
|||||||
DISABLE_MODULE += hashes
|
DISABLE_MODULE += hashes
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifneq (,$(filter esp_idf_nvs_flash,$(USEMODULE)))
|
||||||
|
# add additional modules required by esp_idf_nvs_flash
|
||||||
|
USEMODULE += pthread
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifneq (,$(filter esp_idf_nvs_flash,$(USEMODULE)))
|
||||||
|
# add additional modules required by riot_riot_freertos
|
||||||
|
USEMODULE += xtimer
|
||||||
|
endif
|
||||||
|
|
||||||
ifneq (,$(filter esp_i2c_hw,$(USEMODULE)))
|
ifneq (,$(filter esp_i2c_hw,$(USEMODULE)))
|
||||||
USEMODULE += xtimer
|
USEMODULE += xtimer
|
||||||
else
|
else
|
||||||
@ -52,12 +62,11 @@ endif
|
|||||||
|
|
||||||
# each device has SPI flash memory, but must be explicitly enabled
|
# each device has SPI flash memory, but must be explicitly enabled
|
||||||
ifneq (,$(filter esp_spiffs,$(USEMODULE)))
|
ifneq (,$(filter esp_spiffs,$(USEMODULE)))
|
||||||
USEMODULE += esp_idf_spi_flash
|
|
||||||
USEMODULE += spiffs
|
USEMODULE += spiffs
|
||||||
USEMODULE += vfs
|
endif
|
||||||
export SPIFFS_STD_OPTION = -std=c99
|
|
||||||
INCLUDES += -I$(RIOTBASE)/sys/include
|
ifneq (,$(filter mtd,$(USEMODULE)))
|
||||||
INCLUDES += -I$(RIOTBASE)/sys/posix/include
|
USEMODULE += esp_idf_spi_flash
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq (,$(filter ndn-riot,$(USEPKG)))
|
ifneq (,$(filter ndn-riot,$(USEPKG)))
|
||||||
|
|||||||
@ -126,7 +126,9 @@ ifneq (,$(filter esp_wifi_any,$(USEMODULE)))
|
|||||||
LINKFLAGS += $(BINDIR)/esp_idf_esp32.a
|
LINKFLAGS += $(BINDIR)/esp_idf_esp32.a
|
||||||
LINKFLAGS += $(BINDIR)/esp_idf_nvs_flash.a
|
LINKFLAGS += $(BINDIR)/esp_idf_nvs_flash.a
|
||||||
LINKFLAGS += $(BINDIR)/esp_idf_spi_flash.a
|
LINKFLAGS += $(BINDIR)/esp_idf_spi_flash.a
|
||||||
|
LINKFLAGS += $(BINDIR)/pthread.a
|
||||||
LINKFLAGS += $(BINDIR)/riot_freertos.a
|
LINKFLAGS += $(BINDIR)/riot_freertos.a
|
||||||
|
LINKFLAGS += $(BINDIR)/xtimer.a
|
||||||
LINKFLAGS += -lcore -lrtc -lnet80211 -lpp -lsmartconfig -lcoexist
|
LINKFLAGS += -lcore -lrtc -lnet80211 -lpp -lsmartconfig -lcoexist
|
||||||
LINKFLAGS += -lwps -lwpa -lwpa2 -lespnow -lmesh -lphy -lstdc++
|
LINKFLAGS += -lwps -lwpa -lwpa2 -lespnow -lmesh -lphy -lstdc++
|
||||||
endif
|
endif
|
||||||
|
|||||||
@ -7,14 +7,11 @@ include $(RIOTBASE)/Makefile.base
|
|||||||
INCLUDES = -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/wpa_supplicant/port/include
|
INCLUDES = -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/wpa_supplicant/port/include
|
||||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/wpa_supplicant/include
|
INCLUDES += -I$(ESP32_SDK_DIR)/components/wpa_supplicant/include
|
||||||
INCLUDES += -I$(ESP32_SDK_DIR)/components/wpa_supplicant/port/include
|
INCLUDES += -I$(ESP32_SDK_DIR)/components/wpa_supplicant/port/include
|
||||||
CFLAGS += -D__ets__ -DESPRESSIF_USE
|
CFLAGS += -D__ets__ -DESPRESSIF_USE -DESP32_IDF_CODE=1
|
||||||
|
|
||||||
include $(RIOTCPU)/$(CPU)/Makefile.include
|
include $(RIOTCPU)/$(CPU)/Makefile.include
|
||||||
|
|
||||||
INCLUDES += -I$(RIOTBASE)/core/include
|
INCLUDES += -I$(RIOTBASE)/core/include
|
||||||
INCLUDES += -I$(RIOTBASE)/drivers/include
|
|
||||||
INCLUDES += -I$(RIOTBASE)/sys/include
|
|
||||||
INCLUDES += -I$(RIOTBASE)/sys/posix/include
|
|
||||||
INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/include/log
|
INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/include/log
|
||||||
INCLUDES += -I$(RIOTCPU)/$(CPU)/include
|
INCLUDES += -I$(RIOTCPU)/$(CPU)/include
|
||||||
INCLUDES += -I$(RIOTBOARD)/$(BOARD)/include
|
INCLUDES += -I$(RIOTBOARD)/$(BOARD)/include
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user