-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.mk
71 lines (62 loc) · 2.26 KB
/
config.mk
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#
# Name: config.mk
#
# Purpose: the configuration file of this project
#
# Created By: Lipeng<[email protected]>
# Created Date: 2013-10-05
#
# ChangeList:
# Created in 2013-10-05 by Lipeng;
#
# This document and the information contained in it is confidential and
# proprietary to Unication Co., Ltd. The reproduction or disclosure, in
# whole or in part, to anyone outside of Unication Co., Ltd. without the
# written approval of the President of Unication Co., Ltd., under a
# Non-Disclosure Agreement, or to any employee of Unication Co., Ltd. who
# has not previously obtained written authorization for access from the
# individual responsible for the document, will have a significant
# detrimental effect on Unication Co., Ltd. and is expressly prohibited.
#
#
###################################################
# Project name
###################################################
PROJ_NAME=stm32_mp3player
OUTPATH=build
###################################################
# the compiler definitions
###################################################
BINPATH=/e/STM32_MP3_PHIL/gcc-arm-none-eabi-4.7-2013q2/bin
#BINPATH=/opt/arm-2011.09/bin/
#CC=$(BINPATH)/arm-none-eabi-gcc
#OBJCOPY=$(BINPATH)/arm-none-eabi-objcopy
#OBJDUMP=$(BINPATH)/arm-none-eabi-objdump
#SIZE=$(BINPATH)/arm-none-eabi-size
CC=$(BINPATH)/arm-none-eabi-gcc.exe
OBJCOPY=$(BINPATH)/arm-none-eabi-objcopy.exe
OBJDUMP=$(BINPATH)/arm-none-eabi-objdump.exe
SIZE=$(BINPATH)/arm-none-eabi-size.exe
###################################################
# Check for valid float argument
# NOTE that you have to run make clan after
# changing these as hardfloat and softfloat are not
# binary compatible
###################################################
ifneq ($(FLOAT_TYPE), hard)
ifneq ($(FLOAT_TYPE), soft)
override FLOAT_TYPE = hard
#override FLOAT_TYPE = soft
endif
endif
###################################################
# compiler flags
###################################################
CFLAGS = -std=gnu99 -g -O3 -Wall
CFLAGS += -mlittle-endian -mthumb -mthumb-interwork -nostartfiles -mcpu=cortex-m4
ifeq ($(FLOAT_TYPE), hard)
CFLAGS += -fsingle-precision-constant -Wdouble-promotion
CFLAGS += -mfpu=fpv4-sp-d16 -mfloat-abi=hard
else
CFLAGS += -msoft-float
endif