2019-12-12 13:46:20 +01:00
|
|
|
# With the '-Os' option, char arrays have not to be 32-bit word aligned. This
|
|
|
|
# leads to an alignment exception when the address of a char array is assigned
|
|
|
|
# to an 'uint32_t' pointer and the pointer is used for the access.
|
|
|
|
CFLAGS_OPT ?= -O2
|
2018-09-05 02:39:50 +02:00
|
|
|
|
2019-12-12 13:46:20 +01:00
|
|
|
# ESP8266 specific flashing options
|
2022-08-01 15:22:16 +02:00
|
|
|
# DO NOT CHANGE, ESP8266/ESP8285 modules only work with dout and 26m
|
2019-12-12 13:46:20 +01:00
|
|
|
FLASH_CHIP = esp8266
|
|
|
|
FLASH_OPTS = --version 3
|
2022-08-01 15:22:16 +02:00
|
|
|
FLASH_MODE = dout
|
|
|
|
FLASH_FREQ = 26m
|
2019-12-12 13:46:20 +01:00
|
|
|
FLASH_SIZE ?= 1
|
|
|
|
BOOTLOADER_POS = 0x0000
|
2022-12-27 01:55:28 +01:00
|
|
|
FLASHFILE_POS = 0x10000
|
2019-09-05 13:35:58 +02:00
|
|
|
|
2019-12-12 13:46:20 +01:00
|
|
|
include $(RIOTCPU)/esp_common/Makefile.include
|
2019-12-06 18:56:47 +01:00
|
|
|
|
2018-09-05 02:39:50 +02:00
|
|
|
# regular Makefile
|
|
|
|
|
2020-09-08 22:28:41 +02:00
|
|
|
TARGET_ARCH_ESP8266 ?= xtensa-esp8266-elf
|
|
|
|
TARGET_ARCH ?= $(TARGET_ARCH_ESP8266)
|
2018-09-05 02:39:50 +02:00
|
|
|
|
|
|
|
PSEUDOMODULES += esp_sw_timer
|
|
|
|
|
|
|
|
INCLUDES += -I$(RIOTCPU)/$(CPU)
|
2019-09-05 13:35:58 +02:00
|
|
|
INCLUDES += -I$(RIOTCPU)/$(CPU)/include
|
2018-09-05 02:39:50 +02:00
|
|
|
INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor
|
2019-09-05 13:35:58 +02:00
|
|
|
INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/
|
|
|
|
INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/bootloader_support/include
|
|
|
|
INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/esp8266/include
|
|
|
|
INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/esp8266/include/esp8266
|
|
|
|
INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/heap/include
|
|
|
|
INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/log/include
|
|
|
|
|
2019-12-12 13:46:20 +01:00
|
|
|
CFLAGS += -D__ESP_FILE__=__FILE__
|
2019-09-05 13:35:58 +02:00
|
|
|
|
2020-06-25 10:17:10 +02:00
|
|
|
ifneq (,$(filter esp_gdbstub,$(USEMODULE)))
|
|
|
|
GDBSTUB_DIR ?= $(RIOTCPU)/$(CPU)/vendor/esp-gdbstub
|
2021-04-10 22:49:23 +02:00
|
|
|
CFLAGS += -DGDBSTUB_BREAK_ON_INIT=1
|
2020-06-25 10:17:10 +02:00
|
|
|
INCLUDES += -I$(GDBSTUB_DIR)
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq (,$(filter esp_now,$(USEMODULE)))
|
2020-08-10 14:45:39 +02:00
|
|
|
ARCHIVES += -lespnow
|
2020-06-25 10:17:10 +02:00
|
|
|
endif
|
2019-12-14 15:03:12 +01:00
|
|
|
|
2022-02-01 21:24:43 +01:00
|
|
|
ARCHIVES += -lgcc -lhal -lwpa -lcore -lnet80211 -lphy -lpp -lstdc++
|
2019-09-05 13:35:58 +02:00
|
|
|
|
2020-09-10 14:43:50 +02:00
|
|
|
LINKFLAGS += -L$(RIOTCPU)/$(CPU)/ld
|
|
|
|
LINKFLAGS += -Tesp8266.rom.ld
|
|
|
|
LINKFLAGS += -Tesp8266.riot-os.ld
|
|
|
|
LINKFLAGS += -Tesp8266.peripherals.ld
|
2019-09-05 13:35:58 +02:00
|
|
|
|
2019-10-23 00:54:04 +02:00
|
|
|
LINKFLAGS += -Wl,-wrap=pp_attach
|
|
|
|
LINKFLAGS += -Wl,-wrap=pm_attach
|