Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add target 'check-md5' to build_keyboard.mk #11338

Merged
merged 8 commits into from
Dec 31, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions build_keyboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,7 @@ endif

build: elf cpfirmware
check-size: build
check-md5: build
objs-size: build

include show_options.mk
Expand Down
4 changes: 1 addition & 3 deletions tmk_core/common/command.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,8 @@ static void print_version(void) {
print("VID: " STR(VENDOR_ID) "(" STR(MANUFACTURER) ") "
"PID: " STR(PRODUCT_ID) "(" STR(PRODUCT) ") "
"VER: " STR(DEVICE_VER) "\n");
#ifdef SKIP_VERSION
print("BUILD: (" __DATE__ ")\n");
#else
print("BUILD: " STR(QMK_VERSION) " (" __TIME__ " " __DATE__ ")\n");
#ifndef SKIP_VERSION
# ifdef PROTOCOL_CHIBIOS
print("CHIBIOS: " STR(CHIBIOS_VERSION) ", CONTRIB: " STR(CHIBIOS_CONTRIB_VERSION) "\n");
# endif
Expand Down
19 changes: 15 additions & 4 deletions tmk_core/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,12 @@ CSTANDARD = -std=gnu99
# -Wall...: warning level
# -Wa,...: tell GCC to pass this to the assembler.
# -adhlns...: create assembler listing
ifndef SKIP_DEBUG_INFO
DEBUG_ENABLE ?= yes
ifeq ($(strip $(SKIP_DEBUG_INFO)),yes)
DEBUG_ENABLE=no
endif

ifeq ($(strip $(DEBUG_ENABLE)),yes)
CFLAGS += -g$(DEBUG)
endif
CFLAGS += $(CDEFS)
Expand Down Expand Up @@ -110,7 +115,7 @@ CFLAGS += $(CSTANDARD)
# -Wall...: warning level
# -Wa,...: tell GCC to pass this to the assembler.
# -adhlns...: create assembler listing
ifndef SKIP_DEBUG_INFO
ifeq ($(strip $(DEBUG_ENABLE)),yes)
CXXFLAGS += -g$(DEBUG)
endif
CXXFLAGS += $(CXXDEFS)
Expand Down Expand Up @@ -140,7 +145,7 @@ CXXFLAGS += -Wa,-adhlns=$(@:%.o=%.lst)
# -listing-cont-lines: Sets the maximum number of continuation lines of hex
# dump that will be displayed for a given single line of source input.
ASFLAGS += $(ADEFS)
ifndef SKIP_DEBUG_INFO
ifeq ($(strip $(DEBUG_ENABLE)),yes)
ASFLAGS += -Wa,-adhlns=$(@:%.o=%.lst),-gstabs,--listing-cont-lines=100
else
ASFLAGS += -Wa,-adhlns=$(@:%.o=%.lst),--listing-cont-lines=100
Expand Down Expand Up @@ -202,7 +207,10 @@ REMOVEDIR = rmdir
COPY = cp
WINSHELL = cmd
SECHO = $(SILENT) || echo

MD5SUM ?= md5sum
ifneq ($(filter Darwin FreeBSD,$(shell uname -s)),)
MD5SUM = md5
endif

# Compiler flags to generate dependency files.
#GENDEPFLAGS = -MMD -MP -MF .dep/$(@F).d
Expand Down Expand Up @@ -431,6 +439,9 @@ check-size:
$(SILENT) || echo "(Firmware size check does not yet support $(MCU) microprocessors; skipping.)"
endif

check-md5:
$(MD5SUM) $(BUILD_DIR)/$(TARGET).$(FIRMWARE_FORMAT)

# Create build directory
$(shell mkdir -p $(BUILD_DIR) 2>/dev/null)

Expand Down