Skip to content

Commit

Permalink
re-merge ToyKeeper#9
Browse files Browse the repository at this point in the history
  • Loading branch information
gretel committed Dec 20, 2023
1 parent ab0550f commit 8a99dda
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 26 deletions.
31 changes: 16 additions & 15 deletions .github/workflows/compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,26 @@ jobs:
sudo apt-get -qqy update
sudo apt-get -qqy install avr-libc binutils-avr gcc-avr unzip wget
- name: Cache Atmel DFPs
id: cache-dfp
uses: actions/cache@master
env:
cache-name: cache-dfp-files
with:
path: arch/dfp
# new cache whenever the dfp-install script changes
key: ${{ runner.os }}-${{ env.cache-name }}-${GITHUB_SHA}

- name: Install Atmel DFPs
if: steps.cache-dfp.outputs.cache-hit != 'true'
run: |
./make dfp
# - name: Cache Atmel DFPs
# id: cache-dfp
# uses: actions/cache@master
# env:
# cache-name: cache-dfp-files
# with:
# path: arch/dfp
# # new cache whenever the dfp-install script changes
# key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('ui/anduril/version.h') }}

# - name: Install Atmel DFPs
# if: steps.cache-dfp.outputs.cache-hit != 'true'
# run: |
# ./make dfp

- name: Compile Anduril
continue-on-error: true
run: |
USER=gretel ./make anduril
./bin/dfp-install.sh
USER=gretel ./bin/build-all.sh
echo "ARTIFACT_NAME=${GITHUB_WORKFLOW}-$(echo "${GITHUB_REF_NAME}" | tr '":<>|*?\\/' '_')-$(git rev-parse --short ${GITHUB_SHA})-${GITHUB_RUN_NUMBER}" >> "${GITHUB_ENV}"
- name: Store Artifacts
Expand Down
2 changes: 1 addition & 1 deletion bin/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export CC=avr-gcc
export CPP=avr-cpp
export OBJCOPY=avr-objcopy
export DFPFLAGS="-B $DFPPATH/gcc/dev/$MCUNAME/ -I $DFPPATH/include/"
INCLUDES="-I ui -I hw -I. -I.. -I../.. -I../../.."
INCLUDES="-I .build -I ui -I hw -I. -I.. -I../.. -I../../.."
export CFLAGS=" -Wall -g -Os -mmcu=$MCUNAME -c -std=gnu99 -fgnu89-inline -fwhole-program $MCUFLAGS $INCLUDES -fshort-enums $DFPFLAGS"
export CPPFLAGS="-Wall -g -Os -mmcu=$MCUNAME -C -std=gnu99 -fgnu89-inline -fwhole-program $MCUFLAGS $INCLUDES -fshort-enums $DFPFLAGS"
export OFLAGS="-Wall -g -Os -mmcu=$MCUNAME -mrelax $DFPFLAGS"
Expand Down
2 changes: 1 addition & 1 deletion bin/dfp-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
set -e

V_ATTINY='2.0.368'
V_AVRDD='2.2.253'
V_AVRDD='2.4.286'
F_ATTINY="Atmel.ATtiny_DFP.${V_ATTINY}.atpack"
F_AVRDD="Atmel.AVR-Dx_DFP.${V_AVRDD}.atpack"

Expand Down
13 changes: 4 additions & 9 deletions ui/anduril/anduril.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@
* as possible. These are mostly "USE" flags.
*/

/********* load up MCU info, like ROM size and such *********/
#include "arch/mcu.h"

/********* User-configurable options *********/
#include "anduril/config-default.h"

Expand Down Expand Up @@ -89,15 +86,13 @@
#include "fsm/spaghetti-monster.h"

/********* does this build target have special code to include? *********/
#ifdef CFG_C
#include incfile(CFG_C)
#ifdef HWDEF_C_FILE
#include incfile(HWDEF_C_FILE)
#endif

#ifdef HWDEF_C
#include incfile(HWDEF_C)
#ifdef CFG_C_FILE
#include incfile(CFG_C_FILE)
#endif


/********* Include all the regular app headers *********/

#include "anduril/off-mode.h"
Expand Down

0 comments on commit 8a99dda

Please sign in to comment.