mbed-scli test program
Makefile
- Committer:
- mimi3
- Date:
- 2017-02-27
- Revision:
- 4:85e9057db7a6
- Parent:
- 3:60330a83318b
- Child:
- 5:c3524dc89507
File content as of revision 4:85e9057db7a6:
# # Super light weight command line compile script using mbed-sdk sources. # v0.6 # 2017/02 made by dinau # ########################## # 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 #TARGET ?= NUCLEO_L152RE # GCC_ARM or uARM or ARM TC ?= GCC_ARM # Specify mbed flash drive MBED_DRIVE = /g # Specify mbed root folder: [ "absolute path" or "relative path" ] MBED_ROOT = /d/mbed-os # Specify [ "default" or "debug" or "small" ] PROFILE = default # Verbose display ifeq (${v},1) VERBOSE = -v endif ########################## # Fixed setting. ########################## # Specify "id". This is a fixed constant, don't change it. PROG = MBED_A1 #RTOS = -rtos MACROS = "-D NDEBUG=1" #CFLAGS = "--cflags NDEBUG=1" BUILD_DIR = .build/${TARGET}/${TC} COMFLAG = --color -m ${TARGET} -t ${TC} ${VERBOSE} --profile ${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 lib lst list # clean and make c: 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 # copy to mbed drive f: all cp ${BUILD_DIR}/${notdir ${CURDIR}}.bin ${MBED_DRIVE} # get dependency libraries from web site. lib: @python makelib.py lst: list list: @arm-none-eabi-objdump -Sdh ${BUILD_DIR}/${notdir ${CURDIR}}.elf > ${TARGET}-${TC}.lst