-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
48 lines (37 loc) · 1.14 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
BUILD_DIR_BASE=build
DEBUG?=ON
SIM?=ON
BASE_PATH=$(PWD)
all:
@echo "Targets:"
@echo " default - builds for the board"
@echo " default-sim - build for simulation environment"
@echo " run - builds and load on target"
clean:
@rm -rf $(BUILD_DIR_BASE)*
.PHONY: default
default:
cmake -S . -B $(BUILD_DIR_BASE) -G Ninja -DPARAM_DEBUG=$(DEBUG); \
cmake --build $(BUILD_DIR_BASE)
.PHONY: default-sim
default-sim:
cmake -S . -B $(BUILD_DIR_BASE) -G Ninja -DPARAM_DEBUG=$(DEBUG) \
-DPARAM_SIM=$(SIM); \
cmake --build $(BUILD_DIR_BASE)
release:
cmake -S . -B $(BUILD_DIR_BASE) -G Ninja; \
cmake --build $(BUILD_DIR_BASE)
run: default
JLinkExe -commanderScript jlink/phigw.jlink
run-release: release
JLinkExe -commanderScript jlink/phigw.jlink
erase:
JLinkExe -commanderScript jlink/phigw-erase.jlink
load-bl:
JLinkExe -commanderScript jlink/phigw-bl.jlink
update-arm:
@rm -rf nuttx-export-10.0.1-arm
@unzip ~/nuttx_ws/nuttx/nuttx-export-10.0.1.zip
@mv nuttx-export-10.0.1 nuttx-export-10.0.1-arm
@cp -r ~/nuttx_ws/apps/include/netutils nuttx-export-10.0.1-arm/include/
@cp -r ~/nuttx_ws/apps/include/fsutils nuttx-export-10.0.1-arm/include/