diff --git a/Makefile b/Makefile index f8d16de3..418a02bb 100644 --- a/Makefile +++ b/Makefile @@ -45,7 +45,6 @@ clean: PLUGIN_TEST_SUPPORT_DIR ?= $(ARDUINO_DIRECTORIES_USER)/hardware/keyboardio/build-tools/ PLUGIN_TEST_BIN_DIR ?= $(PLUGIN_TEST_SUPPORT_DIR)/../toolchain/$(shell gcc --print-multiarch)/bin - prepare-virtual: $(MAKE) -C $(ARDUINO_DIRECTORIES_USER)/hardware/keyboardio prepare-virtual diff --git a/etc/sketch-arduino-cli.mk b/etc/sketch-arduino-cli.mk index 6e1319b7..2f047c65 100644 --- a/etc/sketch-arduino-cli.mk +++ b/etc/sketch-arduino-cli.mk @@ -133,6 +133,9 @@ $(SKETCH_FILE_PATH): @echo "Sketch is $(SKETCH_FILE_PATH)" +.PHONY: compile configure-arduino-cli install-arduino-core-kaleidoscope install-arduino-core-avr +.PHONY: disassemble decompile size-map flash clean + .DEFAULT_GOAL := compile all: @@ -155,17 +158,19 @@ install-arduino-core-avr: decompile: disassemble @: ## Do not remove this line, otherwise `make all` will trigger the `%` rule too. -disassemble: compile +disassemble: ${ELF_FILE_PATH} ${AVR_OBJDUMP} -C -d "${ELF_FILE_PATH}" -size-map: compile +size-map: ${ELF_FILE_PATH} ${AVR_NM} --size-sort -C -r -l -t decimal "${ELF_FILE_PATH}" -flash: compile - +flash: ${HEX_FILE_PATH} +${ELF_FILE_PATH}: compile +${HEX_FILE_PATH}: compile + -hex-with-bootloader: +hex-with-bootloader: ${HEX_FILE_PATH} awk '/^:00000001FF/ == 0' "${HEX_FILE_PATH}" >"${HEX_FILE_WITH_BOOTLOADER_PATH}" @echo "Using ${BOOTLOADER_PATH}" cat "${BOOTLOADER_PATH}" >>"${HEX_FILE_WITH_BOOTLOADER_PATH}"