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