mbed-scli test program
Diff: Makefile
- Revision:
- 6:7915b5819364
- Parent:
- 5:c3524dc89507
- Child:
- 8:f1c7a11d0670
--- a/Makefile Tue Feb 28 22:12:26 2017 +0900 +++ b/Makefile Sat Mar 04 14:46:27 2017 +0900 @@ -1,7 +1,6 @@ # # Super light weight command line compile script using mbed-sdk sources. -# v0.7 -# 2017/02 made by dinau +# v0.8 # 2017/03 made by dinau # ########################## @@ -16,8 +15,11 @@ # $ make TC=uARM # Write *.bin file to target board. # $ make f +# Clean only application object files +# $ make c # Clean all object files and rebuild target. -# $ make c +# $ make ca +# # Example, it can be used any combination on command line. # $ make c f TARGET=NUCLEO_L152RE TC=uARM # @@ -27,9 +29,9 @@ # Defalut setting. # These are must be changed according to your environment. ########################## -#TARGET ?= NUCLEO_F030R8 +TARGET ?= NUCLEO_F030R8 #TARGET ?= NUCLEO_L152RE -TARGET ?= NUCLEO_F411RE +#TARGET ?= NUCLEO_F411RE # GCC_ARM or uARM or ARM TC ?= GCC_ARM @@ -38,15 +40,16 @@ MBED_DRIVE = /g # Specify mbed root folder: [ "absolute path" or "relative path" ] -MBED_ROOT = /d/mbed-os +MBED_ROOT = c:/mbed-os # Specify [ "default" or "debug" or "small" ] -#PROFILE = --profile default +#PROFILE = --profile ${MBED_ROOT}/tools/profiles/release.json +#PROFILE = --profile ${MBED_ROOT}/tools/profiles/small.json # Verbose display -#ifeq (${v},1) -#VERBOSE = -v -#endif +ifeq (${v},1) +VERBOSE = -v +endif ########################## # Fixed setting. @@ -65,18 +68,21 @@ # Make target ########################## all: + @echo ${MBED_ROOT} > mbed-root.txt 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 lib lst list +.PHONY: c ca cm f lib lst list rev +# clean only local c: rm -fr ${BUILD_DIR} -# clean and make -ca: - rm -fr ${BUILD_DIR} - python ${MBED_ROOT}/tools/build.py -j4 ${COMFLAG} ${RTOS} -c - python ${MBED_ROOT}/tools/make.py ${COMFLAG} ${PROG_NAME} --build ${BUILD_DIR} --source . -c +# clean all and make +cm: + rm -fr ${MBED_ROOT}/BUILD/* + rm -fr ${MBED_ROOT}/.build/* + +ca: cm all # copy to mbed drive f: all @@ -86,7 +92,11 @@ lib: @python makelib.py +# list lst: list list: @arm-none-eabi-objdump -Sdh ${BUILD_DIR}/${notdir ${CURDIR}}.elf > ${TARGET}-${TC}.lst +rev: + @grep "e MBED_LIBRARY_VERSION" ${MBED_ROOT}/mbed.h +