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