DirectSPI test program

Dependencies:   DirectSPI mbed

Revision:
7:84a0a208ebb2
Parent:
5:691576127698
Child:
8:e11a0361f57f
--- a/Makefile	Sat Feb 25 01:24:22 2017 +0900
+++ b/Makefile	Sat Feb 25 16:00:52 2017 +0900
@@ -1,10 +1,31 @@
-# 
+#
 # Super light weight command line compile script using mbed-sdk sources.
+# v0.3
 # 2017/02 made by dinau
 #
 
 ##########################
-# Defalut setting. These are must be changed according to your environment.
+# Usage
+##########################
+# First, download the dependency libraries from web.
+#	$ make lib
+# Simple build with default settings.
+#	$ make
+# It can be changed to other target or toolchain on command line if necessary.
+# 	$ make TARGET=NUCLEO_F411RE
+# 	$ make TC=uARM
+# Write *.bin file to target board.
+# 	$ make f
+# Clean all object files and rebuild target.
+# 	$ make c
+# Example, it can be used any combination on command line.
+# 	$ make c f TARGET=NUCLEO_L152RE TC=uARM
+#
+
+
+##########################
+# Defalut setting.
+# These are must be changed according to your environment.
 ##########################
 TARGET		?= NUCLEO_F030R8
 
@@ -14,11 +35,11 @@
 # Specify mbed flash drive
 MBED_DRIVE	= /g
 
-# Specify mbed root folder
-MBED_ROOT	= ../../mbed-sdk
+# Specify mbed root folder: [ "absolute path" or "relative path" ]
+MBED_ROOT	= /d/mbed-os
 
 # Specify [ "default" or "debug" or "small" ]
-PROFILE		= small
+PROFILE		= --profile default
 
 # Verbose display
 #VERBOSE		= -v
@@ -33,14 +54,17 @@
 MACROS		= "-D NDEBUG=1"
 #CFLAGS		= "--cflags NDEBUG=1"
 BUILD_DIR	= .build/${TARGET}/${TC}
-COMFLAG		= --color -m ${TARGET} -t ${TC} ${VERBOSE} --profile ${PROFILE}
+COMFLAG		= --color -m ${TARGET} -t ${TC} ${VERBOSE} ${PROFILE}
 PROG_NAME	= -n ${PROG}
 
+##########################
+# Make target
+##########################
 all:
 	python ${MBED_ROOT}/tools/build.py -j4 ${COMFLAG} ${RTOS}
 	python ${MBED_ROOT}/tools/make.py  ${COMFLAG} ${PROG_NAME} --build ${BUILD_DIR} --source .
 
-.PHONY: c f
+.PHONY: c f lib
 # clean and make
 c:
 	rm -fr ${BUILD_DIR}
@@ -51,3 +75,6 @@
 f: all
 	cp ${BUILD_DIR}/${notdir ${CURDIR}}.bin ${MBED_DRIVE}
 
+# get dependency libraries from web site.
+lib:
+	@python lib.py