-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
executable file
·60 lines (40 loc) · 1.6 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
EVRYTHNG_MARVELL_SDK_PATH=$(shell pwd)
PROJECT_ROOT=$(shell pwd)
export PROJECT_ROOT
all: demo
include $(PROJECT_ROOT)/config.mk
include common.mk
ifeq ($(BOARD),mw300)
BOARD_BIN_DIR=$(WMSDK_BUNDLE_DIR)/bin/$(BOARD)_defconfig/mw300_rd
else
BOARD_BIN_DIR=$(WMSDK_BUNDLE_DIR)/bin/$(BOARD)_defconfig/$(BOARD)
endif
.PHONY: all demo demo_clean tests tests_clean clean
demo: wmsdk
$(AT)$(MAKE) -C $(WMSDK_BUNDLE_DIR) APP=$(PROJECT_ROOT)/apps/demo XIP=1
demo_clean:
$(AT)$(MAKE) -C $(WMSDK_BUNDLE_DIR) APP=$(PROJECT_ROOT)/apps/demo clean
demo_flashprog: demo
cd $(WMSDK_PATH)/tools/OpenOCD; \
sudo ./flashprog.py --$(BOARD_FW_PARTITION) $(BOARD_BIN_DIR)/evrythng_demo.bin
demo_ramload: demo
cd $(WMSDK_PATH)/tools/OpenOCD; \
sudo ./ramload.py $(BOARD_BIN_DIR)/evrythng_demo.axf
demo_footprint:
$(AT)$(SDK_DIR)/tools/bin/footprint.pl -m $(BOARD_BIN_DIR)/evrythng_demo.map
target_reboot:
cd $(WMSDK_PATH)/tools/OpenOCD; \
sudo ./flashprog.py -r
tests: wmsdk
@cp $(PROJECT_ROOT)/lib/core/tests/tests.c $(PROJECT_ROOT)/apps/tests/src/
@$(PROJECT_ROOT)/lib/core/tests/gen_header.sh $(PROJECT_ROOT)/test_config $(PROJECT_ROOT)/apps/tests/src/evrythng_config.h
$(AT)$(MAKE) -C $(WMSDK_BUNDLE_DIR) APP=$(PROJECT_ROOT)/apps/tests XIP=1
tests_clean:
$(AT)$(MAKE) -C $(WMSDK_BUNDLE_DIR) APP=$(PROJECT_ROOT)/apps/tests clean
tests_ramload: tests
cd $(WMSDK_PATH)/tools/OpenOCD; \
sudo ./ramload.py $(BOARD_BIN_DIR)/evrythng_tests.axf
tests_flashprog: tests
cd $(WMSDK_PATH)/tools/OpenOCD; \
sudo ./flashprog.py --$(BOARD_FW_PARTITION) $(BOARD_BIN_DIR)/evrythng_tests.bin
clean: demo_clean tests_clean wmsdk_clean