From 3e18644cc2a0f119b0603c01525cf85cbcadfe68 Mon Sep 17 00:00:00 2001 From: "@CarlWachter" Date: Tue, 9 Jan 2024 17:52:41 +0100 Subject: [PATCH] Updated Shell script --- flash.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/flash.sh b/flash.sh index e69de29..0ee514e 100644 --- a/flash.sh +++ b/flash.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +# Check if the program name is provided as an argument +if [ -z "$1" ]; then + echo "Please provide the program name as an argument." + exit 1 +fi + +# Assign the program name to a variable +PROGRAM_NAME=$1 + +# Execute the commands +make -j8 all -C ./Debug +STM32_Programmer_CLI.exe -c port=SWD freq=4000 -e all +STM32_Programmer_CLI.exe -c port=SWD freq=4000 -w ./Debug/${PROGRAM_NAME}.elf 0x08000000 -g