2018-08-29 19:07:52 +00:00
|
|
|
# Hey Emacs, this is a -*- makefile -*-
|
|
|
|
##############################################################################
|
|
|
|
# Compiler settings
|
|
|
|
#
|
2021-10-21 13:39:13 +00:00
|
|
|
CC = $(CC_PREFIX) arm-none-eabi-gcc
|
2018-08-29 19:07:52 +00:00
|
|
|
OBJCOPY = arm-none-eabi-objcopy
|
|
|
|
OBJDUMP = arm-none-eabi-objdump
|
|
|
|
SIZE = arm-none-eabi-size
|
2019-04-22 18:20:13 +00:00
|
|
|
AR = arm-none-eabi-ar
|
2018-08-29 19:07:52 +00:00
|
|
|
NM = arm-none-eabi-nm
|
|
|
|
HEX = $(OBJCOPY) -O $(FORMAT) -R .eeprom -R .fuse -R .lock -R .signature
|
|
|
|
EEP = $(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" --change-section-lma .eeprom=0 --no-change-warnings -O $(FORMAT)
|
|
|
|
BIN =
|
|
|
|
|
|
|
|
COMMON_VPATH += $(LIB_PATH)/arm_atsam/packs/atmel/SAMD51_DFP/1.0.70/include
|
|
|
|
COMMON_VPATH += $(LIB_PATH)/arm_atsam/packs/arm/cmsis/5.0.1/CMSIS/Include
|
|
|
|
|
|
|
|
COMPILEFLAGS += -funsigned-char
|
|
|
|
COMPILEFLAGS += -funsigned-bitfields
|
|
|
|
COMPILEFLAGS += -ffunction-sections
|
|
|
|
COMPILEFLAGS += -fshort-enums
|
|
|
|
COMPILEFLAGS += -fno-inline-small-functions
|
|
|
|
COMPILEFLAGS += -fno-strict-aliasing
|
|
|
|
COMPILEFLAGS += -mfloat-abi=hard
|
|
|
|
COMPILEFLAGS += -mfpu=fpv4-sp-d16
|
|
|
|
COMPILEFLAGS += -mthumb
|
2022-07-07 07:27:50 +00:00
|
|
|
COMPILEFLAGS += -fno-builtin-printf
|
2018-08-29 19:07:52 +00:00
|
|
|
|
|
|
|
#ALLOW_WARNINGS = yes
|
|
|
|
|
|
|
|
CFLAGS += $(COMPILEFLAGS)
|
|
|
|
|
2020-01-04 01:21:08 +00:00
|
|
|
CXXFLAGS += $(COMPILEFLAGS)
|
2022-06-05 22:47:22 +00:00
|
|
|
CXXFLAGS += -fno-exceptions $(CXXSTANDARD)
|
2018-08-29 19:07:52 +00:00
|
|
|
|
|
|
|
LDFLAGS +=-Wl,--gc-sections
|
|
|
|
LDFLAGS += -Wl,-Map="%OUT%%PROJ_NAME%.map"
|
|
|
|
LDFLAGS += -Wl,--start-group
|
|
|
|
LDFLAGS += -Wl,--end-group
|
Massdrop keyboard updates for SEND_STRING, syscalls, stdio, debug prints, Auto Shift (#3973)
* Update for SEND_STRING usage
Update for SEND_STRING usage.
Sending keyboard reports (kbd, nkro) now obey the minimum polling time.
While attempting to send a keyboard report and waiting for a USB poll, other functions of the keyboard, including LED effects and power management, will continue to operate at their intended intervals.
* Updates for send string, syscalls, stdio, debug prints, auto shift
Now properly waiting for previous keys sent over USB to complete before sending new.
Added heap to linker and now compiling with syscalls support.
Removed custom string functions and now using stdio.
dprintf now works as intended through virtser device.
* CTRL and ALT keymap updates
CTRL mac keymap updated
ALT default and mac keymap updated
ALT rules.mk added Auto Shift with default no
* Code cleanup as per discussion with vomindoraan
Code cleanup as per discussion with vomindoraan
2018-09-29 01:32:15 +00:00
|
|
|
LDFLAGS += --specs=rdimon.specs
|
2018-08-29 19:07:52 +00:00
|
|
|
LDFLAGS += -T$(LIB_PATH)/arm_atsam/packs/atmel/SAMD51_DFP/1.0.70/gcc/gcc/samd51j18a_flash.ld
|
|
|
|
|
|
|
|
OPT_DEFS += -DPROTOCOL_ARM_ATSAM
|
|
|
|
|
|
|
|
MCUFLAGS = -mcpu=$(MCU)
|
|
|
|
MCUFLAGS += -D__$(ARM_ATSAM)__
|
|
|
|
|
|
|
|
# List any extra directories to look for libraries here.
|
|
|
|
# Each directory must be seperated by a space.
|
|
|
|
# Use forward slashes for directory separators.
|
|
|
|
# For a directory that has spaces, enclose it in quotes.
|
|
|
|
EXTRALIBDIRS =
|
|
|
|
|
2021-08-22 03:49:33 +00:00
|
|
|
cpfirmware: warn-arm_atsam
|
|
|
|
.INTERMEDIATE: warn-arm_atsam
|
|
|
|
warn-arm_atsam: $(FIRMWARE_FORMAT)
|
|
|
|
$(info @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@)
|
|
|
|
$(info This MCU support package has a lack of support from the upstream provider (Massdrop).)
|
|
|
|
$(info There are currently questions about valid licensing, and at this stage it's likely)
|
|
|
|
$(info their boards and supporting code will be removed from QMK in the near future. Please)
|
|
|
|
$(info contact Massdrop for support, and encourage them to align their future board design)
|
|
|
|
$(info choices to gain proper license compatibility with QMK.)
|
|
|
|
$(info @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@)
|
|
|
|
|
2018-08-29 19:07:52 +00:00
|
|
|
# Convert hex to bin.
|
|
|
|
bin: $(BUILD_DIR)/$(TARGET).hex
|
|
|
|
$(OBJCOPY) -Iihex -Obinary $(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET).bin
|
|
|
|
$(COPY) $(BUILD_DIR)/$(TARGET).bin $(TARGET).bin;
|