~ruther/qmk_firmware

62105b5c07971387026e676815a8358c9833149e — Dasky 1 year, 9 months ago 3561c3a
Remove oversize binaries (#21976)

This stops a situation where a user could end up flashing oversize firmware soft bricking hardware.
1 files changed, 2 insertions(+), 0 deletions(-)

M builddefs/common_rules.mk
M builddefs/common_rules.mk => builddefs/common_rules.mk +2 -0
@@ 392,6 392,8 @@ check-size:
	if [ $(MAX_SIZE) -gt 0 ] && [ $(CURRENT_SIZE) -gt 0 ]; then \
		$(SILENT) || printf "$(MSG_CHECK_FILESIZE)" | $(AWK_CMD); \
		if [ $(CURRENT_SIZE) -gt $(MAX_SIZE) ]; then \
			$(REMOVE) $(TARGET).$(FIRMWARE_FORMAT); \
			$(REMOVE) $(BUILD_DIR)/$(TARGET).{hex,bin,uf2}; \
		    printf "\n * $(MSG_FILE_TOO_BIG)"; $(PRINT_ERROR_PLAIN); \
		else \
		    if [ $(FREE_SIZE) -lt $(SIZE_MARGIN) ]; then \

Do not follow this link