-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (41 loc) · 1.63 KB
/
Copy pathavr-build.yml
File metadata and controls
52 lines (41 loc) · 1.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: AVR Build
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install AVR toolchain
run: |
sudo apt-get update -q
sudo apt-get install -y gcc-avr binutils-avr avr-libc avra
- name: Locate avra include path
run: |
AVRA_INC=$(find /usr/share/avra -name "m32def.inc" 2>/dev/null | head -1 | xargs dirname)
echo "AVRA_INC=$AVRA_INC" >> $GITHUB_ENV
- name: Assemble Lab 6 (external interrupts)
run: avra -I "$AVRA_INC" Lab6_Interrupts/lab6_interrupts.asm
- name: Assemble Lab 7 Part 1 (timer LED roll)
run: |
sed 's/^\.equ PART_SELECT = ./.equ PART_SELECT = 1/' \
Lab7_Timers_Keypad/lab7_timers_keypad.asm > /tmp/lab7_p1.asm
avra -I "$AVRA_INC" /tmp/lab7_p1.asm
- name: Assemble Lab 7 Part 2 (keypad ASCII lookup)
run: |
sed 's/^\.equ PART_SELECT = ./.equ PART_SELECT = 2/' \
Lab7_Timers_Keypad/lab7_timers_keypad.asm > /tmp/lab7_p2.asm
avra -I "$AVRA_INC" /tmp/lab7_p2.asm
- name: Assemble Lab 7 Part 3 (SRAM message buffer)
run: avra -I "$AVRA_INC" Lab7_Timers_Keypad/lab7_timers_keypad.asm
- name: Assemble Lab 8 Part 2 (PWM servo)
run: avra -I "$AVRA_INC" Lab8_PWM_ADC/lab8_part2_pwm_servo.asm
- name: Compile Lab 8 Part 6 (ADC / C)
run: |
avr-gcc -mmcu=atmega32 -DF_CPU=1000000UL \
-Wall -Wextra -Os \
-c Lab8_PWM_ADC/lab8_part6_adc_servo.c \
-o /tmp/lab8_part6_adc_servo.o