Created
March 21, 2022 23:14
-
-
Save dwf/b53da9eddac2b7f5a3aaeffca200b8ae to your computer and use it in GitHub Desktop.
Makefile for flashing a nanoCUL stick with the latest version of the evofw3 firmware.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright 2022 Google LLC. | |
# SPDX-License-Identifier: Apache-2.0 | |
# | |
# Makefile for flashing a nanoCUL stick with evofw3 using arduino-cli. | |
# | |
# Get arduino-cli and make with `nix shell nixpkgs#gnumake nixpkgs#arduino-cli`. | |
# Then run make -f flash-nanocul.mk. | |
# One of atmega328p, atmega32u4. Only tested with atmega328p, the one I have. | |
BOARD=atmega328p | |
all: upload | |
clean: | |
[ -d evofw3 ] && rm -r evofw3 | |
evofw3: | |
git clone https://github.com/ghoti57/evofw3.git | |
# Installs dependencies into ~/.arduino15. | |
install-libs: | |
arduino-cli core install \ | |
--additional-urls https://raw.githubusercontent.com/ghoti57/evofw3_avr/master/package_evofw3_boards_index.json \ | |
arduino:avr evofw3:avr | |
upload: evofw3 install-libs | |
pushd evofw3 && arduino-cli upload -b evofw3:avr:${BOARD} -p /dev/ttyUSB0 evofw3.ino && popd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment