1# 2# Defines the part type that this project uses. 3# 4PART=__MSP432P401R__ 5 6# 7# The base directory for MSPWare. 8# 9ROOT=ti/devices/msp432p4xx/ 10 11# 12# Include the common make definitions. 13# 14include Makefile.defs 15 16# 17# Where to find header files that do not live in the source directory. 18# 19IPATH+=CMSIS 20IPATH+=${ROOT}/driverlib 21 22# BTstack 23BTSTACK_ROOT=../.. 24VPATH += ${BTSTACK_ROOT}/3rd-party/bluedroid/decoder/srce 25VPATH += ${BTSTACK_ROOT}/3rd-party/bluedroid/encoder/srce 26VPATH += ${BTSTACK_ROOT}/3rd-party/hxcmod-player 27VPATH += ${BTSTACK_ROOT}/3rd-party/hxcmod-player/mods 28VPATH += ${BTSTACK_ROOT}/3rd-party/md5 29VPATH += ${BTSTACK_ROOT}/3rd-party/micro-ecc 30VPATH += ${BTSTACK_ROOT}/3rd-party/segger-rtt 31VPATH += ${BTSTACK_ROOT}/3rd-party/yxml 32VPATH += ${BTSTACK_ROOT}/example 33VPATH += ${BTSTACK_ROOT}/src 34VPATH += ${BTSTACK_ROOT}/src/ble 35VPATH += ${BTSTACK_ROOT}/src/ble/gatt-service 36VPATH += ${BTSTACK_ROOT}/src/classic 37VPATH += ${BTSTACK_ROOT}/platform/embedded 38VPATH += ${BTSTACK_ROOT}/chipset/cc256x 39IPATH += ${BTSTACK_ROOT}/3rd-party/segger-rtt 40IPATH += ${BTSTACK_ROOT}/src 41IPATH += ${BTSTACK_ROOT}/platform/embedded 42IPATH += ${BTSTACK_ROOT}/chipset/cc256x 43IPATH += ${BTSTACK_ROOT}/3rd-party/hxcmod-player 44IPATH += ${BTSTACK_ROOT}/3rd-party/hxcmod-player/mods 45IPATH += ${BTSTACK_ROOT}/3rd-party/md5 46IPATH += ${BTSTACK_ROOT}/3rd-party/yxml 47IPATH += ${BTSTACK_ROOT}/3rd-party/bluedroid/decoder/include 48IPATH += ${BTSTACK_ROOT}/3rd-party/bluedroid/encoder/include 49IPATH += ${BTSTACK_ROOT}/3rd-party/lwip/core/src/include 50IPATH += ${BTSTACK_ROOT}/3rd-party/lwip/dhcp-server 51IPATH += ${BTSTACK_ROOT}/platform/lwip/ 52IPATH += ${BTSTACK_ROOT}/platform/lwip/port 53 54 55IPATH += . 56IPATH += ${COMPILER} 57 58BTSTACK_SOURCES = \ 59${BTSTACK_ROOT}/3rd-party/hxcmod-player/hxcmod.c \ 60${BTSTACK_ROOT}/3rd-party/hxcmod-player/mods/nao-deceased_by_disease.c \ 61${BTSTACK_ROOT}/3rd-party/lwip/core/src/core/def.c \ 62${BTSTACK_ROOT}/3rd-party/lwip/core/src/core/inet_chksum.c \ 63${BTSTACK_ROOT}/3rd-party/lwip/core/src/core/init.c \ 64${BTSTACK_ROOT}/3rd-party/lwip/core/src/core/ip.c \ 65${BTSTACK_ROOT}/3rd-party/lwip/core/src/core/mem.c \ 66${BTSTACK_ROOT}/3rd-party/lwip/core/src/core/memp.c \ 67${BTSTACK_ROOT}/3rd-party/lwip/core/src/core/netif.c \ 68${BTSTACK_ROOT}/3rd-party/lwip/core/src/core/pbuf.c \ 69${BTSTACK_ROOT}/3rd-party/lwip/core/src/core/tcp.c \ 70${BTSTACK_ROOT}/3rd-party/lwip/core/src/core/tcp_in.c \ 71${BTSTACK_ROOT}/3rd-party/lwip/core/src/core/tcp_out.c \ 72${BTSTACK_ROOT}/3rd-party/lwip/core/src/core/timeouts.c \ 73${BTSTACK_ROOT}/3rd-party/lwip/core/src/core/udp.c \ 74${BTSTACK_ROOT}/3rd-party/lwip/core/src/core/ipv4/acd.c \ 75${BTSTACK_ROOT}/3rd-party/lwip/core/src/core/ipv4/dhcp.c \ 76${BTSTACK_ROOT}/3rd-party/lwip/core/src/core/ipv4/etharp.c \ 77${BTSTACK_ROOT}/3rd-party/lwip/core/src/core/ipv4/icmp.c \ 78${BTSTACK_ROOT}/3rd-party/lwip/core/src/core/ipv4/ip4.c \ 79${BTSTACK_ROOT}/3rd-party/lwip/core/src/core/ipv4/ip4_addr.c \ 80${BTSTACK_ROOT}/3rd-party/lwip/core/src/core/ipv4/ip4_frag.c \ 81${BTSTACK_ROOT}/3rd-party/lwip/core/src/netif/ethernet.c \ 82${BTSTACK_ROOT}/3rd-party/lwip/core/src/apps/http/altcp_proxyconnect.c \ 83${BTSTACK_ROOT}/3rd-party/lwip/core/src/apps/http/fs.c \ 84${BTSTACK_ROOT}/3rd-party/lwip/core/src/apps/http/httpd.c \ 85${BTSTACK_ROOT}/3rd-party/lwip/dhcp-server/dhserver.c \ 86${BTSTACK_ROOT}/3rd-party/md5/md5.c \ 87${BTSTACK_ROOT}/3rd-party/micro-ecc/uECC.c \ 88${BTSTACK_ROOT}/3rd-party/segger-rtt/SEGGER_RTT.c \ 89${BTSTACK_ROOT}/3rd-party/segger-rtt/SEGGER_RTT_printf.c \ 90${BTSTACK_ROOT}/3rd-party/segger-rtt/SEGGER_RTT_Syscalls_GCC.c \ 91${BTSTACK_ROOT}/3rd-party/yxml/yxml.c \ 92${BTSTACK_ROOT}/example/sco_demo_util.c \ 93${BTSTACK_ROOT}/src/ad_parser.c \ 94${BTSTACK_ROOT}/src/ble/att_db.c \ 95${BTSTACK_ROOT}/src/ble/att_dispatch.c \ 96${BTSTACK_ROOT}/src/ble/att_server.c \ 97${BTSTACK_ROOT}/src/ble/gatt-service/ancs_client.c \ 98${BTSTACK_ROOT}/src/ble/gatt-service/battery_service_server.c \ 99${BTSTACK_ROOT}/src/ble/gatt-service/device_information_service_server.c \ 100${BTSTACK_ROOT}/src/ble/gatt-service/hids_device.c \ 101${BTSTACK_ROOT}/src/ble/gatt_client.c \ 102${BTSTACK_ROOT}/src/ble/le_device_db_memory.c \ 103${BTSTACK_ROOT}/src/ble/le_device_db_tlv.c \ 104${BTSTACK_ROOT}/src/ble/sm.c \ 105${BTSTACK_ROOT}/src/btstack_crypto.c \ 106${BTSTACK_ROOT}/src/btstack_hid_parser.c \ 107${BTSTACK_ROOT}/src/btstack_linked_list.c \ 108${BTSTACK_ROOT}/src/btstack_memory.c \ 109${BTSTACK_ROOT}/src/btstack_memory_pool.c \ 110${BTSTACK_ROOT}/src/btstack_ring_buffer.c \ 111${BTSTACK_ROOT}/src/btstack_run_loop.c \ 112${BTSTACK_ROOT}/src/btstack_tlv.c \ 113${BTSTACK_ROOT}/src/btstack_util.c \ 114${BTSTACK_ROOT}/src/classic/a2dp.c \ 115${BTSTACK_ROOT}/src/classic/a2dp_sink.c \ 116${BTSTACK_ROOT}/src/classic/a2dp_source.c \ 117${BTSTACK_ROOT}/src/classic/avdtp.c \ 118${BTSTACK_ROOT}/src/classic/avdtp_acceptor.c \ 119${BTSTACK_ROOT}/src/classic/avdtp_initiator.c \ 120${BTSTACK_ROOT}/src/classic/avdtp_sink.c \ 121${BTSTACK_ROOT}/src/classic/avdtp_source.c \ 122${BTSTACK_ROOT}/src/classic/avdtp_util.c \ 123${BTSTACK_ROOT}/src/classic/avrcp.c \ 124${BTSTACK_ROOT}/src/classic/avrcp_browsing_controller.c \ 125${BTSTACK_ROOT}/src/classic/avrcp_controller.c \ 126${BTSTACK_ROOT}/src/classic/avrcp_media_item_iterator.c \ 127${BTSTACK_ROOT}/src/classic/avrcp_target.c \ 128${BTSTACK_ROOT}/src/classic/bnep.c \ 129${BTSTACK_ROOT}/src/classic/btstack_cvsd_plc.c \ 130${BTSTACK_ROOT}/src/classic/btstack_link_key_db_tlv.c \ 131${BTSTACK_ROOT}/src/classic/btstack_sbc_decoder_bluedroid.c \ 132${BTSTACK_ROOT}/src/classic/btstack_sbc_encoder_bluedroid.c \ 133${BTSTACK_ROOT}/src/classic/btstack_sbc_plc.c \ 134${BTSTACK_ROOT}/src/classic/device_id_server.c \ 135${BTSTACK_ROOT}/src/classic/goep_client.c \ 136${BTSTACK_ROOT}/src/classic/hfp.c \ 137${BTSTACK_ROOT}/src/classic/hfp_ag.c \ 138${BTSTACK_ROOT}/src/classic/hfp_gsm_model.c \ 139${BTSTACK_ROOT}/src/classic/hfp_hf.c \ 140${BTSTACK_ROOT}/src/classic/hfp_msbc.c \ 141${BTSTACK_ROOT}/src/classic/hid_device.c \ 142${BTSTACK_ROOT}/src/classic/hid_host.c \ 143${BTSTACK_ROOT}/src/classic/hsp_ag.c \ 144${BTSTACK_ROOT}/src/classic/hsp_hs.c \ 145${BTSTACK_ROOT}/src/classic/obex_parser.c \ 146${BTSTACK_ROOT}/src/classic/obex_message_builder.c \ 147${BTSTACK_ROOT}/src/classic/pan.c \ 148${BTSTACK_ROOT}/src/classic/pbap_client.c \ 149${BTSTACK_ROOT}/src/classic/rfcomm.c \ 150${BTSTACK_ROOT}/src/classic/sdp_client.c \ 151${BTSTACK_ROOT}/src/classic/sdp_client_rfcomm.c \ 152${BTSTACK_ROOT}/src/classic/sdp_server.c \ 153${BTSTACK_ROOT}/src/classic/sdp_util.c \ 154${BTSTACK_ROOT}/src/classic/spp_server.c \ 155${BTSTACK_ROOT}/src/hci.c \ 156${BTSTACK_ROOT}/src/hci_cmd.c \ 157${BTSTACK_ROOT}/src/hci_dump.c \ 158${BTSTACK_ROOT}/src/hci_transport_h4.c \ 159${BTSTACK_ROOT}/src/l2cap.c \ 160${BTSTACK_ROOT}/src/l2cap_signaling.c \ 161${BTSTACK_ROOT}/platform/embedded/btstack_run_loop_embedded.c \ 162${BTSTACK_ROOT}/platform/embedded/btstack_stdin_embedded.c \ 163${BTSTACK_ROOT}/platform/embedded/btstack_tlv_flash_bank.c \ 164${BTSTACK_ROOT}/platform/embedded/btstack_uart_block_embedded.c \ 165${BTSTACK_ROOT}/platform/embedded/hci_dump_embedded_stdout.c \ 166${BTSTACK_ROOT}/platform/embedded/hci_dump_segger_rtt_stdout.c \ 167${BTSTACK_ROOT}/platform/lwip/port/sys_arch.c \ 168${BTSTACK_ROOT}/platform/lwip/bnep_lwip.c \ 169 170# CC2564B 171# - BOOST-CC2564MODA 172# - EM Wireless BoosterPacket with CC2564B module 173# INIT_SCRIPT = bluetooth_init_cc2564B_1.8_BT_Spec_4.1 174 175# CC2564C 176# - EM Wireless BoosterPacket with CC2564C module 177INIT_SCRIPT = bluetooth_init_cc2564C_1.4 178 179PORT_SOURCES = \ 180 ${BTSTACK_ROOT}/chipset/cc256x/${INIT_SCRIPT}.o \ 181 ${BTSTACK_ROOT}/chipset/cc256x/btstack_chipset_cc256x.o \ 182 hal_flash_bank_msp432.o \ 183 main.o \ 184 startup_msp432p401r_${COMPILER}.o \ 185 system_msp432p401r.o \ 186 187include ${BTSTACK_ROOT}/3rd-party/bluedroid/decoder/Makefile.inc 188include ${BTSTACK_ROOT}/3rd-party/bluedroid/encoder/Makefile.inc 189 190BTSTACK_SOURCES += ${SBC_ENCODER} 191BTSTACK_SOURCES += ${SBC_DECODER} 192 193EXAMPLES = \ 194 a2dp_source_demo \ 195 ancs_client_demo \ 196 dut_mode_classic \ 197 gap_dedicated_bonding \ 198 gap_inquiry \ 199 gap_le_advertisements \ 200 gatt_battery_query \ 201 gatt_browser \ 202 gatt_counter \ 203 gatt_streamer_server \ 204 hid_host_demo \ 205 hid_keyboard_demo \ 206 hid_mouse_demo \ 207 hog_keyboard_demo \ 208 hog_mouse_demo \ 209 le_streamer_client \ 210 led_counter \ 211 sdp_bnep_query \ 212 sdp_general_query \ 213 sdp_rfcomm_query \ 214 sm_pairing_central \ 215 sm_pairing_peripheral \ 216 spp_and_gatt_counter \ 217 spp_and_gatt_streamer \ 218 spp_counter \ 219 spp_streamer \ 220 spp_streamer_client \ 221 pbap_client_demo \ 222 pan_lwip_http_server \ 223# audio_duplex \ 224# a2dp_sink_demo \ 225# hfp_ag_demo \ 226# hfp_hf_demo \ 227# hsp_ag_demo \ 228# hsp_hs_demo \ 229# mod_player \ 230# sine_player \ 231 232GATT_FILES = \ 233 ancs_client_demo.gatt \ 234 gatt_counter.gatt \ 235 gatt_streamer_server.gatt \ 236 gatt_browser.gatt \ 237 gatt_battery_query.gatt \ 238 hog_keyboard_demo.gatt \ 239 hog_mouse_demo.gatt \ 240 sm_pairing_peripheral.gatt \ 241 sm_pairing_central.gatt \ 242 spp_and_gatt_counter.gatt \ 243 spp_and_gatt_streamer.gatt \ 244 245 246# 247# The default rule, which causes the le_counter example to be built. 248# 249all: ${COMPILER} 250all: \ 251 linker_script_gcc.ld \ 252 $(addprefix $(COMPILER)/,$(GATT_FILES:.gatt=.h)) \ 253 $(addprefix $(COMPILER)/,$(EXAMPLES:=.elf)) \ 254 $(addprefix $(COMPILER)/,$(EXAMPLES:=.jdebug)) \ 255 256include $(BTSTACK_ROOT)/chipset/cc256x/Makefile.inc 257 258# 259# The rule to clean out all the build products. 260# 261clean: 262 @rm -rf ${COMPILER} ${wildcard *~} 263 264# 265# The rule to create the target directory. 266# 267${COMPILER}: 268 @mkdir -p ${COMPILER} 269 270# compile .gatt descriptions 271${COMPILER}/%.h: %.gatt 272 python ${BTSTACK_ROOT}/tool/compile_gatt.py $< $@ 273 274$(COMPILER)/%.jdebug: ozone.jdebug | $(COMPILER) 275 sed -e "s|EXAMPLE|$(basename $(notdir $@))|" $< > $@ 276 277## 278 279# pick up sources 280C_SOURCES = $(BTSTACK_SOURCES) $(PORT_SOURCES) 281OBJECTS = $(addprefix $(COMPILER)/,$(notdir $(C_SOURCES:.c=.o))) 282vpath %.c $(sort $(dir $(C_SOURCES))) 283 284LDFLAGS2 = ${CPU} ${FPU} -specs=nano.specs -lc -lm -lnosys -Wl,--gc-sections 285 286# # 287# # The rule for linking the application. 288# # 289${COMPILER}${SUFFIX}/%.elf: ${OBJECTS} ${COMPILER}/%.o ti/devices/msp432p4xx/driverlib/${COMPILER}/msp432p4xx_driverlib.a 290 @ \ 291 ldname="linker_script_gcc.ld"; \ 292 if [ 'x${VERBOSE}' = x ]; \ 293 then \ 294 echo " LD ${@} ${LNK_SCP}"; \ 295 else \ 296 echo ${CC} -T linker_script_gcc.ld ${LDFLAGS2} -o ${@} $(filter %.o %.a, ${^}); \ 297 fi; \ 298 ${CC} -T linker_script_gcc.ld ${LDFLAGS2} -o ${@} $(filter %.o %.a, ${^}) 299 @${OBJCOPY} -O binary ${@} ${@:.elf=.bin} 300 301# 302# Include the automatically generated dependency files. 303# 304ifneq (${MAKECMDGOALS},clean) 305-include ${wildcard ${COMPILER}/*.d} __dummy__ 306endif 307