forked from espressif/esp-idf
Merge branch 'bugfix/fixes_from_github' into 'master'
Minor fixes/improvements (github-related) Fixes for some issues reported on github or otherwise related. See merge request !131
This commit is contained in:
@@ -4,8 +4,6 @@
|
|||||||
|
|
||||||
#COMPONENT_ADD_INCLUDEDIRS :=
|
#COMPONENT_ADD_INCLUDEDIRS :=
|
||||||
|
|
||||||
CURRENT_DIR=$(IDF_PATH)/components/bt
|
|
||||||
|
|
||||||
COMPONENT_ADD_INCLUDEDIRS := include
|
COMPONENT_ADD_INCLUDEDIRS := include
|
||||||
|
|
||||||
CFLAGS += -Wno-error=unused-label -Wno-error=return-type -Wno-error=missing-braces -Wno-error=pointer-sign -Wno-error=parentheses
|
CFLAGS += -Wno-error=unused-label -Wno-error=return-type -Wno-error=missing-braces -Wno-error=pointer-sign -Wno-error=parentheses
|
||||||
@@ -22,4 +20,4 @@ ALL_LIB_FILES := $(patsubst %,$(COMPONENT_PATH)/lib/lib%.a,$(LIBS))
|
|||||||
$(COMPONENT_LIBRARY): $(ALL_LIB_FILES)
|
$(COMPONENT_LIBRARY): $(ALL_LIB_FILES)
|
||||||
|
|
||||||
# automatically trigger a git submodule update if BT library is missing
|
# automatically trigger a git submodule update if BT library is missing
|
||||||
$(eval $(call SubmoduleRequiredForFiles,$(ALL_LIB_FILES)))
|
$(eval $(call SubmoduleCheck,$(ALL_LIB_FILES),$(COMPONENT_PATH)/lib))
|
||||||
|
@@ -27,7 +27,7 @@ ALL_LIB_FILES := $(patsubst %,$(COMPONENT_PATH)/lib/lib%.a,$(LIBS))
|
|||||||
|
|
||||||
# automatically trigger a git submodule update
|
# automatically trigger a git submodule update
|
||||||
# if any libraries are missing
|
# if any libraries are missing
|
||||||
$(eval $(call SubmoduleRequiredForFiles,$(ALL_LIB_FILES)))
|
$(eval $(call SubmoduleCheck,$(ALL_LIB_FILES),$(COMPONENT_PATH)/lib))
|
||||||
|
|
||||||
# this is a hack to make sure the app is re-linked if the binary
|
# this is a hack to make sure the app is re-linked if the binary
|
||||||
# libraries change or are updated. If they change, the main esp32
|
# libraries change or are updated. If they change, the main esp32
|
||||||
|
@@ -24,10 +24,11 @@ $(APP_BIN): $(APP_ELF) $(ESPTOOLPY_SRC)
|
|||||||
$(Q) $(ESPTOOLPY) elf2image --flash_mode $(ESPFLASHMODE) --flash_freq $(ESPFLASHFREQ) -o $@ $<
|
$(Q) $(ESPTOOLPY) elf2image --flash_mode $(ESPFLASHMODE) --flash_freq $(ESPFLASHFREQ) -o $@ $<
|
||||||
|
|
||||||
flash: all_binaries $(ESPTOOLPY_SRC)
|
flash: all_binaries $(ESPTOOLPY_SRC)
|
||||||
@echo "Flashing project app to $(CONFIG_APP_OFFSET)..."
|
@echo "Flashing binaries to serial port $(ESPPORT) (app at offset $(CONFIG_APP_OFFSET))..."
|
||||||
$(Q) $(ESPTOOLPY_WRITE_FLASH) $(ESPTOOL_ALL_FLASH_ARGS)
|
$(Q) $(ESPTOOLPY_WRITE_FLASH) $(ESPTOOL_ALL_FLASH_ARGS)
|
||||||
|
|
||||||
app-flash: $(APP_BIN) $(ESPTOOLPY_SRC)
|
app-flash: $(APP_BIN) $(ESPTOOLPY_SRC)
|
||||||
|
@echo "Flashing app to serial port $(ESPPORT), offset $(CONFIG_APP_OFFSET)..."
|
||||||
$(Q) $(ESPTOOLPY_WRITE_FLASH) $(CONFIG_APP_OFFSET) $(APP_BIN)
|
$(Q) $(ESPTOOLPY_WRITE_FLASH) $(CONFIG_APP_OFFSET) $(APP_BIN)
|
||||||
|
|
||||||
$(eval $(call SubmoduleRequiredForFiles,$(ESPTOOLPY_SRC)))
|
$(eval $(call SubmoduleCheck,$(ESPTOOLPY_SRC),$(COMPONENT_PATH)/esptool))
|
||||||
|
@@ -39,7 +39,7 @@ endchoice
|
|||||||
|
|
||||||
config FREERTOS_HZ
|
config FREERTOS_HZ
|
||||||
int "Tick rate (Hz)"
|
int "Tick rate (Hz)"
|
||||||
range 1 10000
|
range 1 1000
|
||||||
default 100
|
default 100
|
||||||
help
|
help
|
||||||
Select the tick rate at which FreeRTOS does pre-emptive context switching.
|
Select the tick rate at which FreeRTOS does pre-emptive context switching.
|
||||||
|
@@ -23,19 +23,27 @@ summary := @echo
|
|||||||
details := @true
|
details := @true
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Pseudo-target to handle the case where submodules need to be
|
# Pseudo-target to check a git submodule has been properly initialised
|
||||||
# re-initialised.
|
|
||||||
#
|
#
|
||||||
# $(eval $(call SubmoduleRequiredForFiles,FILENAMES)) to create a target that
|
# $(eval $(call SubmoduleCheck,FILENAMES,SUBMODULE_PATH)) to create a target that
|
||||||
# automatically runs 'git submodule update --init' if those files
|
# automatically runs 'git submodule update --init SUBMODULE_PATH' if any of
|
||||||
# are missing, and fails if this is not possible.
|
# the files in FILENAMES are missing, and fails if this is not possible.
|
||||||
define SubmoduleRequiredForFiles
|
#
|
||||||
|
# Will also print a WARNING if the submodule at SUBMODULE_PATH appears
|
||||||
|
# to require an update.
|
||||||
|
define SubmoduleCheck
|
||||||
$(1):
|
$(1):
|
||||||
@echo "WARNING: Missing submodule for $$@..."
|
@echo "WARNING: Missing submodule $(2) for $$@..."
|
||||||
$(Q) [ -d ${IDF_PATH}/.git ] || ( echo "ERROR: esp-idf must be cloned from git to work."; exit 1)
|
$(Q) [ -d ${IDF_PATH}/.git ] || ( echo "ERROR: esp-idf must be cloned from git to work."; exit 1)
|
||||||
$(Q) [ -x $(which git) ] || ( echo "ERROR: Need to run 'git submodule --init' in esp-idf root directory."; exit 1)
|
$(Q) [ -x $(which git) ] || ( echo "ERROR: Need to run 'git submodule --init' in esp-idf root directory."; exit 1)
|
||||||
@echo "Attempting 'git submodule update --init' in esp-idf root directory..."
|
@echo "Attempting 'git submodule update --init' in esp-idf root directory..."
|
||||||
cd ${IDF_PATH} && git submodule update --init
|
cd ${IDF_PATH} && git submodule update --init $(2)
|
||||||
|
|
||||||
|
# Parse 'git submodule status' output for out-of-date submodule.
|
||||||
|
# Status output prefixes status line with '+' if the submodule commit doesn't match
|
||||||
|
ifneq ("$(shell cd ${IDF_PATH} && git submodule status $(2) | grep '^+')","")
|
||||||
|
$$(info WARNING: git submodule $2 may be out of date. Run 'git submodule update' to update.)
|
||||||
|
endif
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
|
||||||
|
@@ -165,7 +165,7 @@ CPPFLAGS = -DESP_PLATFORM -Og -g3 -Wpointer-arith -Werror -Wno-error=unused-func
|
|||||||
CFLAGS = $(CPPFLAGS) -std=gnu99 -g3 -fstrict-volatile-bitfields
|
CFLAGS = $(CPPFLAGS) -std=gnu99 -g3 -fstrict-volatile-bitfields
|
||||||
|
|
||||||
# CXXFLAGS uses by C++ only
|
# CXXFLAGS uses by C++ only
|
||||||
CXXFLAGS = $(CPPFLAGS) -Og -std=gnu++11 -g3 -fno-exceptions -fstrict-volatile-bitfields
|
CXXFLAGS = $(CPPFLAGS) -Og -std=gnu++11 -g3 -fno-exceptions -fstrict-volatile-bitfields -fno-rtti
|
||||||
|
|
||||||
export CFLAGS CPPFLAGS CXXFLAGS
|
export CFLAGS CPPFLAGS CXXFLAGS
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user