更加通用

This commit is contained in:
fengbh 2024-07-14 01:16:44 +08:00
parent d51d81ee90
commit 859888d7a2

View File

@ -35,7 +35,7 @@ OBJ := $(patsubst src/%.c, obj/%.rel, $(SRC))
.PHONY: all clean .PHONY: all clean
all: uart_temp.hex all: main.hex
clean: clean:
-$(RM) obj\* -$(RM) obj\*
@ -46,11 +46,11 @@ $(OBJ):obj/%.rel:src/%.c
$(TARGET): $(OBJ) $(TARGET): $(OBJ)
-$(CC) $^ -o $@ -$(CC) $^ -o $@
uart_temp.hex: $(TARGET) main.hex: $(TARGET)
-$(PACKIHX) $(TARGET) > uart_temp.hex -$(PACKIHX) $(TARGET) > main.hex
flash: flash:
-stcgal -P stc89 -p $(COM) uart_temp.hex -stcgal -P stc89 -p $(COM) main.hex
#led.bin:led.hex #led.bin:led.hex
# objcopy -I ihex -O binary led.hex led.bin # objcopy -I ihex -O binary led.hex led.bin