From ebcc55f26a82096b86e2b71d422b467bab8fc27f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?King=20K=C3=A9vin?= Date: Sat, 12 Jul 2014 18:49:56 -0700 Subject: [PATCH] add makefile to flash program --- pic/318LPW1K-L/Makefile | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 pic/318LPW1K-L/Makefile diff --git a/pic/318LPW1K-L/Makefile b/pic/318LPW1K-L/Makefile new file mode 100644 index 0000000..bc916c8 --- /dev/null +++ b/pic/318LPW1K-L/Makefile @@ -0,0 +1,22 @@ +TARGET = 318LPW1K-L +PIC = 12f629 + +all: off flash on + +flash: $(TARGET).hex + pk2cmd -PPIC$(PIC) -F$< -M + +# power on +on: + pk2cmd -PPIC$(PIC) -T + +# power off +off: + pk2cmd -PPIC$(PIC) -V0 + +# compile source code +%.hex: %.c + sdcc --std-c99 --opt-code-size --use-non-free -mpic14 -p$(PIC) $< + +clean: + rm -f $(TARGET).hex $(TARGET).lst $(TARGET).asm $(TARGET).adb $(TARGET).o $(TARGET).cod