Skip to content

Commit

Permalink
Compile all 3 versions
Browse files Browse the repository at this point in the history
  • Loading branch information
ADM228 committed Jul 22, 2024
1 parent aec6750 commit 45798ce
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 3 deletions.
40 changes: 38 additions & 2 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 the firmware for the ATtiny85
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -21,3 +21,39 @@ jobs:
with:
name: main.hex
path: bin/avr/main.hex
build_t45:
runs-on: ubuntu-latest
name: Assemble the firmware 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: main.hex
path: bin/avr/main.hex
build_t25:
runs-on: ubuntu-latest
name: Assemble the firmware 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: main.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 45798ce

Please sign in to comment.