mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-25 09:35:42 +00:00
60 lines
1.9 KiB
Makefile
60 lines
1.9 KiB
Makefile
#
|
|
# Makefile for STM32-F103RB Nucleo board with CC256x Bluetooth modules
|
|
#
|
|
|
|
# BINARY=led_counter
|
|
BINARY=gap_inquiry
|
|
OPENCM3_DIR = libopencm3
|
|
LDSCRIPT = stm32f1-nucleo.ld
|
|
|
|
BTSTACK_ROOT = ../..
|
|
|
|
CORE = \
|
|
main.c \
|
|
${BTSTACK_ROOT}/src/btstack_memory.c \
|
|
${BTSTACK_ROOT}/src/linked_list.c \
|
|
${BTSTACK_ROOT}/src/memory_pool.c \
|
|
${BTSTACK_ROOT}/src/run_loop.c \
|
|
${BTSTACK_ROOT}/src/run_loop_embedded.c
|
|
|
|
COMMON = \
|
|
${BTSTACK_ROOT}/chipset-cc256x/bt_control_cc256x.c \
|
|
${BTSTACK_ROOT}/chipset-cc256x/bluetooth_init_cc2560B_1.0_BT_Spec_4.1.c \
|
|
${BTSTACK_ROOT}/src/hci.c \
|
|
${BTSTACK_ROOT}/src/hci_cmds.c \
|
|
${BTSTACK_ROOT}/src/hci_dump.c \
|
|
${BTSTACK_ROOT}/src/hci_transport_h4_ehcill_dma.c \
|
|
${BTSTACK_ROOT}/src/l2cap.c \
|
|
${BTSTACK_ROOT}/src/l2cap_signaling.c \
|
|
${BTSTACK_ROOT}/src/remote_device_db_memory.c \
|
|
${BTSTACK_ROOT}/src/rfcomm.c \
|
|
${BTSTACK_ROOT}/src/sdp.c \
|
|
${BTSTACK_ROOT}/src/sdp_util.c \
|
|
${BTSTACK_ROOT}/src/utils.c \
|
|
${BTSTACK_ROOT}/src/sdp_parser.c \
|
|
${BTSTACK_ROOT}/src/sdp_client.c \
|
|
${BTSTACK_ROOT}/src/sdp_query_util.c \
|
|
${BTSTACK_ROOT}/src/sdp_query_rfcomm.c \
|
|
|
|
CORE_OBJ = $(CORE:.c=.o)
|
|
COMMON_OBJ = $(COMMON:.c=.o)
|
|
|
|
OBJS += $(CORE_OBJ) $(COMMON_OBJ)
|
|
|
|
CFLAGS = -I. -I$(BTSTACK_ROOT)/include -I$(BTSTACK_ROOT)/src -I$(BTSTACK_ROOT)/chipset-cc256x
|
|
|
|
examples: libopencm3/lib/libopencm3_stm32f1.a $(BINARY).elf
|
|
|
|
include libopencm3.stm32f1.mk
|
|
|
|
clean:
|
|
rm -f *.map *.o *.d *.out *.elf *.bin *.hex ../driver/*.o ../../src/*.o ../src/*.o ../firmware/*.o ${BTSTACK_ROOT}/chipset-cc256x/*.o ${BTSTACK_ROOT}/src/*.o
|
|
|
|
# git clone and compile libopencm3
|
|
libopencm3/lib/libopencm3_stm32f1.a:
|
|
git clone git@github.com:libopencm3/libopencm3.git
|
|
make -C libopencm3
|
|
|
|
my_flash: $(BINARY).bin
|
|
st-flash write $(BINARY).bin 0x8000000
|