Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
jscrane committed May 23, 2023
1 parent 9f11de3 commit 47e2030
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions build-targets.mk
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ LIBSRC2 := $(foreach r, $(REQUIRED_ROOTS), $(wildcard $r/src/*.c $r/src/*.cpp $r
LIBRARY_SOURCES := $(LIBSRC1) $(LIBSRC2)
LIBRARY_OBJECTS := $(foreach s, $(LIBRARY_SOURCES), $(BUILD_LIBS)/$s.o)

all: prebuild $(SKETCH_BIN) $(SKETCH_HEX) build-summary
all: prebuild $(SKETCH_BIN) $(SKETCH_HEX) $(SKETCH_ELF) build-summary

define compile-sources
$1.o: source_file = $1
Expand Down Expand Up @@ -193,7 +193,7 @@ path:
term:
$(TERMINAL) $(TERMINAL_FLAGS)

build-summary: $(SKETCH_ELF)
build-summary:
$(eval FLASH_SIZE = $(shell $(recipe.size.pattern) | pcregrep -o1 "$(recipe.size.regex)" | paste -sd "+" | bc))
$(eval FLASH_PC = $(shell echo $(FLASH_SIZE) "* 100 /" $(upload.maximum_size) | bc))
@echo program: $(FLASH_SIZE) / $(upload.maximum_size) bytes \($(FLASH_PC)%\)
Expand All @@ -202,7 +202,7 @@ build-summary: $(SKETCH_ELF)
@echo data: $(DATA_SIZE) / $(upload.maximum_data_size) bytes \($(DATA_PC)%\)

$(call define-scoped-prefix-variables,tools.$(upload.tool),upload)
upload: prebuild $(SKETCH_BIN)
upload: all
$(subst "",,$(call os-override,tools.$(upload.tool).upload.pattern))

$(call define-scoped-prefix-variables,tools.$(program.tool),program)
Expand Down
2 changes: 1 addition & 1 deletion esp8266.mk
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@ fs: $(LITTLEFS_IMAGE)
upload-fs: $(LITTLEFS_IMAGE)
$(tools.esptool.cmd) $(runtime.platform.path)/tools/upload.py --chip esp8266 --port $(serial.port) --baud $(upload.speed) $(upload.verbose) write_flash $(build.spiffs_start) $<

.PHONY: upload ota spiffs fs upload-fs
.PHONY: upload ota spiffs upload-spiffs fs upload-fs

0 comments on commit 47e2030

Please sign in to comment.