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