btstack/port/stm32-f103rb-nucleo/Makefile

83 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/embedded
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 = \
main.c \
btstack_memory.c \
linked_list.c \
memory_pool.c \
run_loop.c \
run_loop_embedded.c
2014-09-28 20:48:04 +00:00
2014-09-29 21:08:37 +00:00
COMMON = \
bt_control_cc256x.c \
bluetooth_init_cc2564B_1.2_BT_Spec_4.1.c \
hci.c \
hci_cmds.c \
hci_dump.c \
hci_transport_h4_ehcill_dma.c \
l2cap.c \
l2cap_signaling.c \
remote_device_db_memory.c \
rfcomm.c \
sdp.c \
sdp_util.c \
utils.c \
sdp_parser.c \
sdp_client.c \
sdp_query_util.c \
sdp_query_rfcomm.c \
2014-09-29 21:08:37 +00:00
2014-10-02 21:41:29 +00:00
BLE = \
att.c \
att_server.c \
le_device_db_memory.c \
sm.c \
att_dispatch.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
# clean:
# rm -f *.map *.o *.d *.out *.elf *.bin *.hex ../driver/*.o ../../src/*.o ../../ble/*.o ../firmware/*.o ${BTSTACK_ROOT}/chipset/cc256x/*.o ${BTSTACK_ROOT}/src/*.o
2014-09-28 20:48:04 +00:00
# git clone and compile libopencm3
libopencm3/lib/libopencm3_stm32f1.a:
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
2015-11-13 14:04:41 +00:00
python ${BTSTACK_ROOT}/tool/compile-gatt.py $< $@
2014-10-02 21:41:29 +00:00