DirectSPI test program

Dependencies:   DirectSPI mbed

Committer:
mimi3
Date:
Sat Feb 25 16:11:44 2017 +0900
Revision:
8:e11a0361f57f
Parent:
7:84a0a208ebb2
Child:
9:7dfa4f5adf42
scli: rename lib.py to makelib.py

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mimi3 7:84a0a208ebb2 1 #
mimi3 5:691576127698 2 # Super light weight command line compile script using mbed-sdk sources.
mimi3 8:e11a0361f57f 3 # v0.4
mimi3 5:691576127698 4 # 2017/02 made by dinau
mimi3 5:691576127698 5 #
mimi3 5:691576127698 6
mimi3 5:691576127698 7 ##########################
mimi3 7:84a0a208ebb2 8 # Usage
mimi3 7:84a0a208ebb2 9 ##########################
mimi3 7:84a0a208ebb2 10 # First, download the dependency libraries from web.
mimi3 7:84a0a208ebb2 11 # $ make lib
mimi3 7:84a0a208ebb2 12 # Simple build with default settings.
mimi3 7:84a0a208ebb2 13 # $ make
mimi3 7:84a0a208ebb2 14 # It can be changed to other target or toolchain on command line if necessary.
mimi3 7:84a0a208ebb2 15 # $ make TARGET=NUCLEO_F411RE
mimi3 7:84a0a208ebb2 16 # $ make TC=uARM
mimi3 7:84a0a208ebb2 17 # Write *.bin file to target board.
mimi3 7:84a0a208ebb2 18 # $ make f
mimi3 7:84a0a208ebb2 19 # Clean all object files and rebuild target.
mimi3 7:84a0a208ebb2 20 # $ make c
mimi3 7:84a0a208ebb2 21 # Example, it can be used any combination on command line.
mimi3 7:84a0a208ebb2 22 # $ make c f TARGET=NUCLEO_L152RE TC=uARM
mimi3 7:84a0a208ebb2 23 #
mimi3 7:84a0a208ebb2 24
mimi3 7:84a0a208ebb2 25
mimi3 7:84a0a208ebb2 26 ##########################
mimi3 7:84a0a208ebb2 27 # Defalut setting.
mimi3 7:84a0a208ebb2 28 # These are must be changed according to your environment.
mimi3 5:691576127698 29 ##########################
mimi3 5:691576127698 30 TARGET ?= NUCLEO_F030R8
mimi3 5:691576127698 31
mimi3 5:691576127698 32 # GCC_ARM or uARM or ARM
mimi3 5:691576127698 33 TC ?= GCC_ARM
mimi3 5:691576127698 34
mimi3 5:691576127698 35 # Specify mbed flash drive
mimi3 5:691576127698 36 MBED_DRIVE = /g
mimi3 5:691576127698 37
mimi3 7:84a0a208ebb2 38 # Specify mbed root folder: [ "absolute path" or "relative path" ]
mimi3 7:84a0a208ebb2 39 MBED_ROOT = /d/mbed-os
mimi3 5:691576127698 40
mimi3 5:691576127698 41 # Specify [ "default" or "debug" or "small" ]
mimi3 7:84a0a208ebb2 42 PROFILE = --profile default
mimi3 5:691576127698 43
mimi3 5:691576127698 44 # Verbose display
mimi3 5:691576127698 45 #VERBOSE = -v
mimi3 5:691576127698 46
mimi3 5:691576127698 47 ##########################
mimi3 5:691576127698 48 # Fixed setting.
mimi3 5:691576127698 49 ##########################
mimi3 5:691576127698 50 # Specify "id". This is a fixed constant, don't change it.
mimi3 5:691576127698 51 PROG = MBED_A1
mimi3 5:691576127698 52
mimi3 5:691576127698 53 #RTOS = -rtos
mimi3 5:691576127698 54 MACROS = "-D NDEBUG=1"
mimi3 5:691576127698 55 #CFLAGS = "--cflags NDEBUG=1"
mimi3 5:691576127698 56 BUILD_DIR = .build/${TARGET}/${TC}
mimi3 7:84a0a208ebb2 57 COMFLAG = --color -m ${TARGET} -t ${TC} ${VERBOSE} ${PROFILE}
mimi3 5:691576127698 58 PROG_NAME = -n ${PROG}
mimi3 5:691576127698 59
mimi3 7:84a0a208ebb2 60 ##########################
mimi3 7:84a0a208ebb2 61 # Make target
mimi3 7:84a0a208ebb2 62 ##########################
mimi3 5:691576127698 63 all:
mimi3 5:691576127698 64 python ${MBED_ROOT}/tools/build.py -j4 ${COMFLAG} ${RTOS}
mimi3 5:691576127698 65 python ${MBED_ROOT}/tools/make.py ${COMFLAG} ${PROG_NAME} --build ${BUILD_DIR} --source .
mimi3 5:691576127698 66
mimi3 7:84a0a208ebb2 67 .PHONY: c f lib
mimi3 5:691576127698 68 # clean and make
mimi3 5:691576127698 69 c:
mimi3 5:691576127698 70 rm -fr ${BUILD_DIR}
mimi3 5:691576127698 71 python ${MBED_ROOT}/tools/build.py -j4 ${COMFLAG} ${RTOS} -c
mimi3 5:691576127698 72 python ${MBED_ROOT}/tools/make.py ${COMFLAG} ${PROG_NAME} --build ${BUILD_DIR} --source . -c
mimi3 5:691576127698 73
mimi3 5:691576127698 74 # copy to mbed drive
mimi3 5:691576127698 75 f: all
mimi3 5:691576127698 76 cp ${BUILD_DIR}/${notdir ${CURDIR}}.bin ${MBED_DRIVE}
mimi3 5:691576127698 77
mimi3 7:84a0a208ebb2 78 # get dependency libraries from web site.
mimi3 7:84a0a208ebb2 79 lib:
mimi3 8:e11a0361f57f 80 @python makelib.py