Skip to content

Commit

Permalink
Add workflow to compile against Microchip AVR8 GNU toolchain
Browse files Browse the repository at this point in the history
  • Loading branch information
marcel hecko committed Dec 22, 2022
1 parent e03d5d1 commit 6189777
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 3 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/makeall_everycpu_microchip.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: "All Arduino Microchip 3.7.0"
on:
push:
branches:
- "mc"
workflow_dispatch:
schedule:
- cron: '0 5 * * *' # Daily at 5:00 UTC

jobs:
build-latest:
runs-on: ubuntu-latest
container:
image: debian:11
steps:
- name: Install Microchip version of GCC toolchain
run: |
apt-get update
apt-get install -y unzip wget git make
mkdir -p /opt/atpack
cd /opt
wget https://ww1.microchip.com/downloads/aemDocuments/documents/DEV/ProductDocuments/SoftwareTools/avr8-gnu-toolchain-3.7.0.1796-linux.any.x86_64.tar.gz
tar xzfv avr8-gnu-toolchain-3.7.0.1796-linux.any.x86_64.tar.gz
cd /opt/atpack
wget http://packs.download.atmel.com/Atmel.ATmega_DFP.2.0.401.atpack
unzip Atmel.ATmega_DFP.2.0.401.atpack
- name: Checkout the repository
uses: actions/checkout@v3
- name: Make the target
run: |
cd optiboot/bootloaders/optiboot
export PATH="/opt/avr8-gnu-toolchain-linux_x86_64/bin/:$PATH"
chmod +x ./makeall.everycpu.sh
./makeall.everycpu.sh
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@
/optiboot/hexfiles/* # exclude additional hexfiles
!/optiboot/hexfiles/legacy/* # include a few legacy hexfiles

# Ignore IDE files
.vscode
2 changes: 1 addition & 1 deletion optiboot/bootloaders/optiboot/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ CC = $(GCCROOT)avr-gcc
HELPTEXT += "Option AVR_FREQ=<n> - Clock rate of AVR CPU\n"


override CFLAGS = -g -Wall $(OPTIMIZE) -mmcu=$(MCU_TARGET) -DF_CPU=$(AVR_FREQ) $(DEFS)
override CFLAGS = -B /opt/atpack/gcc/dev/atmega328pb/ -B /opt/atpack/gcc/dev/atmega324pb/ -I /opt/atpack/include/ -g -Wall $(OPTIMIZE) -mmcu=$(MCU_TARGET) -DF_CPU=$(AVR_FREQ) $(DEFS)
override LDFLAGS = $(LDSECTIONS) -Wl,--relax -nostartfiles

OBJCOPY = $(GCCROOT)avr-objcopy
Expand Down
6 changes: 4 additions & 2 deletions optiboot/bootloaders/optiboot/makeall.everycpu.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
#
#!/bin/bash
# Makefile to make one image for each chip that optiboot supports.
# includes Arduino, Spence Konde ATtinyCore, Hans MCUDude cores, and
# some others.
# this is mainly used to sanity check modifications, especially those
# that are expected to cause "no binary changes" (you can diff the
# resulting .hex file with a reference implementation.)
#

set -e
set -x

make clean

Expand Down

0 comments on commit 6189777

Please sign in to comment.