From b74569668e1351ee2b19e966272f9a7e31efb471 Mon Sep 17 00:00:00 2001 From: fengbh <1953356163@qq.com> Date: Sun, 14 Jan 2024 23:23:35 +0800 Subject: [PATCH] bug fix --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 1f7f12d..98bafdd 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ ifeq ($(OS),Windows_NT) RM := del /q COM := COM3 else - RM =: rm -rf + RM := rm -rf UNAME_S := $(shell cat /etc/*-release | grep 'DISTRIB_ID' | sed 's/DISTRIB_ID=\(\w*\)/\1/g') ifeq ($(UNAME_S),Ubuntu) @@ -14,6 +14,7 @@ else CC := ablrun sdcc COM := /dev/ttyUSB0 endif + TEMP := $(shell sudo chmod 777 $(COM)) endif # set CC TOOL @@ -48,7 +49,7 @@ uart_temp.hex: $(TARGET) -$(PACKIHX) $(TARGET) > uart_temp.hex flash: - -stcgal -P stc89 -p $(COM) -d uart_temp.hex + -stcgal -P stc89 -p $(COM) uart_temp.hex #led.bin:led.hex # objcopy -I ihex -O binary led.hex led.bin