-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
66 lines (51 loc) · 1.29 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
PROJECT_NAME := firmware
.PHONY: open help help-idf build clean flash monitor reconfigure size clobber
default: help
END = \x1b[0m
RED = \x1b[31;01m
GRN = \x1b[32;01m
YEL = \x1b[33;01m
help: Makefile
@echo "$(GRN)Choose a command run:$(END)"
@sed -n 's/^## //p' $< | column -t -s ':' | sed -e 's/^/ /'
@echo
# commented to disable default make build (use idf.py and CMake instead)
# include $(IDF_PATH)/make/project.mk
## open: Open the project in CLion
open:
@if [ -z "$$IDF_PATH" ]; then \
echo "---> Setting up ESP-IDF SDK environment"; \
source .envrc; \
fi
@echo "---> Running CLion"
@/usr/local/bin/clion .
IDF = ${IDF_PATH}/tools/idf.py
## help-idf: print IDF help
help-idf:
@${IDF} --help
## menuconfig: Run "menuconfig" project configuration tool.
menuconfig:
@${IDF} menuconfig
## build: Build the project
build:
@${IDF} build
## clean: Delete build output files from the build directory.
clean:
@${IDF} clean
## flash: Flash the project.
flash:
@${IDF} flash
## monitor: Display serial output.
monitor:
@${IDF} monitor
## reconfigure: Re-run CMake.
reconfigure:
@${IDF} reconfigure
## size: Print basic size information about the app.
size:
@${IDF} size
## clobber: Delete the entire build directory contents.
clobber:
@${IDF} fullclean
@rm -f sdkconfig
@rm -f sdkconfig.old