-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
66 lines (48 loc) · 1.53 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Start: Your configuration!
# Set this to the directory of pyrinas-os
# If you used a symbolic link this points to
# the `pyrinas-os` folder in this repository
OS_DIR := pyrinas-os
# This should be the serial number of your Jlink programmer.
# To find simply run `jlinkexe`
PROG_SERIAL=1234678
# This is your debugger port for Jlink's RTT. If you
# have mulitple, you will have to change this on each app
# your're using
PROG_PORT=19021
# This is where you set your board type. Here are the supported boards:
# xenon - Particle Xenon
BOARD=xenon
# This is where you can name your app something. Make it specific
APP_FILENAME=pyrinas-template
# This determines whether or not you're using debug mode
# Comment this out or change to false
DEBUG=true
# End: Your Configuration
EXPORT_ARGS += \
APP_DIR=$(PWD) \
PROG_SERIAL=$(PROG_SERIAL) \
PROG_PORT=$(PROG_PORT) \
BOARD=$(BOARD) \
APP_FILENAME=$(APP_FILENAME) \
DEBUG=$(DEBUG)
.PHONY: build clean debug erase flash flash_softdevice ota rtt
default: build
build:
@export $(EXPORT_ARGS) && make -C $(OS_DIR) build
clean:
@export $(EXPORT_ARGS) && make -C $(OS_DIR) clean
debug:
@export $(EXPORT_ARGS) && make -C $(OS_DIR) debug
erase:
@export $(EXPORT_ARGS) && make -C $(OS_DIR) erase
flash:
@export $(EXPORT_ARGS) && make -C $(OS_DIR) flash
flash_softdevice:
@export $(EXPORT_ARGS) && make -C $(OS_DIR) flash_softdevice
ota:
@export $(EXPORT_ARGS) && make -C $(OS_DIR) ota
@mkdir -p _ota
@cp $(OS_DIR)/_ota/$(APP_FILENAME)* _ota/
rtt:
@export $(EXPORT_ARGS) && make -C $(OS_DIR) rtt