Skip to content

Commit 8137158

Browse files
committed
Merge branch 'develop'
2 parents f9cce7b + 6477600 commit 8137158

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+8531
-5116
lines changed

Makefile

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ INCLUDES_EXTRA =
4444
CFLAGS = $(addprefix -I,$(INCLUDES)) \
4545
-I$(SDK_DIR)/include \
4646
$(addprefix -I,$(INCLUDES_EXTRA)) \
47-
-mlongcalls \
47+
-mlongcalls -Wall \
4848
-mtext-section-literals \
4949
$(addprefix -D,$(DEFINES))
5050
# The pre-processor options used by the cpp (man cpp for more).
@@ -112,6 +112,8 @@ MKDIR = mkdir -p
112112
CP = cp -v
113113
MV = mv -v
114114
PYTHON = python
115+
BININFO = $(PYTHON) ./scripts/bininfo.py
116+
DIGEST = $(PYTHON) ./scripts/digest.py
115117

116118
## Stable Section: usually no need to be changed. But you can add more.
117119
##==========================================================================
@@ -158,23 +160,30 @@ DEP_OPT = $(shell if `$(CC) --version | grep "GCC" >/dev/null`; then \
158160

159161
DEPEND = $(CC) $(DEP_OPT) $(CFLAGS) $(CPPFLAGS)
160162
DEPEND.d = $(subst -g ,,$(DEPEND))
161-
COMPILE.c = $(CC) $(CFLAGS) $(CPPFLAGS) -c
163+
COMPILE.c = $(CC) $(CFLAGS) -c
162164
COMPILE.cxx = $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c
163-
LINK.c = $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
165+
LINK.c = $(CC) $(CFLAGS) $(LDFLAGS)
164166
LINK.cxx = $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS)
165167

166-
.PHONY: all objs clean cleanall show buildpath project image release reldate
168+
.PHONY: build all objs clean cleanall show buildpath project image release releasedate buildnumber
167169

168170
# Delete the default suffixes
169171
.SUFFIXES:
170172

171-
release: reldate clean all
173+
release: clean releasedate buildnumber all
172174

173-
reldate:
175+
build: clean buildnumber all
176+
177+
releasedate:
174178
@echo "*** Make Release ***" && \
175179
release_date=$$(date '+%s') && sed -i -e "s/\(^#\\s*define\\s*APP_VERSION_RELEASE_DATE\\s*\)\([0-9]*\)/\\1$$release_date/" ./include/core/config.h && \
176180
echo "Release date: $$release_date"
177181

182+
buildnumber:
183+
@echo "*** Incrementing build number ***" && \
184+
build=$$(awk '/^#\s*define\s*BUILD_NUMBER/ {match($$0, "BUILD_NUMBER\\s*([0-9]*)", r); print r[1]+1}' ./include/core/config.h) && \
185+
[ "$$build" != "" ] && sed -i -e "s/\(^#\\s*define\\s*BUILD_NUMBER\\s*\)\([0-9]*\)/\\1$$build/" ./include/core/config.h && \
186+
echo "Build Number: $$build"
178187

179188
all: buildpath project image
180189

@@ -209,23 +218,23 @@ $(BUILD_DIR)%.o:%.cxx
209218
#-------------------------------------
210219
image:$(IMAGES) $(IMAGEINFO) $(SDK_IMAGES)
211220
@echo '*******************************************************'
212-
@echo -e flash 512k:\\n\\t esptool.py -p /dev/ttyUSB0 -b 115200 write_flash $(ESPTOOL_PARAMS) --verify \
221+
@echo -e flash 512k:\\n\\t sudo esptool.py -p /dev/ttyUSB0 -b 115200 write_flash $(ESPTOOL_PARAMS) --verify \
213222
0x00000 boot_v1.7.bin \
214-
0x01000 $(APP).spi$(SPI_MODE).app1.bin $(FLASH_ADD_ADDR) \\n
215-
@echo -e bootloader messages:\\n\\t miniterm.py /dev/ttyUSB0 74880 \\n
216-
@echo -e AT commands:\\n\\t miniterm.py /dev/ttyUSB0 115200 \\n
223+
0x01000 $(APP)-$(APP_SUFFIX).spi$(SPI_MODE).app1.bin $(FLASH_ADD_ADDR) \\n
224+
@echo -e bootloader messages:\\n\\t sudo miniterm.py /dev/ttyUSB0 74880 \\n
225+
@echo -e AT commands:\\n\\t sudo miniterm.py /dev/ttyUSB0 115200 \\n
217226
@echo '*******************************************************'
218227

219228
$(SDK_IMAGES): $(BINDIR)%:$(SDK_DIR)/bin/%
220229
@$(CP) $^ $@
221230

222231
$(IMAGEINFO): $(APPS_INFO)
223-
$(PYTHON) bininfo.py $^ $@
232+
$(BININFO) $^ $@
224233

225234
$(IMAGES): $(BINDIR)%.bin:$(BUILD_DIR)%
226235
ifeq ($(SDK_IMAGE_TOOL),0)
227236
@esptool.py elf2image --version=2 $(ESPTOOL_PARAMS) -o $@ $^
228-
$(PYTHON) digest.py $^ $@
237+
$(DIGEST) $^ $@
229238
else
230239
$(eval APPID := $(subst .app,$(SPACE),$^))
231240
@echo gen_appbin.py: $(CURDIR)/$^ 2 0 0 $(SPI_MODE) $(word $(words $(APPID)),$(APPID))
@@ -242,10 +251,6 @@ endif
242251
# Rules for generating the executable.
243252
#-------------------------------------
244253
project: $(APPS)
245-
@echo Incrementing build number && \
246-
build=$$(awk '/^#\s*define\s*BUILD_NUMBER/ {match($$0, "BUILD_NUMBER\\s*([0-9]*)", r); print r[1]+1}' ./include/core/config.h) && \
247-
[ "$$build" != "" ] && sed -i -e "s/\(^#\\s*define\\s*BUILD_NUMBER\\s*\)\([0-9]*\)/\\1$$build/" ./include/core/config.h && \
248-
echo "Next build: $$build"
249254

250255
$(APPS): %:$(OBJS)
251256
ifeq ($(LD_APP_SUFFIX),1)

0 commit comments

Comments
 (0)