From 8e0cf4cf81fa314d168e3d53e6c315b8215f0664 Mon Sep 17 00:00:00 2001 From: Nunu Date: Tue, 26 Dec 2023 14:07:44 +0100 Subject: [PATCH] Remove sleep from makefile, fix docker compile script. --- Makefile | 7 +++++-- compile-with-docker.sh | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 4f83e04..b00f16c 100644 --- a/Makefile +++ b/Makefile @@ -446,7 +446,10 @@ debug: /opt/openocd/bin/openocd -c "bindto 0.0.0.0" -f interface/jlink.cfg -f dp32g030.cfg flash: - k5prog -F -YYY -b firmware.bin + k5prog -F -YYY -b compiled-firmware/firmware.bin + +docker: + ./compile-with-docker.sh flash-openocd: /opt/openocd/bin/openocd -c "bindto 0.0.0.0" -f interface/jlink.cfg -f dp32g030.cfg -c "write_image firmware.bin 0; shutdown;" @@ -472,4 +475,4 @@ clean: $(RM) $(call FixPath, $(TARGET).bin $(TARGET).packed.bin $(TARGET) $(OBJS) $(DEPS)) run: - make clean && make -j8 && sleep 5 && make flash + make docker && make flash diff --git a/compile-with-docker.sh b/compile-with-docker.sh index a27d308..43c480a 100755 --- a/compile-with-docker.sh +++ b/compile-with-docker.sh @@ -1,3 +1,3 @@ #!/bin/sh docker build -t uvk5 . -docker run --rm -v ${PWD}/compiled-firmware:/app/compiled-firmware uvk5 /bin/bash -c "cd /app && make && cp firmware* compiled-firmware/" +docker run --rm -v ${PWD}/compiled-firmware:/app/compiled-firmware uvk5 /bin/bash -c "cd /app && make clean && make && cp firmware* compiled-firmware/"