Changed echo usage for printf as it is more portable.
This commit is contained in:
14
Makefile
14
Makefile
@@ -35,13 +35,13 @@ build: lib examples
|
|||||||
|
|
||||||
lib:
|
lib:
|
||||||
$(Q)if [ ! "`ls -A libopencm3`" ] ; then \
|
$(Q)if [ ! "`ls -A libopencm3`" ] ; then \
|
||||||
echo "######## ERROR ########"; \
|
printf "######## ERROR ########\n"; \
|
||||||
echo "\tlibopencm3 is not initialized."; \
|
printf "\tlibopencm3 is not initialized.\n"; \
|
||||||
echo "\tPlease run:"; \
|
printf "\tPlease run:\n"; \
|
||||||
echo "\t$$ git submodule init"; \
|
printf "\t$$ git submodule init\n"; \
|
||||||
echo "\t$$ git submodule update"; \
|
printf "\t$$ git submodule update\n"; \
|
||||||
echo "\tbefore running make."; \
|
printf "\tbefore running make.\n"; \
|
||||||
echo "######## ERROR ########"; \
|
printf "######## ERROR ########\n"; \
|
||||||
exit 1; \
|
exit 1; \
|
||||||
fi
|
fi
|
||||||
$(Q)$(MAKE) -C libopencm3
|
$(Q)$(MAKE) -C libopencm3
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ images: $(BINARY).images
|
|||||||
flash: $(BINARY).flash
|
flash: $(BINARY).flash
|
||||||
|
|
||||||
%.images: %.bin %.hex %.srec %.list
|
%.images: %.bin %.hex %.srec %.list
|
||||||
@#echo "*** $* images generated ***"
|
@#printf "*** $* images generated ***\n"
|
||||||
|
|
||||||
%.bin: %.elf
|
%.bin: %.elf
|
||||||
@#printf " OBJCOPY $(*).bin\n"
|
@#printf " OBJCOPY $(*).bin\n"
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ images: $(BINARY).images
|
|||||||
flash: $(BINARY).flash
|
flash: $(BINARY).flash
|
||||||
|
|
||||||
%.images: %.bin %.hex %.srec %.list
|
%.images: %.bin %.hex %.srec %.list
|
||||||
@#echo "*** $* images generated ***"
|
@#printf "*** $* images generated ***\n"
|
||||||
|
|
||||||
%.bin: %.elf
|
%.bin: %.elf
|
||||||
@#printf " OBJCOPY $(*).bin\n"
|
@#printf " OBJCOPY $(*).bin\n"
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ images: $(BINARY).images
|
|||||||
flash: $(BINARY).flash
|
flash: $(BINARY).flash
|
||||||
|
|
||||||
%.images: %.bin %.hex %.srec %.list
|
%.images: %.bin %.hex %.srec %.list
|
||||||
@#echo "*** $* images generated ***"
|
@#printf "*** $* images generated ***\n"
|
||||||
|
|
||||||
%.bin: %.elf
|
%.bin: %.elf
|
||||||
@#printf " OBJCOPY $(*).bin\n"
|
@#printf " OBJCOPY $(*).bin\n"
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ images: $(BINARY).images
|
|||||||
flash: $(BINARY).flash
|
flash: $(BINARY).flash
|
||||||
|
|
||||||
%.images: %.bin %.hex %.srec %.list
|
%.images: %.bin %.hex %.srec %.list
|
||||||
@#echo "*** $* images generated ***"
|
@#printf "*** $* images generated ***\n"
|
||||||
|
|
||||||
%.bin: %.elf
|
%.bin: %.elf
|
||||||
@#printf " OBJCOPY $(*).bin\n"
|
@#printf " OBJCOPY $(*).bin\n"
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ images: $(BINARY).images
|
|||||||
flash: $(BINARY).flash
|
flash: $(BINARY).flash
|
||||||
|
|
||||||
%.images: %.bin %.hex %.srec %.list
|
%.images: %.bin %.hex %.srec %.list
|
||||||
@#echo "*** $* images generated ***"
|
@#printf "*** $* images generated ***\n"
|
||||||
|
|
||||||
%.bin: %.elf
|
%.bin: %.elf
|
||||||
@#printf " OBJCOPY $(*).bin\n"
|
@#printf " OBJCOPY $(*).bin\n"
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ images: $(BINARY).images
|
|||||||
flash: $(BINARY).flash
|
flash: $(BINARY).flash
|
||||||
|
|
||||||
%.images: %.bin %.hex %.srec %.list
|
%.images: %.bin %.hex %.srec %.list
|
||||||
@#echo "*** $* images generated ***"
|
@#printf "*** $* images generated ***\n"
|
||||||
|
|
||||||
%.bin: %.elf
|
%.bin: %.elf
|
||||||
@#printf " OBJCOPY $(*).bin\n"
|
@#printf " OBJCOPY $(*).bin\n"
|
||||||
@@ -151,7 +151,7 @@ else
|
|||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
%.flash: %.elf
|
%.flash: %.elf
|
||||||
@echo " GDB $(*).elf (flash)"
|
@printf " GDB $(*).elf (flash)\n"
|
||||||
$(Q)$(GDB) --batch \
|
$(Q)$(GDB) --batch \
|
||||||
-ex 'target extended-remote $(BMP_PORT)' \
|
-ex 'target extended-remote $(BMP_PORT)' \
|
||||||
-x $(TOOLCHAIN_DIR)/scripts/black_magic_probe_flash.scr \
|
-x $(TOOLCHAIN_DIR)/scripts/black_magic_probe_flash.scr \
|
||||||
@@ -159,7 +159,7 @@ else
|
|||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
%.flash: %.elf
|
%.flash: %.elf
|
||||||
@echo " GDB $(*).elf (flash)"
|
@printf " GDB $(*).elf (flash)\n"
|
||||||
$(Q)$(GDB) --batch \
|
$(Q)$(GDB) --batch \
|
||||||
-ex 'target extended-remote $(STLINK_PORT)' \
|
-ex 'target extended-remote $(STLINK_PORT)' \
|
||||||
-x $(SCRIPT_DIR)/libopencm3/scripts/stlink_flash.scr \
|
-x $(SCRIPT_DIR)/libopencm3/scripts/stlink_flash.scr \
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ images: $(BINARY).images
|
|||||||
flash: $(BINARY).flash
|
flash: $(BINARY).flash
|
||||||
|
|
||||||
%.images: %.bin %.hex %.srec %.list
|
%.images: %.bin %.hex %.srec %.list
|
||||||
@#echo "*** $* images generated ***"
|
@#printf "*** $* images generated ***\n"
|
||||||
|
|
||||||
%.bin: %.elf
|
%.bin: %.elf
|
||||||
@#printf " OBJCOPY $(*).bin\n"
|
@#printf " OBJCOPY $(*).bin\n"
|
||||||
@@ -138,7 +138,7 @@ else
|
|||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
%.flash: %.elf
|
%.flash: %.elf
|
||||||
@echo " GDB $(*).elf (flash)"
|
@printf " GDB $(*).elf (flash)\n"
|
||||||
$(Q)$(GDB) --batch \
|
$(Q)$(GDB) --batch \
|
||||||
-ex 'target extended-remote $(BMP_PORT)' \
|
-ex 'target extended-remote $(BMP_PORT)' \
|
||||||
-x $(TOOLCHAIN_DIR)/scripts/black_magic_probe_flash.scr \
|
-x $(TOOLCHAIN_DIR)/scripts/black_magic_probe_flash.scr \
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ images: $(BINARY).images
|
|||||||
flash: $(BINARY).flash
|
flash: $(BINARY).flash
|
||||||
|
|
||||||
%.images: %.bin %.hex %.srec %.list
|
%.images: %.bin %.hex %.srec %.list
|
||||||
@#echo "*** $* images generated ***"
|
@#printf "*** $* images generated ***\n"
|
||||||
|
|
||||||
%.bin: %.elf
|
%.bin: %.elf
|
||||||
@#printf " OBJCOPY $(*).bin\n"
|
@#printf " OBJCOPY $(*).bin\n"
|
||||||
@@ -145,7 +145,7 @@ else
|
|||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
%.flash: %.elf
|
%.flash: %.elf
|
||||||
@echo " GDB $(*).elf (flash)"
|
@printf " GDB $(*).elf (flash)\n"
|
||||||
$(Q)$(GDB) --batch \
|
$(Q)$(GDB) --batch \
|
||||||
-ex 'target extended-remote $(BMP_PORT)' \
|
-ex 'target extended-remote $(BMP_PORT)' \
|
||||||
-x $(TOOLCHAIN_DIR)/scripts/black_magic_probe_flash.scr \
|
-x $(TOOLCHAIN_DIR)/scripts/black_magic_probe_flash.scr \
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ images: $(BINARY).images
|
|||||||
flash: $(BINARY).flash
|
flash: $(BINARY).flash
|
||||||
|
|
||||||
%.images: %.bin %.hex %.srec %.list
|
%.images: %.bin %.hex %.srec %.list
|
||||||
@#echo "*** $* images generated ***"
|
@#printf "*** $* images generated ***\n"
|
||||||
|
|
||||||
%.bin: %.elf
|
%.bin: %.elf
|
||||||
@#printf " OBJCOPY $(*).bin\n"
|
@#printf " OBJCOPY $(*).bin\n"
|
||||||
@@ -147,7 +147,7 @@ else
|
|||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
%.flash: %.elf
|
%.flash: %.elf
|
||||||
@echo " GDB $(*).elf (flash)"
|
@printf " GDB $(*).elf (flash)\n"
|
||||||
$(Q)$(GDB) --batch \
|
$(Q)$(GDB) --batch \
|
||||||
-ex 'target extended-remote $(BMP_PORT)' \
|
-ex 'target extended-remote $(BMP_PORT)' \
|
||||||
-x $(TOOLCHAIN_DIR)/scripts/black_magic_probe_flash.scr \
|
-x $(TOOLCHAIN_DIR)/scripts/black_magic_probe_flash.scr \
|
||||||
@@ -155,7 +155,7 @@ else
|
|||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
%.flash: %.elf
|
%.flash: %.elf
|
||||||
@echo " GDB $(*).elf (flash)"
|
@printf " GDB $(*).elf (flash)\n"
|
||||||
$(Q)$(GDB) --batch \
|
$(Q)$(GDB) --batch \
|
||||||
-ex 'target extended-remote $(STLINK_PORT)' \
|
-ex 'target extended-remote $(STLINK_PORT)' \
|
||||||
-x $(SCRIPT_DIR)/libopencm3/scripts/stlink_flash.scr \
|
-x $(SCRIPT_DIR)/libopencm3/scripts/stlink_flash.scr \
|
||||||
|
|||||||
Reference in New Issue
Block a user