From f8266a228cacbc31b0455161e0a8bd073feaa9db Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sun, 28 Feb 2021 21:25:09 +0000 Subject: Migrate make_dfu_header to CLI (#12061) * Migrate make_dfu_header to CLI * lint fixes * Update lib/python/qmk/cli/generate/dfu_header.py Co-authored-by: Ryan * Rename object Co-authored-by: Ryan --- tmk_core/avr.mk | 2 +- tmk_core/make_dfu_header.sh | 14 -------------- 2 files changed, 1 insertion(+), 15 deletions(-) delete mode 100755 tmk_core/make_dfu_header.sh (limited to 'tmk_core') diff --git a/tmk_core/avr.mk b/tmk_core/avr.mk index 336a83e9d3..06c308e553 100644 --- a/tmk_core/avr.mk +++ b/tmk_core/avr.mk @@ -284,7 +284,7 @@ extcoff: $(BUILD_DIR)/$(TARGET).elf bootloader: make -C lib/lufa/Bootloaders/DFU/ clean - $(TMK_DIR)/make_dfu_header.sh $(ALL_CONFIGS) + bin/qmk generate-dfu-header --quiet --keyboard $(KEYBOARD) --output lib/lufa/Bootloaders/DFU/Keyboard.h $(eval MAX_SIZE=$(shell n=`$(CC) -E -mmcu=$(MCU) $(CFLAGS) $(OPT_DEFS) tmk_core/common/avr/bootloader_size.c 2> /dev/null | sed -ne 's/\r//;/^#/n;/^AVR_SIZE:/,$${s/^AVR_SIZE: //;p;}'` && echo $$(($$n)) || echo 0)) $(eval PROGRAM_SIZE_KB=$(shell n=`expr $(MAX_SIZE) / 1024` && echo $$(($$n)) || echo 0)) $(eval BOOT_SECTION_SIZE_KB=$(shell n=`expr $(BOOTLOADER_SIZE) / 1024` && echo $$(($$n)) || echo 0)) diff --git a/tmk_core/make_dfu_header.sh b/tmk_core/make_dfu_header.sh deleted file mode 100755 index 7e2283dd70..0000000000 --- a/tmk_core/make_dfu_header.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh -ALL_CONFIGS=$* -GREP="grep" - -cat <<- EOF > lib/lufa/Bootloaders/DFU/Keyboard.h -#pragma once - -$($GREP "MANUFACTURER[ \t]" $ALL_CONFIGS -h | tail -1) -$($GREP "PRODUCT[ \t]" $ALL_CONFIGS -h | tail -1 | tr -d '\r') Bootloader -$($GREP "QMK_ESC_OUTPUT[ \t]" $ALL_CONFIGS -h | tail -1) -$($GREP "QMK_ESC_INPUT[ \t]" $ALL_CONFIGS -h | tail -1) -$($GREP "QMK_LED[ \t]" $ALL_CONFIGS -h | tail -1) -$($GREP "QMK_SPEAKER[ \t]" $ALL_CONFIGS -h | tail -1) -EOF -- cgit v1.2.3