forked from BlackRamElectronics/LPC1769-Blinky
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile.conf
More file actions
38 lines (27 loc) · 820 Bytes
/
makefile.conf
File metadata and controls
38 lines (27 loc) · 820 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Selecting Core
CORTEX_M=3
# Use newlib-nano. To disable it, specify USE_NANO=
USE_NANO=--specs=nano.specs
# Use seimhosting or not
USE_SEMIHOST=--specs=rdimon.specs -lc -lc -lrdimon
USE_NOHOST=-lc -lc -lnosys
CORE=CM$(CORTEX_M)
#BASE=../..
BASE=./
# Compiler & Linker
CC=arm-none-eabi-gcc
CXX=arm-none-eabi-g++
# Options for specific architecture
ARCH_FLAGS=-mthumb -mcpu=cortex-m$(CORTEX_M)
# Startup code
STARTUP=$(BASE)/startup/startup_ARM$(CORE).S
# Include directories
INCLUDES = -Ilpc1700
# -Os -flto -ffunction-sections -fdata-sections to compile for code size
CFLAGS=$(ARCH_FLAGS) $(STARTUP_DEFS) -Os -flto -ffunction-sections -fdata-sections $(INCLUDES)
# Link for code size
GC=-Wl,--gc-sections
# Create map file
MAP=-Wl,-Map=$(NAME).map
# Convert output to BIN file
OBJCOPY=arm-none-eabi-objcopy