<commit_before>###########################################################################
#
# 	mkEnv-avr.mk
#
# 	This file contains AVR specific defines for the build environment.
#
# 	This file should only define variables and not have any rules in it.
#
###########################################################################

MK_CROSS_COMPILE		= avr-

ifeq ($(MK_AVR_MCU),)
$(error MK_AVR_MCU not specified)
endif

MK_AVR_MCU_LONG = $(patsubst t%,attiny%,$(patsubst m%,atmega%,$(MK_AVR_MCU)))

$(info MK_AVR_MCU = $(MK_AVR_MCU))
$(info MK_AVR_MCU_LONG = $(MK_AVR_MCU_LONG))

ifeq ($(MK_AVR_FREQ),)
$(error MK_AVR_FREQ not specified)
endif

MK_OS_DIR = avr-$(MK_AVR_MCU)-$(MK_AVR_FREQ)
MK_AVR_FREQ_DEF = -DCFG_CPU_CLOCK=$(patsubst %MHz,%000000,$(MK_AVR_FREQ))

MK_AVR_MCU_FLAGS	= -mmcu=$(MK_AVR_MCU_LONG)

MK_COMMON_AVR_DIR	= $(MK_COMMON_DIR)/avr

CPPFLAGS += $(MK_AVR_MCU_FLAGS) -I $(MK_COMMON_AVR_DIR) $(MK_AVR_FREQ_DEF)
LDFLAGS  += $(MK_AVR_MCU_FLAGS)

CXXFLAGS += -fno-exceptions -fno-rtti

# On the AVR, we always optimize

CFLAGS += -Os
CXXFLAGS += -Os

MK_PRINT_BIN_SIZE	= avr-mem.sh $@ $(MK_AVR_MCU_LONG)

vpath %.c   $(MK_COMMON_AVR_DIR)
vpath %.cpp $(MK_COMMON_AVR_DIR)

include $(MK_RULES_DIR)/mkEnv-gcc.mk

MK_avrdude	 		= avrdude
MK_avrdude_PORT		?= com1
MK_avrdude_PROG    	?= ponyser
MK_avrdude_CMD		= $(Q)$(MK_avrdude) -P $(MK_avrdude_PORT) -c $(MK_avrdude_PROG) -p $(MK_AVR_MCU_LONG) -U flash:w:$<:a
MK_avrdude_CMD_FUSE	= $(Q)$(MK_avrdude) -P $(MK_avrdude_PORT) -c $(MK_avrdude_PROG) -p $(MK_AVR_MCU_LONG) -U efuse:w:0x$(word 1,$(MK_AVR_FUSES)):m -U hfuse:w:0x$(word 2,$(MK_AVR_FUSES)):m -U lfuse:w:0x$(word 3,$(MK_AVR_FUSES)):m
	
MK_BootHost 		= $(MK_ROOT)/BootHost/BootHost.exe
MK_BootHost_BAUD	?= 38400
MK_BootHost_PORT	?= ttyS0
MK_BootHost_OPTS	?= --baud=$(MK_BootHost_BAUD) --port=$(MK_BootHost_PORT)
MK_BootHost_CMD		= $(Q)$(MK_BootHost) $(MK_BootHost_OPTS) $<

MK_stk500	 		= "c:/Program Files/Atmel/AVR Tools/stk500/stk500.exe"
MK_stk500_PORT		?=	USB
MK_stk500_CMD 		= $(Q)$(MK_stk500) -c$(MK_stk500_PORT) -d$(MK_AVR_MCU_LONG) -e -if$< -pf<commit_msg>Changed avrdude default to be avrispmkII<commit_after>###########################################################################
#
# 	mkEnv-avr.mk
#
# 	This file contains AVR specific defines for the build environment.
#
# 	This file should only define variables and not have any rules in it.
#
###########################################################################

MK_CROSS_COMPILE		= avr-

ifeq ($(MK_AVR_MCU),)
$(error MK_AVR_MCU not specified)
endif

MK_AVR_MCU_LONG = $(patsubst t%,attiny%,$(patsubst m%,atmega%,$(MK_AVR_MCU)))

$(info MK_AVR_MCU = $(MK_AVR_MCU))
$(info MK_AVR_MCU_LONG = $(MK_AVR_MCU_LONG))

ifeq ($(MK_AVR_FREQ),)
$(error MK_AVR_FREQ not specified)
endif

MK_OS_DIR = avr-$(MK_AVR_MCU)-$(MK_AVR_FREQ)
MK_AVR_FREQ_DEF = -DCFG_CPU_CLOCK=$(patsubst %MHz,%000000,$(MK_AVR_FREQ))

MK_AVR_MCU_FLAGS	= -mmcu=$(MK_AVR_MCU_LONG)

MK_COMMON_AVR_DIR	= $(MK_COMMON_DIR)/avr

CPPFLAGS += $(MK_AVR_MCU_FLAGS) -I $(MK_COMMON_AVR_DIR) $(MK_AVR_FREQ_DEF)
LDFLAGS  += $(MK_AVR_MCU_FLAGS)

CXXFLAGS += -fno-exceptions -fno-rtti

# On the AVR, we always optimize

CFLAGS += -Os
CXXFLAGS += -Os

MK_PRINT_BIN_SIZE	= avr-mem.sh $@ $(MK_AVR_MCU_LONG)

vpath %.c   $(MK_COMMON_AVR_DIR)
vpath %.cpp $(MK_COMMON_AVR_DIR)

include $(MK_RULES_DIR)/mkEnv-gcc.mk

MK_avrdude	 		= avrdude
MK_avrdude_PORT		?= usb
MK_avrdude_PROG    	?= avrispmkII
MK_avrdude_CMD		= $(Q)$(MK_avrdude) -P $(MK_avrdude_PORT) -c $(MK_avrdude_PROG) -p $(MK_AVR_MCU_LONG) -U flash:w:$<:a
MK_avrdude_CMD_FUSE	= $(Q)$(MK_avrdude) -P $(MK_avrdude_PORT) -c $(MK_avrdude_PROG) -p $(MK_AVR_MCU_LONG) -U efuse:w:0x$(word 1,$(MK_AVR_FUSES)):m -U hfuse:w:0x$(word 2,$(MK_AVR_FUSES)):m -U lfuse:w:0x$(word 3,$(MK_AVR_FUSES)):m
	
MK_BootHost 		= $(MK_ROOT)/BootHost/BootHost.exe
MK_BootHost_BAUD	?= 38400
MK_BootHost_PORT	?= ttyS0
MK_BootHost_OPTS	?= --baud=$(MK_BootHost_BAUD) --port=$(MK_BootHost_PORT)
MK_BootHost_CMD		= $(Q)$(MK_BootHost) $(MK_BootHost_OPTS) $<

MK_stk500	 		= "c:/Program Files/Atmel/AVR Tools/stk500/stk500.exe"
MK_stk500_PORT		?=	USB
MK_stk500_CMD 		= $(Q)$(MK_stk500) -c$(MK_stk500_PORT) -d$(MK_AVR_MCU_LONG) -e -if$< -pf
{'fraction_non_alphanumeric': 0.2169249106078665, 'fraction_numerical': 0.018831942789034564, 'mean_word_length': 6.36140350877193, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4966974', 'n_tokens_mistral': 2220, 'n_tokens_neox': 1968, 'n_words': 302}