From e817fca0aa647eb164088fdf148139c337011249 Mon Sep 17 00:00:00 2001 From: Daniel Fichtinger Date: Tue, 31 Dec 2024 01:32:54 -0500 Subject: [PATCH] added flashing to justfile --- Justfile | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Justfile b/Justfile index 38d1a1b..bcb4e00 100644 --- a/Justfile +++ b/Justfile @@ -104,3 +104,15 @@ update: # upgrade zephyr-sdk and python dependencies upgrade-sdk: nix flake update --flake . + +# Flash the firmware +flash side: + #!/usr/bin/env bash + if [[ {{side}} == "left" || {{side}} == "right" ]]; then + echo "Flashing: {{side}}" + file {{out}}/corne_{{side}}+nice_view_adapter+nice_view-nice_nano_v2.uf2 || exit + cp {{out}}/corne_{{side}}+nice_view_adapter+nice_view-nice_nano_v2.uf2 /run/media/fic/NICENANO + else + echo "Provide either 'left' or 'right'!" + exit 1 + fi