2011-09-18 07:44:10 +00:00
#
# Makefile for MSP-EXP430F5438 demos with PAN1315, PAN1317, PAN1325, PAN1323, or PAN1327 Bluetooth modules
#
2012-02-04 13:54:41 +00:00
# For the PAN1315/25 modules, please use bluetooth_init_cc2560_2.42.c in COMMON below
2012-11-11 21:28:51 +00:00
# Please check instructions at https://code.google.com/p/btstack/wiki/CC256x on where to download the init scripts and how to convert them to *.c files.
#
2011-09-18 07:44:10 +00:00
# mspgcc is used: http://sourceforge.net/apps/mediawiki/mspgcc/index.php?title=MSPGCC_Wiki
#
BTSTACK_ROOT = ../..
CC = msp430-gcc
2012-11-07 21:34:30 +00:00
CFLAGS = -mmcu= msp430f5438a -Os -Wall -fno-toplevel-reorder -I. -I../src -I../firmware -I${ BTSTACK_ROOT } -I${ BTSTACK_ROOT } /chipset-cc256x -I${ BTSTACK_ROOT } /src -I${ BTSTACK_ROOT } /include
2012-04-22 07:25:36 +00:00
LDFLAGS = -mmcu= msp430f5438a
2011-09-18 07:44:10 +00:00
CORE = \
../src/hal_tick.c \
../src/hal_cpu.c \
../firmware/hal_board.c \
../firmware/hal_compat.c \
../firmware/hal_usb.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 = \
../src/hal_uart_dma.c \
${ BTSTACK_ROOT } /chipset-cc256x/bt_control_cc256x.c \
2013-01-21 14:05:39 +00:00
${ BTSTACK_ROOT } /chipset-cc256x/bluetooth_init_cc2560A_2.1.c \
2011-09-18 07:44:10 +00:00
${ BTSTACK_ROOT } /src/hci.c \
${ BTSTACK_ROOT } /src/hci_cmds.c \
${ BTSTACK_ROOT } /src/hci_dump.c \
2011-09-22 19:37:16 +00:00
${ BTSTACK_ROOT } /src/hci_transport_h4_ehcill_dma.c \
2011-09-18 07:44:10 +00:00
${ 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 \
LCD = ../firmware/hal_lcd.c ../firmware/hal_lcd_fonts.c
CORE_OBJ = $( CORE:.c= .o)
COMMON_OBJ = $( COMMON:.c= .o)
LCD_OBJ = $( LCD:.c= .o)
# create .hex file from .out
%.hex : %.out
msp430-objcopy -O ihex $< $@
# create firmware image from common objects and example source file
2012-11-11 21:28:51 +00:00
all : hid_demo .hex led_counter .hex spp_accel .hex spp_counter .hex spp_flowcontrol .hex gap_inquiry .hex
2011-09-18 07:44:10 +00:00
led_counter.out : ${CORE_OBJ } led_counter .o
${ CC } $^ ${ LDFLAGS } -o $@
hid_demo.out : ${CORE_OBJ } ${COMMON_OBJ } ${LCD_OBJ } hid_demo .o
${ CC } $^ ${ LDFLAGS } -o $@
spp_accel.out : ${CORE_OBJ } ${COMMON_OBJ } ${LCD_OBJ } spp_accel .o ../firmware /hal_adc .o
${ CC } $^ ${ LDFLAGS } -o $@
2011-10-02 13:23:01 +00:00
spp_counter.out : ${CORE_OBJ } ${COMMON_OBJ } spp_counter .o ../firmware /hal_adc .o
2011-09-18 07:44:10 +00:00
${ CC } $^ ${ LDFLAGS } -o $@
spp_flowcontrol.out : ${CORE_OBJ } ${COMMON_OBJ } ${LCD_OBJ } spp_flowcontrol .o ../firmware /hal_adc .o
${ CC } $^ ${ LDFLAGS } -o $@
2012-11-11 21:28:51 +00:00
gap_inquiry.out : ${CORE_OBJ } ${COMMON_OBJ } ${LCD_OBJ } gap_inquiry .o ../firmware /hal_adc .o
${ CC } $^ ${ LDFLAGS } -o $@
2011-09-18 07:44:10 +00:00
clean :
2012-02-04 13:54:41 +00:00
rm -f $ *.o *.out *.hex ../driver/*.o ../../src/*.o ../src/*.o ../firmware/*.o ${ BTSTACK_ROOT } /chipset-cc256x/*.o ${ BTSTACK_ROOT } /src/*.o
2011-09-18 07:44:10 +00:00
size : all
msp430-size ../firmware/*.o
msp430-size ../src/*.o
msp430-size ${ BTSTACK_ROOT } /chipset-cc256x/*.o
msp430-size ${ BTSTACK_ROOT } /src/*.o
msp430-size *.o
msp430-size *.out