add makefile to flash program

This commit is contained in:
King Kévin 2014-07-12 18:49:56 -07:00
parent 816b2190e2
commit ebcc55f26a
1 changed files with 22 additions and 0 deletions

22
pic/318LPW1K-L/Makefile Normal file
View File

@ -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