-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile.run
49 lines (33 loc) · 1.21 KB
/
Makefile.run
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
# embexp instance index
# ---------------------------------
ifndef EMBEXP_INSTANCE_IDX
export EMBEXP_INSTANCE_IDX=0
endif
# embexp port redirections
# ---------------------------------
export EMBEXP_UART_PORT=$(shell bash -c "echo $$(( 20000 + ($(EMBEXP_INSTANCE_IDX) * 100) ))")
export EMBEXP_GDBS_PORT=$(shell bash -c "echo $$(( 20013 + ($(EMBEXP_INSTANCE_IDX) * 100) ))")
export PROGPLAT_LOAD_ELF_IN=$(PROGPLAT_LOAD_ELF)
# targets for running and debugging
# ---------------------------------
connect:
../EmbExp-Box/interface/remote.py $(PROGPLAT_BOARD) -idx $(EMBEXP_INSTANCE_IDX)
# Ctrl+] mode character
uart:
telnet localhost $(EMBEXP_UART_PORT)
log:
nc localhost $(EMBEXP_UART_PORT)
run debug: $(NAME)
./scripts/run_gdb.py ${GDB} "localhost:$(EMBEXP_GDBS_PORT)" $(NAME) $(BOARDCONFIG) $@
runlog: $(NAME)
./scripts/run_only.py ${GDB} "localhost:$(EMBEXP_GDBS_PORT)" $(NAME) $(BOARDCONFIG) run_exp
@echo "======================="
@echo "======================="
@cat temp/uart.log
runlog_reset: $(NAME)
./scripts/connect_and_run.py
runlog_try: $(NAME)
./scripts/try_run_only.py
cleanuart:
make clean && make runlog && cat temp/uart.log
.PHONY: connect uart log run runlog runlog_reset runlog_try cleanuart