btstack/port/stm32-f103rb-nucleo/Makefile

88 lines
2.1 KiB
Makefile
Raw Normal View History

2014-09-28 20:48:04 +00:00
#
# Makefile for STM32-F103RB Nucleo board with CC256x Bluetooth modules
#
2014-09-29 21:08:37 +00:00
# BINARY=led_counter
BINARY=spp_and_le_counter
2014-09-28 20:48:04 +00:00
OPENCM3_DIR = libopencm3
LDSCRIPT = stm32f1-nucleo.ld
BTSTACK_ROOT = ../..
VPATH = $(BTSTACK_ROOT)/example
VPATH += $(BTSTACK_ROOT)/src
2015-11-13 14:04:41 +00:00
VPATH += $(BTSTACK_ROOT)/src/ble
VPATH += $(BTSTACK_ROOT)/src/classic
VPATH += $(BTSTACK_ROOT)/platform/embedded
VPATH += $(BTSTACK_ROOT)/chipset/cc256x
2014-09-28 20:48:04 +00:00
2015-11-13 14:04:41 +00:00
CORE = \
2016-03-07 16:42:57 +00:00
main.c \
btstack_linked_list.c \
btstack_memory.c \
btstack_memory_pool.c \
btstack_run_loop.c \
btstack_run_loop_embedded.c \
2014-09-28 20:48:04 +00:00
2014-09-29 21:08:37 +00:00
COMMON = \
2017-05-17 21:22:05 +00:00
ad_parser.c \
bluetooth_init_cc2564B_1.6_BT_Spec_4.1.c \
2016-03-07 16:42:57 +00:00
btstack_chipset_cc256x.c \
btstack_link_key_db_memory.c \
rfcomm.c \
sdp_client_rfcomm.c \
2016-03-07 16:42:57 +00:00
btstack_util.c \
hci.c \
2016-01-21 10:33:17 +00:00
hci_cmd.c \
hci_dump.c \
btstack_uart_block_embedded.c \
hci_transport_h4.c \
l2cap.c \
l2cap_signaling.c \
sdp_client.c \
2016-03-07 16:42:57 +00:00
sdp_server.c \
sdp_util.c \
2016-03-28 09:57:22 +00:00
spp_server.c \
2014-09-29 21:08:37 +00:00
2014-10-02 21:41:29 +00:00
BLE = \
2016-03-07 16:42:57 +00:00
att_db.c \
att_dispatch.c \
att_server.c \
2016-03-07 16:42:57 +00:00
le_device_db_memory.c \
sm.c \
# gatt_client.c \
2014-10-02 21:41:29 +00:00
2014-09-28 20:48:04 +00:00
CORE_OBJ = $(CORE:.c=.o)
2015-11-13 14:04:41 +00:00
COMMON_OBJ = $(COMMON:.c=.o)
BLE_OBJ = $(BLE:.c=.o)
2014-09-28 20:48:04 +00:00
2014-10-04 17:57:35 +00:00
OBJS += $(CORE_OBJ) $(COMMON_OBJ) $(BLE_OBJ)
2014-09-28 20:48:04 +00:00
2015-11-13 14:04:41 +00:00
CFLAGS = -I. \
-I$(BTSTACK_ROOT)/platform/embedded \
-I$(BTSTACK_ROOT)/src \
-I$(BTSTACK_ROOT)/chipset/cc256x
2014-09-28 20:48:04 +00:00
2014-11-06 20:56:45 +00:00
examples: libopencm3/lib/libopencm3_stm32f1.a spp_and_le_counter.h spp_and_le_counter.elf
2014-09-28 20:48:04 +00:00
include libopencm3.stm32f1.mk
# fetch and convert init scripts
include ${BTSTACK_ROOT}/chipset/cc256x/Makefile.inc
2016-01-21 11:03:39 +00:00
clean:
rm -f *.map *.o *.d *.out *.elf *.bin *.hex
distclean: clean
2016-01-21 11:03:39 +00:00
make -C libopencm3 clean
2014-09-28 20:48:04 +00:00
# git clone and compile libopencm3
libopencm3/lib/libopencm3_stm32f1.a:
2016-01-21 20:56:56 +00:00
rm -rf libopencm3
2015-05-06 20:40:52 +00:00
git clone https://github.com/libopencm3/libopencm3.git
2014-09-28 20:48:04 +00:00
make -C libopencm3
2014-10-02 21:41:29 +00:00
# compile GATT database
spp_and_le_counter.h: spp_and_le_counter.gatt
2016-04-10 19:58:19 +00:00
python ${BTSTACK_ROOT}/tool/compile_gatt.py $< $@
2014-10-02 21:41:29 +00:00