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_bluedroid.c \ 132${BTSTACK_ROOT}/src/classic/btstack_sbc_decoder_bluedroid.c \ 133${BTSTACK_ROOT}/src/classic/btstack_sbc_encoder_bluedroid.c \ 134${BTSTACK_ROOT}/src/classic/btstack_sbc_plc.c \ 135${BTSTACK_ROOT}/src/classic/device_id_server.c \ 136${BTSTACK_ROOT}/src/classic/goep_client.c \ 137${BTSTACK_ROOT}/src/classic/hfp.c \ 138${BTSTACK_ROOT}/src/classic/hfp_ag.c \ 139${BTSTACK_ROOT}/src/classic/hfp_gsm_model.c \ 140${BTSTACK_ROOT}/src/classic/hfp_hf.c \ 141${BTSTACK_ROOT}/src/classic/hfp_codec.c \ 142${BTSTACK_ROOT}/src/classic/hfp_msbc.c \ 143${BTSTACK_ROOT}/src/classic/hid_device.c \ 144${BTSTACK_ROOT}/src/classic/hid_host.c \ 145${BTSTACK_ROOT}/src/classic/hsp_ag.c \ 146${BTSTACK_ROOT}/src/classic/hsp_hs.c \ 147${BTSTACK_ROOT}/src/classic/obex_parser.c \ 148${BTSTACK_ROOT}/src/classic/obex_message_builder.c \ 149${BTSTACK_ROOT}/src/classic/pan.c \ 150${BTSTACK_ROOT}/src/classic/pbap_client.c \ 151${BTSTACK_ROOT}/src/classic/rfcomm.c \ 152${BTSTACK_ROOT}/src/classic/sdp_client.c \ 153${BTSTACK_ROOT}/src/classic/sdp_client_rfcomm.c \ 154${BTSTACK_ROOT}/src/classic/sdp_server.c \ 155${BTSTACK_ROOT}/src/classic/sdp_util.c \ 156${BTSTACK_ROOT}/src/classic/spp_server.c \ 157${BTSTACK_ROOT}/src/hci.c \ 158${BTSTACK_ROOT}/src/hci_cmd.c \ 159${BTSTACK_ROOT}/src/hci_dump.c \ 160${BTSTACK_ROOT}/src/hci_transport_h4.c \ 161${BTSTACK_ROOT}/src/l2cap.c \ 162${BTSTACK_ROOT}/src/l2cap_signaling.c \ 163${BTSTACK_ROOT}/platform/embedded/btstack_run_loop_embedded.c \ 164${BTSTACK_ROOT}/platform/embedded/btstack_stdin_embedded.c \ 165${BTSTACK_ROOT}/platform/embedded/btstack_tlv_flash_bank.c \ 166${BTSTACK_ROOT}/platform/embedded/btstack_uart_block_embedded.c \ 167${BTSTACK_ROOT}/platform/embedded/hci_dump_embedded_stdout.c \ 168${BTSTACK_ROOT}/platform/embedded/hci_dump_segger_rtt_stdout.c \ 169${BTSTACK_ROOT}/platform/lwip/port/sys_arch.c \ 170${BTSTACK_ROOT}/platform/lwip/bnep_lwip.c \ 171 172# CC2564B 173# - BOOST-CC2564MODA 174# - EM Wireless BoosterPacket with CC2564B module 175# INIT_SCRIPT = bluetooth_init_cc2564B_1.8_BT_Spec_4.1 176 177# CC2564C 178# - EM Wireless BoosterPacket with CC2564C module 179INIT_SCRIPT = bluetooth_init_cc2564C_1.4 180 181PORT_SOURCES = \ 182 ${BTSTACK_ROOT}/chipset/cc256x/${INIT_SCRIPT}.o \ 183 ${BTSTACK_ROOT}/chipset/cc256x/btstack_chipset_cc256x.o \ 184 hal_flash_bank_msp432.o \ 185 main.o \ 186 startup_msp432p401r_${COMPILER}.o \ 187 system_msp432p401r.o \ 188 189include ${BTSTACK_ROOT}/3rd-party/bluedroid/decoder/Makefile.inc 190include ${BTSTACK_ROOT}/3rd-party/bluedroid/encoder/Makefile.inc 191 192BTSTACK_SOURCES += ${SBC_ENCODER} 193BTSTACK_SOURCES += ${SBC_DECODER} 194 195EXAMPLES = \ 196 a2dp_source_demo \ 197 ancs_client_demo \ 198 dut_mode_classic \ 199 gap_dedicated_bonding \ 200 gap_inquiry \ 201 gap_le_advertisements \ 202 gatt_battery_query \ 203 gatt_browser \ 204 gatt_counter \ 205 gatt_streamer_server \ 206 hid_host_demo \ 207 hid_keyboard_demo \ 208 hid_mouse_demo \ 209 hog_keyboard_demo \ 210 hog_mouse_demo \ 211 le_streamer_client \ 212 led_counter \ 213 sdp_bnep_query \ 214 sdp_general_query \ 215 sdp_rfcomm_query \ 216 sm_pairing_central \ 217 sm_pairing_peripheral \ 218 spp_and_gatt_counter \ 219 spp_and_gatt_streamer \ 220 spp_counter \ 221 spp_streamer \ 222 spp_streamer_client \ 223 pbap_client_demo \ 224 pan_lwip_http_server \ 225# audio_duplex \ 226# a2dp_sink_demo \ 227# hfp_ag_demo \ 228# hfp_hf_demo \ 229# hsp_ag_demo \ 230# hsp_hs_demo \ 231# mod_player \ 232# sine_player \ 233 234GATT_FILES = \ 235 ancs_client_demo.gatt \ 236 gatt_counter.gatt \ 237 gatt_streamer_server.gatt \ 238 gatt_browser.gatt \ 239 gatt_battery_query.gatt \ 240 hog_keyboard_demo.gatt \ 241 hog_mouse_demo.gatt \ 242 sm_pairing_peripheral.gatt \ 243 sm_pairing_central.gatt \ 244 spp_and_gatt_counter.gatt \ 245 spp_and_gatt_streamer.gatt \ 246 247 248# 249# The default rule, which causes the le_counter example to be built. 250# 251all: ${COMPILER} 252all: \ 253 linker_script_gcc.ld \ 254 $(addprefix $(COMPILER)/,$(GATT_FILES:.gatt=.h)) \ 255 $(addprefix $(COMPILER)/,$(EXAMPLES:=.elf)) \ 256 $(addprefix $(COMPILER)/,$(EXAMPLES:=.jdebug)) \ 257 258include $(BTSTACK_ROOT)/chipset/cc256x/Makefile.inc 259 260# 261# The rule to clean out all the build products. 262# 263clean: 264 @rm -rf ${COMPILER} ${wildcard *~} 265 266# 267# The rule to create the target directory. 268# 269${COMPILER}: 270 @mkdir -p ${COMPILER} 271 272# compile .gatt descriptions 273${COMPILER}/%.h: %.gatt 274 python ${BTSTACK_ROOT}/tool/compile_gatt.py $< $@ 275 276$(COMPILER)/%.jdebug: ozone.jdebug | $(COMPILER) 277 sed -e "s|EXAMPLE|$(basename $(notdir $@))|" $< > $@ 278 279## 280 281# pick up sources 282C_SOURCES = $(BTSTACK_SOURCES) $(PORT_SOURCES) 283OBJECTS = $(addprefix $(COMPILER)/,$(notdir $(C_SOURCES:.c=.o))) 284vpath %.c $(sort $(dir $(C_SOURCES))) 285 286LDFLAGS2 = ${CPU} ${FPU} -specs=nano.specs -lc -lm -lnosys -Wl,--gc-sections 287 288# # 289# # The rule for linking the application. 290# # 291${COMPILER}${SUFFIX}/%.elf: ${OBJECTS} ${COMPILER}/%.o ti/devices/msp432p4xx/driverlib/${COMPILER}/msp432p4xx_driverlib.a 292 @ \ 293 ldname="linker_script_gcc.ld"; \ 294 if [ 'x${VERBOSE}' = x ]; \ 295 then \ 296 echo " LD ${@} ${LNK_SCP}"; \ 297 else \ 298 echo ${CC} -T linker_script_gcc.ld ${LDFLAGS2} -o ${@} $(filter %.o %.a, ${^}); \ 299 fi; \ 300 ${CC} -T linker_script_gcc.ld ${LDFLAGS2} -o ${@} $(filter %.o %.a, ${^}) 301 @${OBJCOPY} -O binary ${@} ${@:.elf=.bin} 302 303# 304# Include the automatically generated dependency files. 305# 306ifneq (${MAKECMDGOALS},clean) 307-include ${wildcard ${COMPILER}/*.d} __dummy__ 308endif 309