更加通用

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