Added command for flashing the images via the bootloader
This commit is contained in:
@@ -30,6 +30,9 @@ STACK_SIZE = 0x0050
|
||||
CPU = -mcpu=cortex-m0plus
|
||||
FPU = -mfloat-abi=soft
|
||||
|
||||
# Command for flashing the left half of the keyboard.
|
||||
FLASH_CMD = node ../lib/agent/packages/usb/update-module-firmware.js leftHalf $(PROJECT_OBJ:.axf=.bin)
|
||||
|
||||
# Source files.
|
||||
SOURCE = $(wildcard src/*.c) \
|
||||
../lib/KSDK_2.0_MKL03Z8xxx4/devices/MKL03Z4/system_MKL03Z4.c \
|
||||
|
||||
@@ -36,6 +36,9 @@ BUILD_FLAGS = -DCPU_$(PART)_cm4 -DBL_APP_VECTOR_TABLE_ADDRESS=$(BL_APP_VECTOR_TA
|
||||
CPU = -mcpu=cortex-m4
|
||||
FPU = -mfpu=fpv4-sp-d16 -mfloat-abi=hard
|
||||
|
||||
# Command for flashing the right half of the keyboard.
|
||||
FLASH_CMD = node ../lib/agent/packages/usb/update-device-firmware.js $(PROJECT_OBJ:.axf=.hex)
|
||||
|
||||
# Source files.
|
||||
SOURCE = $(wildcard src/*.c) \
|
||||
$(wildcard src/*/*.c) \
|
||||
|
||||
@@ -150,7 +150,7 @@ ifeq ($(INTERACTIVE),1)
|
||||
color_purple = \033[38;5;097m
|
||||
endif
|
||||
|
||||
.PHONY: all clean
|
||||
.PHONY: all clean flash
|
||||
|
||||
# The default rule, which causes the project to be built.
|
||||
all: $(PROJECT_OBJ)
|
||||
@@ -160,6 +160,9 @@ clean:
|
||||
@rm -rf $(BUILD_DIR) $(wildcard *~)
|
||||
@echo "$(color_red)Done cleaning!$(color_default)"
|
||||
|
||||
flash: all
|
||||
@$(FLASH_CMD) || exit 1
|
||||
|
||||
# Rebuild all objects when the Makefile changes.
|
||||
$(OBJS): Makefile
|
||||
|
||||
|
||||
Reference in New Issue
Block a user