Skip to content
Snippets Groups Projects
Commit 66683050 authored by Gunar Schorcht's avatar Gunar Schorcht Committed by Schorcht
Browse files

cpu/esp8266: Makefile fixes for ets_task thread

Changes of ETS task handling require the context switch by software interrupt. The context switch based on interrupt is therefore enabled by default. Furthermore, the number of priority levels are increased due to the new additional thread.
parent 906bdebb
No related branches found
No related tags found
No related merge requests found
# additional modules dependencies # additional modules dependencies
ifneq (, $(filter esp_sdk, $(USEMODULE)))
USEMODULE += core_thread_flags
endif
ifneq (, $(filter esp_spiffs, $(USEMODULE)))
export SPIFFS_STD_OPTION = -std=c99
USEMODULE += spiffs
USEMODULE += vfs
endif
ifneq (, $(filter lua, $(USEPKG))) ifneq (, $(filter lua, $(USEPKG)))
USEMODULE += newlib_syscalls_default USEMODULE += newlib_syscalls_default
USEMODULE += xtimer USEMODULE += xtimer
...@@ -35,13 +45,3 @@ endif ...@@ -35,13 +45,3 @@ endif
ifneq (, $(filter newlib_syscalls_default, $(USEMODULE))) ifneq (, $(filter newlib_syscalls_default, $(USEMODULE)))
USEMODULE += stdio_uart USEMODULE += stdio_uart
endif endif
# network interface dependencies
ifneq (, $(filter netdev_default, $(USEMODULE)))
# if NETDEV_DEFAULT is empty, we use module mrf24j40 as default network device
ifndef NETDEV_DEFAULT
USEMODULE += mrf24j40
else
USEMODULE += $(NETDEV_DEFAULT)
endif
endif
...@@ -24,6 +24,16 @@ endif ...@@ -24,6 +24,16 @@ endif
ifeq ($(ENABLE_GDBSTUB), 1) ifeq ($(ENABLE_GDBSTUB), 1)
USEMODULE += esp_gdbstub USEMODULE += esp_gdbstub
endif
# SPECIAL module dependencies
# cannot be done in Makefile.dep since Makefile.dep is included too late
ifneq (, $(filter esp_sw_timer, $(USEMODULE)))
USEMODULE += esp_sdk
endif
ifneq (, $(filter esp_gdbstub, $(USEMODULE)))
USEMODULE += esp_gdb USEMODULE += esp_gdb
endif endif
...@@ -39,7 +49,17 @@ PSEUDOMODULES += esp_sdk_int_handling ...@@ -39,7 +49,17 @@ PSEUDOMODULES += esp_sdk_int_handling
PSEUDOMODULES += esp_sw_timer PSEUDOMODULES += esp_sw_timer
PSEUDOMODULES += esp_spiffs PSEUDOMODULES += esp_spiffs
USEMODULE += esp
USEMODULE += mtd
USEMODULE += periph
USEMODULE += periph_common
USEMODULE += ps
USEMODULE += random
USEMODULE += sdk
USEMODULE += xtensa
ifneq (, $(filter pthread, $(USEMODULE))) ifneq (, $(filter pthread, $(USEMODULE)))
# has to be included before $(ESP8266_NEWLIB_DIR)
INCLUDES += -I$(RIOTBASE)/sys/posix/pthread/include INCLUDES += -I$(RIOTBASE)/sys/posix/pthread/include
endif endif
...@@ -49,13 +69,14 @@ INCLUDES += -I$(RIOTCPU)/$(CPU) ...@@ -49,13 +69,14 @@ INCLUDES += -I$(RIOTCPU)/$(CPU)
INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor
INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/espressif INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/espressif
CFLAGS += -DESP_OPEN_SDK CFLAGS += -DESP_OPEN_SDK -DSCHED_PRIO_LEVELS=32
CFLAGS += -Wno-unused-parameter -Wformat=0 CFLAGS += -Wno-unused-parameter -Wformat=0
CFLAGS += -mlongcalls -mtext-section-literals -fdata-sections CFLAGS += -mlongcalls -mtext-section-literals
CFLAGS += -fdata-sections -fzero-initialized-in-bss
ASFLAGS += --longcalls --text-section-literals ASFLAGS += --longcalls --text-section-literals
ifneq (, $(filter esp_sw_timer, $(USEMODULE))) ifeq (, $(filter esp_sdk_int_handling, $(USEMODULE)))
USEMODULE += esp_sdk CFLAGS += -DCONTEXT_SWITCH_BY_INT
endif endif
ifneq (, $(filter esp_sdk, $(USEMODULE))) ifneq (, $(filter esp_sdk, $(USEMODULE)))
...@@ -70,17 +91,9 @@ ifneq (, $(filter esp_gdbstub, $(USEMODULE))) ...@@ -70,17 +91,9 @@ ifneq (, $(filter esp_gdbstub, $(USEMODULE)))
endif endif
ifneq (, $(filter esp_gdb, $(USEMODULE))) ifneq (, $(filter esp_gdb, $(USEMODULE)))
CFLAGS_OPT = -fzero-initialized-in-bss -Og -ggdb -g3 CFLAGS += -Og -ggdb -g3
else else
CFLAGS_OPT = -fzero-initialized-in-bss -O2 CFLAGS += -Os
endif
CFLAGS += $(CFLAGS_OPT)
ifneq (, $(filter esp_spiffs, $(USEMODULE)))
export SPIFFS_STD_OPTION = -std=c99
USEMODULE += spiffs
USEMODULE += vfs
endif endif
ifeq ($(QEMU), 1) ifeq ($(QEMU), 1)
...@@ -115,15 +128,6 @@ LINKFLAGS += -T$(RIOTCPU)/$(CPU)/ld/eagle.rom.addr.v6.ld ...@@ -115,15 +128,6 @@ LINKFLAGS += -T$(RIOTCPU)/$(CPU)/ld/eagle.rom.addr.v6.ld
LINKFLAGS += -nostdlib -lgcc -u ets_run -Wl,-gc-sections # -Wl,--print-gc-sections LINKFLAGS += -nostdlib -lgcc -u ets_run -Wl,-gc-sections # -Wl,--print-gc-sections
LINKFLAGS += -Wl,--warn-unresolved-symbols LINKFLAGS += -Wl,--warn-unresolved-symbols
USEMODULE += esp
USEMODULE += mtd
USEMODULE += periph
USEMODULE += periph_common
USEMODULE += ps
USEMODULE += random
USEMODULE += sdk
USEMODULE += xtensa
# configure preflasher to convert .elf to .bin before flashing # configure preflasher to convert .elf to .bin before flashing
FLASH_SIZE = -fs 8m FLASH_SIZE = -fs 8m
export PREFLASHER ?= esptool.py export PREFLASHER ?= esptool.py
...@@ -143,5 +147,5 @@ else ...@@ -143,5 +147,5 @@ else
export FFLAGS += -p $(PORT) -b $(PROGRAMMER_SPEED) write_flash export FFLAGS += -p $(PORT) -b $(PROGRAMMER_SPEED) write_flash
export FFLAGS += -fm $(FLASH_MODE) export FFLAGS += -fm $(FLASH_MODE)
export FFLAGS += 0 $(ELFFILE)-0x00000.bin export FFLAGS += 0 $(ELFFILE)-0x00000.bin
export FFLAGS += 0x10000 $(ELFFILE)-0x10000.bin export FFLAGS += 0x10000 $(ELFFILE)-0x10000.bin; esptool.py -p $(PORT) run
endif endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment