add makefile to flash program
This commit is contained in:
parent
816b2190e2
commit
ebcc55f26a
|
@ -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
|
Loading…
Reference in New Issue