-
Notifications
You must be signed in to change notification settings - Fork 2
/
makefile
195 lines (172 loc) · 6.1 KB
/
makefile
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
#
# Copyright 2016-2024, Cypress Semiconductor Corporation (an Infineon company) or
# an affiliate of Cypress Semiconductor Corporation. All rights reserved.
#
# This software, including source code, documentation and related
# materials ("Software") is owned by Cypress Semiconductor Corporation
# or one of its affiliates ("Cypress") and is protected by and subject to
# worldwide patent protection (United States and foreign),
# United States copyright laws and international treaty provisions.
# Therefore, you may use this Software only as provided in the license
# agreement accompanying the software package from which you
# obtained this Software ("EULA").
# If no EULA applies, Cypress hereby grants you a personal, non-exclusive,
# non-transferable license to copy, modify, and compile the Software
# source code solely for use in connection with Cypress's
# integrated circuit products. Any reproduction, modification, translation,
# compilation, or representation of this Software except as specified
# above is prohibited without the express written permission of Cypress.
#
# Disclaimer: THIS SOFTWARE IS PROVIDED AS-IS, WITH NO WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, NONINFRINGEMENT, IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Cypress
# reserves the right to make changes to the Software without notice. Cypress
# does not assume any liability arising out of the application or use of the
# Software or any product or circuit described in the Software. Cypress does
# not authorize its products for use in any products where a malfunction or
# failure of the Cypress product may reasonably be expected to result in
# significant property damage, injury or death ("High Risk Product"). By
# including Cypress's product in a High Risk Product, the manufacturer
# of such system or application assumes all risk of such use and in doing
# so agrees to indemnify Cypress against all liability.
#
ifeq ($(WHICHFILE),true)
$(info Processing $(lastword $(MAKEFILE_LIST)))
endif
#
# Basic Configuration
#
APPNAME=BLE_HelloSensor
TOOLCHAIN=GCC_ARM
CONFIG=Debug
VERBOSE=
# default target
TARGET=CYW920819M2EVB-01
SUPPORTED_TARGETS = \
CYW920819EVB-02 \
CYW920819M2EVB-01 \
CYW920820EVB-02 \
CYBT-213043-EVAL \
CYBT-243053-EVAL \
Vela-IF820-INT-ANT-DVK \
Vela-IF820-EXT-ANT-DVK \
CYBT-253059-EVAL \
CYBT-223058-EVAL \
CYBT-273063-EVAL \
CYBT-263065-EVAL \
CYW989820EVB-01 \
CYW989820M2EVB-01 \
CYW920719B2Q40EVB-01 \
CYW920706WCDEVAL \
CYBT-353027-EVAL \
CYBT-343026-EVAL \
CYBT-333047-EVAL \
CYW920835M2EVB-01 \
CYBLE-343072-EVAL-M2B \
CYBLE-333074-EVAL-M2B \
CYBT-423054-EVAL \
CYBT-413055-EVAL \
CYBT-483056-EVAL \
CYBT-423060-EVAL \
CYBT-413061-EVAL \
CYBT-483062-EVAL \
CYW955572BTEVK-01 \
CYW920721M2EVK-02 \
CYW920721M2EVB-03 \
CYW920820M2EVB-01 \
CYW943022BTEVK-01
#
# Advanced Configuration
#
SOURCES=
INCLUDES=
DEFINES=
VFP_SELECT=
CFLAGS=
CXXFLAGS=
ASFLAGS=
LDFLAGS=
LDLIBS=
LINKER_SCRIPT=
PREBUILD=
POSTBUILD=
FEATURES=
#
# App features/defaults
#
OTA_FW_UPGRADE?=0
BT_DEVICE_ADDRESS?=default
UART?=AUTO
XIP?=xip
TRANSPORT?=UART
ENABLE_DEBUG?=0
APP_NAME?=Hello
# wait for SWD attach
ifeq ($(ENABLE_DEBUG),1)
CY_APP_DEFINES+=-DENABLE_DEBUG=1
endif
CY_APP_DEFINES+=-DWICED_BT_TRACE_ENABLE
CY_APP_DEFINES+=-DDEV_NAME='"$(APP_NAME)"'
# Enable Below Macro to get HCI Traces
# CY_APP_DEFINES+=-DENABLE_HCI_TRACE
#
# Components (middleware libraries)
#
COMPONENTS +=bsp_design_modus
# nvram_emulation library is provided to support nvram emulation in RAM for designs without flash
# Use library-manager to add the 'btsdk-drivers' library to app if the TARGET device supports nvram emulation
# disabled by default, set to 1 or override on command line to enable
# note that some configurations are adjusted to support demonstrating the nvram_emulation
# these include transport_cfg, max_number_of_buffer_pools, and rpa_refresh_timeout
NVRAM_EMULATION=0
# optionally use HCI communication with a Host MCU as backup storage if NVRAM_EMULATION_HCI is set to 1
NVRAM_EMULATION_HCI=0
ifeq ($(NVRAM_EMULATION),1)
COMPONENTS +=nvram_emulation
ifeq ($(NVRAM_EMULATION_HCI),1)
CY_APP_DEFINES+=-DNVRAM_EMULATION_HCI=1
endif
endif
################################################################################
# Paths
################################################################################
# Path (absolute or relative) to the project
CY_APP_PATH=.
# Relative path to the shared repo location.
#
# All .mtb files have the format, <URI><COMMIT><LOCATION>. If the <LOCATION> field
# begins with $$ASSET_REPO$$, then the repo is deposited in the path specified by
# the CY_GETLIBS_SHARED_PATH variable. The default location is one directory level
# above the current app directory.
# This is used with CY_GETLIBS_SHARED_NAME variable, which specifies the directory name.
CY_GETLIBS_SHARED_PATH=../
# Directory name of the shared repo location.
#
CY_GETLIBS_SHARED_NAME=mtb_shared
# Absolute path to the compiler (Default: GCC in the tools)
CY_COMPILER_PATH=
# Locate ModusToolbox IDE helper tools folders in default installation
# locations for Windows, Linux, and macOS.
CY_WIN_HOME=$(subst \,/,$(USERPROFILE))
CY_TOOLS_PATHS ?= $(wildcard \
$(CY_WIN_HOME)/ModusToolbox/tools_* \
$(HOME)/ModusToolbox/tools_* \
/Applications/ModusToolbox/tools_* \
$(CY_IDE_TOOLS_DIR))
# If you install ModusToolbox IDE in a custom location, add the path to its
# "tools_X.Y" folder (where X and Y are the version number of the tools
# folder).
CY_TOOLS_PATHS+=
# Default to the newest installed tools folder, or the users override (if it's
# found).
CY_TOOLS_DIR=$(lastword $(sort $(wildcard $(CY_TOOLS_PATHS))))
ifeq ($(CY_TOOLS_DIR),)
$(error Unable to find any of the available CY_TOOLS_PATHS -- $(CY_TOOLS_PATHS))
endif
# tools that can be launched with "make open CY_OPEN_TYPE=<tool>
CY_BT_APP_TOOLS+=BTSpy ClientControl hello_client
-include internal.mk
ifeq ($(filter $(TARGET),$(SUPPORTED_TARGETS)),)
$(error TARGET $(TARGET) not supported for this application. Edit SUPPORTED_TARGETS in the code example makefile to add new BSPs)
endif
include $(CY_TOOLS_DIR)/make/start.mk