소스 검색

moved to esp32 2.0.3

Andrew Tridgell 3 년 전
부모
커밋
04f4f0d665
3개의 변경된 파일16개의 추가작업 그리고 16개의 파일을 삭제
  1. 3 2
      .github/workflows/test_build.yml
  2. 12 13
      RemoteIDModule/Makefile
  3. 1 1
      RemoteIDModule/arduino-cli.yaml

+ 3 - 2
.github/workflows/test_build.yml

@@ -17,6 +17,7 @@ jobs:
         env:
           HOME: ${{ runner.workspace }}/ArduRemoteID
         run: |
+          PATH="$HOME/.local/bin:$PATH"
           ./scripts/install_build_env.sh
           ./scripts/regen_headers.sh
           ./scripts/add_libraries.sh
@@ -33,12 +34,12 @@ jobs:
         id: check_files
         uses: andstor/file-existence-action@v1
         with:
-          files: "RemoteIDModule/ArduRemoteID.bin"
+          files: "RemoteIDModule/build/esp32.esp32.esp32s3/ArduRemoteID.bin"
           allow_failure: true
 
       - name: Archive build
         uses: actions/upload-artifact@v2
         with:
            name: binaries
-           path: RemoteIDModule/ArduRemoteID.bin
+           path: RemoteIDModule/build
            retention-days: 7

+ 12 - 13
RemoteIDModule/Makefile

@@ -1,31 +1,30 @@
 # Makefile using arduino-cli
 
 ARDUINO_HOME=$(HOME)/.arduino15
-ESP32_VER=2.0.3-RC1
+ESP32_VER=2.0.3
 ESP32_TOOLS=$(ARDUINO_HOME)/packages/esp32/hardware/esp32/$(ESP32_VER)/tools
 ESPTOOL=$(ESP32_TOOLS)/esptool.py
 CHIP=esp32s3
 ESP32_FQBN=esp32:esp32:$(CHIP)
+BUILD_DIR=esp32.esp32.$(CHIP)
 SERDEV := $(wildcard /dev/serial/by-id/usb-Espressif_*)
 ARDUINO_CLI=../bin/arduino-cli
 
 
-all: ArduRemoteID.bin
+all: build/$(BUILD_DIR)/ArduRemoteID.bin
 
-ArduRemoteID.bin: ..esp32.esp32.esp32s3.bin
+build/$(BUILD_DIR)/ArduRemoteID.bin: build/$(BUILD_DIR)/RemoteIDModule.ino.bin
 	@echo "Merging $@"
-	@python3 $(ESPTOOL) --chip $(CHIP) merge_bin -o $@ --flash_size 4MB 0xe000 $(ESP32_TOOLS)/partitions/boot_app0.bin 0x0 ..esp32.esp32.$(CHIP).bootloader.bin 0x10000 ..esp32.esp32.$(CHIP).bin 0x8000 ..esp32.esp32.$(CHIP).partitions.bin
+	@python3 $(ESPTOOL) --chip $(CHIP) merge_bin -o $@ --flash_size 4MB 0xe000 $(ESP32_TOOLS)/partitions/boot_app0.bin 0x0 build/$(BUILD_DIR)/RemoteIDModule.ino.bootloader.bin 0x10000 build/$(BUILD_DIR)/RemoteIDModule.ino.bin 0x8000 build/$(BUILD_DIR)/RemoteIDModule.ino.partitions.bin
 
 setup:
 	@echo "Installing ESP32 support"
-	@$(ARDUINO_CLI) core update-index --config-file arduino-cli.yaml
-	@$(ARDUINO_CLI) core install esp32:esp32
-	@$(ARDUINO_CLI) core update-index --config-file arduino-cli.yaml
-	@$(ARDUINO_CLI) core install esp32:esp32
+	$(ARDUINO_CLI) core update-index --config-file arduino-cli.yaml
+	$(ARDUINO_CLI) core install esp32:esp32@$(ESP32_VER)
 
-..esp32.esp32.$(CHIP).bin: *.cpp *.ino *.h
-	@echo "Building main binary"
-	@$(ARDUINO_CLI) compile --fqbn $(ESP32_FQBN) .
+build/$(BUILD_DIR)/RemoteIDModule.ino.bin: *.cpp *.ino *.h
+	@echo "Building $@"
+	@$(ARDUINO_CLI) compile --export-binaries --fqbn $(ESP32_FQBN) .
 
 boards:
 	@echo "Listing boards"
@@ -34,9 +33,9 @@ boards:
 checkdev:
 	@[ "${SERDEV}" ] && echo "Using device $(SERDEV)" || ( echo "Failed to find serial device"; exit 1 )
 
-upload: checkdev ArduRemoteID.bin
+upload: checkdev build/$(BUILD_DIR)/ArduRemoteID.bin
 	@echo "Flashing"
 	@$(ARDUINO_CLI) upload -p $(SERDEV) --fqbn $(ESP32_FQBN) .
 
 clean:
-	rm -f ..esp32* *.bin
+	rm -rf ..esp32* *.bin build

+ 1 - 1
RemoteIDModule/arduino-cli.yaml

@@ -1,3 +1,3 @@
 board_manager:
   additional_urls:
-    - https://raw.githubusercontent.com/espressif/arduino-esp32/master/package/package_esp32_index.template.json
+    - https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json