From fd38bb624188aa0288cc53ca86916736f685e1a6 Mon Sep 17 00:00:00 2001 From: Michal Moskal Date: Tue, 14 Feb 2023 10:41:46 -0800 Subject: [PATCH] fixing build --- .github/workflows/build.yml | 10 ++++++---- Makefile | 13 ++++++------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fe7e016..4ced903 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,23 +25,25 @@ jobs: - run: echo 'TARGET=esp32s2' > Makefile.user - run: make prep - - name: esp-idf build uses: espressif/esp-idf-ci-action@main with: esp_idf_version: v4.4.1 target: esp32s2 - command: make dist clean + command: make build + - run: make patch + - run: make clean - run: echo 'TARGET=esp32c3' > Makefile.user - run: make prep - - name: esp-idf build uses: espressif/esp-idf-ci-action@main with: esp_idf_version: v4.4.1 target: esp32c3 - command: make dist clean + command: make build + - run: make patch + - run: make clean - run: ls -l dist diff --git a/Makefile b/Makefile index 6131eb1..b1a74ce 100644 --- a/Makefile +++ b/Makefile @@ -28,7 +28,10 @@ endif prep: devicescript/cli/built/devicescript-cli.cjs sdkconfig.defaults refresh-version -all: check-export prep +all: build patch + +.PHONY: build +build: check-export prep $(IDF) --ccache build $(MAKE) combine @@ -48,6 +51,8 @@ combine: $(BL_OFF) build/bootloader/bootloader.bin \ 0x8000 build/partition_table/partition-table.bin \ 0x10000 build/espjd.bin + +patch: mkdir -p dist $(CLI) binpatch --bin build/combined.bin --elf build/espjd.elf --generic boards/$(TARGET)/*.board.json @@ -99,12 +104,6 @@ rst: FW_VERSION = $(shell sh $(JDC)/scripts/git-version.sh) -.PHONY: dist -dist: all - mkdir -p dist - # also keep ELF file for addr2line - cp build/espjd.elf dist/devicescript-$(TARGET).elf - bump: sh ./scripts/bump.sh