Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Port tags to know which system we are making #282

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion example/Makefile.inc
Original file line number Diff line number Diff line change
Expand Up @@ -428,9 +428,20 @@ ublox_spp_le_counter: ublox_spp_le_counter.h ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ
mesh_node_demo: mesh_node_demo.h ${CORE_OBJ} ${COMMON_OBJ} ${MESH_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} ${SM_OBJ} mesh_node_demo.o
${CC} $(filter-out mesh_node_demo.h,$^) ${CFLAGS} ${LDFLAGS} -o $@

ifdef BTSTACK_SYSTEM
ifeq ($(BTSTACK_SYSTEM),LIBUSB)
$(info Making for linux...)
endif
ifeq ($(BTSTACK_SYSTEM),RASPI)
$(info Making for raspberry pi...)
endif
else
$(warning BTSTACK_SYSTEM not defined!)
endif

clean:
rm -f ${EXAMPLES} ${EXAMPLES_GATT_H_FILES}
rm -f *.o *.out *.hex *.exe *.wav *.sbc
rm -f *.o *.out *.hex *.exe *.wav *.sbc
rm -rf *.dSYM
rm -rf ${BTSTACK_ROOT}/src/*.o
rm -rf ${BTSTACK_ROOT}/src/ble/*.o
Expand Down
17 changes: 9 additions & 8 deletions port/ez430-rf2560/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ CC2564B = bluetooth_init_cc2564B_1.6_BT_Spec_4.1.o
CC2567 = CC256x_BT_Service_Pack_2.8_ANT_1.16.o

BTSTACK_ROOT ?= ../..
BTSTACK_SYSTEM ?= EZ430_RF2560
VPATH += example
VPATH += firmware
VPATH += src
Expand Down Expand Up @@ -83,7 +84,7 @@ BLE = \

LCD = hal_lcd.c hal_lcd_fonts.c


CORE_OBJ = $(CORE:.c=.o)
COMMON_OBJ = $(COMMON:.c=.o)
SPP_OBJ = $(SPP:.c=.o)
Expand All @@ -92,7 +93,7 @@ LCD_OBJ = $(LCD:.c=.o)

# create .hex file from .out
%.hex: %.out
msp430-objcopy -O ihex $< $@
msp430-objcopy -O ihex $< $@

# create firmware image from common objects and example source file

Expand All @@ -103,18 +104,18 @@ include ${BTSTACK_ROOT}/chipset/cc256x/Makefile.inc

# compiling requires a 20-bit mspgcc version
# spp_and_gatt_counter.hex spp_accel.hex spp_flowcontrol.hex spp_counter.hex
# sdp_rfcomm_query.hex sdp_general_query.hex
# gap_inquiry.hex
# sdp_rfcomm_query.hex sdp_general_query.hex
# gap_inquiry.hex

# compiling ant-test requires special ant init script
# ant-test.hex

# compile GATT database
%.h: %.gatt
python ${BTSTACK_ROOT}/tool/compile_gatt.py $< $@
python ${BTSTACK_ROOT}/tool/compile_gatt.py $< $@


led_counter.out: ${CORE_OBJ} ${COMMON_OBJ} ${CC2560B} led_counter.o
led_counter.out: ${CORE_OBJ} ${COMMON_OBJ} ${CC2560B} led_counter.o
${CC} $^ ${LDFLAGS} -o $@

ant-test.out: ${CORE_OBJ} ${COMMON_OBJ} ${SPP_OBJ} profile.h sdp_server.o ant_cmds.o ${CC2567} ant-test.o
Expand All @@ -123,7 +124,7 @@ ant-test.out: ${CORE_OBJ} ${COMMON_OBJ} ${SPP_OBJ} profile.h sdp_server.o ant_cm
ble_server.out: ${CORE_OBJ} ${COMMON_OBJ} ${BLE_OBJ} ${LCD_OBJ} profile.h ble_server.o
${CC} $^ ${LDFLAGS} -o $@

hid_demo.out: ${CORE_OBJ} ${COMMON_OBJ} ${LCD_OBJ} ${SPP_OBJ} ${CC2560B} hid_demo.o
hid_demo.out: ${CORE_OBJ} ${COMMON_OBJ} ${LCD_OBJ} ${SPP_OBJ} ${CC2560B} hid_demo.o
${CC} $^ ${LDFLAGS} -o $@

spp_accel.out: ${CORE_OBJ} ${COMMON_OBJ} ${SPP_OBJ} ${CC2560B} spp_accel.o sdp_server.o hal_adc.o
Expand Down Expand Up @@ -152,4 +153,4 @@ clean:

size: all
msp430-size *.o
msp430-size *.out
msp430-size *.out
2 changes: 1 addition & 1 deletion port/libusb-intel/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Makefile for libusb based examples
BTSTACK_ROOT ?= ../..
BTSTACK_SYSTEM ?= LIBUSB_INTEL

CORE += main.c btstack_stdin_posix.c btstack_tlv_posix.c

Expand Down Expand Up @@ -54,4 +55,3 @@ clean_src:
rm -rf * ${BTSTACK_ROOT}/platform/embedded/*.o

all: all-intel ${EXAMPLES}

2 changes: 1 addition & 1 deletion port/libusb/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Makefile for libusb based examples
BTSTACK_ROOT ?= ../..
BTSTACK_SYSTEM ?= LIBUSB

CORE += main.c btstack_stdin_posix.c btstack_tlv_posix.c

Expand Down Expand Up @@ -57,4 +58,3 @@ clean_src:
rm -rf * ${BTSTACK_ROOT}/platform/embedded/*.o

all: ${EXAMPLES}

29 changes: 15 additions & 14 deletions port/msp-exp430f5438-cc2564b/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ CC2564B = bluetooth_init_cc2564B_1.8_BT_Spec_4.1.o
CC2567 = CC256x_BT_Service_Pack_2.8_ANT_1.16.o

BTSTACK_ROOT ?= ../..
BTSTACK_SYSTEM ?= MSP_EXP430F5438_CC2564B
VPATH += example
VPATH += firmware
VPATH += src
Expand Down Expand Up @@ -83,7 +84,7 @@ BLE = \

LCD = hal_lcd.c hal_lcd_fonts.c


CORE_OBJ = $(CORE:.c=.o)
COMMON_OBJ = $(COMMON:.c=.o)
SPP_OBJ = $(SPP:.c=.o)
Expand All @@ -92,7 +93,7 @@ LCD_OBJ = $(LCD:.c=.o)

# create .hex file from .out
%.hex: %.out
msp430-objcopy -O ihex $< $@
msp430-objcopy -O ihex $< $@

# create firmware image from common objects and example source file

Expand All @@ -102,25 +103,25 @@ all: led_counter.hex
include ${BTSTACK_ROOT}/chipset/cc256x/Makefile.inc

# compiling requires a 20-bit mspgcc version
# hid_demo.hex
# hid_demo.hex
# spp_and_gatt_counter.hex
# spp_accel.hex
# ble_server.hex
# spp_counter.hex
# spp_flowcontrol.hex
# spp_flowcontrol.hex
# sdp_rfcomm_query.hex
# sdp_general_query.hex
# sdp_general_query.hex
# gap_inquiry.hex

# compiling ant-test requires special ant init script
# ant-test.hex

# compile GATT database
%.h: %.gatt
python ${BTSTACK_ROOT}/tool/compile_gatt.py $< $@
python ${BTSTACK_ROOT}/tool/compile_gatt.py $< $@


led_counter.out: ${CORE_OBJ} ${COMMON_OBJ} ${CC2560B} led_counter.o
led_counter.out: ${CORE_OBJ} ${COMMON_OBJ} ${CC2560B} led_counter.o
${CC} $^ ${LDFLAGS} -o $@

ant-test.out: ${CORE_OBJ} ${COMMON_OBJ} ${SPP_OBJ} profile.h sdp_server.o ant_cmds.o ${CC2567} ant-test.o
Expand All @@ -129,25 +130,25 @@ ant-test.out: ${CORE_OBJ} ${COMMON_OBJ} ${SPP_OBJ} profile.h sdp_server.o ant_cm
ble_server.out: ${CORE_OBJ} ${COMMON_OBJ} ${BLE_OBJ} ${LCD_OBJ} profile.h ble_server.o
${CC} $^ ${LDFLAGS} -o $@

hid_demo.out: ${CORE_OBJ} ${COMMON_OBJ} ${LCD_OBJ} ${SPP_OBJ} ${CC2560B} hid_demo.o
hid_demo.out: ${CORE_OBJ} ${COMMON_OBJ} ${LCD_OBJ} ${SPP_OBJ} ${CC2560B} hid_demo.o
${CC} $^ ${LDFLAGS} -o $@

spp_accel.out: ${CORE_OBJ} ${COMMON_OBJ} ${SPP_OBJ} ${CC2560B} spp_accel.o sdp_server.o hal_adc.o
${CC} $^ ${LDFLAGS} -o $@

spp_and_gatt_counter.out: ${CORE_OBJ} ${COMMON_OBJ} ${SPP_OBJ} ${BLE_OBJ} spp_and_gatt_counter.h spp_and_gatt_counter.o sdp_server.o
spp_and_gatt_counter.out: ${CORE_OBJ} ${COMMON_OBJ} ${SPP_OBJ} ${BLE_OBJ} spp_and_gatt_counter.h spp_and_gatt_counter.o sdp_server.o
${CC} $^ ${LDFLAGS} -o $@

spp_counter.out: ${CORE_OBJ} ${COMMON_OBJ} ${SPP_OBJ} ${CC2560B} spp_counter.o sdp_server.o
spp_counter.out: ${CORE_OBJ} ${COMMON_OBJ} ${SPP_OBJ} ${CC2560B} spp_counter.o sdp_server.o
${CC} $^ ${LDFLAGS} -o $@

spp_flowcontrol.out: ${CORE_OBJ} ${COMMON_OBJ} ${SPP_OBJ} ${CC2560B} spp_flowcontrol.o sdp_server.o
spp_flowcontrol.out: ${CORE_OBJ} ${COMMON_OBJ} ${SPP_OBJ} ${CC2560B} spp_flowcontrol.o sdp_server.o
${CC} $^ ${LDFLAGS} -o $@

gap_inquiry.out: ${CORE_OBJ} ${COMMON_OBJ} ${SPP_OBJ} ${CC2560B} ad_parser.o gap_inquiry.o
gap_inquiry.out: ${CORE_OBJ} ${COMMON_OBJ} ${SPP_OBJ} ${CC2560B} ad_parser.o gap_inquiry.o
${CC} $^ ${LDFLAGS} -o $@

sdp_rfcomm_query.out: ${CORE_OBJ} ${COMMON_OBJ} ${SPP_OBJ} ${SDP_CLIENT} ${CC2560B} sdp_rfcomm_query.o
sdp_rfcomm_query.out: ${CORE_OBJ} ${COMMON_OBJ} ${SPP_OBJ} ${SDP_CLIENT} ${CC2560B} sdp_rfcomm_query.o
${CC} $^ ${LDFLAGS} -o $@

sdp_general_query.out: ${CORE_OBJ} ${COMMON_OBJ} ${SPP_OBJ} ${SDP_CLIENT} ${CC2560B} sdp_general_query.o
Expand All @@ -158,4 +159,4 @@ clean:

size: all
msp430-size *.o
msp430-size *.out
msp430-size *.out
14 changes: 7 additions & 7 deletions port/msp430f5229lp-cc2564b/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ CC2564B = bluetooth_init_cc2564B_1.8_BT_Spec_4.1.o
CC2567 = CC256x_BT_Service_Pack_2.8_ANT_1.16.o

BTSTACK_ROOT ?= ../..
BTSTACK_SYSTEM ?= MSP430F5229LP_CC2564B
VPATH += example
VPATH += firmware
VPATH += src
Expand Down Expand Up @@ -86,20 +87,20 @@ BLE = \

LCD = hal_lcd.c hal_lcd_fonts.c


CORE_OBJ = $(CORE:.c=.o)
COMMON_OBJ = $(COMMON:.c=.o)
SPP_OBJ = $(SPP:.c=.o)
BLE_OBJ = $(BLE:.c=.o)

# create .hex file from .out
%.hex: %.out
msp430-objcopy -O ihex $< $@
msp430-objcopy -O ihex $< $@

# create firmware image from common objects and example source file

all: led_counter.hex spp_counter.hex gap_inquiry.hex spp_flowcontrol.hex \
sdp_rfcomm_query.hex sdp_general_query.hex
sdp_rfcomm_query.hex sdp_general_query.hex
# ble_server.hex

# fetch and convert init scripts
Expand All @@ -113,10 +114,10 @@ include ${BTSTACK_ROOT}/chipset/cc256x/Makefile.inc

# compile GATT database
%.h: %.gatt
python ${BTSTACK_ROOT}/tool/compile_gatt.py $< $@
python ${BTSTACK_ROOT}/tool/compile_gatt.py $< $@


led_counter.out: ${CORE_OBJ} ${COMMON_OBJ} ${CC2560B} led_counter.o
led_counter.out: ${CORE_OBJ} ${COMMON_OBJ} ${CC2560B} led_counter.o
${CC} $^ ${LDFLAGS} -o $@

ant-test.out: ${CORE_OBJ} ${COMMON_OBJ} ${SPP_OBJ} profile.h ant_cmds.o ${CC2567} ant-test.o
Expand Down Expand Up @@ -148,8 +149,7 @@ clean:

size: all
msp430-size *.o
msp430-size *.out
msp430-size *.out

%.flash: %.hex
mspdebug tilib --force-reset "prog $^"

9 changes: 5 additions & 4 deletions port/mtk/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ CFLAGS = -march=armv7-a -mfloat-abi=softfp -I$(SYSROOT)/usr/include -fpie -fpic
LDFLAGS = -Wl,--fix-cortex-a8 -L$(SYSROOT)/usr/lib -fpie -fpic -fPIE -pie

BTSTACK_ROOT ?= ../..
BTSTACK_SYSTEM ?= MTK

CFLAGS += -I$(BTSTACK_ROOT)/include
CFLAGS += -I$(BTSTACK_ROOT)/src/
Expand Down Expand Up @@ -87,10 +88,10 @@ libbluetoothdrv.so: bluetoothdrv_stub.o
install:
./installer.sh

run:
run:
$(ADB) shell le_scan

shell:
shell:
$(ADB) shell

version:
Expand Down Expand Up @@ -119,10 +120,10 @@ le_scan: le_scan.o
# minimal_peripheral: minimal_peripheral.o
# $(GCC) $(LDFLAGS) libs/libbluetoothdrv.so -o $@ minimal_peripheral.o

hci_dump:
hci_dump:
killall PacketLogger
$(ADB) shell su root chmod 666 /data/btstack/hci_dump.pklg
$(ADB) pull /data/btstack/hci_dump.pklg 2> /dev/null
open hci_dump.pklg

log: hci_dump
Empty file modified port/nrf5x/pca10028/armgcc/Makefile
100755 → 100644
Empty file.
1 change: 1 addition & 0 deletions port/posix-h4-atwilc3000/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Makefile for libusb based examples
BTSTACK_ROOT ?= ../..
BTSTACK_SYSTEM ?= POSIX_H4_ATWILC3000

CORE += \
btstack_chipset_atwilc3000.c \
Expand Down
2 changes: 1 addition & 1 deletion port/posix-h4-da14581/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Makefile for libusb based examples
BTSTACK_ROOT ?= ../..
BTSTACK_SYSTEM ?= POSIX_H4_DA14581

CORE += \
btstack_chipset_da14581.c \
Expand Down Expand Up @@ -28,4 +29,3 @@ VPATH += ${BTSTACK_ROOT}/chipset/da14581
EXAMPLES = ${EXAMPLES_GENERAL} ${EXAMPLES_LE_ONLY}

all: ${EXAMPLES}

2 changes: 1 addition & 1 deletion port/posix-h4-da14585/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Makefile for libusb based examples
BTSTACK_ROOT ?= ../..
BTSTACK_SYSTEM ?= POSIX_H4_DA14585

CORE += \
btstack_chipset_da14581.c \
Expand Down Expand Up @@ -28,4 +29,3 @@ VPATH += ${BTSTACK_ROOT}/chipset/da14581
EXAMPLES = ${EXAMPLES_GENERAL} ${EXAMPLES_LE_ONLY}

all: ${EXAMPLES}

4 changes: 2 additions & 2 deletions port/posix-h4-zephyr/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Makefile for posix-h4 based examples
BTSTACK_ROOT ?= ../..
BTSTACK_SYSTEM ?= POSIX_H4_ZEPHYR

CORE += \
btstack_run_loop_posix.c \
Expand All @@ -19,10 +20,9 @@ CFLAGS += -g -Wall -Werror \
-I$(BTSTACK_ROOT)/platform/posix \
-I$(BTSTACK_ROOT)/chipset/zephyr \
-I${BTSTACK_ROOT}/3rd-party/tinydir

VPATH += ${BTSTACK_ROOT}/platform/posix
VPATH += ${BTSTACK_ROOT}/platform/embedded
VPATH += ${BTSTACK_ROOT}/chipset/zephyr

all: ${EXAMPLES_LE_ONLY}

4 changes: 2 additions & 2 deletions port/posix-h4/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Makefile for libusb based examples
BTSTACK_ROOT ?= ../..
BTSTACK_SYSTEM ?= POSIX_H4

CORE += \
bluetooth_init_cc2564B_1.8_BT_Spec_4.1.c \
Expand Down Expand Up @@ -51,7 +52,7 @@ VPATH += ${BTSTACK_ROOT}/3rd-party/rijndael
VPATH += ${BTSTACK_ROOT}/platform/posix
VPATH += ${BTSTACK_ROOT}/platform/embedded

VPATH += ${BTSTACK_ROOT}/chipset/bcm
VPATH += ${BTSTACK_ROOT}/chipset/bcm
VPATH += ${BTSTACK_ROOT}/chipset/cc256x
VPATH += ${BTSTACK_ROOT}/chipset/csr
VPATH += ${BTSTACK_ROOT}/chipset/em9301
Expand All @@ -69,4 +70,3 @@ EXAMPLES += pan_lwip_http_server
# LDFLAGS += -L/sw/lib -lportaudio -Wl,-framework,CoreAudio -Wl,-framework,AudioToolbox -Wl,-framework,AudioUnit -Wl,-framework,Carbon

all: BCM43430A1.hcd ${EXAMPLES}

3 changes: 2 additions & 1 deletion port/posix-h5-bcm/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Makefile for libusb based examples
BTSTACK_ROOT ?= ../..
BTSTACK_SYSTEM ?= POSIX_H5_BCM

CORE += \
btstack_chipset_bcm.c \
Expand Down Expand Up @@ -34,7 +35,7 @@ VPATH += ${BTSTACK_ROOT}/3rd-party/rijndael
VPATH += ${BTSTACK_ROOT}/platform/posix
VPATH += ${BTSTACK_ROOT}/platform/embedded

VPATH += ${BTSTACK_ROOT}/chipset/bcm
VPATH += ${BTSTACK_ROOT}/chipset/bcm

EXAMPLES = ${EXAMPLES_GENERAL} ${EXAMPLES_CLASSIC_ONLY} ${EXAMPLES_LE_ONLY} ${EXAMPLES_DUAL_MODE}
EXAMPLES += pan_lwip_http_server
Expand Down
1 change: 1 addition & 0 deletions port/posix-h5/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Makefile for libusb based examples
BTSTACK_ROOT ?= ../..
BTSTACK_SYSTEM ?= POSIX_H5

CORE += \
bluetooth_init_cc2564B_1.8_BT_Spec_4.1.c \
Expand Down
Loading