From 598ac87d26dc48ce2677cbbfbf5976b224511120 Mon Sep 17 00:00:00 2001 From: ADM228 <91823517+ADM228@users.noreply.github.com> Date: Tue, 23 Jul 2024 00:02:03 +0300 Subject: [PATCH] Added support for 25/45/85 compilation Compile all 3 versions artifact name fix Whoops. --- .github/workflows/firmware.yml | 42 +++++++++++++++++++++++++++++++--- makefile | 3 ++- 2 files changed, 41 insertions(+), 4 deletions(-) diff --git a/.github/workflows/firmware.yml b/.github/workflows/firmware.yml index 8bd5d74..2bcb26a 100644 --- a/.github/workflows/firmware.yml +++ b/.github/workflows/firmware.yml @@ -3,9 +3,9 @@ name: ATtiny85APU assembly on: [push] jobs: - build_rom: + build_t85: runs-on: ubuntu-latest - name: Assemble the firmware + name: Assemble for the ATtiny85 steps: - name: Checkout uses: actions/checkout@v4 @@ -19,5 +19,41 @@ jobs: - name: Upload artifacts uses: actions/upload-artifact@v4 with: - name: main.hex + name: attiny85apu_t85.hex + path: bin/avr/main.hex + build_t45: + runs-on: ubuntu-latest + name: Assemble for the ATtiny45 + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Cache avra + uses: ./.github/actions/cache_avra + - name: Set path + run: | + echo "${{ github.workspace }}/opt/avra/bin" >> $GITHUB_PATH + - name: Build the firmware + run: make ATTINY=45 + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: attiny85apu_t45.hex + path: bin/avr/main.hex + build_t25: + runs-on: ubuntu-latest + name: Assemble for the ATtiny25 + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Cache avra + uses: ./.github/actions/cache_avra + - name: Set path + run: | + echo "${{ github.workspace }}/opt/avra/bin" >> $GITHUB_PATH + - name: Build the firmware + run: make ATTINY=25 + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: attiny85apu_t25.hex path: bin/avr/main.hex diff --git a/makefile b/makefile index c645386..cf0de38 100644 --- a/makefile +++ b/makefile @@ -1,3 +1,4 @@ +ATTINY := 85 # Only intended for linux. firmware: bin/avr/main.hex @@ -5,7 +6,7 @@ avr: bin/avr/main.hex libt85apu: bin/emu/libt85apu.a bin/emu/libt85apu.so bin/avr/main.hex bin/avr/main.map: bin/avr avr/main.asm - avra -I avr -m bin/avr/main.map -e bin/avr/main.eep.hex avr/main.asm -o bin/avr/main.hex + avra -D ATTINY=$(ATTINY) -I avr -m bin/avr/main.map -e bin/avr/main.eep.hex avr/main.asm -o bin/avr/main.hex bin/avr/main.elf: bin/avr bin/avr/main.hex bin/avr/main.map avr-objcopy -v -I ihex -O elf32-avr bin/avr/main.hex bin/avr/main.elf