Skip to content

Commit

Permalink
Generate hex with proper device identification
Browse files Browse the repository at this point in the history
  • Loading branch information
tritol committed Jul 2, 2021
1 parent 41a40ca commit de28d5e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,15 @@ VERSION_FILE = ${BUILD_DIR}/version.h
LANG_TEMPLATE = ${I18N}/${PROJECT}-${VERSION}.pot

default: DEFS += -DUSB_PRODUCT='"Original Prusa CW1"' -DUSB_PID=0x0008 -DSERIAL_COM_DEBUG
default: DEVICE = cw1
default: $(addprefix $(BUILD_DIR)/, ${PROJECT}-${LANG}-devel.hex)

dist: DEFS += -DUSB_PRODUCT='"Original Prusa CW1"' -DUSB_PID=0x0008
dist: DEVICE = cw1
dist: $(addprefix $(BUILD_DIR)/, ${PROJECT}-${LANG}-${VERSION}.hex)

cw1s: DEFS += -DCW1S -DUSB_PRODUCT='"Original Prusa CW1S"' -DUSB_PID=0x000F
cw1s: DEVICE = cw1s
cw1s: $(addprefix $(BUILD_DIR)/, ${PROJECT_CW1S}-${LANG}-${VERSION}.hex)

.PHONY: clean distclean lang_extract default dist ${VERSION_FILE}.tmp doc
Expand All @@ -55,7 +58,7 @@ $(BUILD_DIR)%/.:

$(BUILD_DIR)/%.hex: ${BUILD_DIR}/%.elf
${OBJCOPY} -O ihex -R .eeprom $< $@.tmp
@echo "; device = cw1" > $@
@echo "; device = ${DEVICE}" > $@
@echo >> $@
cat $@.tmp >> $@
rm $@.tmp
Expand Down

0 comments on commit de28d5e

Please sign in to comment.