Skip to content

Commit

Permalink
Added support for 25/45/85 compilation
Browse files Browse the repository at this point in the history
Compile all 3 versions

artifact name fix

Whoops.
  • Loading branch information
ADM228 committed Jul 22, 2024
1 parent 814fadc commit 598ac87
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 4 deletions.
42 changes: 39 additions & 3 deletions .github/workflows/firmware.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
3 changes: 2 additions & 1 deletion makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
ATTINY := 85

# Only intended for linux.
firmware: bin/avr/main.hex
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
Expand Down

0 comments on commit 598ac87

Please sign in to comment.