-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.stm32f0
45 lines (37 loc) · 1.37 KB
/
Makefile.stm32f0
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
39
40
41
42
43
44
45
.PHONY: all clean install download erase cpu-info debug gdb_server check_target
##############
# config #
##############
# paths #
OBJPATH=./obj
INCPATH=./inc
SRCPATH=./src
INCHWPATH=$(INCPATH)/inc_stmf0
SRCHWPATH=$(SRCPATH)/src_stmf0
# http://www.st.com/web/catalog/tools/FM147/CL1794/SC961/SS1743/PF257884#
SPLIBPATH=./stm32f0_std_periph_lib/Libraries/STM32F0xx_StdPeriph_Driver
CMSISPATH=./stm32f0_std_periph_lib/Libraries/CMSIS
CMSISDEV=./stm32f0_std_periph_lib/Libraries/CMSIS/Device/ST/STM32F0xx
# https://github.com/texane/stlink
STLINK_PATH=~/.software/stlink
# https://launchpad.net/gcc-arm-embedded
TOOLCHAIN_PATH=~/.software/gcc-arm-none-eabi-4_7-2013q3/
# project #
MAIN=main.bin
OBJ=main.o \
dig_out.o \
dig_in.o \
adc.o \
servo.o \
rtc.o
OBJ+=system_stm32f0xx.o startup_stm32f0xx.o
# flags #
DEFINES=-DDEBUG -DUSE_FULL_ASSERT=1 -DUSE_STDPERIPH_DRIVER
CFLAGS=-fomit-frame-pointer -g -gdwarf-2 -mcpu=cortex-m0 -mthumb -mno-thumb-interwork -msoft-float -fdata-sections -ffunction-sections -Wl,--gc-sections --std=c99 -nostdlib #-Os
LDFLAGS=-lnosys -Wl,--gc-sections -nostartfiles -T./stm32f0_std_periph_lib/linker_script/stm32f0_linker.ld
TARGET="F0 Device"
#################################################
# !! WARNING !! #
## warranty void if you scroll past this line ##
#################################################
include common.mk