1 # Hey Emacs, this is a -*- makefile -*-
2 ##############################################################################
6 OBJCOPY
= arm-none-eabi-objcopy
7 OBJDUMP
= arm-none-eabi-objdump
8 SIZE
= arm-none-eabi-size
9 AR
= arm-none-eabi-ar rcs
11 HEX
= $(OBJCOPY
) -O
$(FORMAT
) -R .eeprom
-R .fuse
-R .lock
-R .signature
12 EEP
= $(OBJCOPY
) -j .eeprom
--set-section-flags
=.eeprom
="alloc,load" --change-section-lma .eeprom
=0 --no-change-warnings
-O
$(FORMAT
)
15 COMMON_VPATH
+= $(LIB_PATH
)/arm_atsam
/packs
/atmel
/SAMD51_DFP
/1.0.70/include
16 COMMON_VPATH
+= $(LIB_PATH
)/arm_atsam
/packs
/arm
/cmsis
/5.0.1/CMSIS
/Include
18 COMPILEFLAGS
+= -funsigned-char
19 COMPILEFLAGS
+= -funsigned-bitfields
20 COMPILEFLAGS
+= -ffunction-sections
21 COMPILEFLAGS
+= -fshort-enums
22 COMPILEFLAGS
+= -fno-inline-small-functions
23 COMPILEFLAGS
+= -fno-strict-aliasing
24 COMPILEFLAGS
+= -mfloat-abi
=hard
25 COMPILEFLAGS
+= -mfpu
=fpv4-sp-d16
26 COMPILEFLAGS
+= -mthumb
30 CFLAGS
+= $(COMPILEFLAGS
)
32 CPPFLAGS
+= $(COMPILEFLAGS
)
33 CPPFLAGS
+= -fno-exceptions
-std
=c
++11
35 LDFLAGS
+=-Wl
,--gc-sections
36 LDFLAGS
+= -Wl
,-Map
="%OUT%%PROJ_NAME%.map"
37 LDFLAGS
+= -Wl
,--start-group
38 LDFLAGS
+= -Wl
,--end-group
39 LDFLAGS
+= --specs
=rdimon.specs
40 LDFLAGS
+= -T
$(LIB_PATH
)/arm_atsam
/packs
/atmel
/SAMD51_DFP
/1.0.70/gcc
/gcc
/samd51j18a_flash.
ld
42 OPT_DEFS
+= -DPROTOCOL_ARM_ATSAM
44 MCUFLAGS
= -mcpu
=$(MCU
)
45 MCUFLAGS
+= -D__
$(ARM_ATSAM
)__
47 # List any extra directories to look for libraries here.
48 # Each directory must be seperated by a space.
49 # Use forward slashes for directory separators.
50 # For a directory that has spaces, enclose it in quotes.
54 bin
: $(BUILD_DIR
)/$(TARGET
).hex
55 $(OBJCOPY
) -Iihex
-Obinary
$(BUILD_DIR
)/$(TARGET
).hex
$(BUILD_DIR
)/$(TARGET
).bin
56 $(COPY
) $(BUILD_DIR
)/$(TARGET
).bin
$(TARGET
).bin
;