Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Makefile@5:691576127698, 2017-02-24 (annotated)
- Committer:
- mimi3
- Date:
- Fri Feb 24 22:21:51 2017 +0900
- Revision:
- 5:691576127698
- Child:
- 7:84a0a208ebb2
added: Super light weight command line compile script
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| mimi3 | 5:691576127698 | 1 | # |
| mimi3 | 5:691576127698 | 2 | # Super light weight command line compile script using mbed-sdk sources. |
| mimi3 | 5:691576127698 | 3 | # 2017/02 made by dinau |
| mimi3 | 5:691576127698 | 4 | # |
| mimi3 | 5:691576127698 | 5 | |
| mimi3 | 5:691576127698 | 6 | ########################## |
| mimi3 | 5:691576127698 | 7 | # Defalut setting. These are must be changed according to your environment. |
| mimi3 | 5:691576127698 | 8 | ########################## |
| mimi3 | 5:691576127698 | 9 | TARGET ?= NUCLEO_F030R8 |
| mimi3 | 5:691576127698 | 10 | |
| mimi3 | 5:691576127698 | 11 | # GCC_ARM or uARM or ARM |
| mimi3 | 5:691576127698 | 12 | TC ?= GCC_ARM |
| mimi3 | 5:691576127698 | 13 | |
| mimi3 | 5:691576127698 | 14 | # Specify mbed flash drive |
| mimi3 | 5:691576127698 | 15 | MBED_DRIVE = /g |
| mimi3 | 5:691576127698 | 16 | |
| mimi3 | 5:691576127698 | 17 | # Specify mbed root folder |
| mimi3 | 5:691576127698 | 18 | MBED_ROOT = ../../mbed-sdk |
| mimi3 | 5:691576127698 | 19 | |
| mimi3 | 5:691576127698 | 20 | # Specify [ "default" or "debug" or "small" ] |
| mimi3 | 5:691576127698 | 21 | PROFILE = small |
| mimi3 | 5:691576127698 | 22 | |
| mimi3 | 5:691576127698 | 23 | # Verbose display |
| mimi3 | 5:691576127698 | 24 | #VERBOSE = -v |
| mimi3 | 5:691576127698 | 25 | |
| mimi3 | 5:691576127698 | 26 | ########################## |
| mimi3 | 5:691576127698 | 27 | # Fixed setting. |
| mimi3 | 5:691576127698 | 28 | ########################## |
| mimi3 | 5:691576127698 | 29 | # Specify "id". This is a fixed constant, don't change it. |
| mimi3 | 5:691576127698 | 30 | PROG = MBED_A1 |
| mimi3 | 5:691576127698 | 31 | |
| mimi3 | 5:691576127698 | 32 | #RTOS = -rtos |
| mimi3 | 5:691576127698 | 33 | MACROS = "-D NDEBUG=1" |
| mimi3 | 5:691576127698 | 34 | #CFLAGS = "--cflags NDEBUG=1" |
| mimi3 | 5:691576127698 | 35 | BUILD_DIR = .build/${TARGET}/${TC} |
| mimi3 | 5:691576127698 | 36 | COMFLAG = --color -m ${TARGET} -t ${TC} ${VERBOSE} --profile ${PROFILE} |
| mimi3 | 5:691576127698 | 37 | PROG_NAME = -n ${PROG} |
| mimi3 | 5:691576127698 | 38 | |
| mimi3 | 5:691576127698 | 39 | all: |
| mimi3 | 5:691576127698 | 40 | python ${MBED_ROOT}/tools/build.py -j4 ${COMFLAG} ${RTOS} |
| mimi3 | 5:691576127698 | 41 | python ${MBED_ROOT}/tools/make.py ${COMFLAG} ${PROG_NAME} --build ${BUILD_DIR} --source . |
| mimi3 | 5:691576127698 | 42 | |
| mimi3 | 5:691576127698 | 43 | .PHONY: c f |
| mimi3 | 5:691576127698 | 44 | # clean and make |
| mimi3 | 5:691576127698 | 45 | c: |
| mimi3 | 5:691576127698 | 46 | rm -fr ${BUILD_DIR} |
| mimi3 | 5:691576127698 | 47 | python ${MBED_ROOT}/tools/build.py -j4 ${COMFLAG} ${RTOS} -c |
| mimi3 | 5:691576127698 | 48 | python ${MBED_ROOT}/tools/make.py ${COMFLAG} ${PROG_NAME} --build ${BUILD_DIR} --source . -c |
| mimi3 | 5:691576127698 | 49 | |
| mimi3 | 5:691576127698 | 50 | # copy to mbed drive |
| mimi3 | 5:691576127698 | 51 | f: all |
| mimi3 | 5:691576127698 | 52 | cp ${BUILD_DIR}/${notdir ${CURDIR}}.bin ${MBED_DRIVE} |
| mimi3 | 5:691576127698 | 53 |